diff --git a/mods/story/api.lua b/mods/story/api.lua index c58143c..8439f4e 100644 --- a/mods/story/api.lua +++ b/mods/story/api.lua @@ -229,7 +229,15 @@ function story.generator.run(part, player, line_pos) story.generator.players_storys[player:get_player_name()].pos = places.pos[cmd[3]] end elseif cmd[2] == "near" then - if places.pos[cmd[3]] then + if cmd[3] == "player" then + if cmd[4] then + local place = minetest:get_player_by_name(cmd[4]):getpos() + story.generator.players_storys[player:get_player_name()].pos = {x=place.x+math.random(-5, 5), y=place.y, z=place.z+math.random(-5, 5)} + else + local place = player:getpos() + story.generator.players_storys[player:get_player_name()].pos = {x=place.x+math.random(-5, 5), y=place.y, z=place.z+math.random(-5, 5)} + end + elseif places.pos[cmd[3]] then local place = places.pos[cmd[3]] story.generator.players_storys[player:get_player_name()].pos = {x=place.x+math.random(-5, 5), y=place.y, z=place.z+math.random(-5, 5)} end diff --git a/mods/story/parts/quest_2.dialog b/mods/story/parts/quest_2.dialog new file mode 100644 index 0000000..0d1b26d --- /dev/null +++ b/mods/story/parts/quest_2.dialog @@ -0,0 +1,8 @@ +??? : Hello +You : Hi +??? : Every adventurer needs to have good equipment. +??? : For good equipment, you need iron. +??? : You should mine some iron. +You : wait... Who are you?? +??? : - +You : huh, what was that? diff --git a/mods/story/parts/quest_2.quest b/mods/story/parts/quest_2.quest index 99e8714..6721e9c 100644 --- a/mods/story/parts/quest_2.quest +++ b/mods/story/parts/quest_2.quest @@ -1 +1,5 @@ +$dialog quest_2 +$wait +$quest dignode default:stone_with_iron 2 10 +$wait quest $quit