npc_test_quest.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //===== rAthena Script =======================================
  2. //= Sample: Quest Test
  3. //===== By: ==================================================
  4. //= Akkarin
  5. //===== Last Updated: ========================================
  6. //= 20121227
  7. //===== Description: =========================================
  8. //= Demonstrates quest commands.
  9. //============================================================
  10. // Before installing an NPC like the one below, you would
  11. // need to add the quest to /db/quest_db.txt - e.g:
  12. // 70000,0,1002,3,0,0,0,0,"3 Splats Please!"
  13. prontera,90,95,1 script Jelly 123,{
  14. if(checkquest(70000) == -1) { // Quest not yet started.
  15. mes "[Jelly]";
  16. mes "Hey there! Would you help me?";
  17. next;
  18. switch(select("I'd rather not:What's up?")){
  19. case 1:
  20. mes "[Jelly]";
  21. mes "I didn't want your help anyway!";
  22. close;
  23. case 2:
  24. mes "[Jelly]";
  25. mes "Those Porings are weirding me out.";
  26. mes "Would you kill 3 for me?";
  27. setquest 70000; // Adds the quest to your Quest Window.
  28. close;
  29. }
  30. } else if(checkquest(70000,HUNTING) == 2) { // All monsters killed.
  31. mes "[Jelly]";
  32. mes "Awesome! Thank you!";
  33. getexp 10000,0;
  34. dispbottom "You have been rewarded with 10,000 Base Exp.";
  35. completequest 70000; // Sets quest status to "complete".
  36. close;
  37. } else if(checkquest(70000) == 1) { // Quest is active.
  38. mes "[Jelly]";
  39. mes "Keep going, almost there!";
  40. close;
  41. } else if(checkquest(70000) == 2) { // Quest finished.
  42. mes "[Jelly]";
  43. mes "Thanks again for doing that for me!";
  44. close;
  45. }
  46. }