Espero que te ajude!
http://www.xtibia.com/forum/topic/134875-matar-monstro-abrir-tp-remover-parede-ganhar-storage/
info
Grupo: Cavaleiro
Registrado: 17/06/15
Posts: 177
Reputação: +9
Char no Tibia: GOD Server

Tentei, tentei e tentei... parece que n funfa em tfs 0.4...
Fiz e refiz varias vezes e nao funfou.. da um erro, que nao é possivel encontrar o arquivo sendo que fiz igualzinho tá la.
Não sei se vai funcionar , mais está ai.
guardianDeath.lua
function onDeath(cid, corpse, killer)
local myTab = {
["Guardian Blastoise"] = {pillarPos ={x= 1469, y= 1827, z= 12}, pillarName="Ocean Pillar", pillarId=9783},
["Ancient Charizard"] = {pillarPos ={x= 1469, y= 1828, z= 12}, pillarName="Volcano Pillar", pillarId=9781},
}
local creature = myTab[getCreatureName(cid)]
local pillar = getTileItemById(creature.pillarPos, creature.pillarId)
if pillar.itemid == creature.pillarId then
doRemoveItem(pillar.uid, 1)
doCreatureSay(cid, creature.pillarName.." Destroyed!", TALKTYPE_ORANGE_1)
doSendMagicEffect(creature.pillarPos, 164)
end
return true
end
creaturescript.xml
<event type="death" name="guardianDeath" event="script" value="guardianDeath.lua"/>
no xml do monstro você adiciona logo abaixo do loot
<script> <event name="guardianDeath"/> </script>
Não sei se vai funcionar , mais está ai.
guardianDeath.lua
function onDeath(cid, corpse, killer) local myTab = { ["Guardian Blastoise"] = {pillarPos ={x= 1469, y= 1827, z= 12}, pillarName="Ocean Pillar", pillarId=9783}, ["Ancient Charizard"] = {pillarPos ={x= 1469, y= 1828, z= 12}, pillarName="Volcano Pillar", pillarId=9781}, } local creature = myTab[getCreatureName(cid)] local pillar = getTileItemById(creature.pillarPos, creature.pillarId) if pillar.itemid == creature.pillarId then doRemoveItem(pillar.uid, 1) doCreatureSay(cid, creature.pillarName.." Destroyed!", TALKTYPE_ORANGE_1) doSendMagicEffect(creature.pillarPos, 164) end return true endcreaturescript.xml
<event type="death" name="guardianDeath" event="script" value="guardianDeath.lua"/>no xml do monstro você adiciona logo abaixo do loot
<script> <event name="guardianDeath"/> </script>
E o tempo para a grade voltar pro lugar?
up
up
info
Grupo: Infante
Registrado: 28/01/12
Posts: 1.6k
Reputação: +262
Gênero: Masculino

function onDeath ( cid , corpse , killer )
local M = {
[ "Demon" ] = { Pos = { x = 2655 , y = 598 , z = 7 }, id = 5072 , time = 120 },
[ "Dragon Lord" ] = { Pos = { x = 2655 , y = 634 , z = 7 }, id = 5072 , time = 120 },
}
local x = M [ getCreatureName ( cid )]
function create ()
local wall = getTileItemById ( x . Pos , x . id )
doCreateItem ( x . id , 1 , x . Pos )
end
if x then
local wall = getTileItemById ( x . Pos , x . id )
if wall then
doRemoveItem ( wall . uid , 1 )
doCreatureSay ( cid , "You have " .. x . time .. " seconds to enter in the room." , TALKTYPE_ORANGE_1 )
addEvent ( create , x . time * 1000 )
end
end
return TRUE
end
<event type="death" name="removewall" event="script" value ="removewall.lua"/>
id = 5072 -- ID da grade, wall, etc
info
Grupo: Visconde
Registrado: 04/01/14
Posts: 320
Reputação: +15
Bom Dia, xTibianos...
Estou precisando de um script que ao matar tal monstro, liberar um acesso por 1 minuto, que teria 2 grades impedindo de passar...
Creio que seja simples!
Valeeeu!! REP++