Advertisement
Guest User

RewardManager

a guest
Jan 2nd, 2013
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. // ===================================================
  2. // = Reward Manager Script 1.0
  3. // = Kindly VOTE UP MY POST XD
  4. // = Script By: [Anubis]
  5. // = rAthena SVN
  6. // ===================================================
  7. // ===================================================
  8. quiz_02,355,345,6 script RewardManager 100,{ // restrict any kind of warp to the NPC to avoid abuses.
  9. // ========== [ CONFIGURTION ] =======================
  10.  
  11. set .npcName$,"[ RewardManager ]";
  12. set .adminMenu,70;
  13.  
  14. // ========== [ MAIN SCRIPT ] ========================
  15.  
  16. if (getgroupid() >= .adminMenu) {
  17. mes .npcName$;
  18. mes "Hello GM " +strcharinfo(0)+",";
  19. mes "Would you like to modify the item reward ID and Reward Amount?";
  20. next;
  21. switch(select("Yes:No")) {
  22. case 1:
  23. L_adminMenu:
  24. mes .npcName$;
  25. mes "What do you want to do?";
  26. mes "The current reward is ^FF0000" + $amountPrize + "^000000x ^FF0000" + getitemname($prizeID) +"^000000."; next;
  27. switch(select("Change Item Reward:Change Reward Amount:Nothing")) {
  28. case 1:
  29. mes .npcName$;
  30. mes "Please input the Reward Item ID.";
  31. next;
  32. input $prizeID; goto L_adminMenu;
  33.  
  34. case 2:
  35. mes .npcName$;
  36. mes "Please input the Amount of Reward.";
  37. next;
  38. input $amountPrize; goto L_adminMenu;
  39. case 3:
  40. mes .npcName$;
  41. mes "Okay GM " +strcharinfo(0)+",";
  42. mes "I hope to see you again next time.";
  43. close;
  44. }
  45. case 2:
  46. mes .npcName$;
  47. mes "Okay GM " +strcharinfo(0)+",";
  48. mes "I hope to see you again next time.";
  49. close;
  50. }
  51. }
  52.  
  53. mes .npcName$;
  54. mes "Hello " +strcharinfo(0)+",";
  55. mes "I am the RewardManager.";
  56. mes "What do you want to do?";
  57. next;
  58. switch(select("Event Reward?:Claim Reward:Exit")) {
  59. case 1:
  60. mes .npcName$;
  61. mes "Hello again " +strcharinfo(0)+",";
  62. mes "The current reward is " + $amountPrize + "x " + getitemname($prizeID) +".";
  63. close;
  64. case 2:
  65. mes .npcName$;
  66. mes "What is your name?";
  67. input .name$;
  68. next;
  69. if(strcharinfo(0) != .name$) {
  70. mes .npcName$;
  71. mes "Sorry but I dont see your name in our record.";
  72. close;
  73. } else if (@x_claimed == 1) {
  74. mes .npcName$;
  75. mes "You already recieved your reward.";
  76. close; } else {
  77. mes .npcName$;
  78. mes "Congratulations " +strcharinfo(0)+",";
  79. mes "Here is your reward ~!";
  80. getitem $prizeID, $amountPrize;
  81. set @x_claimed, 1;
  82. close; }
  83.  
  84. case 3:
  85. warp "prontera",150,150;
  86. set @x_claimed, 0;
  87. end;
  88. }
  89.  
  90. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement