Ir para conteúdo
Entre para seguir isso  
vyctor17

Wave Arena v1

Recommended Posts

vyctor17    35
vyctor17

Nome: Wave Arena v.1 
Autor: vyctor17 
Versão Testada: TFS 0.3.6PL1 (8.54)

O que o script faiz ?

(Video auto-explicativo)

 

 

Monster:

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Gate" nameDescription="a Gate" race="undead" experience="0" speed="0" manacost="0">
   <health now="10000" max="40"/>
   <look typeex="9533"/>
   <targetchange interval="5000" chance="20"/>
   <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="0"/>
       <flag canpushcreatures="1"/>
       <flag targetdistance="1"/>
       <flag staticattack="90"/>
       <flag runonhealth="100"/>
       <flag hidehealth="0"/>
   </flags>
   <attacks>
   </attacks>
   <immunities>
       <immunity physical="0"/>
       <immunity energy="0"/>
       <immunity fire="0"/>
       <immunity poison="1"/>
       <immunity ice="1"/>
       <immunity holy="0"/>
       <immunity death="1"/>
       <immunity lifedrain="1"/>
       <immunity manadrain="1"/>
       <immunity paralyze="1"/>
       <immunity drunk="1"/>
       <immunity outfit="1"/>
       <immunity invisible="1"/>
   </immunities>

<script>
   <event name="arena"/>
</script>
</monster>

Tag:

    <event type="death" name="arena" event="script" value="arena.lua"/>

Script:

function startEvent(num)
   local names ={
       ['wave1'] ={'ghost', 'Dragon', 'energy elemental', 'ghost', 'Dragon', 'energy elemental','ghost', 'Dragon', 'energy elemental'},
       ['wave2'] ={'hydra', 'warlock', 'Dragon Lord', 'hydra', 'warlock', 'Dragon Lord', 'hydra', 'warlock', 'Dragon Lord'},
       ['wave3'] ={'demon', 'Fury', 'Hellhound', 'demon', 'Fury', 'Hellhound', 'demon', 'Fury', 'Hellhound'},
       ['wave4'] ={'Juggernaut', 'hellgorak', 'Ushuriel', 'Juggernaut', 'hellgorak', 'Ushuriel', 'Juggernaut', 'hellgorak', 'Ushuriel'},
       }
   local spaws = {
       [1] = {x= 1007, y= 1016,z= 7},
       [2] = {x= 1007,y= 1016,z= 7},
       [3] = {x= 1007,y= 1016,z= 7},
       [4] = {x= 1007,y= 1016,z= 7},
       }
   for i= 1, 9 do
       addEvent(doCreateMonster, 3 * 300, names['wave'..num][i], spaws[math.random(1,4)]) 
   end
end
function onDeath(cid, corpse, deathList)
   local id = 9533
   local rd = math.random(46000, 50000)
   local wall = doCreateItem(id, 1, getCreaturePosition(cid))
   doItemSetAttribute(wall, 'uid', rd)
   wall = rd
   for i= 1, 3 do
       addEvent(doSendMagicEffect, i * 1000, getCreaturePosition(cid), 2) 
   end
   addEvent(doRemoveItem, 4000, wall)
   addEvent(doSendAnimatedText, 4000, getCreaturePosition(cid), "Gate Down!!", 12)
   addEvent(doSendMagicEffect, 4000, getCreaturePosition(cid), 34)
   addEvent(doCreateMonster, 1 * 60 * 1000, "Gate", getCreaturePosition(cid))
   for i= 1, 4 do
       addEvent(startEvent, i * 60 * 1000, i)
   end
end

 

 

OBS:

configurar os spaws no script

Editado por vyctor17

Compartilhar este post


Link para o post
iuniX    4
iuniX

Indentação perfeita, bem organizado. Porem o nível do código e da ideia deixou a desejar. Mas parabéns e obrigado pela colaboração.

 

 

Aprovado e movido.

Compartilhar este post


Link para o post
Gustavo665    0
Gustavo665

Issai fez as tabelas como eu tinha te tido, finalmente vc aprendeu.

Compartilhar este post


Link para o post
vyctor17    35
vyctor17

me deu block no msn safado '-' ?

uehue uma hora eu tinha que aprender

Compartilhar este post


Link para o post
Biozard    0
Biozard

gostei cara..vlw vo usar se pá

Compartilhar este post


Link para o post
Azzkaban    0
Azzkaban

Music name?

Compartilhar este post


Link para o post
hiquez12    0
hiquez12

teria como no final de todas as wave fazer com que os sobreviventes ganhassem um premio ?

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×