Advertisement
Guest User

Untitled

a guest
Jun 16th, 2016
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 KB | None | 0 0
  1. //===== Hercules Script ===================================
  2. //===== By ===================================================
  3. //== True Zeal =========================================
  4. //===== Description =======================================
  5. //== Daily Quest
  6. //===== Comments ==========================================
  7. //== good luck
  8. //=========================================================
  9.  
  10. prontera,150,150,3 script Daily Quest 4_M_ALCHE_E,{
  11.  
  12. //----- Configuration --------------------------------------
  13. // Sets the name of the NPC in dialogue screens
  14. .@name$ = "[Daily Quest]";
  15.  
  16. // Sets the ItemID# of the prize/reward
  17. set .reward,7227;
  18.  
  19. // Sets the amount of item listed above to give in reward
  20. set .rewardamount,1;
  21.  
  22. // Don't worry about this, just used to display amount of items required
  23. set @randomcount1,countitem(L_DailyLolz1);
  24. set @randomcount2,countitem(L_DailyLolz1);
  25. set @randomcount3,countitem(L_DailyLolz1);
  26.  
  27. L_Menu:
  28. if (L_SetDailyQuest == 0) {
  29. mes .@name$;
  30. mes "Would you like a quest?";
  31. next;
  32. menu "Yes",-,"No",L_Close;
  33. mes .@name$;
  34. mes "Okay then, I want you to collect the following items for me:";
  35. next;
  36.  
  37. // Sets the random item numbers
  38. set L_Random1,rand(9,16);
  39. set L_Random2,rand(100,221);
  40. set L_Random3,rand(100,221);
  41.  
  42. // Sets which card to randomly choose.
  43. // Replace 4001, 4002, etc. with the ones you want
  44. setarray .@ItemID1,4001,4002,4003,4004;
  45.  
  46. // Sets item 2 option
  47. setarray .@ItemID2,501,502,503,503;
  48.  
  49. // Sets item 3 option
  50. setarray .@ItemID3,504,505,506,507;
  51.  
  52. // This function randomly picks an item from the list above, corresponding to its thing
  53. set .@ItemName1,rand( getarraysize(.@ItemID1) );
  54. set .@ItemName2,rand( getarraysize(.@ItemID2) );
  55. set .@ItemName3,rand( getarraysize(.@ItemID3) );
  56.  
  57. // Sets the random item to save to your character (sorry I've given up explaining now lol)
  58. set L_DailyLolz1,.@ItemName1;
  59. set L_DailyLolz2,.@ItemName2;
  60. set L_DailyLolz3,.@ItemName3;
  61.  
  62. // Makes it impossible to return to this screen once quest is active
  63. set L_SetDailyQuest,1;
  64.  
  65. mes .@name$;
  66. mes "" + L_Random1 + "x " + getitemname(.@ItemName1) + "";
  67. mes "" + L_Random2 + "x " + getitemname(.@ItemName2) + "";
  68. mes "" + L_Random3 + "x " + getitemname(.@ItemName3) + "";
  69. next;
  70. mes .@name$;
  71. mes "Good luck!";
  72. close;
  73.  
  74. }
  75.  
  76. else {
  77. mes .@name$;
  78. mes "You already have a quest!";
  79. next;
  80. switch(select("Claim Reward:Cancel")) {
  81. case 1:
  82. mes .@name$;
  83. mes "You need the following items:";
  84. mes "" + L_Random1 + "x " + getitemname(L_DailyLolz1) + "";
  85. mes "" + L_Random2 + "x " + getitemname(L_DailyLolz2) + "";
  86. mes "" + L_Random3 + "x " + getitemname(L_DailyLolz3) + "";
  87. next;
  88. switch(select("Turn in items:Cancel")) {
  89. case 1:
  90. if (countitem(L_DailyLolz1) >= L_Random1 && countitem(L_DailyLolz2) >= L_Random2 && countitem(L_DailyLolz3) >= L_Random3) {
  91. mes .@name$;
  92. mes "Let me see...";
  93. next;
  94. delitem L_DailyLolz1,L_Random1;
  95. delitem L_DailyLolz2,L_Random2;
  96. delitem L_DailyLolz3,L_Random3;
  97. getitem .reward,.rewardamount;
  98. set L_DailyLolz1,0;
  99. set L_DailyLolz2,0;
  100. set L_DailyLolz3,0;
  101. set L_Random1,0;
  102. set L_Random2,0;
  103. set L_Random3,0;
  104. set L_SetDailyQuest,0;
  105. next;
  106. mes .@name$;
  107. mes "Well done!";
  108. close;
  109. }
  110. else {
  111. mes .@name$;
  112. mes "You don't have all the required items!";
  113. next;
  114. mes "You still need:";
  115. mes "" + L_Random1-@randomcount1 + "x " + getitemname(L_DailyLolz1) + "";
  116. mes "" + L_Random2-@randomcount2 + "x " + getitemname(L_DailyLolz2) + "";
  117. mes "" + L_Random3-@randomcount3 + "x " + getitemname(L_DailyLolz3) + "";
  118. close;
  119. }
  120. break;
  121.  
  122. case 2:
  123. close;
  124. break;
  125.  
  126. }
  127. break;
  128.  
  129. case 2:
  130. close;
  131. break;
  132.  
  133. }
  134.  
  135. }
  136.  
  137. L_Close:
  138. close;
  139. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement