From 5ff34fd2458dff28d664c90fb93f455231f8633c Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sun, 11 Mar 2012 18:16:16 +0100 Subject: 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 --- scripts/lua/npclib.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'scripts/lua/npclib.lua') diff --git a/scripts/lua/npclib.lua b/scripts/lua/npclib.lua index 9edfcbd9..48e53769 100644 --- a/scripts/lua/npclib.lua +++ b/scripts/lua/npclib.lua @@ -31,8 +31,8 @@ local wasmall_starty = {} function walkaround_small(npc) if not wasmall_timer[npc] then wasmall_timer[npc] = 1 - wasmall_startx[npc] = mana.posX(npc) - wasmall_starty[npc] = mana.posY(npc) + wasmall_startx[npc] = posX(npc) + wasmall_starty[npc] = posY(npc) end wasmall_timer[npc] = wasmall_timer[npc] + 1 @@ -41,7 +41,7 @@ function walkaround_small(npc) wasmall_timer[npc] = math.random(1, 10) local x = math.random(-32, 32) + wasmall_startx[npc] local y = math.random(-32, 32) + wasmall_starty[npc] - mana.being_walk(npc, x, y, 2) + being_walk(npc, x, y, 2) end end @@ -58,8 +58,8 @@ local wawide_starty = {} function walkaround_wide(npc) if not wawide_timer[npc] then wawide_timer[npc] = 1 - wawide_startx[npc] = mana.posX(npc) - wawide_starty[npc] = mana.posY(npc) + wawide_startx[npc] = posX(npc) + wawide_starty[npc] = posY(npc) end wawide_timer[npc] = wawide_timer[npc] + 1 @@ -68,7 +68,7 @@ function walkaround_wide(npc) wawide_timer[npc] = math.random(1, 10) local x = math.random(-128, 128) + wawide_startx[npc] local y = math.random(-128, 128) + wawide_starty[npc] - mana.being_walk(npc, x, y, 2) + being_walk(npc, x, y, 2) end end @@ -88,9 +88,9 @@ function walkaround_map(npc) if wam_timer[npc] == 50 then wam_timer[npc] = math.random(1, 10) - local x = math.random(-128, 128) + mana.posX(npc) - local y = math.random(-128, 128) + mana.posY(npc) - mana.being_walk(npc, x, y, 2) + local x = math.random(-128, 128) + posX(npc) + local y = math.random(-128, 128) + posY(npc) + being_walk(npc, x, y, 2) end end -- cgit v1.2.3-70-g09d2