summaryrefslogtreecommitdiff
path: root/scripts/lua/npclib.lua
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-15 22:15:31 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2013-04-15 22:15:31 +0200
commitc53bc90dbaa876a86f762a3d864b1f920e2b8071 (patch)
tree1a8174f4d1745a4799210db970aa2230df622d34 /scripts/lua/npclib.lua
parentb89e404f85358f2e3ff87d7731376dbeacdf9778 (diff)
parent81be8dc99ba7558c8915310eed095df43e3bdbf7 (diff)
downloadmanaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.gz
manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.bz2
manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.tar.xz
manaserv-c53bc90dbaa876a86f762a3d864b1f920e2b8071.zip
Merge branch 'master' into lpc2012
Conflicts: src/account-server/accounthandler.cpp src/game-server/character.cpp
Diffstat (limited to 'scripts/lua/npclib.lua')
-rw-r--r--scripts/lua/npclib.lua16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/lua/npclib.lua b/scripts/lua/npclib.lua
index 48e53769..b3b4b096 100644
--- a/scripts/lua/npclib.lua
+++ b/scripts/lua/npclib.lua
@@ -31,8 +31,7 @@ local wasmall_starty = {}
function walkaround_small(npc)
if not wasmall_timer[npc] then
wasmall_timer[npc] = 1
- wasmall_startx[npc] = posX(npc)
- wasmall_starty[npc] = posY(npc)
+ wasmall_startx[npc], wasmall_starty[npc] = npc:position()
end
wasmall_timer[npc] = wasmall_timer[npc] + 1
@@ -41,7 +40,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]
- being_walk(npc, x, y, 2)
+ npc:walk(x, y, 2)
end
end
@@ -58,8 +57,7 @@ local wawide_starty = {}
function walkaround_wide(npc)
if not wawide_timer[npc] then
wawide_timer[npc] = 1
- wawide_startx[npc] = posX(npc)
- wawide_starty[npc] = posY(npc)
+ wawide_startx[npc], wawide_starty[npc] = npc:position()
end
wawide_timer[npc] = wawide_timer[npc] + 1
@@ -68,7 +66,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]
- being_walk(npc, x, y, 2)
+ npc:walk(x, y, 2)
end
end
@@ -88,9 +86,9 @@ function walkaround_map(npc)
if wam_timer[npc] == 50 then
wam_timer[npc] = math.random(1, 10)
- local x = math.random(-128, 128) + posX(npc)
- local y = math.random(-128, 128) + posY(npc)
- being_walk(npc, x, y, 2)
+ local x = math.random(-128, 128) + npc:x()
+ local y = math.random(-128, 128) + npc:y()
+ npc:walk(x, y, 2)
end
end