guixap 60 Postado Agosto 30, 2009 Share Postado Agosto 30, 2009 (editado) QUERIA PEDI UM SCRIPT AE, QUANDO MONSTRO MORRER SURGI UM TELEPORT DURANTE 2 MIN POR EXEMPLO VLWS DEIS DE JAH Editado Agosto 31, 2009 por XaPiNhAl Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/ Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 30, 2009 Share Postado Agosto 30, 2009 QUERIA PEDI UM SCRIPT AE, QUANDO MONSTRO MORRER SURGI UM TELEPORT DURANTE 2 MIN POR EXEMPLO VLWS DEIS DE JAH Blz vamo la... 1º Em data/creaturescripts/scripts/ crie um chamado monsterkilled.lua 2º Coloque endentro: function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "MonsterKilled") local in_pos = {x=859, y=837, z=6, stackpos=2} -- lugar que aparece o teleport local to_pos = {x=588, y=1086, z=7, stackpos=1} -- lugar que vai ir o teleport local timeremove = 180 -- em segundos local message = "Msg aqui" -- msg local monsterhere = 'Orshabaal' -- nome do monstro local creaturename = getCreatureName(cid) if creaturename == monsterhere then doCreateTeleport(1387, to_pos, in_pos) doSendMagicEffect(in_pos, CONST_ME_TELEPORT) doCreatureSay(cid, message, TALKTYPE_ORANGE_1) addEvent(removeTeleport, (1000*timeremove)) end end function removeTeleport() if getThingfromPos(in_pos).itemid == 1387 then doRemoveItem(getThingfromPos(in_pos).uid,1) doSendMagicEffect(in_pos, CONST_ME_POFF) return TRUE end end Edite conforme suas nessecidades... 3º Em data/creaturescripts/creaturescripts.xml <event type="death" name="MonsterKilled" script="monsterkilled.lua"/> 4º Em data/creaturescripts/scripts/login.lua Embaixo de registerCreatureEvent(cid, "Mail") Adicione registerCreatureEvent(cid, "MonsterKilled") 5º Agora vai em data/monster/ Escolha o monstro que vai ter que matar e adicione a ele no final de </flags> vai ficar assim: </flags> <script> <event name="MonsterKilled"/> </script> Fim. *Qualquer coisa fala ai Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-785794 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 30, 2009 Autor Share Postado Agosto 30, 2009 AE LEK BUGO, SO NA HOPRA DE EXECUTA O OT, =/ FUDEU E AGORA ?/ SE PUDER ADD MSN GUI_HAST@HOTMAIL.COM Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-785805 Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 30, 2009 Share Postado Agosto 30, 2009 oque aparece? Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-785811 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 30, 2009 Autor Share Postado Agosto 30, 2009 oque aparece? SISMPLESMENTE N CARREGA FALANDO DE UM PROBLEMA NA PASTA CREATURESCRIPTS =/ DAE DA DEBUG NO EXECUTER Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-785824 Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 30, 2009 Share Postado Agosto 30, 2009 (editado) SISMPLESMENTE N CARREGA FALANDO DE UM PROBLEMA NA PASTA CREATURESCRIPTS =/ DAE DA DEBUG NO EXECUTER guenta ai que eu ja ajeito aqui *edit so muda esse function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "MonsterKilled") in_pos = {x=703, y=600, z=7, stackpos=1} -- lugar que aparece o teleport to_pos = {x=703, y=603, z=7, stackpos=1} -- lugar que vai ir o teleport timeremove = 180 -- em segundos message = "Msg aqui" -- msg monsterhere = 'Pythius The Rotten' -- nome do monstro local creaturename = getCreatureName(cid) if creaturename == monsterhere then doCreateTeleport(1387, to_pos, in_pos) doSendMagicEffect(in_pos, CONST_ME_TELEPORT) doCreatureSay(cid, message, TALKTYPE_ORANGE_1) addEvent(removeTeleport, (1000*timeremove)) end end function removeTeleport() if getThingfromPos(in_pos).itemid == 1387 then doRemoveItem(getThingfromPos(in_pos).uid,1) doSendMagicEffect(in_pos, CONST_ME_POFF) return TRUE end end esta funcionando agora =D Editado Agosto 31, 2009 por kkk11111 Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-785827 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 31, 2009 Autor Share Postado Agosto 31, 2009 LEK N SEIS E EU TO FAZENDU ALGUMA COISA ERRADA OU O SCRIPT TEM ALGUMA COISA N TA DANDO AKI LEK O ERRO QEU APARECEU NO EXECUTER [31/08/2009 11:43:02] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:43:03] Warning: [Monster::Monster]. Unknown event name - MonsterKilled [31/08/2009 11:42:32] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/monsterkilled.lua) [31/08/2009 11:42:32] cannot open data/creaturescripts/scripts/monsterkilled.lua: No such file or directory Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-785999 Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 31, 2009 Share Postado Agosto 31, 2009 Voce tem que criar em data/creaturescripts/scripts/ um arquivo chamado monsterkilled.lua com isso dentro: function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "MonsterKilled") in_pos = {x=703, y=600, z=7, stackpos=1} -- lugar que aparece o teleport to_pos = {x=703, y=603, z=7, stackpos=1} -- lugar que vai ir o teleport timeremove = 180 -- em segundos message = "Msg aqui" -- msg monsterhere = 'Pythius The Rotten' -- nome do monstro local creaturename = getCreatureName(cid) if creaturename == monsterhere then doCreateTeleport(1387, to_pos, in_pos) doSendMagicEffect(in_pos, CONST_ME_TELEPORT) doCreatureSay(cid, message, TALKTYPE_ORANGE_1) addEvent(removeTeleport, (1000*timeremove)) end end function removeTeleport() if getThingfromPos(in_pos).itemid == 1387 then doRemoveItem(getThingfromPos(in_pos).uid,1) doSendMagicEffect(in_pos, CONST_ME_POFF) return TRUE end end Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786003 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 31, 2009 Autor Share Postado Agosto 31, 2009 AE LEK, TUDO SUCI N APARECE MASI ERRO SO QEU AGORA HEHE, EU MATO O MONSTRO TALS ESSE MONSTRO COMO FUNCIONA EU SO COLOKEI ELE COM O MAP EDITOR TALS DAE EU FUI MATEI ELE E N APARECEU NADAH Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786009 Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 31, 2009 Share Postado Agosto 31, 2009 (editado) AE LEK, TUDO SUCI N APARECE MASI ERRO SO QEU AGORA HEHE, EU MATO O MONSTRO TALS ESSE MONSTRO COMO FUNCIONA EU SO COLOKEI ELE COM O MAP EDITOR TALS DAE EU FUI MATEI ELE E N APARECEU NADAH Tem que configurar aqui ... .... in_pos = {x=703, y=600, z=7, stackpos=1} -- lugar que aparece o teleport to_pos = {x=703, y=603, z=7, stackpos=1} -- lugar que vai ir o teleport timeremove = 180 -- em segundos message = "Msg aqui" -- msg monsterhere = 'Pythius The Rotten' -- nome do monstro .... Você tem que fazer um bicho unico no ot ou se voce coloca um demon por exemplo, cada vez que alguem mata qualquer demon vai executar a função no caso criar o teleport. Faça um bicho proprio para isso ai Editado Agosto 31, 2009 por kkk11111 Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786043 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 31, 2009 Autor Share Postado Agosto 31, 2009 isso eu jah fiz mais tipo vo mato bixo n aparece lek =/ Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786050 Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 31, 2009 Share Postado Agosto 31, 2009 isso eu jah fiz mais tipo vo mato bixo n aparece lek =/ Posta ai como se deixou seu script Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786051 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 31, 2009 Autor Share Postado Agosto 31, 2009 <?xml version="1.0" encoding="UTF-8"?> <monster name="Woul" nameDescription="a woul" race="blood" experience="25000" speed="0" manacost="0"> <health now="50000" max="50000"/> <look type="80" head="20" body="30" legs="40" feet="50" corpse="6020"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> [i][color="#0000FF"][b] <script> <event name="MonsterKilled"/> </script>[/b][/color][/i] </flags> <attacks> <attack name="melee" interval="2000" skill="250" attack="250"/> <attack name="fire" interval="2000" chance="50" range="7" min="-1545" max="-1875"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="death" interval="1000" chance="10" range="7" min="-1550" max="-1905"> <attribute key="shootEffect" value="death"/> </attack> <attack name="ice" interval="3000" chance="18" radius="6" target="0" min="-1660" max="-1780"> <attribute key="areaEffect" value="bigplants"/> </attack> <attack name="lifedrain" interval="3000" chance="25" range="7" min="-1955" max="-2105"> <attribute key="shootEffect" value="suddendeath"/> </attack> <attack name="drunk" interval="1000" chance="20" range="7"> <attribute key="shootEffect" value="energy"/> <attribute key="areaEffect" value="energyarea"/> </attack> <attack name="outfit" interval="1000" chance="17" range="7" monster="rabbit" duration="20000"> <attribute key="areaEffect" value="blueshimmer"/> </attack> </attacks> <defenses armor="20" defense="10"/> <elements> <element firePercent="85"/> <element deathPercent="50"/> <element energyPercent="50"/> <element icePercent="-50"/> <element holyPercent="15"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="Simsalabim"/> <voice sentence="Shuriquantalas, rsrsr!"/> <voice sentence="Seu Corno inquanto tu joga tibia tua muie ta na cama do vizinho."/> <voice sentence="Auashaushuasha, Corno, Corno, Corno, Corno e Corno."/> </voices> <loot> <item id="1978" countmax="1" chance="2500"/> <item id="2745" countmax="1" chance="1000"/> <item id="7378" countmax="2" chance1="2000" chancemax="0"/> <item id="2146" countmax="4" chance="2500"/> <item id="2148" countmax="20" chance1="100000" chancemax="0"/> <item id="2684" countmax="5" chance1="50000" chancemax="0"/> <item id="2146" countmax="4" chance1="6666" chancemax="0"/> <item id="2663" countmax="1" chance="100"/> <item id="1971" chance="10000"/> <item id="2044" chance="20000"/> <item id="2063" countmax="1" chance="7500"/> <item id="5938" countmax="1" chance="1000"/> <item id="5912" countmax="1" chance1="5000" chancemax="0"/> </loot> </monster> ae olha lah e ve se essa a tag que tu me passo <script> <event name="MonsterKilled"/> </script> ta no lugar certo ta em negrito ae Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786052 Compartilhar em outros sites More sharing options...
kkk111 8 Postado Agosto 31, 2009 Share Postado Agosto 31, 2009 (editado) coloca o creatureevents Edit Ai está errado -Não é assim <script> <event name="MonsterKilled"/> </script> </flags> -É assim </flags> <script> <event name="MonsterKilled"/> </script> Editado Agosto 31, 2009 por kkk11111 Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786053 Compartilhar em outros sites More sharing options...
guixap 60 Postado Agosto 31, 2009 Autor Share Postado Agosto 31, 2009 AEL LEK PELA 3ª VEZ TU ME SALVA AKI NOS TOPICOS DO XTIBIA ^^, BRIGADÃO RESOLVIDO JAH VLWS Link para o comentário https://xtibia.com/forum/topic/119439-resolvido-aparece-teleport-quando-monster-morre/#findComment-786056 Compartilhar em outros sites More sharing options...
Posts Recomendados