12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- event.load("quest_start");
- event.load("quest_term");
- event.load("block_place");
- event.load("block_click");
- event.load("craft");
- stage = 0;
- all_stages = 4;
- quest_name = "Feuerteufel";
- fire_loc = loc.new(world.get("story"), -1648, 65, -992);
- chest_loc = loc.new(world.get("story"), -1606, 65, -1035);
- @wait
- wait();
- if(!player.isQuester(player, script)) {
- goto("wait");
- }
- if(event == "quest_term") {
- //Hier Code einfügen...
- wait(); //Script wird von außen terminiert
- }
- if(event == "quest_start") {
- quest.display(player, quest_name, stage, all_stages);
- player.giveItem(player, read.item("minecraft:jungle_log", 1, "Auf der Feuerstelle platzieren"));
- block.set(fire_loc, "minecraft:air");
- msg.prefix(player, "§dKumpel", "Hier hast du einen Holzstamm. Lege ihn auf die Feuerstelle und gehe danach zum Schiff.");
- scheduler.msgPrefix(30, player, "§dKumpel", "In der Kiste auf dem Bug des Schiffs findest du Materialien für ein Feuerzeug.");
- scheduler.msgPrefix(60, player, "§dKumpel", "Zünde damit das Holz an, damit wir unsere Kleider über dem Feuer trocknen können.");
- goto("wait");
- }
- label = concat("stage", text.number(stage));
- goto(label);
- @stage0
- if(event == "block_place") {
- if(block_loc == fire_loc) {
- if(block_type == "minecraft:jungle_log") {
- cancel = false;
- stage.increase(player);
- }
- }
- }
- goto("wait");
- @stage1
- if(event == "block_click") {
- if(block_type == "minecraft:chest") {
- if(block_loc != chest_loc) {
- cancel = true;
- msg.prefix(player, "§dKumpel", "Das ist nicht die richtige Kiste.");
- goto("wait");
- }
- stage.increase(player);
- block.addItem(block_loc, read.item("minecraft:flint"));
- block.addItem(block_loc, read.item("minecraft:iron_ingot"));
- }
- }
- goto("wait");
- @stage2
- if(event == "craft") {
- if(item.getType(result) == "minecraft:flint_and_steel") {
- stage.increase(player);
- }
- }
- goto("wait");
- @stage3
- if(event == "block_click") {
- if(block_loc == fire_loc) {
- if(block_type == "minecraft:jungle_log") {
- block.set(fire_loc, "minecraft:campfire");
- msg.prefix(player, "§dKumpel", "Feuer! Es lodere wie die Wut von unzufriedenen Leuten.");
- player.setShipProgress(player, 12);
- msg(player, "§dQuest abgeschlossen. Belohnung: 6 Snuvis!");
- addMoney(player, 6);
- quest.finish(script, player);
- }
- }
- }
- goto("wait");
|