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.

[System] Single Target para Área of Effect

2 participantes

Ir para baixo

[System] Single Target para Área of Effect Empty [System] Single Target para Área of Effect

Mensagem por Gilgamesh 2013-08-08, 11:36

Descrição:
Sistema muito simples que permite converter spells de alvo único para spells com área de efeito.

Requisitos:
 - JNGP + USMWE (clique aqui)

Código:
//! textmacro SPELLNAME_SETUP

    public constant function MAIN_SPELL_RAW takes nothing returns integer
        return 'A000'
    endfunction

    public constant function DUMMY_SPELL_RAW takes nothing returns integer
        return 'A001'
    endfunction

    public constant function MAIN_SPELL_AREA takes nothing returns real
        return 512.00
    endfunction

    public constant function DUMMY_UNIT_RAW takes nothing returns integer
        return 'dumm'
    endfunction

    public constant function DUMMY_SPELL_ORDER takes nothing returns string
        return "firebolt"
    endfunction

//! endtextmacro
Código:
scope SPELLNAME initializer ini

    //! runtextmacro SPELLNAME_SETUP()

    private function config takes nothing returns nothing
        local unit u = null
        local player p = null
        local integer i = 0
        local group g = null
        local location l = null
        local unit U = null
        local unit d = null
        if GetSpellAbilityId()==MAIN_SPELL_RAW() then
            set u = GetTriggerUnit()
            set p = GetOwningPlayer(u)
            set i = GetUnitAbilityLevel(u,GetSpellAbilityId())
            set g = CreateGroup()
            set l = GetSpellTargetLoc()
            call BJDebugMsg(I2S(GetUnitTypeId(u)))
            call GroupEnumUnitsInRangeOfLoc(g,l,MAIN_SPELL_AREA(),null)
            loop
                set U = FirstOfGroup(g)
                if GetUnitState(U,ConvertUnitState(0))>0 and IsUnitEnemy(U,p) and not IsUnitType(U,ConvertUnitType(15)) and not IsUnitType(U,ConvertUnitType(2)) then
                    set d = CreateUnit(p,DUMMY_UNIT_RAW(),GetUnitX(u),GetUnitY(u),0.)
                    call UnitApplyTimedLife(d,'BTLF',1.5)
                    call UnitAddAbility(d,DUMMY_SPELL_RAW())
                    call SetUnitAbilityLevel(d,DUMMY_SPELL_RAW(),i)
                    call IssueTargetOrder(d,DUMMY_SPELL_ORDER(),U)
                    set d = null
                endif
                call GroupRemoveUnit(g,U)
                exitwhen U == null
            endloop
            call RemoveLocation(l)
            call DestroyGroup(g)
            set l = null
            set g = null
            set p = null
            set u = null
        endif
    endfunction

    private function ini 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 config)
        set t = null
    endfunction

endscope
Download (Demo Map)
 - Open Source: Pode ser aberto com o World  Editor.
 - Upado no MediaFire
Gilgamesh
Gilgamesh

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

Warning Necropost
[System] Single Target para Área of Effect Left_bar_bleue0 / 1000 / 100[System] Single Target para Área of Effect Right_bar_bleue


http://www.DotCastleBR.forumeiros.com

Ir para o topo Ir para baixo

[System] Single Target para Área of Effect Empty Re: [System] Single Target para Área of Effect

Mensagem por Law.Terro 2013-08-08, 17:40

Ficou legal, uma target área com unidades atingidas, gostei xD
Law.Terro
Law.Terro

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

Warning Necropost
[System] Single Target para Área of Effect Left_bar_bleue0 / 1000 / 100[System] Single Target para Área of Effect Right_bar_bleue


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

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