123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- event.load("quest_start");
- event.load("quest_term");
- event.load("block_click");
- event.load("block_place");
- event.load("living_death");
- event.load("living_pre_hurt");
- stage = 0;
- all_stages = 5;
- quest_name = "Boss";
- story = world.get("story");
- witch_loc = loc.new(story, -1628, 64, -956);
- zombie_loc = loc.new(story, -1618.5, 51, -966.5);
- wither_skeleton_loc = loc.new(story, -1618.5, 51, -978.5);
- evilloc = loc.new(story, -1618.5, 51, -972.5);
- zombie_head_loc = loc.new(story, -1619, 51, -967);
- wither_skeleton_head_loc = loc.new(story, -1619, 51, -979);
- ents = list.new();
- placed_set = set.new();
- killed = 0;
- enter = false;
- @wait
- wait();
- if(event == "living_pre_hurt") {
- player = player.getFromDamageSource(damage_source);
- if(player == null) {
- goto("wait");
- }
- }
- if(event == "living_death") {
- if(isPlayer(living_entity)) {
- entity.remove(witch_ent);
- for(i = 0; i < list.getSize(ents); i++) {
- entity.remove(list.getIndex(ents, i));
- }
- block.set(loc.new(story, -1643, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1644, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1645, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1643, 65, -971), "minecraft:grass_block");
- block.set(loc.new(story, -1644, 65, -971), "minecraft:grass_block");
- player = living_entity;
- msg.prefix(player, "§dQuest", "Quest termed.");
- quest.term(script, player);
- goto("wait");
- }
- player = player.getFromDamageSource(damage_source);
- if(player == null) {
- goto("wait");
- }
- }
- if(!player.isQuester(player, script)) {
- goto("wait");
- }
- if(event == "quest_term") {
- entity.remove(witch_ent);
- for(i = 0; i < list.getSize(ents); i++) {
- entity.remove(list.getIndex(ents, i));
- }
- block.set(loc.new(story, -1643, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1644, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1645, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1643, 65, -971), "minecraft:grass_block");
- block.set(loc.new(story, -1644, 65, -971), "minecraft:grass_block");
- wait(); //Script wird von außen terminiert
- }
- if(event == "quest_start") {
- quest.display(player, quest_name, stage, all_stages);
- player.giveSingleItem(player, read.item("minecraft:iron_sword"), false);
- player.giveSingleItem(player, read.item("minecraft:shield"), false);
- witch_ent = entity.spawn("witch", witch_loc);
- msg.prefix(player, "§dKumpel", "Gut, dass du hier bist. Auf der anderen Seite der Insel habe ich eine Hexe gesehen.");
- goto("wait");
- }
- label = concat("stage", text.number(stage));
- goto(label);
- @stage0
- if(event == "living_death") {
- entity_type = entity.getType(living_entity);
- if(entity_type == "witch") {
- stage.increase(player);
- player.giveSingleItem(player, read.item("km:diamond_stick", 1, "Stab der Elemente", "Achtung, Fragil!"), false);
- msg.prefix(player, "§dKumpel", "Hörst du das auch? Es scheint, als würden böse Kreaturen unter der Insel erwachen. Gehe besser nachschauen.");
- scheduler.msgPrefix(30, player, "§dKumpel", "Ich habe letztens ein kleines Loch in der Mitte der Insel gefunden. Vielleicht kommen die Geräusche von dort.");
- block.set(loc.new(story, -1643, 65, -972), "minecraft:air");
- block.set(loc.new(story, -1644, 65, -972), "minecraft:air");
- block.set(loc.new(story, -1645, 65, -972), "minecraft:air");
- block.set(loc.new(story, -1643, 65, -971), "minecraft:air");
- block.set(loc.new(story, -1644, 65, -971), "minecraft:air");
- block.set(zombie_loc, "minecraft:air");
- block.set(wither_skeleton_loc, "minecraft:air");
- for(i = 0; i < 5; i++) {
- list.add(ents, entity.spawn("zombie", zombie_loc));
- }
- list.add(ents, entity.spawn("wither_skeleton", wither_skeleton_loc));
- list.add(ents, entity.spawn("wither_skeleton", wither_skeleton_loc));
- }
- }
- goto("wait");
- @stage1
- if(event == "block_click") {
- if(block_type == "minecraft:stone_button" && !enter) {
- msg.prefix(player, "§dKumpel", "Ach du meine Güte. Alles voller Monster. Sie scheinen diesen magischen Ort zu bewachen.");
- scheduler.msgPrefix(30, player, "§dKumpel", "Was an dem wohl so besonders ist?");
- enter = true;
- stage.increase(player);
- }
- }
- goto("wait");
- @stage2
- if(event == "living_pre_hurt") {
- if(list.contains(ents, living_entity)) {
- item = living.getEquip(player, "hand");
- item_type = item.getType(item);
- if(item_type != "km:diamond_stick") {
- cancel = true;
- msg.prefix(player, "§dKumpel", "Diese Monster sind mit irdischen Waffen unbesiegbar.");
- }
- }
- goto("wait");
- }
- if(event == "living_death") {
- if(list.contains(ents, living_entity)) {
- entity_type = entity.getType(living_entity);
- entity_loc = entity.getLocation(living_entity);
- if(entity_type == "wither_skeleton") {
- item.drop(entity_loc, read.item("minecraft:wither_skeleton_skull"));
- } elseif(entity_type == "zombie") {
- item.drop(entity_loc, read.item("minecraft:zombie_head"));
- }
- killed++;
- if(killed == 7) {
- stage.increase(player);
- msg.prefix(player, "§dKumpel", "Es schaut so aus, als könnte jeweils einer dieser Köpfe hier platziert werden.");
- }
- }
- }
- goto("wait");
- @stage3
- if(event == "block_place") {
- if(block_loc == zombie_head_loc || block_loc == wither_skeleton_head_loc) {
- if(block_type == "minecraft:zombie_head" || block_type == "minecraft:wither_skeleton_skull") {
- if(set.contains(placed_set, block_type)) {
- msg.prefix(player, "§dKumpel", "Diesen Kopf hast du bereits platziert.");
- goto("wait");
- }
- cancel = false;
- set.add(placed_set, block_type);
- if(set.getSize(placed_set) == 2) {
- stage.increase(player);
- particle.spawn(loc.mod(evilloc, 0, 2, 0), particle.get("minecraft:explosion"));
- sound.spawn(evilloc, sound.get("minecraft:entity.generic.explode"), sound.getCategory("ambient"));
- beelzebub_ent = human.spawn(evilloc);
- human.setSkin(beelzebub_ent, "herobrine");
- human.setScale(beelzebub_ent, 1.2);
- entity.setName(beelzebub_ent, "§cBeelzebub");
- msg.prefix(player, "§cBeelzebub", "Dir werde ich das Fürchten lehren! Nie mehr wirst du vor mir Ruhe haben!");
- scheduler.msgPrefix(100, player, "§cBeelzebub", "Muahahaha..., nimm dies.");
- scheduler.spawnEntity(180, "witch", evilloc);
- scheduler.removeEntity(180, beelzebub_ent);
- scheduler.msgPrefix(180, player, "§cBeelzebub", "Bis zum nächsten Mal...");
- }
- }
- }
- }
- goto("wait");
- @stage4
- if(event == "living_death") {
- entity_type = entity.getType(living_entity);
- if(entity_type == "witch" || entity_type == "silverfish") {
- block.set(loc.new(story, -1643, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1644, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1645, 65, -972), "minecraft:grass_block");
- block.set(loc.new(story, -1643, 65, -971), "minecraft:grass_block");
- block.set(loc.new(story, -1644, 65, -971), "minecraft:grass_block");
- player.setShipProgress(player, 13);
- msg(player, "§dQuest abgeschlossen. Belohnung: 30 Snuvis!");
- msg(player, text.click("§r [§cclick§r] §f[§bTeleport§f] zum Story-Spawn.", "/story"));
- addMoney(player, 30);
- quest.finish(script, player);
- }
- }
- goto("wait");
|