diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-13 20:44:25 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-13 20:44:25 +0000 |
commit | 01e3326de8fc03cf9f61fd1b288cd4f16915484c (patch) | |
tree | 583a1be3466994767dad82a77fab21b85d9356a7 /data/test.lua | |
parent | d95c2fbf8fc3fd45b03e27aa802f7886cd930a5e (diff) | |
download | manaserv-01e3326de8fc03cf9f61fd1b288cd4f16915484c.tar.gz manaserv-01e3326de8fc03cf9f61fd1b288cd4f16915484c.tar.bz2 manaserv-01e3326de8fc03cf9f61fd1b288cd4f16915484c.tar.xz manaserv-01e3326de8fc03cf9f61fd1b288cd4f16915484c.zip |
Implemented buy/sell handler.
Diffstat (limited to 'data/test.lua')
-rw-r--r-- | data/test.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/data/test.lua b/data/test.lua index 6b914634..f9ffb8fe 100644 --- a/data/test.lua +++ b/data/test.lua @@ -107,7 +107,7 @@ function my_npc1(npc, ch) do_message(npc, ch, "Hello! I am the testing NPC") do_message(npc, ch, "This message is just here for testing intertwined connections.") do_message(npc, ch, "What do you want?") - local v = do_choice(npc, ch, "Guns! Lots of guns!", "A christmas party!", "Nothing.") + local v = do_choice(npc, ch, "Guns! Lots of guns!", "A christmas party!", "To buy.", "To sell.", "Nothing.") if v == 1 then do_message(npc, ch, "Sorry, this is a heroic-fantasy game, I do not have any gun.") elseif v == 2 then @@ -121,6 +121,10 @@ function my_npc1(npc, ch) tmw.chr_inv_change(ch, 524, -1, 511, 1) end end + elseif v == 3 then + tmw.test_npc_buy(npc, ch) + elseif v == 4 then + tmw.test_npc_sell(npc, ch) end end |