summaryrefslogtreecommitdiff
path: root/example/scripts/special_actions.lua
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-11 18:16:16 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-03-11 19:27:32 +0100
commit5ff34fd2458dff28d664c90fb93f455231f8633c (patch)
tree533151e5f3002c1e24ce4d44e5cd32c66c026b51 /example/scripts/special_actions.lua
parentb822dcee52d15d41c4186a250e73b85b16c9dc39 (diff)
downloadmanaserv-5ff34fd2458dff28d664c90fb93f455231f8633c.tar.gz
manaserv-5ff34fd2458dff28d664c90fb93f455231f8633c.tar.bz2
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/special_actions.lua')
-rw-r--r--example/scripts/special_actions.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/example/scripts/special_actions.lua b/example/scripts/special_actions.lua
index 7e42ad43..25619f41 100644
--- a/example/scripts/special_actions.lua
+++ b/example/scripts/special_actions.lua
@@ -16,13 +16,13 @@ specialCost[3] = 1000
local function use_special(ch, id)
-- perform whatever the special with the ID does
if id == 1 then
- mana.being_say(ch, "Kaaame...Haaame... HAAAAAA!")
+ being_say(ch, "Kaaame...Haaame... HAAAAAA!")
end
if id == 2 then
- mana.being_say(ch, "HAA-DOKEN!")
+ being_say(ch, "HAA-DOKEN!")
end
if id == 3 then
- mana.being_say(ch, "Sonic BOOM")
+ being_say(ch, "Sonic BOOM")
end
end
@@ -31,5 +31,5 @@ local function get_special_recharge_cost(id)
return specialCost[id]
end
-mana.on_use_special(use_special)
-mana.on_get_special_recharge_cost(get_special_recharge_cost)
+on_use_special(use_special)
+on_get_special_recharge_cost(get_special_recharge_cost)