local config = {
bohPos = { x = 1314, y = 1313, z = 7, stackpos = 255 },
demonPos = { x = 1232, y = 12421, z = 7 },
leverAction = 1234
}
function onUse(cid, item)
if item.actionid == config.leverAction then
if item.itemid == 1995 then
local boh = getThingfromPos(config.bohPos)
if boh.itemid == bohitemidhereokey? then
doRemoveItem(boh.uid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "GUARD HAS BEEN WARNED, YOU IS GO DED!")
doSummonCreature("Demon", config.demonPos)
doTransformItem(item.uid, item.itemid + 1)
else
return FALSE
end
elseif item.itemid == 1996 then
doTransformItem(item.uid, item.itemid - 1)
-- maybe something more?
end
end
return TRUE
end