diff options
author | Roderic Morris <roderic@ccs.neu.edu> | 2008-10-21 22:26:05 +0000 |
---|---|---|
committer | Roderic Morris <roderic@ccs.neu.edu> | 2008-10-21 22:26:05 +0000 |
commit | a9ba502b2856b4125ffc99cafee429c00a7ea958 (patch) | |
tree | fac8e12eb31601d44aa8609b2e26c752445a68ba /data/scripts/libs/libtmw.lua | |
parent | 8eefca6ea575d6b55a0ad493ce7f7aa3f9c88f5e (diff) | |
download | manaserv-a9ba502b2856b4125ffc99cafee429c00a7ea958.tar.gz manaserv-a9ba502b2856b4125ffc99cafee429c00a7ea958.tar.bz2 manaserv-a9ba502b2856b4125ffc99cafee429c00a7ea958.tar.xz manaserv-a9ba502b2856b4125ffc99cafee429c00a7ea958.zip |
return npc ids when creating new ones (by Kage_Jittai)
Diffstat (limited to 'data/scripts/libs/libtmw.lua')
-rw-r--r-- | data/scripts/libs/libtmw.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/data/scripts/libs/libtmw.lua b/data/scripts/libs/libtmw.lua index 5b1792f9..0bb72923 100644 --- a/data/scripts/libs/libtmw.lua +++ b/data/scripts/libs/libtmw.lua @@ -62,6 +62,7 @@ function create_npc(name, id, x, y, talkfunct, updatefunct) local npc = tmw.npc_create(name, id, x, y) if talkfunct then npc_talk_functs[npc] = talkfunct end if updatefunct then npc_update_functs[npc] = updatefunct end + return npc end -- Waits for the player to acknowledge the previous message, if any. @@ -222,7 +223,7 @@ end function update() -- check the scheduler check_schedule() - + -- Run every minute only, in order not to overload the server. if not timer then return end timer = timer - 1 @@ -335,7 +336,7 @@ function on_death(being, funct) tmw.note_on_death(being) end --- called by the engine when a being with dies for which a death +-- called by the engine when a being with dies for which a death -- notification has been requested function death_notification(being) if type(ondeath_functs[being]) == "table" then @@ -355,4 +356,4 @@ end tmw.chr_money = function(ch) return tmw.chr_inv_count(ch, 0) -end
\ No newline at end of file +end |