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

[Request] Lever

Tibia Rox

Member
Joined
Feb 4, 2009
Messages
1,181
Reaction score
9
Location
U.S.A
I need a script so that when you pull a level, a stone in X: Y: Z: disapears for 60 sec.

(Theres 4 stones so make the thingy 4 times :D)

Thanks in advance!
 
Code:
local t = {
	[9696] = {stoneID = 1353, pos = {x=1010,y=1000,z=7}, time = 10}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = t[item.actionid]
	if not v then return true end
	local c = getTileItemById(v.pos,v.stoneID)
	
	doRemoveItem(c.uid)
	addEvent(function(id,c,pos) pos.stackpos = 253 if isPlayer(getThingFromPos(pos).uid) then doMoveCreature(getThingFromPos(pos).uid, 2) end doCreateItem(id,c,pos) end ,t.time*1000,c.itemid,1,t.pos)
	return true
end

[9696] = {stoneID = 1353, pos = {x=1010,y=1000,z=7}, time = 10}
[actionid_of_leaver] << index
 
Back
Top