Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. prontera,147,157,0 script Mission points 861,{
  2. mes .NPC$;
  3. mes "Do you want to exchange your Mission points to " + getitemname(.ID) + "?";
  4. mes "The conversion rate is " + .NP + " for 1 " + getitemname(.ID) + ".";
  5. next;
  6. if (select("Yes:No") - 1) close;
  7. mes .NPC$;
  8. mes "How many " + getitemname(.ID) + " do you want?";
  9. next;
  10. input .@amount;
  11. if (.@amount == 0) {
  12. mes .NPC$;
  13. mes "Umm, you want 0" + getitemname(.ID) + "?...";
  14. close;
  15. }
  16. .@amount2 = (.@amount * .NP);
  17. .@points = (#Mission_Points);
  18. if (.@amount2 > .@points) {
  19. mes .NPC$;
  20. mes "You do not have enough points!";
  21. close;
  22. }
  23. if (#Mission_Points == 0) {
  24. mes .NPC$;
  25. mes "You have 0 mission points!";
  26. close;
  27. }
  28. mes .NPC$;
  29. mes "Here you go!";
  30. set #Mission_Points,#Mission_Points - .@amount2;
  31. getitem .ID,.@amount;
  32. close;
  33.  
  34. OnInit:
  35. set .NPC$,"[ " +strnpcinfo(1)+ " ]"; // NPC Name
  36. set .ID,7227; // Item to give
  37. set .NP,50; // Amount of points needed for one of the item
  38. end;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement