• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Dota Assasinate Spell +REP

Status
Not open for further replies.
Haven't tested it, but add this to your header,
JASS:
//  Edit to change effect...
constant function AssasinateTarget_String takes nothing returns string
    return "Abilities\\Spells\\Other\\AcidBomb\\BottleImpact.mdl"
endfunction
//  Edit to match spell casttime...
constant function AssasinateTarget_Duration takes nothing returns real
    return 3.00
endfunction

//  Don't edit!!!
function AssasinateTarget_Timer takes nothing returns nothing
    call DestroyEffect(LoadEffectHandle(udg_AssasinateEffectTable, GetHandleId(GetExpiredTimer()), 0))
    call FlushChildHashtable(udg_AssasinateEffectTable, GetHandleId(GetExpiredTimer()))
    call DestroyTimer(GetExpiredTimer())
endfunction

//  Don't edit!!!
function AssasinateTarget takes player owner, unit target returns nothing
    local integer assasinateInt = 0
    local string assasinateString = "Doodads\\Terrain\\LOSBlocker\\IntentionallyLeftBlank.mdl"
    local timer assasinateTimer = CreateTimer()
    local effect assasinateEffect = null
    call TimerStart(assasinateTimer, AssasinateTarget_Duration(), false, function AssasinateTarget_Timer)
    
    loop
        if IsPlayerAlly(owner, Player(assasinateInt)) then
            if GetLocalPlayer() == Player(assasinateInt) then
                set assasinateString = AssasinateTarget_String()
            endif
        endif
    exitwhen assasinateInt >= bj_MAX_PLAYERS
    set assasinateInt = assasinateInt + 1
    endloop
    
    set assasinateEffect = AddSpecialEffectTarget(assasinateString, target, "overhead")    
    call SaveEffectHandle(udg_AssasinateEffectTable, GetHandleId(assasinateTimer), 0, assasinateEffect)
        
    set assasinateEffect = null
    set assasinateTimer = null
endfunction
Add this to your Init Trigger
  • Set AssasinateEffectTable = Initialize Hashtable
And create this trigger
  • Events
    • Unit - A Unit Begins Casting an Ability
  • Conditions
    • Ability being cast = X
  • Actions
    • Custom script: call AssasinateTarget(GetOwningPlayer(GetSpellAbilityUnit()), GetSpellAbilityUnit())
PS:
A) This uses the Hashtable variable: AssasinateEffectTabl
B) Change the 2 constant functions' return values, comments say what to do.
 
Haven't tested it, but add this to your header,
JASS:
//  Edit to change effect...
constant function AssasinateTarget_String takes nothing returns string
    return "Abilities\\Spells\\Other\\AcidBomb\\BottleImpact.mdl"
endfunction
//  Edit to match spell casttime...
constant function AssasinateTarget_Duration takes nothing returns real
    return 3.00
endfunction

//  Don't edit!!!
function AssasinateTarget_Timer takes nothing returns nothing
    call DestroyEffect(LoadEffectHandle(udg_AssasinateEffectTable, GetHandleId(GetExpiredTimer()), 0))
    call FlushChildHashtable(udg_AssasinateEffectTable, GetHandleId(GetExpiredTimer()))
    call DestroyTimer(GetExpiredTimer())
endfunction

//  Don't edit!!!
function AssasinateTarget takes player owner, unit target returns nothing
    local integer assasinateInt = 0
    local string assasinateString = "Doodads\\Terrain\\LOSBlocker\\IntentionallyLeftBlank.mdl"
    local timer assasinateTimer = CreateTimer()
    local effect assasinateEffect = null
    call TimerStart(assasinateTimer, AssasinateTarget_Duration(), false, function AssasinateTarget_Timer)
    
    loop
        if IsPlayerAlly(owner, Player(assasinateInt)) then
            if GetLocalPlayer() == Player(assasinateInt) then
                set assasinateString = AssasinateTarget_String()
            endif
        endif
    exitwhen assasinateInt >= bj_MAX_PLAYERS
    set assasinateInt = assasinateInt + 1
    endloop
    
    set assasinateEffect = AddSpecialEffectTarget(assasinateString, target, "overhead")    
    call SaveEffectHandle(udg_AssasinateEffectTable, GetHandleId(assasinateTimer), 0, assasinateEffect)
        
    set assasinateEffect = null
    set assasinateTimer = null
endfunction
Add this to your Init Trigger
  • Set AssasinateEffectTable = Initialize Hashtable
And create this trigger
  • Events
    • Unit - A Unit Begins Casting an Ability
  • Conditions
    • Ability being cast = X
  • Actions
    • Custom script: call AssasinateTarget(GetOwningPlayer(GetSpellAbilityUnit()), GetSpellAbilityUnit())
PS:
A) This uses the Hashtable variable: AssasinateEffectTabl
B) Change the 2 constant functions' return values, comments say what to do.
Well,I checked the system,and I don't think that the target effect disappears exactly when the target is hit by the missile of spell like in DotA=)
And ORLYowl, if you want your map to be not only 1.24 compatible but 1.23 also (don't know about older version)then try to avoid hashtables as in this system,but it's good anyway=)
 
Well,I checked the system,and I don't think that the target effect disappears exactly when the target is hit by the missile of spell like in DotA=)
It dissapears when the shot is fired, which is more realistic :xxd:

And ORLYowl, if you want your map to be not only 1.24 compatible but 1.23 also (don't know about older version)then try to avoid hashtables as in this system,but it's good anyway=)
Why should it be 1.23 compatible? Everyone has 1.24 now, and Garena too, as 70% users are DotA players, that have to update in order to play, and the rest update because they have no reason not to.
 
It dissapears when the shot is fired, which is more realistic :xxd:


Why should it be 1.23 compatible? Everyone has 1.24 now, and Garena too, as 70% users are DotA players, that have to update in order to play, and the rest update because they have no reason not to.
Still there are many users which use 1.23 or even older versions...Some because they don't want to update to 1.24 because many maps don't work on them,some because they don;t have internet to download the patch (Believe me,in the world there are many countries where max. speed is about 50 Kb/sec, and downloading is about 10/15 Kb/sec,I lived in a such one...)
And Garena supports all versions of Warcraft,and I met many people which play on 1.23 with Garena...
 
Status
Not open for further replies.
Back
Top