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

Windows "Lever Wait Timer"

Ub Kenobi

Member
Joined
Apr 10, 2009
Messages
144
Reaction score
8
Location
Sweden
Hello!

I need a script that makes when you pull a lever, you can't pull it again before a specific time.


I hope someone can help me and understan what I'm searching for.
Thx.
 
Lua:
local c = { storage = 1000
            timee = 60
		  }

function onUse (cid, item, frompos, topos)

if exhaustion.get(cid,c.storage) then
   doPlayerSendCancel(cid,"You cant use this except after "..exhause.get(cid,c.storage).." seconds.")
else
  exhaustion.set(cid,c.storage,c.time)
end

return true
end
 
Thank you very much, BUT .... ( I'm a bit retarded ;) ) Where shall I put it in ?

Script:

Lua:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 1380 then
 if item.itemid == 1946 then

 player1pos = {x=235, y=113, z=7, stackpos=253}
 player1 = getThingfromPos(player1pos)

 player2pos = {x=234, y=113, z=7, stackpos=253}
 player2 = getThingfromPos(player2pos)


	 if player1.itemid > 0 and player2.itemid > 0 then

	player1level = getPlayerLevel(player1.uid)
	player2level = getPlayerLevel(player2.uid)

	questlevel = 180

if player1level >= questlevel and player2level >= questlevel then

	--if 1==1 then

	nplayer1pos = {x=272, y=97, z=8}
	nplayer2pos = {x=273, y=97, z=8}
	


   doSendMagicEffect(player1pos,2)
   doSendMagicEffect(player2pos,2)

   doTeleportThing(player1.uid,nplayer1pos)
   doTeleportThing(player2.uid,nplayer2pos)

	 doSendMagicEffect(nplayer1pos,10)
	 doSendMagicEffect(nplayer2pos,10)



   else
	doPlayerSendCancel(cid,"All players must have level 180 to enter")
   end
  else
  doPlayerSendCancel(cid,"Sorry, you need to be 2 players in your team.")
  end

end

doTransformItem(item.uid,1946)
end
 return 1
end
 
Last edited:
Back
Top