warriorfrog
Active Member
- Joined
- Jul 29, 2015
- Messages
- 334
- Reaction score
- 35
I tried made it to
if door is closed
if u tried to open and have a scroll
ok, door will open and in 5 seconds it will close
else
u cant open the door
script (im not good in lua, i tried make it, cathing parts on web)
if door is closed
if u tried to open and have a scroll
ok, door will open and in 5 seconds it will close
else
u cant open the door
script (im not good in lua, i tried make it, cathing parts on web)
Code:
local open_door = 6258
local closed_door = 6257
local scroll_id = 1949
local function changeBack(Pos)
doTransformItem(getTileItemById(Pos, open_door).uid, closed_door)
end
function onUse(cid, item, frompos, item2, toPosition)
if(itemEx.itemid == closed_door) then
if getPlayerItemCount(cid,scroll_id) > -1 then
doTransformItem(itemEx.uid, open_door)
addEvent(changeBack,5000,toPosition)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You don't have the scroll password.")
end
end
end
Last edited: