kalt.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. event.load("entity_click");
  2. event.load("player_giveup");
  3. waitfor(1);
  4. player = script.getLeader();
  5. display.add(player, 11, "§bAufgabe");
  6. display.add(player, 12, "Junker: hölzerne Hacke");
  7. player.speak(player, "Der Junker", "Mir ist kalt, bring mir eine hölzerne Hacke.");
  8. overworld = world.get("overworld");
  9. junker_loc = loc.new(overworld, 988, 88, 250);
  10. needed_item = read.item("minecraft:wooden_hoe");
  11. reward_item = read.item("minecraft:campfire");
  12. @wait
  13. wait();
  14. if(event == "entity_click") {
  15. if(entity.getType(entity) == "human") {
  16. if(loc.distance(junker_loc, entity.getLocation(player)) < 8) {
  17. if(player.getItemAmount(player, true, needed_item) > 0) {
  18. player.removeItem(player, needed_item);
  19. player.giveItem(player, reward_item);
  20. player.speak(player, "Der Junker", "Danke sehr!");
  21. display.remove(player, 11);
  22. display.remove(player, 12);
  23. term();
  24. } else {
  25. player.speak(player, "Der Junker", "Du hast meine hölzerne Hacke nicht dabei!");
  26. }
  27. }
  28. }
  29. goto("wait");
  30. }
  31. if(event == "player_giveup") {
  32. display.remove(player, 11);
  33. display.remove(player, 12);
  34. player.speak(player, "Der Junker", "Aufgabe beendet!");
  35. term();
  36. }
  37. goto("wait");