clario
OTS based on Heroes III Might and Magic
- Joined
- Feb 4, 2018
- Messages
- 98
- Reaction score
- 5
Hello there ! i make something like that :
what can i do there?
and if i trun swich on , theres a callback bug (and stone dont back to POS :{x = 926, y = 1332, z = 9, stackpos = 1}local switchIds = {
[1945] = {trans = 1946, stoneId = 1304},
[1946] = {trans = 1945, stoneId = 9022}
}
local stonePos = {x = 926, y = 1332, z = 9, stackpos = 1}
function onUse(cid, item, frompos, item2, topos)
if getItemAttribute(item.uid, 'aid') ~= 2230 then
return false
end
local SWITCH = switchIds[item.itemid]
if not SWITCH then
return false
end
local COFFIN = getThingFromPos(stonePos)
if not COFFIN then
return doPlayerSendCancel(cid, "Could not find stone.")
end
doTransformItem(item.uid, SWITCH.trans)
doTransformItem(COFFIN.uid, SWITCH.coffinId)
addEvent(Remove, 20 * 1000, stonePos)
if getTileItemById(stonePos, 1304).uid > 0 then
doTransformItem(item.uid, 1945)
else
doPlayerSendCancel(cid, "It seems the lever has been already used.")
end
return true
end
what can i do there?