Emistry

[RO] Max Refiner - one-click

Mar 16th, 2016
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. prontera,155,175,5 script Sample#npc 4_F_KAFRA9,{
  2. .@item_id = 7539;
  3. .@amount = 1000;
  4. .@max_refine = 10;
  5.  
  6. if ( countitem( .@item_id ) < .@amount ) {
  7. mes "not enough items.";
  8. }
  9. else {
  10. for ( .@i = EQI_HEAD_TOP; .@i <= EQI_SHOES; .@i++ )
  11. if ( getequipid( .@i ) != -1 ) {
  12. .@refine = getequiprefinerycnt( .@i );
  13. if ( .@refine < .@max_refine ) {
  14. successrefitem .@i,( .@max_refine - .@refine );
  15. .@refine_count++;
  16. }
  17. }
  18.  
  19. if ( .@refine_count )
  20. delitem .@item_id,.@amount;
  21.  
  22. mes "done";
  23. }
  24. close;
  25. }
Add Comment
Please, Sign In to add comment