• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Need Help with Jass

Status
Not open for further replies.
Level 3
Joined
Jul 16, 2005
Messages
9
I just started using jass and I made this spell based on roar and it suppost to increase the caster's stats by 2x. But when i test it, it doesnt work. Need help


function Essence_of_Darkness_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A029' ) ) then
return false
endif
return true
endfunction

function Essence_of_Darkness takes nothing returns nothing
local unit d = GetSpellAbilityUnit()
local real e = +I2R(GetHeroStatBJ(bj_HEROSTAT_STR, d, true))*2.0
local real b = +I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, d, true))*2.0
local real j = +I2R(GetHeroStatBJ(bj_HEROSTAT_INT, d, true))*2.0

call Bonuser(d,R2I(e),"hero-a")
call Bonuser(d,R2I(b),"hero-s")
call Bonuser(d,R2I(j),"hero-i")
call PolledWait(16)
if(UnitHasBuffBJ(d, 'B001') == false )then
call Remove(d,"hero-a")
call Remove(d,"hero-s")
call Remove(d,"hero-i")
endif
set d = null
endfunction

//===========================================================================
function InitTrig_Essence_of_Darkness takes nothing returns nothing
set gg_trg_Essence_of_Darkness = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Essence_of_Darkness, EVENT_PLAYER_UNIT_SPELL_CAST )
endfunction
 
Status
Not open for further replies.
Top