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

Traps Problem Need Help

Blackcody

RiseOfTibia Owner
Joined
Aug 31, 2008
Messages
136
Reaction score
1
LUA:
local pos1 = {x = 1439, y = 1496, z = 7}
local pos2 = {x = 1438, y = 1496, z = 7}
local pos3 = {x = 1440, y = 1496, z = 7}
local id = 1511
local time = 7
local time1 = 1

function onStepIn(cid, item, pos)
    addEvent(doCreateItem,time1 * 1000, id,1,pos1)
    addEvent(doCreateItem,time1 * 1000, id,1,pos2)
    addEvent(doCreateItem,time1 * 1000, id,1,pos3)    
    addEvent(doCleanTile,time * 1000, id,1,pos1, false)
    addEvent(doCleanTile,time * 1000, id,1,pos2, false)
    addEvent(doCleanTile,time * 1000, id,1,pos3, false)
    return true
end

I Need It To Just Remove The The Id Not EveryThing On The Tile
 
LUA:
local pos = {
	[1] = {x = 1439, y = 1496, z = 7},
	[2] = {x = 1438, y = 1496, z = 7},
	[3] = {x = 1440, y = 1496, z = 7}
}

local id = 1511
local time = 7
local time1 = 1


onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	for i = 1, 3 do
		addEvent(doCreateItem, time1 * 1000, id, 1, pos[i])
		addEvent(removeBlades, time * 1000, pos[i], id)
	end
	return true
end

function removeBlades(pos, Id)
	local thing = getTileItemById(pos, Id).uid
	if thing > 0 then
		doRemoveItem(thing)
	end
end
 
Back
Top