kokokoko
Veteran OT User
- Joined
- Feb 4, 2008
- Messages
- 921
- Reaction score
- 257
I want it to do this: When you click on a wall torch with either actionid 2501 or 2502, it checks if the transformed torch will be the same as the other one(they have to match after being clicked). If they do match, open the path(transform the secret wall to a door).
Errors: 0
Problem: The 2 wall torches go lit and unlit when clicking on them, but the wall doesn't turn into a door.
scripts/custom/open_braindeath.lua:
actions.xml:
Thanks in advance,
//Kokokoko
Errors: 0
Problem: The 2 wall torches go lit and unlit when clicking on them, but the wall doesn't turn into a door.
scripts/custom/open_braindeath.lua:
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
torch1 = getThingfromPos({x=1286, y=1257, z=9})
torch2 = getThingfromPos({x=1286, y=1261, z=9})
wall = getThingfromPos({x=1286, y=1259, z=9, stackpos=1})
magic = {x=1286, y=1259, z=9}
if item.actionid == 2501 then
if item.itemid == 2060 and torch2.itemid == 2061 then
doTransformItem(wall.uid, 3441)
effect(magic, 2)
end
elseif item.actionid == 2502 then
if item.itemid == 2061 and torch1.itemid == 2060 then
doTransformItem(wall.uid, 3374)
effect(magic, 2)
end
end
if item.itemid == 2060 then
doTransformItem(item.uid, item.itemid+1)
else
doTransformItem(item.uid, item.itemid-1)
end
return TRUE
end
actions.xml:
Code:
<action actionid="2501" script="custom/open_braindeath.lua"/>
<action actionid="2502" script="custom/open_braindeath.lua"/>
Thanks in advance,
//Kokokoko