Postado Julho 24, 2014 10 anos {Remover Trap} Explicação de como funciona o script. Então Galera do Tk queria ajuda pra arruma esse script aqui mas n sei pq n ta funfando direito. E tipo quando eu coloca um monster pelo Remerer o bixo cria os trap para os player n passar. ai quando os player matar o boss os Trap Vai sumir. ==================================================================================================== Script. Esse script um amigo aqui do tk ajudo a cria ele. Mas n ta funcionando direito pra começa tipo eu fiz assim coloquei um 1 boss Guardiao que eu criei pelo remerer. to com duvida se tenho que colocar algo no script do monstro que eu criei. o Script aqui em baixo . creaturescripts\scripts\nomequalquer.lua function onKill(cid, target, lastHit) local tempo = 20*1000 local idparede = 1596 --DIGITE AQUI O ID DAS TRAPS ------ POSIÇÃO DAS TRAPS ---------- local wall1 = {x=1193, y=1946, z=8, stackpos=1} local pos1 = getThingfromPos(wall1) local wall2 = {x=1193, y=1947, z=8, stackpos=1} local pos2 = getThingfromPos(wall2) local wall3 = {x=1193, y=1948, z=8, stackpos=1} local pos3 = getThingfromPos(wall3) ---------------------------------------- function wait3(wall3) doCreateItem(idparede,1,wall3) end function wait1(wall1) doCreateItem(idparede,1,wall1) end function wait2(wall2) doCreateItem(idparede,1,wall2) end if isMonster(target) and getCreatureName(target):lower() == 'Guardiao dos Trap' then---boss que vai remover as trap ao morrer doPlayerSendTextMessage(cid,22,"Voce Matou o Boss As Traps foram Removidas!") local storage = getPlayerStorageValue(cid,13340) if storage ~= 1 then ------------ FUNÇÃO DE REMOVER ------------- doRemoveItem(pos1.uid,1) doSendMagicEffect(pos1,12) doRemoveItem(pos2.uid,1) doSendMagicEffect(pos2,12) doRemoveItem(pos3.uid,1) doSendMagicEffect(pos3,12) ----------------------------------------------------------------------- addEvent(wait1,tempo,wall1) addEvent(wait2,tempo,wall2) addEvent(wait3,tempo,wall3) setPlayerStorageValue(cid, 13340, 1) end end return true end <event type="kill" name="apasta" script="qualquer.lua"/> registerCreatureEvent(cid, "apasta") e isso. ==================================================================================================== Script do monstro : tenho que colocar algo no script do monstro ? <?xml version="1.0" encoding="UTF-8"?> <monster name="Guardiao dos Trap" nameDescription="Guardiao dos Trap" race="blood" experience="900" speed="0" manacost="0"> <health now="65000000" max="65000000"/> <look type="131" head="57" body="19" legs="57" feet="95" addons="1" corpse="6080"/> <targetchange interval="5000" chance="30"/> <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="1"/> <flag targetdistance="4"/> <flag staticattack="90"/> <flag runonhealth="800"/> </flags> <attacks> <attack name="melee" interval="2000" min="3000" max="4000"/> <attack name="physical" interval="1000" chance="35" range="7" min="2005" max="2685"> <attribute key="shootEffect" value="energy"/> </attack> <attack name="manadrain" interval="1000" chance="17" range="7" min="2005" max="2560"/> <attack name="speed" interval="1000" chance="12" range="7" speedchange="-600" duration="40000"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="45" range="7" radius="3" target="1" min="250" max="420"> <attribute key="shootEffect" value="burstarrow"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="20" range="7" radius="2" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="25" length="8" spread="0" min="265" max="445"> <attribute key="areaEffect" value="energy"/> </attack> <attack name="speed" interval="6000" chance="10" range="5" speedchange="-600" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </attack> </attacks> <defenses armor="1" defense="1"/> <elements> <element firePercent="100"/> <element energyPercent="100"/> <element icePercent="100"/> <element earthPercent="90"/> <element holyPercent="-25"/> <element physicalPercent="-33"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="deathspawn" interval="1500" chance="0" max="0"/> </summons> <loot> <item id="2148" countmax="20" chance1="100000" chancemax="0"/> </loot> </monster> ==================================================================================================== oque n funciona ? N Tem trap pra trapa era pra ter as trap quando o boss nasce coloquei o respaw de 1 boos pelo remerer mas n funfa. +REP PRA QUEM AJUDA PLSS SO FALTA ISSO PRA MIM TERMINA O EVENTO QuE To fazendo esse evento a 2 dias so falta isso kkk vllww up pls
Postado Julho 24, 2014 10 anos Tente mudar o script do monster para este : <?xml version="1.0" encoding="UTF-8"?> <monster name="Guardiao dos Trap" nameDescription="Guardiao dos Trap" race="blood" experience="900" speed="0" manacost="0"> <health now="65000000" max="65000000"/> <look type="131" head="57" body="19" legs="57" feet="95" addons="1" corpse="6080"/> <targetchange interval="5000" chance="30"/> <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="1"/> <flag targetdistance="4"/> <flag staticattack="90"/> <flag runonhealth="800"/> </flags> <attacks> <attack name="melee" interval="2000" min="3000" max="4000"/> <attack name="physical" interval="1000" chance="35" range="7" min="2005" max="2685"> <attribute key="shootEffect" value="energy"/> </attack> <attack name="manadrain" interval="1000" chance="17" range="7" min="2005" max="2560"/> <attack name="speed" interval="1000" chance="12" range="7" speedchange="-600" duration="40000"> <attribute key="areaEffect" value="redshimmer"/> </attack> <attack name="fire" interval="2000" chance="45" range="7" radius="3" target="1" min="250" max="420"> <attribute key="shootEffect" value="burstarrow"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="1000" chance="20" range="7" radius="2" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="25" length="8" spread="0" min="265" max="445"> <attribute key="areaEffect" value="energy"/> </attack> <attack name="speed" interval="6000" chance="10" range="5" speedchange="-600" duration="20000"> <attribute key="areaEffect" value="redshimmer"/> </attack> </attacks> <defenses armor="1" defense="1"/> <elements> <element firePercent="100"/> <element energyPercent="100"/> <element icePercent="100"/> <element earthPercent="90"/> <element holyPercent="-25"/> <element physicalPercent="-33"/> </elements> <immunities> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="2"> <summon name="deathspawn" interval="1500" chance="0" max="0"/> </summons> <loot> <item id="2148" countmax="20" chance1="100000" chancemax="0"/> </loot> <script> <event name="teleportmonster"/> </script> </monster> E use está tag no xml : <event type="death" name="teleportmonster" script="nomequalquer.lua"/> Ajudei = REP+ Não dou suporte por PM qualquer dúvida procure no fórum,caso não encontre oque procura crie um tópico. [email protected]" /> | TFS 0.4 DEV | %5Bcreaturescript%5D Icones no minimap com descrição%5Btalkaction%5D Adicionar ou remover VIP do player.%5Bcreaturescripts%5D Senha para porta%5Btalkaction%5D Mandar mensagem para pasta do servidorMapa Evento War Castle%5Baction%5D Canoa em MovimentoTeleport Scroll System%5Bcreaturescripts%5D Recompensa por level para X vocations%5Btalkaction%5D Adicionar X item para o player%5Btalkactions%5D Adicionar item para todos players online%5Baction%5D Item que teleporta o player para house[action+movement] Passaporte para entrar no barco
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.