Postado Janeiro 6, 2018 7 anos Galera estou com um problemão, estou tentando fazer um evento acontecer quando uma criatura morre, que é aparecer um tp por um periodo de tempo porem não tem geito de funcionar ME AJUDEM POR FAVOR. ESTE É O MONSTRO <?xml version="1.0" encoding="UTF-8"?> <monster name="Dream Eater" nameDescription="a dream eater" race="psychic" experience="2000" speed="527" manacost="0"> <health now="1400" max="1400"/> <look type="2148" head="45" body="65" legs="95" feet="113" corpse="11893"/> <targetchange interval="2000" chance="0"/> <strategy attack="100" defense="0"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="1"/> <flag pushable="1"/> <flag canpushitems="0"/> <flag canpushcreatures="0"/> <flag targetdistance="1"/> <flag staticattack="97"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" chance="100" range="1" min="-500" max="-1000"/> <attack name="Psybeam" interval="2570" chance="31" range="1"/> <!-- Magina nao pertence a esse pokemon <attack name="Headbutt" interval="2711" chance="30" range="1"/> --> --> <attack name="Confusion" interval="2805" chance="29" range="6"/> <attack name="Psywave" interval="2605" chance="29" range="6"/> <attack name="Psychic" interval="3005" chance="25" range="6"/> <attack name="Dream Eater" interval="5070" chance="28" range="6"/> <attack name="Focus" interval="4920" chance="20" range="3"/> <attack name="Hypnosis" interval="5061" chance="20" range="3"/> </attacks> <defenses armor="0" defense="0"/> <voices interval="5000" chance="10"> <voice sentence="HYPNO!"/> </voices> <loot> <item id="12194" chance="30" count="1" countmax="1"/> --future orb <item id="13785" chance="100" countmax="70"/> --enchanted gem <item id="11452" chance="5" count="1" countmax="1"/> --enigma stone </loot> <script> <event name="Spawn"/> </script> <script> <event name="tp"/> </script> </monster> ESTE É O SCRIPT tp.lua local tpId = 1387 local tps = { ["Dream Eater"] = {pos = {x=224, y=1157, z=7}, toPos = {x=271, y=1157, z=7}, time = 300}, } 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 ESTE É O XML <event type="death" name="tp" event="script" value="tp.lua"/>
Postado Janeiro 6, 2018 7 anos @Arrazado Tenta Assim: Seu Server/Data/Creaturescripts/Scripts e Cria Arquivo .LUA com o nome Dream Eater Citar local tps = { [""Dream Eater"] = {pos = {x=224, y=1157, z=7}, toPos = {x=1128, y=831, z=7}, time = 50}, } local function removeTp(tp) local t = getTileItemById(tp.pos, 5023).uid return t > 0 and doRemoveItem(t) and doSendMagicEffect(tp.pos, CONST_ME_POFF) end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(5023, 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 Depois Em Seu Server/Data/Creaturescripts/Creaturescripts.XML Adiciona Esta Tag: Citar <event type="death" name="Dream Eater" event="script" value="Dream Eater.lua"/> Em Seu Server/Data/Monster/.... Adicione E Adicione Um Arquivo .XML Com O Nome Dream Eater e Joga Isso Dentro Citar <?xml version="1.0" encoding="UTF-8"?> <monster name="Dream Eater" nameDescription="Dream Eater" race="psychic" experience="2000" speed="527" manacost="0"> <health now="9065000" max="9065000"/> <look type="337" head="0" body="94" legs="79" feet="79" corpse="0"/> <targetchange interval="9000" chance="100"/> <strategy attack="90" defense="20"/> <flags> <flag summonable="1"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="1"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="2"/> <flag staticattack="65"/> <flag runonhealth="0"/> </flags> <script> <event name="Dream Eater"/> </script> <attacks> <attack name="melee" interval="4000" min="-2010" max="-3140"/> <attack name="manadrain" interval="1000" chance="10" range="7" min="-110" max="-125"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="amaterasu" interval="3500" chance="1000" radius="4" target="0" min="-14340" max="-15600"> </attack> </attacks> <defenses armor="80" defense="80"> <defense name="healing" interval="4000" chance="40" min="300" max="300"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="4000" chance="10" speedchange="450" duration="3000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element physicalPercent="20"/> <element icePercent="10"/> <element holyPercent="-15"/> <element deathPercent="35"/> </elements> <immunities> <immunity paralyze="1"/> <immunity lifedrain="1"/> <immunity outfit="1"/> <immunity drunk="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="Vamos matar todooos.." yell="1"/> <voice sentence="Iahaha...nao somos nojentos, voces que sao!!!"/> </voices> <loot> <item id="2160" countmax="7" chance="4000"/><!-- gold bar --> <item id="7875" countmax="1" chance="4000"/><!-- dual slayer glove --> <item id="2395" countmax="1" chance="4000"/><!-- akatsuki armor --> <item id="2529" countmax="1" chance="4000"/><!-- akatsuki boots --> </loot> </monster> Só Arruma O LookType, Vida, Atks pro seu bixo Esta Tag No Monsters.XML Citar <monster name="Dream Eater" file="PASTA TAL/Dream Eater.xml"/> Editado Janeiro 6, 2018 7 anos por Hokograma (veja o histórico de edições) Projeto Nto Myth " Eu to disposto a lutar e que se foda todo mundo que duvida que eu vou tocar o terror na porra toda! "
Postado Janeiro 6, 2018 7 anos Adicionou Certo O Caminho Dessa Tag? 2 horas atrás, Hokograma disse: <monster name="Dream Eater" file="PASTA TAL/Dream Eater.xml"/> ? Nao Tem 2 Monstros Com O Mesmo Nome? Projeto Nto Myth " Eu to disposto a lutar e que se foda todo mundo que duvida que eu vou tocar o terror na porra toda! "
Postado Janeiro 6, 2018 7 anos Autor N FUNCIONOU MANO VC PODERIA EDITAR A CRIATURA QU EEU ENVIEI ACIMA? QUEM SABE FUNCIONE SEI LA
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.