• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Zzaion Gate

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

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:
this is working but how to add this to execute only when raids starts this is checking if the boss is in the position it will be better execute only one time when raids starts anyone have any idea ?

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 = 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 } }
         
    }



local from = {x = 33343, y = 31606, z = 1}
local to = {x = 33351, y = 31613, z = 1}
local monsters = {"zulazza the corruptor"}


function onThink(interval, lastExecution, thinkInterval)

		for x = from.x, to.x do
			for y = from.y, to.y do
				local v = getTopCreature({x = x, y = y, z = 1}).uid
				if isPlayer(v) then
					return true
				elseif isMonster(v) then
					table.insert(monsters, v)
				end
			end
		end			
	
		for i = 1, #removals do
           		 removals[i].pos.stackpos = 1
            		 doRemoveItem(getThingfromPos(removals[i].pos).uid, 1)
        	end
        			
		
    return TRUE
end
 
Back
Top Bottom