updated story mod

This commit is contained in:
cale 2016-04-01 18:39:13 +02:00
parent 5d8cc6e0a8
commit e48a8455f3
3 changed files with 21 additions and 1 deletions

View File

@ -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

View File

@ -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?

View File

@ -1 +1,5 @@
$dialog quest_2
$wait
$quest dignode default:stone_with_iron 2 10
$wait quest
$quit