vá em creaturescripts --> scripter e crie um arquivo chamado tp.lua
local tps = {
["Orshabaal"] = {pos = {x=761, y=57, z=7}, toPos = {x=767, y=52, z=7}, 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
explicação:
["Orshabaal"] --------- Nome do monstro
pos = {x=761, y=57, z=7} ----------- onde o Teleport irá abrir
toPos = {x=767, y=52, z=7} ------- onde o teleport vai leva eles
time = 30 ------------ tempo em segundos que o teleport ficará aberto
em creaturescript adicione:
<event type="death" name="tp" event="script" value="tp.lua"/>
no arquivo.xml do seu monstro adicione:
<script>
<event name="tp"/>
</script>







info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...
Pedido pra quando matarem o Boos Deathstrike ser criado um buero na Position: [X: 202] [Y: 1224] [Z: 12].
@Edit
achei esse script aki feito pelo Vodkart e estou tentando editar ele alguem pode me ajudar porque não estou entendo ele direito =(
function onDeath(cid, corpse, killer) local M ={ ["deathstrike"] = {Pos = {x=202,y=1224,z=12},id= 430 ,time = 1800}, } local x = M[getCreatureName(cid)] function criar() local parede = getTileItemById(x.Pos, x.id) doRemoveItem(x.id, 1, x.Pos) end if x then local parede = getTileItemById(x.Pos, x.id) if parede then doCreateItem(parede.uid, 1) addEvent(criar, x.time*1000) end end return TRUE endEditado Setembro 21 por KennyxD