LucasFerraz
Systems Analyst
XML:
<action actionid="7522" script="BlueLegs/lever.lua"/>
LUA:
local coffinPos = {x = 33273, y = 32457, z = 8, stackpos = 1} -- stairs on hole position (coffin)
local statue_pos = {{x = 33276, y = 32444, z = 8, stackpos = 1}, -- statue1
{x = 33278, y = 32450, z = 8, stackpos = 1}, -- statue2
{x = 33284, y = 32450, z = 8, stackpos = 1}} -- statue3
function onUse(cid, item, frompos, item2, topos)
local getcoffin = getThingfromPos(coffinPos) -- coffin
local statue1 = getThingfromPos(statue_pos[1]) -- statue1
local statue2 = getThingfromPos(statue_pos[2]) -- statue2
local statue3 = getThingfromPos(statue_pos[3]) -- statue3
--conditional script below :
if item.itemid == 3900 and getcoffin.itemid == 7520 and statue1.itemid == 3697 and statue2.itemid == 3697 and statue3.itemid == 3697 then
doRemoveItem(getcoffin.uid, 1)
doCreateItem(7525, 1, coffinPos)
doCreatureSay(cid, 'Click!', TALKTYPE_MONSTER_YELL, false, 0, {x=33273, y=32457, z=8})
elseif item.itemid == 3900 and getcoffin.itemid == 7525 then
doRemoveItem(getcoffin.uid, 1)
doCreateItem(7520, 1, coffinPos)
doCreatureSay(cid, 'Clerck...', TALKTYPE_MONSTER_YELL, false, 0, {x=33273, y=32457, z=8})
else
doCreatureSay(cid, 'Nothing happens...', TALKTYPE_MONSTER_YELL, false, 0, {x=33273, y=32457, z=8})
end
return 1
end
Last edited: