Sir Islam
Never Give Up
have fun
globalevents.xml
npcpositioning.lua
Full credit goes to Acedayz
globalevents.xml
Code:
<globalevent name="npc positioning" type="startup" script="npcpositioning.lua"/>
npcpositioning.lua
Code:
local npcPositions = {
{ position={x = 2005, y = 1999, z = 6}, direction=WEST },
{ position={x = 1994, y = 1993, z = 6}, direction=SOUTH },
{ position={x = 2005, y = 1993, z = 6}, direction=SOUTH },
{ position={x = 2005, y = 2004, z = 6}, direction=NORTH },
{ position={x = 1989, y = 1993, z = 6}, direction=SOUTH },
{ position={x = 1999, y = 2004, z = 6}, direction=NORTH },
{ position={x = 1993, y = 2004, z = 6}, direction=NORTH }
}
function onStartup()
for _, mob in ipairs(npcPositions) do
local tile = Tile(mob.position)
if tile then
local creature = tile:getTopCreature()
if creature then
creature:setDirection(mob.direction)
end
end
end
return true
end
Full credit goes to Acedayz
Last edited: