Advertisement
akbare

daily hunting quest

Dec 27th, 2021
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.68 KB | None | 0 0
  1. //======Name========================================
  2. // Daily Monster Hunt
  3. //======Version=====================================
  4. // 1.2
  5. //======Author(s)===================================
  6. // Sandbox
  7. //======Comments====================================
  8. // This NPC allows your player to hunt a random amount
  9. // of a random monster, within a random time
  10. // *randomception!*
  11. // If the player successfully hunts the monster
  12. // within the time limit, he'll receive a reward!
  13. //======Credits=====================================
  14. // KeyWorld, nanakiwurtz, NeoMind, Kido
  15. // Thanks for helping me out guize!
  16. //==================================================
  17.  
  18. prontera,141,171,3 script Daily Hunting 869,{
  19.  
  20. mes "[Daily Hunting]";
  21. if(Hunter) {
  22. mes "You have killed ^880000"+HuntCount+"^000000/^0000FF"+Amt+"^000000 "+getmonsterinfo(Hunt,0)+"s, keep it up!";
  23. mes " ";
  24. //mes "Pay ^FF000050.000 Zeny^000000 to ^0000FFReset Quest^000000";
  25. mes "Pay ^FF0000300.000 Zeny^000000 to ^0000FFComplete Quest^000000";
  26.  
  27. menu //"Reset Quest 50.000Z",Lreset,
  28. "Complete Quest ^FF0000300.000Z^000000",LComplete;
  29.  
  30. }
  31. if(gettimetick(2) < HuntDelay) {
  32. mes "You can only do this quest once a day!";
  33. mes " ";
  34. mes "Pay ^FF000050.000 Zeny^000000 to ^0000FFReset Quest^000000";
  35.  
  36. menu "Reset Quest ^FF000050.000Z^000000",Lreset;
  37. }
  38.  
  39. mes "Hello, do you want to take on the Monster Daily Hunting?","I will give you Challenge to kill amount of a monster, and you'll receive a reward!";
  40. next;
  41. mes "Requirement ^FF0000Level 50^000000.";
  42. mes "Mission kill ^FF000040 Zombie Prisoners^000000.";
  43. if(select("Take a Mission!:Leave it?")==2) {
  44. mes "[Daily Hunting]";
  45. mes "Fine!";
  46. close;
  47. }
  48. next;
  49. if (BaseLevel <= 50) goto noob;
  50. mes "[Daily Hunting]";
  51. Hunt = .Mob_List[rand(getarraysize(.Mob_List))];
  52. Time = 86400000; //Timer
  53. Amt = rand (40,40); //Amount of mob to hunt
  54. Hunter++;
  55.  
  56. mes "You have to hunt ^0000FF"+Amt+" "+getmonsterinfo(Hunt,0)+"^000000!";
  57. mes "Go go go!";
  58. close2;
  59. //showdigit Time,3;
  60. HuntDelay = gettimetick(2)+86400; //Once a day only.
  61. HuntStart = gettimetick(2)+Time;
  62. setquest 80001;
  63. //sleep2 1000*Time;
  64. //if(Hunter) dispbottom strnpcinfo(1)+": I'm sorry, you didn't make it!";
  65. //HuntStart = 0; //Reset all variables
  66. //Hunt = 0;
  67. //Hunter = 0;
  68. //HuntCount = 0;
  69. //Time = 0;
  70. //Amt = 0;
  71. end;
  72.  
  73. Lreset:
  74. if (Zeny <= 50000) goto S_NoZeny;
  75. mes "Reset";
  76. HuntDelay = 0;
  77. erasequest 80001;
  78. set Zeny,Zeny-50000;
  79. dispbottom strnpcinfo(1)+": Congratulations! Your Daily has been reset!";
  80. close;
  81.  
  82. LComplete:
  83. if (Zeny <= 300000) goto S_NoZeny;
  84. mes "Complete";
  85. dispbottom strnpcinfo(1)+": Congratulations! Your Daily has been Complete!";
  86. getitem .Reward,.RewAmt;
  87. completequest 80001;
  88. HuntStart = 0;
  89. Hunt = 0;
  90. Hunter = 0;
  91. HuntCount = 0;
  92. Time = 0;
  93. Amt = 0;
  94. showdigit 1,3;
  95. set Zeny,Zeny-300000;
  96. close;
  97.  
  98. S_NoZeny:
  99. mes "You need more zeny";
  100. close;
  101.  
  102. noob:
  103. mes "Need more level";
  104. close;
  105. //----------Config----------
  106.  
  107. OnInit:
  108. .Npc_Name$ = "[^0000FF NPC ^000000]";
  109. setarray .Mob_List[0],1197; //Mobs to hunt. Default: Poring, Fabre, Lunatic
  110. .Reward = 51013; //Reward ID
  111. .RewAmt = 1; //Reward Amount
  112. end;
  113.  
  114. OnNPCKillEvent:
  115. if(Hunter >= 0) {
  116. if(gettimetick(2) < HuntStart) {
  117. if(killedrid == Hunt) {
  118. HuntCount++;
  119. dispbottom "You have killed "+HuntCount+"/"+Amt+" "+getmonsterinfo(Hunt,0)+"s, keep it up!";
  120. if(HuntCount >= Amt) {
  121. dispbottom strnpcinfo(1)+": Congratulations! You did it!";
  122. getitem .Reward,.RewAmt;
  123. HuntStart = 0;
  124. Hunt = 0;
  125. Hunter = 0;
  126. HuntCount = 0;
  127. Time = 0;
  128. Amt = 0;
  129. showdigit 1,3;
  130. }
  131. }
  132. }
  133. }
  134. end;
  135. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement