chauffaille
New Member
- Joined
- Sep 10, 2009
- Messages
- 198
- Reaction score
- 1

I need a script.
when player passes a black tile the tile is white
i give rep + +; D
-- 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
doCreateItem will always return true, so there's no need to check it.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
addEvent(doCreateItem, t.interval * 1000, t.item[1], 1, [B][COLOR="red"]{[/COLOR][/B]t.item[2][B][COLOR="Red"]}[/COLOR][/B])
function onStepIn(cid, item, position, fromPosition) doTransformItem(item.uid, 406) end
function onStepOut(cid, item, position, fromPosition) doTransformItem(item.uid, 405) end
<movevent type="StepIn" itemid="405" event="script" value="tilesScript.lua"/>
<movevent type="StepOut" itemid="406" event="script" value="tilesScript.lua"/>