yuhsing

Untitled

Nov 9th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1.  
  2. prontera,155,181,5 script Sample#exchange 757,{
  3. mes "Hi , "+strcharinfo(0)+" i can exchange your ^FF0000Poring Points^000000 for items.";
  4. next;
  5. mes "You have "+@Poring_Points+" Points. You've killed a total of "+( @Poring_Points / .Points )+" Poring.";
  6. mes "What would you like to exchange for ?";
  7. next;
  8. for( set .@i,0; .@i < getarraysize( .ItemID ); set .@i,.@i + 1 )
  9. set .@Menu$,.@Menu$ + "[ "+.Cost[.@i]+" P ] "+.Amount[.@i]+" x "+getitemname( .ItemID[.@i] )+":";
  10. set .@i,( select( .@Menu$ ) - 1 );
  11. mes "You have selected ^FF0000"+getitemname( .ItemID[.@i] )+"^000000";
  12. mes "[ Cost : "+.Cost[.@i]+" Points ] ";
  13. mes .Amount[.@i]+" x "+getitemname( .ItemID[.@i] );
  14. if( @Poring_Points >= .Cost[.@i] ){
  15. if( select("Exchange:Cancel") == 1 ){
  16. getitem .ItemID[.@i],.Amount[.@i];
  17. set @Poring_Points,@Poring_Points - .Cost[.@i];
  18. }
  19. }else{
  20. mes "But, you dont have enough Points...";
  21. }
  22. close;
  23.  
  24. OnInit:
  25. // Mob ID + Points Reward
  26. set .MobID,1002;
  27. set .Points,2;
  28. // Item Exchange + Amount
  29. setarray .ItemID[0],607,608,512;
  30. setarray .Amount[0],1,2,3;
  31. setarray .Cost[0],2,4,6;
  32. end;
  33.  
  34. OnNPCKillEvent:
  35. if( killedrid == .MobID ){
  36. set @Poring_Points,@Poring_Points + .Points;
  37. dispbottom "[ Point Reward ] Gained "+.Points+" Points. Total : "+@Poring_Points+" Points.";
  38. }
  39. end;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment