findmentos.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. event.load("human_hurt");
  2. event.load("entity_click");
  3. event.load("custom_command");
  4. event.load("quest_start");
  5. event.load("quest_term");
  6. stage = 0;
  7. all_stages = 4;
  8. quest_name = "Find Mentos";
  9. @wait
  10. wait();
  11. if(event == "human_hurt") {
  12. player = entity;
  13. }
  14. if(quest_player_uuid == player.getUuid(player)) {
  15. ignoreGoto(event);
  16. }
  17. goto("wait");
  18. @quest_start
  19. msg.quest(player, "Marvin", 1, 3, "Have you seen Mentos? He has been missing for days.");
  20. stage.increase(player);
  21. goto("wait");
  22. @quest_term
  23. goto("wait");
  24. @human_hurt
  25. player = entity;
  26. entity = human;
  27. goto("human_core");
  28. @entity_click
  29. if(hand == "OFF_HAND") {
  30. goto("wait");
  31. }
  32. if(entity.getType(entity) != "human") {
  33. goto("wait");
  34. }
  35. goto("human_core");
  36. @human_core
  37. entity_name = entity.getName(entity);
  38. if(entity_name == "Marvin") {
  39. if(stage == 1) {
  40. msg.quest(player, entity_name, 2, 3, "The last time I saw him he said he was going to hunt a unicorn.");
  41. stage.increase(player);
  42. } elseif(stage == 2) {
  43. msg.quest(player, entity_name, 3, 3, "He told me, that if necessary, he spends the night in a cave near the Stone Mage's tower.");
  44. stage.increase(player);
  45. }
  46. goto("wait");
  47. }
  48. if(entity_name == "Mentos") {
  49. if(stage == 3) {
  50. msg(player, "§dQuest completed. Reward: 5 Coins!");
  51. addMoney(player, 4);
  52. quest.finish(script, player);
  53. }
  54. }
  55. goto("wait");