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

script tile.!

chauffaille

New Member
Joined
Sep 10, 2009
Messages
198
Reaction score
1
:peace:hiho,

I need a script.


when player passes a black tile the tile is white

i give rep + +; D
 
Here you go

Code:
-- one of the firsts by frankfarmer
-- tested on 0.3.6

local t = {
	item = {407, {x=573, y=666, z=5}}, -- itemid and coords
	interval = 60, --how many seconds until next
}

function onStepIn(cid, item, position, fromPosition)
		if doCreateItem(t.item[1], t.item[2]) then
		addEvent(doCreateItem, t.interval * 1000, t.item[1], 1, {t.item[2]})

	
		end
end

edit:updated again
 
Last edited:
Here you go

Code:
-- one of the firsts by frankfarmer
-- tested on 0.3.6

local t = {
	item = {407, {x=573, y=666, z=5}}, -- itemid and coords
	interval = 60, --how many seconds until next
}

function onStepIn(cid, item, position, fromPosition)
		if doCreateItem(t.item[1], t.item[2]) then
		addEvent(doCreateItem, t.interval * 1000, t.item[1], 1, {t.item[2]})

	
		end
end

edit:updated again
doCreateItem will always return true, so there's no need to check it.
Also,
Code:
addEvent(doCreateItem, t.interval * 1000, t.item[1], 1, [B][COLOR="red"]{[/COLOR][/B]t.item[2][B][COLOR="Red"]}[/COLOR][/B])
Not required.. (the brackets)

#thread
Code:
function onStepIn(cid, item, position, fromPosition) doTransformItem(item.uid, 406) end
function onStepOut(cid, item, position, fromPosition) doTransformItem(item.uid, 405) end
Code:
	<movevent type="StepIn" itemid="405" event="script" value="tilesScript.lua"/>
	<movevent type="StepOut" itemid="406" event="script" value="tilesScript.lua"/>
 
Last edited:
Back
Top Bottom