valivan601
New Member
- Joined
- Apr 13, 2011
- Messages
- 365
- Reaction score
- 1
Hello anyone i made this to open the gate in Zzaion when the Zulazza the corruptor raid starts
but i want to make it check if there is a monster in x position and open the gate can anyone help me in this?
this erro appear creature not found
but i want to make it check if there is a monster in x position and open the gate can anyone help me in this?
this erro appear creature not found
Code:
removals = {
{ item = 9486, pos = { x = 33303 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33304 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33305 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33305 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33306 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33307 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33308 , y = 31491 , z = 7 } },
{ item = 9486, pos = { x = 33309 , y = 31491 , z = 7 } }
}
area = {
fromX = 33343, toX = 33351,
fromY = 31606, toY = 31613,
z = 1
}
function onThink(interval, lastExecution, thinkInterval)
local area = getCreatureName(target):lower()
if area == 'zulazza the corruptor' then
for i = 1, #removals do
removals[i].pos.stackpos = 1
doRemoveItem(getThingfromPos(removals[i].pos).uid, 1)
end
doTransformItem(item.uid, item.itemid + 1)
elseif
for i = 1, #removals do
doCreateItem(removals[i].item, 1, removals[i].pos)
end
doTransformItem(item.uid, item.itemid - 1)
end
return TRUE
end
Last edited: