1234567891011121314151617181920212223242526272829303132333435363738394041 |
- event.load("entity_click");
- event.load("player_giveup");
- waitfor(1);
- player = script.getLeader();
- display.add(player, 11, "§bAufgabe");
- display.add(player, 12, "Junker: hölzerne Hacke");
- player.speak(player, "Der Junker", "Mir ist kalt, bring mir eine hölzerne Hacke.");
- overworld = world.get("overworld");
- junker_loc = loc.new(overworld, 988, 88, 250);
- needed_item = read.item("minecraft:wooden_hoe");
- reward_item = read.item("minecraft:campfire");
- @wait
- wait();
- if(event == "entity_click") {
- if(entity.getType(entity) == "human") {
- if(loc.distance(junker_loc, entity.getLocation(player)) < 8) {
- if(player.getItemAmount(player, true, needed_item) > 0) {
- player.removeItem(player, needed_item);
- player.giveItem(player, reward_item);
- player.speak(player, "Der Junker", "Danke sehr!");
- display.remove(player, 11);
- display.remove(player, 12);
- term();
- } else {
- player.speak(player, "Der Junker", "Du hast meine hölzerne Hacke nicht dabei!");
- }
- }
- }
- goto("wait");
- }
- if(event == "player_giveup") {
- display.remove(player, 11);
- display.remove(player, 12);
- player.speak(player, "Der Junker", "Aufgabe beendet!");
- term();
- }
- goto("wait");
|