- Joined
- May 7, 2016
- Messages
- 2,175
Hey, guys!
I've made this spell before and I converted it to custom text but I don't find it's main GUI trigger map. Is there any way to convert it to GUI again?
I've made this spell before and I converted it to custom text but I don't find it's main GUI trigger map. Is there any way to convert it to GUI again?
JASS:
function Trig_EluneBolt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A603' ) ) then
return false
endif
return true
endfunction
function Trig_EluneBolt_Func013Func001C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(udg_Unit01) == true ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(udg_Unit02) == true ) ) then
return false
endif
return true
endfunction
function Trig_EluneBolt_Actions takes nothing returns nothing
set udg_Targ_Unit = GetSpellTargetUnit()
set udg_Temp_Unit = GetTriggerUnit()
set udg_Temp_Point = GetUnitLoc(GetTriggerUnit())
set udg_Targ_Point = GetUnitLoc(GetSpellTargetUnit())
call AddSpecialEffectLocBJ( udg_Temp_Point, "Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl" )
set udg_Effect01 = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( udg_Temp_Point, "Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkZapTarget.mdl" )
set udg_Effect02 = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'h603', Player(0), udg_Temp_Point, bj_UNIT_FACING )
set udg_Unit01 = GetLastCreatedUnit()
call CreateNUnitsAtLoc( 1, 'h603', Player(0), udg_Targ_Point, bj_UNIT_FACING )
call KillUnit( udg_Unit01 )
set udg_Unit02 = GetLastCreatedUnit()
call KillUnit( udg_Unit02 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call AddLightningLoc( "CLPB", udg_Temp_Point, udg_Targ_Point )
set udg_Lightning = GetLastCreatedLightningBJ()
call TriggerSleepAction( 0.05 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_EluneBolt_Func013Func001C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 30
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call PlaySoundAtPointBJ( gg_snd_LightningBolt1, 100, udg_Targ_Point, 0 )
call AddSpecialEffectLocBJ( udg_Targ_Point, "Doodads\\Cinematic\\Lightningbolt\\Lightningbolt.mdl" )
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 1000000000.00 * GetUnitLifePercent(udg_Targ_Unit) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 16
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( udg_Targ_Point, "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call DestroyEffectBJ( udg_Effect01 )
call DestroyEffectBJ( udg_Effect02 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call AddSpecialEffectLocBJ( udg_Targ_Point, "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" )
call DestroyLightningBJ( udg_Lightning )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_EluneBolt takes nothing returns nothing
set gg_trg_EluneBolt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_EluneBolt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_EluneBolt, Condition( function Trig_EluneBolt_Conditions ) )
call TriggerAddAction( gg_trg_EluneBolt, function Trig_EluneBolt_Actions )
endfunction