Postado Março 23, 2014 11 anos Eu queria adicionar 6 mostro nessa anihi pra quando pusharem a alavanca os mostro aparecer ,ta ae meu script e o mostro caso precise editar MINHA ANIHI function onUse(cid, item, fromPosition, itemEx, toPosition) local config = { position = {x=1183, y=1224, z=7}, -- Posição aonde sera criado o teleport position1 = {x=1177, y=1241, z=8}, position2 = {x=1177, y=1249, z=8}, position3 = {x=1183, y=1241, z=8}, position4 = {x=1183, y=1249, z=8}, fromPosition = {x=1176, y=1240, z=8}, toPosition = {x=1183, y=1249, z=8}, walls = {x=1177, y=1224, z=7}, wallr = {x=1177, y=1224, z=7, stackpos = 1}, id = 1498, time = 2 -- tempo que o teleport ira sumir em minutos } local t = { level = 120, -- level minimo para poder entrar inicio = -- posical inicial dos players { {x=1184,y=1224,z=7}, {x=1183,y=1224,z=7}, {x=1182,y=1224,z=7}, {x=1181,y=1224,z=7}, {x=1180,y=1224,z=7} }, fim = -- posição para onde serão teleportados { {x=1182,y=1245,z=8}, {x=1181,y=1245,z=8}, {x=1180,y=1245,z=8}, {x=1179,y=1245,z=8}, {x=1178,y=1245,z=8} } } local time = 120 local sto = 5937 local test = {} for _, k in ipairs(t.inicio) do local x = getTopCreature(k).uid if(x == 0 or not isPlayer(x) or getPlayerLevel(x) < t.level) then doPlayerSendCancel(cid, 'Você precisa de 5 jogadores') return true end if getGlobalStorageValue(sto) == 1 then doPlayerSendCancel(cid, 'Espere o tempo acabar') return true end table.insert(test, x) end for i, pid in ipairs(test) do doSendMagicEffect(t.inicio, CONST_ME_POFF) doTeleportThing(pid, t.fim, false) doSendMagicEffect(t.fim, CONST_ME_ENERGYAREA) doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) end setGlobalStorageValue(sto, 1) for i = 1,time do formula = time - 1*i addEvent(doSendAnimatedText,i*1000, config.position, formula, math.random(1, 255)) addEvent(doSendAnimatedText,i*1000, config.position1, formula, math.random(1, 255)) addEvent(doSendAnimatedText,i*1000, config.position2, formula, math.random(1, 255)) addEvent(doSendAnimatedText,i*1000, config.position3, formula, math.random(1, 255)) addEvent(doSendAnimatedText,i*1000, config.position4, formula, math.random(1, 255)) end function removeWall() setGlobalStorageValue(sto, -1) return true end addEvent(removeWall, config.time*60*1000) for x = config.fromPosition.x, config.toPosition.x do for y = config.fromPosition.y, config.toPosition.y do for z = config.fromPosition.z, config.toPosition.z do areapos = {x = x, y = y, z = z, stackpos = 253} getMonsters = getThingfromPos(areapos) if isMonster(getMonsters.uid) then doRemoveCreature(getMonsters.uid) end end end end function removePlayer() if isInArea(getPlayerPosition(cid), config.fromPosition, config.toPosition) then doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) end end addEvent(removePlayer, config.time*60*1000) return TRUE end MEU MONSTRO <?xml version="1.0" encoding="UTF-8"?> <monster name="Annihilon" nameDescription="annihilon" race="fire" experience="0" speed="500" manacost="0"> <health now="400000" max="400000"/> <look type="12" head="0" body="19" legs="0" feet="0" corpse="6068"/> <targetchange interval="2000" chance="10"/> <strategy attack="70" defense="10"/> <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> <attacks> <attack name="melee" interval="2000" skill="10" attack="2000"/> <attack name="effect" interval="700" chance="6" radius="5" target="0"> <attribute key="areaEffect" value="blackspark"/> </attack> <attack name="fire" interval="2000" chance="43" range="7" radius="7" target="1" min="-700" max="-1000"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="firefield" interval="2000" chance="10" range="7" radius="4" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="energy" interval="2000" chance="15" length="8" spread="0" min="-700" max="-1000"> <attribute key="areaEffect" value="energy"/> </attack> </attacks> <defenses armor="90" defense="111"> <defense name="healing" interval="1000" chance="10" min="700" max="1400"> <attribute key="areaEffect" value="blueshimmer"/> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element firePercent="0"/> <element earthPercent="0"/> <element deathPercent="0"/> <element icePercent="0"/> <element holyPercent="0"/> </elements> <immunities> <immunity lifedrain="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <voices interval="5000" chance="10"> <voice sentence="You Are Dead" yell="1"/> <voice sentence="Run From Here" yell="1"/> <voice sentence="You Will not pass!!!" yell="1"/> <voice sentence="Be prepared for the day my masters will come for you!"/> <voice sentence="SOULS FOR ORSHABAAL!" yell="1"/> </voices> <loot> <item id="2160" countmax="8" chance="125000"/><!-- crystal coin --> <item id="2160" countmax="9" chance="125000"/><!-- Crystal coin --> <item id="2160" countmax="8" chance="125000"/><!-- Crystal coin --> </loot> </monster> anihi.lua annihilon.xml Editado Março 23, 2014 11 anos por damiaotorres (veja o histórico de edições)
Postado Março 23, 2014 11 anos dica: cole o script aqui porque muita gente vai ter preguiça de ler isso aí inclusive eu Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá! "Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda (obg ao @Beeny por fazer essa linda sign <3)
Postado Março 23, 2014 11 anos Autor Pronto ta ae o script Editado Março 27, 2014 11 anos por damiaotorres (veja o histórico de edições)
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.