1- Ao pisar no tile receber um item..
2- Ao atingir level 55, ser teleportado automaticamente para o templo.
Rapidex!
1- Ao pisar no tile receber um item..
2- Ao atingir level 55, ser teleportado automaticamente para o templo.
Rapidex!
++REP (Ajudei)?
- REP (Não Ajudei)?
Tutoriais de ElfBot: http://www.xtibia.co...__fromsearch__1
Fórum Oficial: http://www.mreonline.com.br
Bom eu fiz so q nao testei o do tile tenta ae
tileitem.lua:
function onStepIn(cid, item, position, fromPosition)doPlayerAddItem(cid,id,quantidade)
end
movements.xml
<movevent type="StepIn" actionid="19456" event="script" value="itemtile.lua"/>
edite conforme seu server
function onAdvance(cid, oldLevel, newLevel)local tempo = 15 -- Tempo em segundos
local level = 55 -- Level
if newLevel == level then
addEvent(doTeleportThing, tempo*1000, cid, getTownTemplePosition(getPlayerTown(cid))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você atingiu o level "..newLevel..". Você será mandado para o templo em "..tempo.." segundos.")
end
return true
end
Tempo = Tempo em segundos para o player ser teleportado para o templo.
Créditos: LuckOake
-T
Kyoshi o seu bugo (a formatação aki no forum)
++REP (Ajudei)?
- REP (Não Ajudei)?
Tutoriais de ElfBot: http://www.xtibia.co...__fromsearch__1
Fórum Oficial: http://www.mreonline.com.br
Kyoshi, o code nao tem suporte de cor
Mas eu não tinha posto cores e mesmo assim bugou, deixei em quote mesmo.
-T
function onAdvance(cid, skill, oldLevel, newLevel) local toPos = {x = x, y = y, z = z} if skill == 8 then if newLevel == 55 then if getPlayerStorageValue(cid, 367221) < 1 then addEvent(doTeleportThing, 2 * 1000, cid, toPos) doPlayerSendTextMessage(cid, 27, "You advanced to level 55 and now has been teleported.") setPlayerStorageValue(cid, 367221, 1) end end end return true end
tag:
<event type="advance" name="advanceLev" event="script" value="nome_do_script.lua"/>
login.lua
registerCreatureEvent(cid, "advanceLev")
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) local itemId, quant = 2160, 10 if isPlayer(cid) then if getPlayerStorageValue(cid, 327116) < 0 then doPlayerAddItem(cid, itemId, quant) doPlayerSendTextMessage(cid, 27, "You win " .. quant .. "x " .. getItemNameById(itemId) .. ".") setPlayerStorageValue(cid, 327116, 1) end end return true end
<movevent type="StepIn" actionid="X" event="script" value="nome_do_script.lua"/>
sky, passa as tags... e poe pra teleportar por posição (no primeiro), porque n eh exatamente no templo que quero.
++REP (Ajudei)?
- REP (Não Ajudei)?
Tutoriais de ElfBot: http://www.xtibia.co...__fromsearch__1
Fórum Oficial: http://www.mreonline.com.br