• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Required Item in bp to pass door.

dalan valka

New Member
Joined
Dec 20, 2007
Messages
18
Reaction score
0
I need a script that only lets someone pass the door if they have a certain item in there backpack any help?

Door id = 1225
item id = 11138
 
Code:
local itemid, count = 11138, 1
local door_open = 1225 -- Id of the door when it is OPEN. - Must be a quest or experience door!

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerItemCount(cid, itemid) >= count then
        doTransformItem(item.uid, door_open)
        doTeleportThing(cid, toPosition, FALSE)
    end
end
 
Last edited:
Forgot i requested this one but i got it working

PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local itemId = 11138

	if (getPlayerItemCount(cid, itemId) <= 0) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Requires Demonic Doll.")
	else
		doTransformItem(item.uid, item.itemid + 1)
		doTeleportThing(cid, fromPosition, TRUE)
		doPlayerRemoveItem(cid, itemId)
	end

	return TRUE
end
 
Back
Top