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

Action script

despion0

Minecraft Addict
Joined
Sep 22, 2009
Messages
159
Reaction score
1
Location
Belgium
Hello, could someone please make a script.
If you pull a lever you get teleported to a certain place
(you get a storage) and after x minutes you get teleported back
(you get another storage).

Rep for the one that helps me.
 
LUA:
function onUse(cid, item, frompos, item2, topos)
    if item.uid == 1313 and item.itemid == 1945 or item.itemid == 1946 then
						nplayer1pos = {x=1687, y=1191, z=7}
						doSendMagicEffect(player1pos,2) 
						doTeleportThing(cid,nplayer1pos)
						doSendMagicEffect(nplayer1pos,10)
						setPlayerStorageValue(cid, 11553, 1)  
						local timed = 15
						local czas = 0
							local function timer(i)
								if(getPlayerStorageValue(cid, 11553)==1)then
								xpos = {x=1000, y=1000, z=7}
								end
							doTeleportThing(i.cid, xpos)
							doPlayerSendTextMessage(cid, 19, 'Twoj czas sie skonczyl!')
							end
							if(czas == 0)then
							addEvent(timer, (timed*60000), {cid=cid, xpos=getThingfromPos(getPlayerPosition(cid))})
							doPlayerSendTextMessage(cid, 19, 'You have 15 minutes :P(dalate this text if dont want it!')
							czas = os.time()
							end
							if(os.time() <= (czas+timed*30))then
							stopEvent(timer)
							setPlayerStorageValue(cid, 11553, -1)
							setPlayerStorageValue(cid, 11554, 1) 
							
							end
						end
					end
 
Back
Top