Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prontera,155,181,5 script Sample#refine 757,{
- mes "What to refine ?";
- for( set .@i,1; .@i <= 10; set .@i,.@i + 1 )
- set .@Menu$,.@Menu$ + (( getequipid(.@i) <= 0 || !getequipisenableref(.@i) )?"":getitemname( getequipid(.@i) ) )+":";
- set .@i,select( .@Menu$ );
- if( getequiprefinerycnt(.@i) >= 10 ){
- mes "You cant refine this anymore.";
- }else{
- mes "To refine this..you need "+.Amount[ getequiprefinerycnt(.@i) ]+" "+getitemname( .ItemID );
- if( select("Refine:Cancel") == 1 )
- if( countitem( .ItemID ) < .Amount[ getequiprefinerycnt(.@i) ] ){
- mes "You dont have enought items.";
- }else if( getequippercentrefinery( .@i ) < rand(100) ){
- delitem .ItemID,.Amount[ getequiprefinerycnt(.@i) ];
- mes "Failed to refine..and receive 1 cash points.";
- set #CASHPOINTS,#CASHPOINTS + 1;
- failedrefitem .@i;
- }else{
- delitem .ItemID,.Amount[ getequiprefinerycnt(.@i) ];
- mes "Success";
- successrefitem .@i;
- }
- }
- close;
- OnInit:
- set .ItemID,512;
- setarray .Amount[0],50,70,90,100,120,150,180,400,1000;
- end;
- }
Advertisement
Add Comment
Please, Sign In to add comment