Bem tenho esse Script que eu usava em um pda,porém no open source ele não está funcionando,simplismente não da erro nenhum na distro,e o teleport não apareçe após matar o Pokémon
Uso esse script:
Spoiler
local tpId = 1387 local tps = { ["Caterpie Christmas"] = {pos = {x=690, y=918, z=15}, toPos = {x=665, y=809, z=15}, time = 30}, }
function removeTp(tp) local t = getTileItemById(tp.pos, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(tp.pos, CONST_ME_POFF) end end
function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeTp, tp.time*1000, tp) end return TRUE end
lembrando que eu registrava na xml do pokémon Caterpie Christmas
info
Grupo: Conde
Registrado: 15/06/15
Posts: 729
Reputação: +200
Bem tenho esse Script que eu usava em um pda,porém no open source ele não está funcionando,simplismente não da erro nenhum na distro,e o teleport não apareçe após matar o Pokémon
Uso esse script:
local tpId = 1387
local tps = {
["Caterpie Christmas"] = {pos = {x=690, y=918, z=15}, toPos = {x=665, y=809, z=15}, time = 30},
}
function removeTp(tp)
local t = getTileItemById(tp.pos, tpId)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(tp.pos, CONST_ME_POFF)
end
end
function onDeath(cid)
local tp = tps[getCreatureName(cid)]
if tp then
doCreateTeleport(tpId, tp.toPos, tp.pos)
doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(removeTp, tp.time*1000, tp)
end
return TRUE
end
lembrando que eu registrava na xml do pokémon Caterpie Christmas
no pda era funcional,mais nesta open source não;
BASE USADA: