Hello,
I'm interested in making a script where you use a key on a locked door that you can only lock up with that specific door key. In order to do this, do I only need the same actionid on the door and the item? Also, will I have to consider that when you use the item on the door again, it should transform back?
Edit: can I also just do this?
will this simply if you use the key with aid on the door, tp you to the other side of the door?
I'm interested in making a script where you use a key on a locked door that you can only lock up with that specific door key. In order to do this, do I only need the same actionid on the door and the item? Also, will I have to consider that when you use the item on the door again, it should transform back?
Edit: can I also just do this?
Code:
function onUse(cid, item, frompos, item2, topos)
if item.actionid == 21591 then
doTeleportThing(cid, {x = 1, y = 1, z = 1}, {x = 1, y = 1, z = 1})
doSendMagicEffect(frompos, CONST_ME_TELEPORT, getCreaturePosition(cid), CONST_ME_TELEPORT)
return true
end
end
will this simply if you use the key with aid on the door, tp you to the other side of the door?
Last edited: