123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- event.load("human_hurt");
- event.load("entity_click");
- event.load("custom_command");
- event.load("quest_start");
- event.load("quest_term");
- stage = 0;
- all_stages = 21;
- quest_name = "Tutorial";
- kölsch = read.item("{id:\"minecraft:player_head\",Count:1b,tag:{SkullOwner:{Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDE2OGI5ODA5OGEwYzRhMjllMjA0NjcwNDYzMDkxZGI2MDcwZTc3ZDg2NzY5ZDk4NWY2YmVmNDA3NWU1In19fQ==\"}]},Id:\"c937a96b-cdbc-4fd1-8a19-e3fa9eadf313\"},display:{Name:'{\"text\":\"§r§eKölsch\"}'}}}");
- @wait
- wait();
- if(event == "human_hurt") {
- player = entity;
- }
- if(quest_player_uuid == player.getUuid(player)) {
- ignoreGoto(event);
- }
- goto("wait");
- @quest_start
- msg.quest(player, "Tutorial", 1, 3, "Welcome to our fat world full of chocolate!");
- stage.increase(player);
- goto("wait");
- @quest_term
- goto("wait");
- @custom_command
- if(command == "questanswer") {
- number = list.getIndex(args, 0);
- speaker = list.getIndex(args, 1);
- if(stage == 5) {
- if(number == 1000) {
- msg(player, "[§b2§r/§b5§r] §a", speaker, " §r| §eFirst rule about rules. Don't talk about rules. No joke. There are no rules. But you can read our funny ", text.hover(text.link("§bFake Rules", "https://minecraft.hammerle.me/?site=rules"), "Click me"), ".");
- stage.increase(player);
- } elseif(number == 1001) {
- msg(player, "[§b2§r/§b5§r] §a", speaker, " §r| §eAlways those useless developers! Has he also told you to learn all server rules by heart? Don't trust him! We have no rules. There are just a bunch of funny ", text.hover(text.link("§bFake Rules", "https://minecraft.hammerle.me/?site=rules"), "Click me"), ".");
- stage.increase(player);
- }
- goto("wait");
- }
- if(stage == 11) {
- if(number == 1002) {
- msg.quest(player, speaker, 2, 3, "There you go. Marvin should enjoy it!");
- safeGiveItemPlayer(player, kölsch);
- stage.increase(player);
- } elseif(number == 1003) {
- msg.quest(player, speaker, 2, 3, "There you go. You may have heard about Marvin?");
- safeGiveItemPlayer(player, kölsch);
- safeGiveItemPlayer(player, kölsch);
- safeGiveItemPlayer(player, kölsch);
- safeGiveItemPlayer(player, read.item("minecraft:apple"));
- stage.increase(player);
- }
- goto("wait");
- }
- if(stage == 15) {
- if(number == 1004) {
- msg.quest(player, speaker, 2, 6, "I see. I see.");
- player.removeItem(player, kölsch);
- stage.increase(player);
- } elseif(number == 1005) {
- msg.quest(player, speaker, 2, 6, "My friend. My best friend.");
- player.removeItem(player, kölsch);
- stage.increase(player);
- }
- goto("wait");
- }
- if(stage == 18) {
- if(number == 1006) {
- msg.quest(player, speaker, 4, 6, "Mmhh. If it has to be. 20x10 plot, there you go.");
- if(skill.getAmount(player, "skill.freeplotsize") <= 0) {
- skill.addAmount(player, "skill.freeplotsize", 200);
- }
- stage.increase(player);
- } elseif(number == 1007) {
- if(player.getItemAmount(player, false, kölsch) >= 1) {
- msg.quest(player, speaker, 4, 6, "Oh yeah! You know what. You get a free plot for the size of 20x20. But don't tell Kajetan about this.");
- if(skill.getAmount(player, "skill.freeplotsize") <= 0) {
- skill.addAmount(player, "skill.freeplotsize", 400);
- }
- player.removeItem(player, kölsch);
- stage.increase(player);
- } else {
- msg.quest(player, speaker, 4, 6, "§eUff. We ran out of beer. Doesn't matter. 20x10 plot, there you go.");
- if(skill.getAmount(player, "skill.freeplotsize") <= 0) {
- skill.addAmount(player, "skill.freeplotsize", 200);
- }
- stage.increase(player);
- }
- }
- goto("wait");
- }
- }
- 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 == "Tutorial") {
- if(stage == 1) {
- msg.quest(player, entity_name, 2, 3, "Just a joke. Altough this is modified Minecraft, we have no chocolate.");
- stage.increase(player);
- } elseif(stage == 2) {
- msg.quest(player, entity_name, 3, 3, "Talk to Kajetan. He is a funky guy. But don't believe his every word.");
- stage.increase(player);
- }
- goto("wait");
- }
- if(entity_name == "Kajetan") {
- if(stage == 3) {
- msg.quest(player, entity_name, 1, 5, concat("Hello ", player.getName(player), ". I am your owner and the creator of life, the universe and everything."));
- stage.increase(player);
- } elseif(stage == 4) {
- msg(player, "§dOptions of answer:");
- msg(player, text.click("[§bA§r] §eOkay my lord. What do you want me to do? Should I learn all server rules by heart?", "/questanswer 1000 Kajetan"));
- msg(player, text.click("[§bB§r] §eSure. Marvin already told me to be aware of you.", "/questanswer 1001 Kajetan"));
- stage.increase(player);
- } elseif(stage == 6) {
- msg.quest(player, player_name, 3, 5, "Fancy, but where can I build my own house?");
- stage.increase(player);
- } elseif(stage == 7) {
- msg.quest(player, entity_name, 4, 5, "Wherever you want to. For protection use §b/plot. §eTalk to Marvin and he will give you a free plot (max. 20x10).");
- stage.increase(player);
- } elseif(stage == 8) {
- msg.quest(player, entity_name, 5, 5, "Please bring him something to drink. This developer only works on 100% when drunk. Alena in the tavern will give you a beer for him.");
- stage.increase(player);
- }
- goto("wait");
- }
- if(entity_name == "Alena") {
- if(stage == 9) {
- msg.quest(player, entity_name, 1, 3, "Hello Stranger. What brings you here?");
- stage.increase(player);
- } elseif(stage == 10) {
- msg(player, "§dOptions of answer:");
- msg(player, text.click("[§bTruth§r] §eI was told to get Marvin a beer.", "/questanswer 1002 Alena"));
- msg(player, text.click("[§bLie§r] §eKajetan the owner sent me to you. I should bring him three beers and an apple.", "/questanswer 1003 Alena"));
- stage.increase(player);
- } elseif(stage == 12) {
- msg.quest(player, entity_name, 3, 3, "He always codes useful things such as the button over there for free food.");
- stage.increase(player);
- }
- goto("wait");
- }
- if(entity_name == "Marvin") {
- if(stage == 13) {
- msg.quest(player, entity_name, 1, 6, "??????");
- stage.increase(player);
- } elseif(stage == 14) {
- msg(player, "§dOptions of answer:");
- msg(player, text.click("[§bA§r] §eEhmm... I have a beer for you.", "/questanswer 1004 Marvin"));
- msg(player, text.click("[§bB§r] §eLOL. You are already drunk. Nevertheless I have a beer for you.", "/questanswer 1005 Marvin"));
- stage.increase(player);
- } elseif(stage == 16) {
- msg.quest(player, entity_name, 3, 6, "Go into the cave for minigames.");
- stage.increase(player);
- } elseif(stage == 17) {
- msg(player, "§dOptions of answer:");
- msg(player, text.click("[§bA§r] §eMaybe later. Kajetan told me you have a free plot for me.", "/questanswer 1006 Marvin"));
- msg(player, text.click("[§bB§r] §eYeah, great idea. But let us drink another beer together!", "/questanswer 1007 Marvin"));
- stage.increase(player);
- } elseif(stage == 19) {
- msg.quest(player, player_name, 5, 6, "Very nice. Thank you.");
- stage.increase(player);
- } elseif(stage == 20) {
- msg.quest(player, entity_name, 6, 6, "You're welcome.");
- msg(player, "§dTutorial completed. Reward: 10 Coins!");
- addMoney(player, 10);
- quest.finish(script, player);
- }
- }
- goto("wait");
|