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

Close doors in 2~3 seconds.

SnakevL

New Member
Joined
Jun 5, 2008
Messages
71
Reaction score
0
Hi! i'm needing a script that close a door opened after 2~3 seconds...

I'll give the ID of the door that i need:

1219 = Door Closed
1220 = Door Opened

1221 = Door Closed
1222 = Door Opened

So, if the door ID is "1219", the door will change do "1220" in "2" seconds. I need this for houses .. :)

Thanks!
 
Code:
function closeDoor(cid)
	doTransformItem(item.uid, 1219, 1)
	setGlobalStorageValue(100, 1)
end


function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1220 then
		return FALSE
	end
	
	if item.itemid == 1219 and getGlobalStorageValue(100) ~= 1 then
		doTransformItem(item.uid, 1220, 1)
		setGlobalStorageValue(100, 1)
		addEvent(closeDoor, 2 * 1000)
	else
		doPlayerSendCancel(cid, "You cannot use this object.")
	end
	return TRUE
end
I'm not a pro scripter, so I can't say this WILL work xD
 
Last edited:
what is wrong with you?

i like to be honest with people and i only stated my opinion about the scripted you posted
 
it don't work, i put it on the final of "door.lua" on movements/scripts... is that correct? :D

Somebody help me, if not is correct :)
 
Back
Top