diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-11 18:16:16 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2012-03-11 19:27:32 +0100 |
commit | 5ff34fd2458dff28d664c90fb93f455231f8633c (patch) | |
tree | 533151e5f3002c1e24ce4d44e5cd32c66c026b51 /example/scripts/npcs/healer.lua | |
parent | b822dcee52d15d41c4186a250e73b85b16c9dc39 (diff) | |
download | manaserv-5ff34fd2458dff28d664c90fb93f455231f8633c.tar.gz manaserv-5ff34fd2458dff28d664c90fb93f455231f8633c.tar.xz manaserv-5ff34fd2458dff28d664c90fb93f455231f8633c.zip |
Register Lua script API functions into the global namespace
Scripts mostly execute the Mana script API, and it seems like just
unnecessary verbosity to refer to the 'mana' table all the time. This table
no longer exists now.
Reviewed-by: Erik Schilling
Diffstat (limited to 'example/scripts/npcs/healer.lua')
-rw-r--r-- | example/scripts/npcs/healer.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/scripts/npcs/healer.lua b/example/scripts/npcs/healer.lua index 478047b..3569673 100644 --- a/example/scripts/npcs/healer.lua +++ b/example/scripts/npcs/healer.lua @@ -5,11 +5,11 @@ --]] function Healer(npc, ch) - mana.npc_message(npc, ch, "Do you need healing?") - local c = mana.npc_choice(npc, ch, "Heal me fully", "Heal 100 HP", "Don't heal me") + npc_message(npc, ch, "Do you need healing?") + local c = npc_choice(npc, ch, "Heal me fully", "Heal 100 HP", "Don't heal me") if c == 1 then - mana.being_heal(ch) + being_heal(ch) elseif c == 2 then - mana.being_heal(ch, 100) + being_heal(ch, 100) end end |