1234567891011121314151617181920212223242526272829303132333435363738394041 |
- event.load("entity_click");
- event.load("player_giveup");
- waitfor(1);
- player = script.getLeader();
- display.add(player, 11, "§bAufgabe");
- display.add(player, 12, "Junker: glatte Sandsteinstufe");
- player.speak(player, "Der Junker", "Ich habe Hunger, bring mir eine glatte Sandsteinstufe.");
- overworld = world.get("overworld");
- junker_loc = loc.new(overworld, 988, 88, 250);
- needed_item = read.item("minecraft:smooth_sandstone_slab");
- reward_item = read.item("minecraft:dried_kelp", 13);
- @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 glatte Sandsteinstufe 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");
|