diff options
author | David Athay <ko2fan@gmail.com> | 2008-10-24 15:18:02 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-10-24 15:18:02 +0000 |
commit | 20fe6419f8d9564e7ab098ead53c6ef5da1519fa (patch) | |
tree | 5313713cd9f12ca3fc503db2ceaccaa73f12a355 /data/scripts/test.lua | |
parent | ef9852cddecfc5abce38438ca2138defb1a9b1bf (diff) | |
download | manaserv-20fe6419f8d9564e7ab098ead53c6ef5da1519fa.tar.gz manaserv-20fe6419f8d9564e7ab098ead53c6ef5da1519fa.tar.bz2 manaserv-20fe6419f8d9564e7ab098ead53c6ef5da1519fa.tar.xz manaserv-20fe6419f8d9564e7ab098ead53c6ef5da1519fa.zip |
Added post callback for getting post.
Added GM command for changing player attributes. Changed GM command to
@ as '/' was already being used by client for local commands.
Diffstat (limited to 'data/scripts/test.lua')
-rw-r--r-- | data/scripts/test.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/data/scripts/test.lua b/data/scripts/test.lua index d3cd14ae..344ca105 100644 --- a/data/scripts/test.lua +++ b/data/scripts/test.lua @@ -187,4 +187,14 @@ function post_talk(npc, ch) do_message(npc, ch, "Hello " .. tmw.being_get_name(ch)) local strength = tmw.being_get_attribute(ch, ATTR_STRENGTH) do_message(npc, ch, "You have " .. tostring(strength) .. " strength") + do_message(npc, ch, "Would you like to see your mail?") + local answer = do_choice(npc, ch, "Yes", "No") + if answer == 1 then + local sender, post = getpost(ch) + if sender == "" then + do_message(npc, ch, "No Post right now, sorry") + else + do_message(npc, ch, tostring(sender) .. " sent you " .. tostring(post)) + end + end end |