TeaM KingS
[center]Ola Convidado, seja bem vindo ao TeaM KingS !

Nós temos tutoriais sobre o WarCraft World Editor: se você tiver alguma duvida pode perguntar que os moderadores ou membros experientes vão lhe ajudar.

Para melhor utilizar nossos recursos é extremamente recomendado que esteja logado em nosso fórum e que leia o nosso regulamento oficial.

Também temos fóruns sobre DotA AllstarS, com guias, estratégias, e muito mais!




Participe do fórum, é rápido e fácil

TeaM KingS
[center]Ola Convidado, seja bem vindo ao TeaM KingS !

Nós temos tutoriais sobre o WarCraft World Editor: se você tiver alguma duvida pode perguntar que os moderadores ou membros experientes vão lhe ajudar.

Para melhor utilizar nossos recursos é extremamente recomendado que esteja logado em nosso fórum e que leia o nosso regulamento oficial.

Também temos fóruns sobre DotA AllstarS, com guias, estratégias, e muito mais!


TeaM KingS
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

[Spell] Triple Wave

3 participantes

Ir para baixo

[Spell] Triple Wave Empty [Spell] Triple Wave

Mensagem por Gilgamesh 2013-07-05, 18:47

Descrição da Spell:
Lança três ondas de água em uma direção, causando danos á todos os inimigos atingidos no caminho.

Plataforma da Spell:
vJass

Requisitos:
JNGP (Jass New Generation Pack)

Setup (JESP):

Código:
module TripleWave_Setup

    public static constant method DUMMY_RAWCODE takes nothing returns integer
        return 'dumm'
    endmethod

    public static constant method SPELL_RAWCODE takes nothing returns integer
        return 'A000'
    endmethod

    public static constant method DUMMY_SPELL_RAWCODE takes nothing returns integer
        return 'A001'
    endmethod

endmodule

Corpo do Script:

Código:
struct TripleWave extends array
    implement TripleWave_Setup

    private static method AngleAB takes location whichLocA,location whichLocB returns real
        local location a = whichLocA
        local location b = whichLocB
        local real r = 180. / 3.14159 * Atan2(GetLocationY(b) - GetLocationY(a),GetLocationX(b) - GetLocationX(a))
        call RemoveLocation(a)
        call RemoveLocation(b)
        set a = null
        set b = null
        return r
    endmethod

    private static method ProjectionX takes real realX,real whichDist,real whichAngle returns real
        local real x = realX + whichDist * Cos(whichAngle * 3.14159 / 180.)
        return x
    endmethod

    private static method ProjectionY takes real realY,real whichDist,real whichAngle returns real
        local real y = realY + whichDist * Sin(whichAngle * 3.14159 / 180.)
        return y
    endmethod

    private static method checkSpell takes nothing returns nothing
        local unit u = null
        local player p = null
        local integer i = 0
        local integer l = 0
        local real x = 0.
        local real y = 0.
        local unit d = null
        local location l1 = null
        local location l2 = null
        local real array xa
        local real array ya
        if GetSpellAbilityId()==SPELL_RAWCODE() then
            set u = GetTriggerUnit()
            set p = GetOwningPlayer(u)
            set i = GetUnitAbilityLevel(u,GetSpellAbilityId())
            set x = GetUnitX(u)
            set y = GetUnitY(u)
            set l1 = Location(x,y)
            set l2 = GetSpellTargetLoc()
            /*set xa[0] = ProjectionX(x,60.,AngleAB(l1,l2)+30)
            set xa[1] = ProjectionX(x,60.,AngleAB(l1,l2)-30)
            set ya[0] = ProjectionY(y,60.,AngleAB(l1,l2)+30)
            set ya[1] = ProjectionY(y,60.,AngleAB(l1,l2)-30)*/
            set xa[0] = ProjectionX(x,60.,GetUnitFacing(u)+30)
            set xa[1] = ProjectionX(x,60.,GetUnitFacing(u)-30)
            set ya[0] = ProjectionY(y,60.,GetUnitFacing(u)+30)
            set ya[1] = ProjectionY(y,60.,GetUnitFacing(u)-30)
            loop
                set d = CreateUnit(p,DUMMY_RAWCODE(),x,y,GetUnitFacing(u))
                call UnitApplyTimedLife(d,'BTLF',1.25)
                call UnitAddAbility(d,DUMMY_SPELL_RAWCODE())
                call SetUnitAbilityLevel(d,GetSpellAbilityId(),i)
                call IssuePointOrder(d,"carrionswarm",xa[l],ya[l])
                set d = null
                set l = l + 1
                exitwhen l == 2
            endloop
            call RemoveLocation(l2)
            call RemoveLocation(l1)
            set p = null
        endif
        set u = null
    endmethod

    private static method onInit takes nothing returns nothing
        local trigger t = CreateTrigger()
        local integer i = 0
        loop
            call TriggerRegisterPlayerUnitEvent(t,Player(i),ConvertPlayerUnitEvent(274),null)
            set i = i + 1
            exitwhen i == 12
        endloop
        call TriggerAddAction(t,function thistype.checkSpell)
        set t = null
    endmethod

endstruct

Download (Demo Map)
 - Open Source: pode ser aberto no World Editor.

JNGP (Link Externo)
 - Página de download da ferramenta
 - Instruções de uso e instalação na página de download (inglês).
Gilgamesh
Gilgamesh

Número de Posts : 313
Data de inscrição : 11/05/2013
Reputação : 69 Pontos : 23349

Warning Necropost
[Spell] Triple Wave Left_bar_bleue0 / 1000 / 100[Spell] Triple Wave Right_bar_bleue


http://www.DotCastleBR.forumeiros.com

Ir para o topo Ir para baixo

[Spell] Triple Wave Empty Re: [Spell] Triple Wave

Mensagem por Iky 2013-07-05, 19:31

gostei, bem feito, fluido e não parece apresentar falhas, pena que não estou em casa, gostaria de testar Razz
Iky
Iky

Número de Posts : 2065
Data de inscrição : 06/04/2010
Reputação : 99 Pontos : 30254

Warning Necropost
[Spell] Triple Wave Left_bar_bleue10 / 10010 / 100[Spell] Triple Wave Right_bar_bleue


http://icaro.glauco

Ir para o topo Ir para baixo

[Spell] Triple Wave Empty Re: [Spell] Triple Wave

Mensagem por Law.Terro 2013-07-05, 19:39

Gostei, simples e pratico. O Único problema é que eu não entendo nada de jass ou vjass =/ eu gostaria muito de aprender.
Law.Terro
Law.Terro

Número de Posts : 1243
Data de inscrição : 18/07/2011
Reputação : 107 Pontos : 29862

Warning Necropost
[Spell] Triple Wave Left_bar_bleue0 / 1000 / 100[Spell] Triple Wave Right_bar_bleue


http://againstattack.blogspot.com.br/

Ir para o topo Ir para baixo

[Spell] Triple Wave Empty Re: [Spell] Triple Wave

Mensagem por Gilgamesh 2013-07-05, 19:46

Pra aprender é só observar. Você é mestre em GUI, eu vi em outro post.

Tudo o que têm que fazer é converter tudo o que você faz pra custom text. Só pra aprender as funções primeiro.

O restante vem com o tempo.

")
Gilgamesh
Gilgamesh

Número de Posts : 313
Data de inscrição : 11/05/2013
Reputação : 69 Pontos : 23349

Warning Necropost
[Spell] Triple Wave Left_bar_bleue0 / 1000 / 100[Spell] Triple Wave Right_bar_bleue


http://www.DotCastleBR.forumeiros.com

Ir para o topo Ir para baixo

[Spell] Triple Wave Empty Re: [Spell] Triple Wave

Mensagem por Iky 2013-07-05, 20:17

tenta fazer uma versão GUI '0'

@off

o negocio é que vjass é programação MERRRMO Razz com orientação a objeto e tudo mais so temos q quebrar esse formato de gui para programarmos de verdade, é rápido de se acostumar relaxem
Iky
Iky

Número de Posts : 2065
Data de inscrição : 06/04/2010
Reputação : 99 Pontos : 30254

Warning Necropost
[Spell] Triple Wave Left_bar_bleue10 / 10010 / 100[Spell] Triple Wave Right_bar_bleue


http://icaro.glauco

Ir para o topo Ir para baixo

[Spell] Triple Wave Empty Re: [Spell] Triple Wave

Mensagem por Conteúdo patrocinado


Conteúdo patrocinado


Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos