Postado Junho 16, 2014 10 anos olá amigos(a), estou criando uma quest com a mesma dinamica da inquisition, porem tentei fazer conforme mostra os tutoriais para criar um teleport apos a morte da criatura e não esta dando certo verifiquem o exemplo abaixo: <?xml version="1.0" encoding="UTF-8"?> <monster name="Ashkarah" nameDescription="a Ashkarah" race="blood" experience="25000" speed="270" manacost="0"> <health now="95000" max="95000"/> <look type="12" head="95" body="215" legs="215" feet="215" corpse="7349"/> <targetchange interval="2000" chance="15"/> <strategy attack="60" defense="5"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <script> <event name="AncientLightDwarvenKingdom"/> </script> <attacks> <attack name="melee" interval="2000" skill="190" attack="210"/> <attack name="firecondition" interval="1000" chance="7" range="2" min="-1000" max="-1800"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="7" radius="3" target="0" min="-380" max="-950"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="50" radius="3" target="0" min="-500" max="-900"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="34" range="7" radius="3" target="3" min="-200" max="-650"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="13" length="7" spread="0" min="-500" max="-900"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="10" length="7" spread="3" min="-300" max="-800"> <attribute key="areaEffect" value="explosion"/> </attack> </attacks> <defenses armor="165" defense="150"> <defense name="healing" interval="1000" chance="15" min="5000" max="10000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="healing" interval="1000" chance="25" min="2000" max="3000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="1800" duration="4000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="1"/> <immunity fire="1"/> <immunity death="1"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="dwarf warmaster" interval="1000" chance="8" max="2"/> </summons> <voices interval="5000" chance="10"> <voice sentence="Worship Zathroth pathetic mortal!"/> <voice sentence="Your soul will be mine!"/> <voice sentence="ASHES TO ASHES!" yell="1"/> <voice sentence="YOU WILL ALL BURN!" yell="1"/> <voice sentence="THE DAY OF RECKONING IS AT HAND!" yell="1"/> <voice sentence="BOW TO THE POWER OF THE RUTHLESS SEVEN!" yell="1"/> </voices> <loot capacity="5000"> <item id="2142" countmax="1" chance="3500"/> <item id="2231" countmax="1" chance="9000"/> <item id="2144" countmax="15" chance="15000"/> <item id="2158" countmax="1" chance="1500"/> <item id="2195" countmax="1" chance="4000"/> <item id="2192" countmax="1" chance="2500"/> </loot> </monster> local tpId = 1387 local tps = { ["Old Blood"] = {pos = {x=32711, y=31316, z=14}, toPos = {x=32689, y=31470, z=13}, time = 10}, } 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 algo mais eu preciso estar fazendo? pois não estou conseguindo obter sucesso, agradeço desde já.
Postado Junho 16, 2014 10 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Suporte OTServ → Suporte de OTServ Geral" Para: "OTServ → Suporte OTServ → Suporte de Scripts"
Postado Junho 16, 2014 10 anos Tenta assim amigo .. local tps = { -- [monster name] = {pos = {posição onde aparecerá o TP}, toPos = {posição para onde levara o TP}, time = tempo para o teleporte sumir}, ["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, 1387) 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(1387, 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 o senhor tem que configurar corretamente .. -- [monster name] = {pos = {posição onde aparecerá o TP}, toPos = {posição para onde levara o TP}, time = tempo para o teleporte sumir}, Colocando o nome do monstro que você quer que seja morto, e a posição que o teleport irá aparecer e pra onde ele levará .. qualquer dúvida dá uma olhada nesse tópico ..http://www.tibiaking.com/forum/topic/31415-pedido-sistema-de-teleporte/ Aguardo resposta!
Postado Junho 16, 2014 10 anos Autor da uma bizu ai... no erro [16/6/2014 13:3:7] [Warning - Monster::Monster] Unknown event name - AncientLightDwarvenKingdom como esta no meus scripts: MONSTER: <?xml version="1.0" encoding="UTF-8"?> <monster name="Ashkarah" nameDescription="a Ashkarah" race="blood" experience="25000" speed="270" manacost="0"> <health now="950" max="950"/> <look type="12" head="95" body="215" legs="215" feet="215" corpse="7349"/> <targetchange interval="2000" chance="15"/> <strategy attack="60" defense="5"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <script> <event name="AncientLightDwarvenKingdom"/> </script> <attacks> <attack name="melee" interval="2000" skill="190" attack="210"/> <attack name="firecondition" interval="1000" chance="7" range="2" min="-1000" max="-1800"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="7" radius="3" target="0" min="-380" max="-950"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="50" radius="3" target="0" min="-500" max="-900"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="34" range="7" radius="3" target="3" min="-200" max="-650"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="13" length="7" spread="0" min="-500" max="-900"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="10" length="7" spread="3" min="-300" max="-800"> <attribute key="areaEffect" value="explosion"/> </attack> </attacks> <defenses armor="165" defense="150"> <defense name="healing" interval="1000" chance="15" min="5000" max="10000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="healing" interval="1000" chance="25" min="2000" max="3000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="1800" duration="4000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="1"/> <immunity fire="1"/> <immunity death="1"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="dwarf warmaster" interval="1000" chance="8" max="2"/> </summons> <voices interval="5000" chance="10"> <voice sentence="Worship Zathroth pathetic mortal!"/> <voice sentence="Your soul will be mine!"/> <voice sentence="ASHES TO ASHES!" yell="1"/> <voice sentence="YOU WILL ALL BURN!" yell="1"/> <voice sentence="THE DAY OF RECKONING IS AT HAND!" yell="1"/> <voice sentence="BOW TO THE POWER OF THE RUTHLESS SEVEN!" yell="1"/> </voices> <loot capacity="5000"> <item id="2142" countmax="1" chance="3500"/> <item id="2393" countmax="1" chance="12500"/> <item id="2148" countmax="100" chance="99900"/> <item id="2148" countmax="100" chance="88800"/> <item id="2148" countmax="100" chance="77700"/> <item id="2148" countmax="100" chance="66600"/> <item id="2179" countmax="1" chance="8000"/> <item id="2470" countmax="1" chance="5000"/> <item id="2436" countmax="1" chance="5000"/> </loot> CREATURESCRIPT: [nome da pasta da quest: AncientLightDwarvenKingdom] local tpId = 1387 local tps = { ["Ashkarah"] = {pos = {x=32711, y=31316, z=14}, toPos = {x=32689, y=31470, z=13}, time = 60}, } 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 creaturescript (scrip principal): <event type="death" name="tp" event="script" value="AncientLightDwarvenKingdom.lua"/> se puder me mandar o script todo arrumado já, agradeço um monte... da uma bizu ai... no erro (esse erro aparece depois que mata o bixo) [16/6/2014 13:3:7] [Warning - Monster::Monster] Unknown event name - AncientLightDwarvenKingdom como esta no meus scripts: MONSTER: <?xml version="1.0" encoding="UTF-8"?> <monster name="Ashkarah" nameDescription="a Ashkarah" race="blood" experience="25000" speed="270" manacost="0"> <health now="950" max="950"/> <look type="12" head="95" body="215" legs="215" feet="215" corpse="7349"/> <targetchange interval="2000" chance="15"/> <strategy attack="60" defense="5"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag runonhealth="0"/> </flags> <script> <event name="AncientLightDwarvenKingdom"/> </script> <attacks> <attack name="melee" interval="2000" skill="190" attack="210"/> <attack name="firecondition" interval="1000" chance="7" range="2" min="-1000" max="-1800"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="7" radius="3" target="0" min="-380" max="-950"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="50" radius="3" target="0" min="-500" max="-900"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="34" range="7" radius="3" target="3" min="-200" max="-650"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="13" length="7" spread="0" min="-500" max="-900"> <attribute key="areaEffect" value="explosion"/> </attack> <attack name="death" interval="1000" chance="10" length="7" spread="3" min="-300" max="-800"> <attribute key="areaEffect" value="explosion"/> </attack> </attacks> <defenses armor="165" defense="150"> <defense name="healing" interval="1000" chance="15" min="5000" max="10000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="healing" interval="1000" chance="25" min="2000" max="3000"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="10" speedchange="1800" duration="4000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <immunities> <immunity physical="0"/> <immunity energy="1"/> <immunity fire="1"/> <immunity death="1"/> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="dwarf warmaster" interval="1000" chance="8" max="2"/> </summons> <voices interval="5000" chance="10"> <voice sentence="Worship Zathroth pathetic mortal!"/> <voice sentence="Your soul will be mine!"/> <voice sentence="ASHES TO ASHES!" yell="1"/> <voice sentence="YOU WILL ALL BURN!" yell="1"/> <voice sentence="THE DAY OF RECKONING IS AT HAND!" yell="1"/> <voice sentence="BOW TO THE POWER OF THE RUTHLESS SEVEN!" yell="1"/> </voices> <loot capacity="5000"> <item id="2142" countmax="1" chance="3500"/> <item id="2393" countmax="1" chance="12500"/> <item id="2148" countmax="100" chance="99900"/> <item id="2148" countmax="100" chance="88800"/> <item id="2148" countmax="100" chance="77700"/> <item id="2148" countmax="100" chance="66600"/> <item id="2179" countmax="1" chance="8000"/> <item id="2470" countmax="1" chance="5000"/> <item id="2436" countmax="1" chance="5000"/> </loot> CREATURESCRIPT: [nome da pasta da quest: AncientLightDwarvenKingdom] local tpId = 1387 local tps = { ["Ashkarah"] = {pos = {x=32711, y=31316, z=14}, toPos = {x=32689, y=31470, z=13}, time = 60}, } 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 creaturescript (scrip principal): <event type="death" name="tp" event="script" value="AncientLightDwarvenKingdom.lua"/> se puder me mandar o script todo arrumado já, agradeço um monte...
Postado Junho 16, 2014 10 anos Solução Creaturescripts/Scripts: local tpId = 1387 local tps = { ["NomeDoMonstro"] = {pos = {x=221, y=82, z=15}, toPos = {x=200, y=73, z=15}, time = 30}, -- Onde o Teleport irá aparecer e onde ele levará o Player. Em 'Time', configurar tempo em segundos para o TP desapecer. } 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 Creaturescripts.xml <event type="death" name="tp" event="script" value="NomeDoArquivo.lua"/> Monster: No monstro que você quer que abra o portal ao morrer, adicione essa tag nele: <script> <event name="tp"/> </script>
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.