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

Need a script

danielpt

Banned User
Joined
Jan 20, 2010
Messages
181
Reaction score
0
Im using a dhelmet custom and i don't go change... so...
I want a script that once the player puch the lever to open the passage, after 150 seconds it will automatically return


Repp+++++ ;);)
 
Last edited:
I think he mean he need a script for the lever that will not reset after completing quest but after 150 seconds.
Am I right?
 
Here try this, just be sure to edit it!
Code:
local cfg = {
	on = 1945, 
	off = 1946,
	Wpos = {x = , y = , z = , stackpos = 1} -- change to the position of the wall
	}
local function reBuild(Wpos, item)
	doCreateItem(Wpos.itemid, 1, cfg.Wpos)
	doTransformItem(item.uid, item.itemid - 1)
end	
function onUse(cid, item, fromPos, itemEx, toPos)
Wpos = getThingfromPos(cfg.Wpos)
	if item.itemid == cfg.off then
		doTransformItem(item.uid, item.itemid + 1)
		doRemoveItem(Wpos.uid)
		addEvent(reBuild, 150*1000, Wpos, item)
	elseif item.itemid == cfg.on then
		doPlayerSendTextMessage(cid, 24, "The passage is open.")
	end
return true
end
 
Back
Top