- Joined
- Sep 14, 2012
- Messages
- 3,413
Okay let's go.
Start whenever you have spell to be reviewed.
Start whenever you have spell to be reviewed.
tooltipPowerful spell capable of killing the caster.
scope TrollYah initializer onInit
globals
private constant integer ABILITY_ID = 'AOwk'
private constant string EFFECT = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
endglobals
private function core takes nothing returns boolean
local unit c=GetTriggerUnit()
if (GetSpellAbilityId()==ABILITY_ID) then
call AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c))
call KillUnit(c)
endif
set c=null
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Filter(function core))
// I will not set t to null, this ain't gonna be destroyed anyways.
endfunction
endscope
scope TrollYah initializer onInit
globals
private constant integer ABILITY_ID = 'AOwk'
private constant string EFFECT = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
endglobals
private function core takes nothing returns boolean
local unit c
if (GetSpellAbilityId()==ABILITY_ID) then
set c = GetTriggerUnit()
call AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c))
//What about the effect ?
//Why not :
// call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call KillUnit(c)
set c = null
endif
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Filter(function core))
// I will not set t to null, this ain't gonna be destroyed anyways.
endfunction
endscope
scope TrollYah initializer onInit
globals
private constant integer ABILITY_ID = 'AOwk'
private constant string EFFECT = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
endglobals
private function core takes nothing returns boolean
local unit c=GetTriggerUnit()
if (GetSpellAbilityId()==ABILITY_ID) then
// credits to Malhorne for making me remove the effect...
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call KillUnit(c)
endif
set c=null
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Filter(function core))
// I will not set t to null, this ain't gonna be destroyed anyways.
endfunction
endscope
scope TrollYah initializer onInit
globals
private constant integer ABILITY_ID = 'AOwk'
private constant string EFFECT = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
endglobals
private function core takes nothing returns boolean
local unit c
// Credits to Malhorne, for overall optimization
if (GetSpellAbilityId()==ABILITY_ID) then
set c=GetTriggerUnit()
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call KillUnit(c)
set c=null
endif
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Filter(function core))
// I will not set t to null, this ain't gonna be destroyed anyways.
endfunction
endscope
scope TrollYah initializer onInit
globals
private constant integer ABILITY_ID = 'AOwk'
private constant string EFFECT = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
endglobals
private function core takes nothing returns boolean
local unit c
// Credits to Malhorne, for overall optimization
if (GetSpellAbilityId()==ABILITY_ID) then
set c=GetTriggerUnit()
call DestroyEffect(AddSpecialEffect(EFFECT,GetUnitX(c),GetUnitY(c)))
call KillUnit(c)
set c=null
endif
return false
endfunction
private function onInit takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Filter(function core))
//Preloading effects to avoid lags :)
call Preload(EFFECT)
// I will not set t to null, this ain't gonna be destroyed anyways.
endfunction
endscope