• 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!

Hello i need a door script....

Joined
Apr 17, 2008
Messages
1,922
Solutions
1
Reaction score
188
Location
Venezuela
Hello!! HAPPY NEW YEAR!

I'm looking for a door script, the door will open only if you have a storage value, if you don't have the door will say "The door seems to be sealed against unwanted intruders."

Help please
 
Man, this function is in doors.lua:
Code:
	function onUse(cid, item, frompos, item2, topos)
		STORAGE_VALUE = 57084
		if isInArray(questDoors, item.itemid) == TRUE then
		if getPlayerStorageValue(cid, STORAGE_VALUE) == 1 then
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, topos, TRUE)
		else
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The door seems to be sealed against unwanted intruders.")
		end
		return TRUE
	end
 
I am using this action script:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local UNIQUE = 55055
local STORAGE = 55055
	if item.uid == UNIQUE then
		if(isInArray({getPlayerStorageValue(cid,STORAGE)}, -1) == TRUE) then
			doPlayerSendTextMessage(cid, 22, "The door seems to be sealed against unwanted intruders.")
		else
			doPlayerSendTextMessage(cid, 22, "You may pass.")
			doTransformItem(item.uid, item.itemid + 1)
			doTeleportThing(cid, toPosition, TRUE)
		end
		return TRUE
	end
	return FALSE
end

and this thing to movements (door will be fucked up without this line):
Code:
	<movevent event="StepOut" uniqueid="55055" script="closingdoor.lua"/>

Regards,
Hermes
 
Back
Top