From 01e3326de8fc03cf9f61fd1b288cd4f16915484c Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Mon, 13 Aug 2007 20:44:25 +0000 Subject: Implemented buy/sell handler. --- data/test.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'data/test.lua') 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 -- cgit v1.2.3-60-g2f50