summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-10 14:45:41 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-08-10 14:45:41 +0000
commitf562abbf2980c66e5c16f30ea667b758e796ae4e (patch)
tree5b93dd4d009c98bc0c42e90111464444127f9c6c /data
parentf990980f80ab1523086edba1bed222741d716fa0 (diff)
downloadmanaserv-f562abbf2980c66e5c16f30ea667b758e796ae4e.tar.gz
manaserv-f562abbf2980c66e5c16f30ea667b758e796ae4e.tar.bz2
manaserv-f562abbf2980c66e5c16f30ea667b758e796ae4e.tar.xz
manaserv-f562abbf2980c66e5c16f30ea667b758e796ae4e.zip
Added Lua function for warping people around.
Diffstat (limited to 'data')
-rw-r--r--data/test.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/data/test.lua b/data/test.lua
index 5a1327a6..d419b9f0 100644
--- a/data/test.lua
+++ b/data/test.lua
@@ -100,6 +100,7 @@ function initialize()
create_npc(110, 50 * 32 + 16, 19 * 32 + 16, my_npc1)
create_npc(107, 53 * 32 + 16, 21 * 32 + 16, my_npc2)
create_npc(107, 53 * 32 + 16, 23 * 32 + 16, my_npc3)
+ create_npc(108, 51 * 32 + 16, 25 * 32 + 16, my_npc4)
end
function my_npc1(npc, ch)
@@ -123,3 +124,19 @@ end
function my_npc3(npc, ch)
do_message(npc, ch, "Don't you think the guy behind me is my evil twin?")
end
+
+function my_npc4(npc, ch)
+ do_message(npc, ch, "Where do you want to go?")
+ local v = do_choice(npc, ch, "Map 1:Map 3")
+ if v >= 1 and v <= 2 then
+ do_message(npc, ch, "Are you really sure?")
+ local w = do_choice(npc, ch, "Yes, I am.:I still have a few things to do around here.")
+ if w == 1 then
+ if v == 1 then
+ tmw.chr_warp(ch, nil, 60 * 32, 50 * 32)
+ else
+ tmw.chr_warp(ch, 3, 25 * 32, 25 * 32)
+ end
+ end
+ end
+end