Advertisement
Guest User

Untitled

a guest
Aug 15th, 2021
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.63 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,100,200,3 script Hunting Challenge 78,{
  19.  
  20. mes .Npc_Name$;
  21. if(Hunter) {
  22. mes "You have killed ^880000"+HuntCount+"^000000/^0000FF"+Amt
  23.  
  24. +"^000000 "+getmonsterinfo(Hunt,0)+"s, keep it up!";
  25. close;
  26. }
  27. if(gettimetick(2) < HuntDelay) {
  28. mes "You can only do this quest once a day!";
  29. close;
  30. }
  31.  
  32. mes "Hello, do you want to take on the Monster Hunting Challenge?","I will give you a random time limit to kill a random amount of a monster, If you manage to kill them within the given time, you'll receive a reward!";
  33. if(select("Bring it on!:How about no?")==2) {
  34. mes .Npc_Name$;
  35. mes "Fine!";
  36. close;
  37. }
  38.  
  39. next;
  40. mes .Npc_Name$;
  41. Hunt = .Mob_List[rand(getarraysize(.Mob_List))];
  42. Time = rand(60,99); //Timer
  43. Amt = rand (50,100); //Amount of mob to hunt
  44. Hunter++;
  45.  
  46. mes "You have to hunt ^0000FF"+Amt+" "+getmonsterinfo(Hunt,0)+"^000000 in ^AA0000"+Time+"^000000 seconds!";
  47. next;
  48. mes .Npc_Name$;
  49. mes "Go go go!";
  50. close2;
  51. showdigit Time,3;
  52. HuntDelay = gettimetick(2)+86400; //Once a day only.
  53. HuntStart = gettimetick(2)+Time;
  54. sleep2 1000*Time;
  55. if(Hunter) dispbottom strnpcinfo(1)+": I'm sorry, you didn't make it!";
  56. HuntStart = 0; //Reset all variables
  57. Hunt = 0;
  58. Hunter = 0;
  59. HuntCount = 0;
  60. Time = 0;
  61. Amt = 0;
  62. end;
  63.  
  64.  
  65. //----------Config----------
  66.  
  67. OnInit:
  68. .Npc_Name$ = "[^0000FF NPC ^000000]";
  69. setarray .Mob_List[0],1002,1007,1063; //Mobs to hunt. Default: Poring, Fabre, Lunatic
  70. .Reward = 607; //Reward ID
  71. .RewAmt = 10; //Reward Amount
  72. end;
  73.  
  74. OnNPCKillEvent:
  75. if(Hunter > 0) {
  76. if(gettimetick(2) < HuntStart) {
  77. if(killedrid == Hunt) {
  78. HuntCount++;
  79. dispbottom "You have killed "+HuntCount+"/"+Amt+" "+getmonsterinfo(Hunt,0)+"s, keep it up!";
  80. if(HuntCount >= Amt) {
  81. dispbottom strnpcinfo(1)+": Congratulations! You did it!";
  82. getitem .Reward,.RewAmt;
  83. HuntStart = 0;
  84. Hunt = 0;
  85. Hunter = 0;
  86. HuntCount = 0;
  87. Time = 0;
  88. Amt = 0;
  89. showdigit 1,3;
  90. }
  91. }
  92. }
  93. }
  94. end;
  95. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement