yuhsing

Untitled

Nov 17th, 2012
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1.  
  2. prontera,155,181,5 script Sample#refine 757,{
  3. mes "What to refine ?";
  4. for( set .@i,1; .@i <= 10; set .@i,.@i + 1 )
  5. set .@Menu$,.@Menu$ + (( getequipid(.@i) <= 0 || !getequipisenableref(.@i) )?"":getitemname( getequipid(.@i) ) )+":";
  6. set .@i,select( .@Menu$ );
  7. if( getequiprefinerycnt(.@i) >= 10 ){
  8. mes "You cant refine this anymore.";
  9. }else{
  10. mes "To refine this..you need "+.Amount[ getequiprefinerycnt(.@i) ]+" "+getitemname( .ItemID );
  11. if( select("Refine:Cancel") == 1 )
  12. if( countitem( .ItemID ) < .Amount[ getequiprefinerycnt(.@i) ] ){
  13. mes "You dont have enought items.";
  14. }else if( getequippercentrefinery( .@i ) < rand(100) ){
  15. delitem .ItemID,.Amount[ getequiprefinerycnt(.@i) ];
  16. mes "Failed to refine..and receive 1 cash points.";
  17. set #CASHPOINTS,#CASHPOINTS + 1;
  18. failedrefitem .@i;
  19. }else{
  20. delitem .ItemID,.Amount[ getequiprefinerycnt(.@i) ];
  21. mes "Success";
  22. successrefitem .@i;
  23. }
  24. }
  25. close;
  26.  
  27. OnInit:
  28. set .ItemID,512;
  29. setarray .Amount[0],50,70,90,100,120,150,180,400,1000;
  30. end;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment