Spellpack Single target and AOE divine shield; Mass Hex&Sleep

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
This spell pack (If I can say so), contains 2 spell: Single Target Divine Shield and Multi Target Divine shield. (Meaning they are targetable). Thanks to Sfilip, who withstand my stupid mistakes and questions and for helping me to understand, how to remove bj functions. I have to mention the fact, these are my first JASS spells.:eek:

BTNDivineInterventioncopy.jpg


Multi Target Divine Shield

An impenetrable shield surrounds the targeted units, protecting them from all damage and spells for a set amount of time.

[Level 1]

Mana - 125
Duration - 15 seconds
Area of effect - 200
Cooldown - 45 seconds

[Level 2]

Mana - 125
Duration - 30 seconds
Area of effect - 200
Cooldown - 60 seconds

[Level 3]

Mana - 125
Duration - 45 seconds
Area of effect - 200
Cooldown - 75 seconds

BTNDivineInterventioncopy.jpg


Single Target Divine Shield

An impenetrable shield surrounds the targeted unit, protecting it from all damage and spells for a set amount of time.

[Level 1]

Mana - 50
Duration - 15 seconds
Cooldown - 35 seconds

[Level 2]

Mana - 50
Duration - 30 seconds
Cooldown - 50 seconds

[Level 3]

Mana - 50
Duration - 45 seconds
Cooldown - 65 seconds

BTNHexcopy.jpg


Mass Hex

Transforms the targeted enemy units into random critters, disabling special abilities.

[Level 1]

Mana - 100
Duration - 15 seconds, 4 seconds hero
Area of Effect - 200
Cooldown - 30 seconds

[Level 2]

Mana - 100
Duration - 30 seconds, 5 seconds hero
Area of Effect - 200
Cooldown - 35 seconds

[Level 3]

Mana - 100
Duration - 45 seconds, 6 seconds hero
Area of Effect - 200
Cooldown - 40 seconds

BTNSleepcopy.jpg


Mass Sleep

Puts a targeted enemy units to sleep. A sleeping unit can be awoken by attacking it.

[Level 1]

Mana - 150
Duration - 20 seconds, 5 seconds hero
Area of Effect - 200
Cooldown - 35 seconds

[Level 2]

Mana - 125
Duration - 40 seconds, 10 seconds hero
Area of Effect - 200
Cooldown - 45 seconds

[Level 3]

Mana - 100
Duration - 60 seconds, 15 seconds hero
Area of Effect - 200
Cooldown - 55 seconds

*Includes an aoe template.
 

Attachments

  • Art Spellpack.w3x
    22 KB · Views: 864

SFilip

Gone but not forgotten
Reaction score
634
Nice one, added to the index.
Though there is one little leak you might wanna fix...
The group in the AOE version is never destroyed. You need one call DestroyGroup(e) just before you null it.
 

R@d14nc3

New Member
Reaction score
49
>The group in the AOE version is never destroyed. You need one call DestroyGroup(e) just before you null it.
Lol, so Andrew hasn't mastered GUI at all...
But nice one anyways Thumbs up ;)
 

Chocobo

White-Flower
Reaction score
409
Looked quickly in the map, I found :

Code:
//===========================================================================
// Trigger: Mana
//===========================================================================
function Trig_Mana_Func002A takes nothing returns nothing
    call SetUnitManaPercentBJ( GetEnumUnit(), 100 )
endfunction

function Trig_Mana_Actions takes nothing returns nothing
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_heroes_unitgroup, function Trig_Mana_Func002A )
endfunction

//===========================================================================
function InitTrig_Mana takes nothing returns nothing
    set gg_trg_Mana = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Mana, Player(0), "-mana", true )
    call TriggerAddAction( gg_trg_Mana, function Trig_Mana_Actions )
endfunction

//===========================================================================
// Trigger: Life
//===========================================================================
function Trig_Life_Func002A takes nothing returns nothing
    call SetUnitLifePercentBJ( GetEnumUnit(), 100 )
endfunction

function Trig_Life_Actions takes nothing returns nothing
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_heroes_unitgroup, function Trig_Life_Func002A )
endfunction

//===========================================================================
function InitTrig_Life takes nothing returns nothing
    set gg_trg_Life = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Life, Player(0), "-life", true )
    call TriggerAddAction( gg_trg_Life, function Trig_Life_Actions )
endfunction

//===========================================================================
// Trigger: Reset
//===========================================================================
function Trig_Reset_Func002A takes nothing returns nothing
    call UnitResetCooldown( GetEnumUnit() )
endfunction

function Trig_Reset_Actions takes nothing returns nothing
    set bj_wantDestroyGroup = true
    call ForGroupBJ( udg_heroes_unitgroup, function Trig_Reset_Func002A )
endfunction

//===========================================================================
function InitTrig_Reset takes nothing returns nothing
    set gg_trg_Reset = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Reset, Player(0), "-reset", true )
    call TriggerAddAction( gg_trg_Reset, function Trig_Reset_Actions )
endfunction


You do not need "set bj_wantDestroyGroup = true" because udg_heroes_unitgroup is already defined.


Code:
globals
    // User-defined
[B]    unit                    udg_a                      = null
    unit                    udg_b                      = null
    real                    udg_c                      = 0
    effect                  udg_d                      = null
    group                   udg_e                      = null[/B]
    group                   udg_heroes_unitgroup       = null

    // Generated
    trigger                 gg_trg_Level_Initialization = null
    trigger                 gg_trg_Mana                = null
    trigger                 gg_trg_Life                = null
    trigger                 gg_trg_Reset               = null
    trigger                 gg_trg_castable_divine     = null
    trigger                 gg_trg_aoe_divine          = null
    unit                    gg_unit_Huth_0018          = null
    unit                    gg_unit_Hapm_0000          = null
    unit                    gg_unit_Hpal_0009          = null
endglobals

You never used a,b,c,d, and e. (UDG_<WHATEVER> I mean)


Code:
//===========================================================================
// Trigger: castable divine
//===========================================================================
function Trig_castable_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction

function Trig_castable_divine_Actions takes nothing returns nothing
    local unit a = GetTriggerUnit()
    local unit b = GetSpellTargetUnit()
    local real c = ( 15.00 * I2R(GetUnitAbilityLevel( a, 'A000')) )

    call SetUnitInvulnerable( b, true )
    call TriggerSleepAction( c )
    call SetUnitInvulnerable( b, false )

    set a = null
    set b = null
endfunction

//===========================================================================
function InitTrig_castable_divine takes nothing returns nothing
    local integer i = 0
    set gg_trg_castable_divine = CreateTrigger(  )
    loop
        call TriggerRegisterPlayerUnitEvent( gg_trg_castable_divine, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null )
        set i = i + 1
        exitwhen i == 12
    endloop
    call TriggerAddCondition( gg_trg_castable_divine, Condition( function Trig_castable_divine_Conditions ) )
    call TriggerAddAction( gg_trg_castable_divine, function Trig_castable_divine_Actions )
endfunction
//===========================================================================
// Trigger: aoe divine
//===========================================================================
function Trig_aoe_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A001'
endfunction

function Trig_aoe_divine_Func001A takes nothing returns nothing
    local unit a = GetEnumUnit()
    local unit b = CreateUnit( GetOwningPlayer(GetTriggerUnit()), 'O000', GetUnitX( a ), GetUnitY( a ), 0)
    
    call UnitAddAbility( b, 'A000' )
    call SetUnitAbilityLevel( b, 'A000', GetUnitAbilityLevel(GetTriggerUnit(), 'A001' ) )
    call IssueTargetOrder( b, "frostarmor", a )
    call UnitApplyTimedLife( b, 'BTLF', 1.00 )
    
    set a = null
    set b = null
endfunction

function Trig_aoe_divine_Actions takes nothing returns nothing
    local group e = CreateGroup()
    
    call GroupEnumUnitsInRangeOfLoc(e, GetSpellTargetLoc(), 200.0, null)
    call ForGroup(e, function Trig_aoe_divine_Func001A)
    call DestroyGroup(e)
    
    set e = null
endfunction

//===========================================================================
function InitTrig_aoe_divine takes nothing returns nothing
    local integer i = 0
    set gg_trg_aoe_divine = CreateTrigger(  )
    loop
        call TriggerRegisterPlayerUnitEvent( gg_trg_aoe_divine, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null )
        set i = i + 1
        exitwhen i == 12
    endloop
    call TriggerAddCondition( gg_trg_aoe_divine, Condition( function Trig_aoe_divine_Conditions ) )
    call TriggerAddAction( gg_trg_aoe_divine, function Trig_aoe_divine_Actions )
endfunction

It can be changed a bit. Here's mine.


Code:
function Trig_castable_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId()=='A000'
endfunction

function Trig_castable_divine_Actions takes nothing returns nothing
    local unit a=GetTriggerUnit()
    local unit b=GetSpellTargetUnit()
    local real c=(15.*I2R(GetUnitAbilityLevel(a,'A000')))
    call SetUnitInvulnerable(b,true)
    call PolledWait(c)
    call SetUnitInvulnerable(b,false)
    set a=null
    set b=null
endfunction

function InitTrig_castable_divine takes nothing returns nothing
    local integer i=0
    set gg_trg_castable_divine=CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(gg_trg_castable_divine,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
        set i=i+1
        exitwhen i==12
    endloop
    call TriggerAddCondition(gg_trg_castable_divine,Condition(function Trig_castable_divine_Conditions))
    call TriggerAddAction(gg_trg_castable_divine,function Trig_castable_divine_Actions)
endfunction

function Trig_aoe_divine_Conditions takes nothing returns boolean
    return GetSpellAbilityId()=='A001'
endfunction

function Trig_aoe_divine_Func001A takes nothing returns nothing
    local unit a=GetEnumUnit()
    local unit b=CreateUnit(GetOwningPlayer(GetTriggerUnit()),'O000',GetUnitX(a),GetUnitY(a),0)
    callUnitAddAbility(b,'A000')
    call SetUnitAbilityLevel(b,'A000',GetUnitAbilityLevel(GetTriggerUnit(),'A001'))
    call IssueTargetOrder(b,"frostarmor",a)
    call UnitApplyTimedLife(b,'BTLF',1.)
    set a = null
    set b = null
endfunction

function Trig_aoe_divine_Actions takes nothing returns nothing
    local group e=CreateGroup()
    call GroupEnumUnitsInRangeOfLoc(e,GetSpellTargetLoc(),200.,null)
    call ForGroup(e,function Trig_aoe_divine_Func001A)
    call DestroyGroup(e)
    set e = null
endfunction

function InitTrig_aoe_divine takes nothing returns nothing
    local integer i=0
    set gg_trg_aoe_divine=CreateTrigger()
    loop
        call TriggerRegisterPlayerUnitEvent(gg_trg_aoe_divine,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
        set i=i+1
        exitwhen i==12
    endloop
    call TriggerAddCondition(gg_trg_aoe_divine,Condition(function Trig_aoe_divine_Conditions))
    call TriggerAddAction(gg_trg_aoe_divine,function Trig_aoe_divine_Actions)
endfunction

Changed TriggerSleepAction to PolledWait.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Jeah, forgot to delete the special effect variable d. Going to edit it.

EDIT: Added Mass Sleep and Mass Hex.
 

emjlr3

Change can be a good thing
Reaction score
395
ok so, i dont like the fact that you use your single target divine shield trigger in your AOE divine shield trigger

there is no configuration for those who do not know JASS, and those who do would not bother using these, since they could make it on their own

secondly, what may be easier, is to create an AOE template, and allow any type if abil to be used, instead of 3 diff triggers for 3 diff abils

as it is it does not get my aproval

I would suggest removing it from the index SFilip
 

Chocobo

White-Flower
Reaction score
409
REMOVE udg_a, udg_b,udg_c, and udg_e because you never used them.


I've seen you used conversion from GUI to Custom Script, then you removed udg_ (s) , didn't you?


Found no leaks in the script, looks fine.


For mass hex, what about a Hex line? :p (cheapy and very easy).


Just some knowledge you can have :

hex orderId : 852502
sleep orderId : 852227
frostarmor orderId : 852225
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
ok so, i dont like the fact that you use your single target divine shield trigger in your AOE divine shield trigger

there is no configuration for those who do not know JASS, and those who do would not bother using these, since they could make it on their own

secondly, what may be easier, is to create an AOE template, and allow any type if abil to be used, instead of 3 diff triggers for 3 diff abils

as it is it does not get my aproval

I would suggest removing it from the index SFilip

Yeah, I thought about the aoe template. Just added the hex and sleep for bonus. Anyway, these are my first JASS spells and yes, they don not meet the JESP standards.

REMOVE udg_a, udg_b,udg_c, and udg_e because you never used them.


I've seen you used conversion from GUI to Custom Script, then you removed udg_ (s) , didn't you?


Found no leaks in the script, looks fine.


For mass hex, what about a Hex line? :p (cheapy and very easy).


Just some knowledge you can have :

hex orderId : 852502
sleep orderId : 852227
frostarmor orderId : 852225

Yeah, for the single target one. (Its faster [for me] to make and event and a condition(s) and then convert it in JASS than write them from scratch.)

EDIT:

How was I supposed to know, that you don't need to make variables in the variable editor if you use local variables in JASS...
 

emjlr3

Change can be a good thing
Reaction score
395
orderid's do not matter

in anycase, I do not ask that you follow the JESP standard, just that you add a little configuration options, along with some instructions on how to implement.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
You just converted from GUI to Custom Script and you forget to delete variable. :p

Locals are not Globals.

I just thought I needed them too. No-one told me that if I delete them the trigger still works. I know globals aren't locals. Anyway, lets give this one a rest, the fact is I am a beginner at JASS, and you are not.

orderid's do not matter

in anycase, I do not ask that you follow the JESP standard, just that you add a little configuration options, along with some instructions on how to implement.

It shall be done.

EDIT:

Did it, but tell me if it suits.
 
M

Mysecret

Guest
Well i was trying the spells out and after a while i realised the Dreadlord and Shadow hunter werent moving... I realised that they where still acting like they are about to cast the mass spells even though they already did.:confused:
 
G

Gordrid

Guest
Well i was trying the spells out and after a while i realised the Dreadlord and Shadow hunter werent moving... I realised that they where still acting like they are about to cast the mass spells even though they already did.:confused:

Yea I have that problem as well. The spell isn't even cast when I use the ability. Any ideas on how to correct it?
 

hasslarn

New Member
Reaction score
20
i tryed this spells on ur map they worked fine
when i tryed them on my map
singe target divine didnt work
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Check if there is any codes in the map header, in that case copy that to your map and try it again.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I don't see this submission worthy enough to belong in the approved section, as it was one of my early experimentations with JASS.

Graveyarded until I will release a better version, which fulfills standards.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top