I need this spell modified, and it's JASS :/

GhosTHunteR

New Member
Reaction score
2
First of all I have to give credits to emjlr3 for his Random Dota Spells 2, which he had uploaded in the hive workshop.
Let me get straight to my point. I decided to use Berseker's Call and modify it. The thing is that I suck at JASS, not just suck, but a complete failure. I hope you can help me out with it.
JASS:
function Trig_Berserkers_Call_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A003'        
endfunction

function Berserkers_Group takes nothing returns boolean
    return GetBooleanAnd( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true, IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

function Trig_Berserkers_Call_Actions takes nothing returns nothing
    local unit v     
    local location l = GetUnitLoc(GetTriggerUnit())
    set udg_Ber_Caster = GetTriggerUnit()
    call TriggerSleepAction( 0.20 )
    set v = CreateUnit( GetOwningPlayer(udg_Ber_Caster), 'n002', GetUnitX(udg_Ber_Caster), GetUnitY(udg_Ber_Caster), bj_UNIT_FACING )
    call SetUnitAbilityLevelSwapped( 'A004', v, GetUnitAbilityLevelSwapped('A003', udg_Ber_Caster) )
    call IssueTargetOrder( v, "innerfire", udg_Ber_Caster )
    call UnitApplyTimedLife( v, 'BTLF', 1.00 )
    call TriggerSleepAction( ( 1.00 + ( 0.50 * I2R(GetUnitAbilityLevelSwapped('A003', udg_Ber_Caster)) ) ) )    
    call RemoveLocation(l)
    set udg_Ber_Caster = null
    set l = null
    set v = null
endfunction

//===========================================================================
function InitTrig_Berserkers_Call takes nothing returns nothing
    set gg_trg_Berserkers_Call = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_Call, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Berserkers_Call, Condition( function Trig_Berserkers_Call_Conditions ) )
    call TriggerAddAction( gg_trg_Berserkers_Call, function Trig_Berserkers_Call_Actions )
endfunction


That's the trigger and I want it working for the ability Mountain Taunt (that is cast by my hero) and Mountain Taunt Dummy that gives the buff. And ofcourse the buffs that are given on the enemies - Mountain Taunt (Attacker) and Mountain Taunt (Defender). The variables are the same Ber_Caster and Ber_Group.
I'll appreciate the help given and + rep!

P.S. There's another trigger in the berseker's call pack, but it was GUI and I worked it out.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
'A003' - the ability the Hero is casting
'n002' - the ID of the dummy unit
'A004' - a version of "Inner Fire"

To get those, open the abilities tab in the Object Editor and press "ctrl + D".


This code is also seriously outdated... :p
 

GhosTHunteR

New Member
Reaction score
2
Yes, I thought so but could't figure out the numbers :nuts:. Anyway I only need to replace the wrong numbers with the right ones, right?
Maybe it's kinda old, dunno :rolleyes:
 

GhosTHunteR

New Member
Reaction score
2
well, I did what you said and changed the ability/unit codes. But now when I test my map it says that the trigger is disabled due 39 compile errors :eek:

What now? :confused:

P.S. I've just fixed the errors by deleting the letters after the ":" on the spell/unit code, but this taunting spell still doesn't work :(
 

Expelliarmus

Where to change the sig?
Reaction score
48
P.S. I've just fixed the errors by deleting the letters after the ":" on the spell/unit code, but this taunting spell still doesn't work
can you post your new codes?
 

GhosTHunteR

New Member
Reaction score
2
Sure!

A02G stands for my hero's ability called Mountain Taunt
A02K stands for the inner fire ability that is cast on my hero when he taunts
n013 stands for my dummy unit
 

Expelliarmus

Where to change the sig?
Reaction score
48
Ok, Woah! I'm lost. What's working and what's not working. What do you want, and what don't you want?
 

GhosTHunteR

New Member
Reaction score
2
Revolver, I downloaded your pack and, I dunno why, HandleVars is getting disabled due errors :banghead: .Help is appreciated

P.S. The Call trigger is disabled too T_T
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Are you using NewGen World Editor? You will need that in order for the vJASS code to compile.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top