core.txt 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. event.load("human_hurt");
  2. event.load("entity_click");
  3. event.load("inv_click");
  4. msg("dev", "§bQuests: §rSpawn loaded.");
  5. @wait
  6. wait();
  7. ignoreGoto(event);
  8. goto("wait");
  9. @human_hurt
  10. if(!isPlayer(entity)) {
  11. goto("wait");
  12. }
  13. player = entity;
  14. entity = human;
  15. goto("human_core");
  16. @entity_click
  17. if(hand == "OFF_HAND") {
  18. goto("wait");
  19. }
  20. if(entity.getType(entity) != "human") {
  21. goto("wait");
  22. }
  23. goto("human_core");
  24. @human_core
  25. if(player.hasQuest2(player)) {
  26. goto("wait");
  27. }
  28. entity_name = entity.getName(entity);
  29. if(entity_name == "Tutorial") {
  30. /*script = script.start("story/spawn/tutorial", "utils/u_quest", "utils/u_general");
  31. if(script == null) {
  32. waitfor(1);
  33. msg("dev", "quest waitfor");
  34. }
  35. quest.addPlayer(script, player);
  36. script.setVar(script, "player", player);
  37. script.setVar(script, "script", script);
  38. script.setVar(script, "quest_player_uuid", player.getUuid(player));
  39. script.callEvent("quest_start", script);*/
  40. msg(player, "Coming soon");
  41. goto("wait");
  42. }
  43. if(entity_name == "Marvin") {
  44. script = script.start("story/spawn/findmentos", "utils/u_quest", "utils/u_general");
  45. if(script == null) {
  46. waitfor(1);
  47. msg("dev", "quest waitfor");
  48. }
  49. quest.addPlayer(script, player);
  50. script.setVar(script, "player", player);
  51. script.setVar(script, "script", script);
  52. script.setVar(script, "quest_player_uuid", player.getUuid(player));
  53. script.callEvent("quest_start", script);
  54. goto("wait");
  55. }
  56. goto("wait");