summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-11-15 21:47:40 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-11-15 21:47:40 +0000
commitf8ca515c22353b40ff42f5958bb514c25032ca93 (patch)
tree9568f82c3530e4fc98027a484b371ccaf405949a
parent85295251890a621a34f374d3082e4db7374ad23e (diff)
downloadmanaserv-f8ca515c22353b40ff42f5958bb514c25032ca93.tar.gz
manaserv-f8ca515c22353b40ff42f5958bb514c25032ca93.tar.bz2
manaserv-f8ca515c22353b40ff42f5958bb514c25032ca93.tar.xz
manaserv-f8ca515c22353b40ff42f5958bb514c25032ca93.zip
Added do_wait helper function.
-rw-r--r--ChangeLog4
-rw-r--r--data/scripts/libtmw.lua5
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 38441367..24d8d9fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-15 Guillaume Melquiond <guillaume.melquiond@gmail.com>
+
+ * data/scripts/libtmw.lua: Added do_wait helper function.
+
2007-11-13 Guillaume Melquiond <guillaume.melquiond@gmail.com>
* src/utils/trim.hpp, src/Makefile.am: Added trim function.
diff --git a/data/scripts/libtmw.lua b/data/scripts/libtmw.lua
index b2c22c68..662488e3 100644
--- a/data/scripts/libtmw.lua
+++ b/data/scripts/libtmw.lua
@@ -29,6 +29,11 @@ function create_npc(id, x, y, handler)
npcs[npc] = handler
end
+-- Waits for the player to acknowledge the previous message, if any.
+function do_wait()
+ coroutine.yield(0)
+end
+
-- Sends an npc message to a player.
-- Note: Does not wait for the player to acknowledge the message.
function do_message(npc, ch, msg)