summaryrefslogtreecommitdiff
path: root/example/scripts/status/plague.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/status/plague.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/status/plague.lua')
-rw-r--r--example/scripts/status/plague.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/example/scripts/status/plague.lua b/example/scripts/status/plague.lua
index a43b9d40..2f6a5f6c 100644
--- a/example/scripts/status/plague.lua
+++ b/example/scripts/status/plague.lua
@@ -14,17 +14,17 @@
local function tick(target, ticknumber)
if (ticknumber % 10 == 0) then
- mana.being_say(target, "I have the plague! :( = " .. ticknumber)
+ being_say(target, "I have the plague! :( = " .. ticknumber)
end
- local victims = mana.get_beings_in_circle(mana.posX(target), mana.posY(target), 64)
+ local victims = get_beings_in_circle(posX(target), posY(target), 64)
local i = 1
while (victims[i]) do
- if (mana.being_has_status(victims[i], 1) == false) then
- mana.being_apply_status(victims[i], 1, 6000)
- mana.being_say(victims[i], "I don't feel so good")
+ if (being_has_status(victims[i], 1) == false) then
+ being_apply_status(victims[i], 1, 6000)
+ being_say(victims[i], "I don't feel so good")
end
i = i + 1
end
end
-mana.get_status_effect("plague"):on_tick(tick)
+get_status_effect("plague"):on_tick(tick)