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

Lua Createladder.lua and removeitem after 3 minutes

lizudus

Www.Xivarian.Com Owner
Joined
May 14, 2008
Messages
456
Reaction score
5
Location
Milky Way,Earth,America Central,Costa rica, Heredi
How i can do this? remove item after 3 minuts

PHP:
function onStepIn(cid, item, frompos, item2, topos) 
	wall1 = {x=461, y=1374, z=10, stackpos=1}
	getwall1 = getThingfromPos(wall1)

	if item.uid == 10225 then
		doTransformItem(item.uid, item.itemid - 1)
		doCreateItem(1386,1,wall1)
end
end

function onStepOut(cid, item, frompos, item2, topos)
	wall1 = {x=461, y=1374, z=10, stackpos=1}
	getwall1 = getThingfromPos(wall1)

	if item.uid == 10225 then
		doTransformItem(item.uid, item.itemid + 1)
		doRemoveItem(getwall1.uid,1)

	end

	return 1
end

I tryed this one but dont work XD!

PHP:
local time = 180 --seconds(3 minutes)

function onStepIn(cid, item, frompos, item2, topos) 
	wall1 = {x=461, y=1374, z=10, stackpos=1}
	getwall1 = getThingfromPos(wall1)

	if item.uid == 10225 then
		doTransformItem(item.uid, item.itemid - 1)
		doCreateItem(1386,1,wall1)
end
end

function onStepOut(cid, item, frompos, item2, topos)
	wall1 = {x=461, y=1374, z=10, stackpos=1}
	getwall1 = getThingfromPos(wall1)

	if item.uid == 10225 then
		doTransformItem(item.uid, item.itemid + 1)
		addEvent(doRemoveItem, time * 1000, getwall1.uid,1)

	end

	return 1
end

What mine have different??This

PHP:
local time = 180 --seconds(3 minutes)

		addEvent(doRemoveItem, time * 1000, getwall1.uid,1)

Rep++
 
Lua:
function removewall()
    wall1 = {x=461, y=1374, z=10, stackpos=1}
    getwall1 = getThingfromPos(wall1)
    doRemoveItem(getwall1.uid,1)
     end

Lua:
function onStepOut(cid, item, frompos, item2, topos)
addEvent(removewall, 3* 1000, getwall1.uid,1)
return true
end
 
Thanks spider ot ;) rep++ :D
Posting script working if someone need it ;)

PHP:
function onStepIn(cid, item, frompos, item2, topos) 
	wall1 = {x=461, y=1374, z=10, stackpos=1}
	getwall1 = getThingfromPos(wall1)

	if item.uid == 10225 then
		doTransformItem(item.uid, item.itemid - 1)
		doCreateItem(1386,1,wall1)
end
end

function onStepOut(cid, item, frompos, item2, topos)
addEvent(removewall, 3* 1000, getwall1.uid,1)
return true
end

function removewall()
    wall1 = {x=461, y=1374, z=10, stackpos=1}
    getwall1 = getThingfromPos(wall1)
    doRemoveItem(getwall1.uid,1)
     end

	return 1
end
 
Maybe someone would've even took it, if it wasn't that shitty.
Lua:
local xd, event = {x=461, y=1374, z=10}, 0

local function remove()
	doRemoveItem(getTileItemById(xd, 1386).uid)
end

function onStepIn(cid, item, pos, fromPos)
	stopEvent(event)
	doTransformItem(item.uid, item.itemid - 1)
	doCreateItem(1386, 1, xd)
end

function onStepOut(cid, item, pos, fromPos)
	doTransformItem(item.uid, item.itemid + 1)
	event = addEvent(remove, 3 * 60 * 1000)
end
 
Back
Top