1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- event.load("human_hurt");
- event.load("entity_click");
- event.load("custom_command");
- event.load("quest_start");
- event.load("quest_term");
- stage = 0;
- all_stages = 4;
- quest_name = "Find Mentos";
- @wait
- wait();
- if(event == "human_hurt") {
- player = entity;
- }
- if(quest_player_uuid == player.getUuid(player)) {
- ignoreGoto(event);
- }
- goto("wait");
- @quest_start
- msg.quest(player, "Marvin", 1, 3, "Have you seen Mentos? He has been missing for days.");
- stage.increase(player);
- goto("wait");
- @quest_term
- goto("wait");
- @human_hurt
- player = entity;
- entity = human;
- goto("human_core");
- @entity_click
- if(hand == "OFF_HAND") {
- goto("wait");
- }
- if(entity.getType(entity) != "human") {
- goto("wait");
- }
- goto("human_core");
- @human_core
- entity_name = entity.getName(entity);
- if(entity_name == "Marvin") {
- if(stage == 1) {
- msg.quest(player, entity_name, 2, 3, "The last time I saw him he said he was going to hunt a unicorn.");
- stage.increase(player);
- } elseif(stage == 2) {
- 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.");
- stage.increase(player);
- }
- goto("wait");
- }
- if(entity_name == "Mentos") {
- if(stage == 3) {
- msg(player, "§dQuest completed. Reward: 5 Coins!");
- addMoney(player, 4);
- quest.finish(script, player);
- }
- }
- goto("wait");
|