Ae gente!
É o meu segundo tutorial, então comentem pra ver se ficou legal
Abra data/actions/scripts e abra um bloco de notas e dentro coloke:
--------Boots of Firewalking system v2.0 by Colex-------------function onUse(cid, item, frompos, item2, topos)
tempo = 10
tempo2 = tempo + 60
pos = getPlayerPosition(cid)
tilepos = {x=pos.x, y=pos.y, z=pos.z, stackpos=0}
tile = getThingfromPos(tilepos)
storage = 1533
storage2 = 1534
storage3 = 1535
bow = getPlayerStorageValue(cid,storage2)
bow2 = getPlayerStorageValue(cid,storage3)
timer1 = getPlayerStorageValue(cid,storage)
timer2 = os.time()
time = os.difftime(timer2, timer1)
add = timer2 + 1
if item.itemid == 2641 then
if bow2 == -1 then
setPlayerStorageValue(cid,storage,add)
setPlayerStorageValue(cid,storage2,-1)
setPlayerStorageValue(cid,storage3,1)
doRemoveItem(item.uid,1)
else
doPlayerSendCancel(cid,"You are already using Boots of FireWalking.")
end
return 1
end
if item.itemid ~= 2641 then
if timer1 >= 0 then
if time <= tempo then
doTeleportThing(cid,topos)
else
doPlayerSendTextMessage(cid,22,"time out! Please use the boots of firewalking again if you want to continue.")
if bow > -2 then
doPlayerAddItem(cid,2641,1)
setPlayerStorageValue(cid,storage2,-2)
setPlayerStorageValue(cid,storage3,-1)
end
if time >= tempo2 then
if tile.itemid >= 599 and tile.itemid <= 598 then
doTeleportThing(cid,getPlayerMasterPos(cid))
doPlayerSendTextMessage(cid,22,"time out")
setPlayerStorageValue(cid,storage,-1)
setPlayerStorageValue(cid,storage2,-1)
else
doPlayerSendTextMessage(cid,22,"time out")
setPlayerStorageValue(cid,storage,-1)
setPlayerStorageValue(cid,storage2,-1)
end
end
end
else
return 0
end
end
return 1
end
E depois abra actions.xml e acrescente:
------boots of firewalking------------------Bordas do Boots of FireWalking----
<action itemid="518" script="bof.lua" />
<action itemid="519" script="bof.lua" />
<action itemid="520" script="bof.lua" />
<action itemid="521" script="bof.lua" />
<action itemid="554" script="bof.lua" />
<action itemid="555" script="bof.lua" />
<action itemid="556" script="bof.lua" />
<action itemid="557" script="bof.lua" />
----------/bordas-------------
---------tiles de Fogo----------
<action itemid="598" script="bof.lua" />
<action itemid="599" script="bof.lua" />
<action itemid="600" script="bof.lua" />
<action itemid="601" script="bof.lua" />
----------/Tiles de Fogo---------
<action itemid="2641" script="bof.lua" /> ----id da boots of firewalking
------/boots of firewalking---------
Obs: voce pode editar as bordas