[Request]Custom Abilities

GameOver[GR]

New Member
Reaction score
11
Another ability i imagined :)

Ability Info
Targets allowed : enemy (creep , hero , even air mobs)
When casting to the enemy stun him for 3.5 seconds,
Blink Caster to the unit and order him to hit the unit
set Caster's attack speed = 300 % for 3 seconds.


Thanks in addition because i know you will help :D

Last Created Ability [ On My Own ]

Code:
function Trig_MassEntangle_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'AC44' ) ) then
        return false
    endif
    return true
endfunction

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

function Trig_MassEntangle_Func003A takes nothing returns nothing
    call CreateNUnitsAtLoc( 1, 'h000', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
    call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
    call IssueTargetOrderBJ( GetLastCreatedUnit(), "entanglingroots", GetEnumUnit() )
endfunction

function Trig_MassEntangle_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_MassEntangle_Func003001003)), function Trig_MassEntangle_Func003A )
endfunction

//===========================================================================
function InitTrig_MassEntangle takes nothing returns nothing
    set gg_trg_MassEntangle = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_MassEntangle, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_MassEntangle, Condition( function Trig_MassEntangle_Conditions ) )
    call TriggerAddAction( gg_trg_MassEntangle, function Trig_MassEntangle_Actions )
endfunction
 

GameOver[GR]

New Member
Reaction score
11
ok i when someone helps me with the current request i will add the next here :)

By the way guys i found how to create Omnislash with Jass
Here it is :

Code:
function Trig_Omnislash_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A055'        
endfunction

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

function Trig_Omnislash_Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local integer i = 0
    local group UnitGroup
    local unit TargetRandom
    local unit Target = GetSpellTargetUnit()
    local effect Phoenix    
    local location R
    local real Damage = 250 
    local integer Amount = 1 + ( GetUnitAbilityLevelSwapped('A055', Caster) * 3 )
    call TriggerSleepAction( 0.20 )
    call SelectUnitRemove( Caster )
    call SetUnitVertexColor( Caster, 150, 150, 150, 150 )
    call SetUnitInvulnerable( Caster, true )    
    set Phoenix = AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",Caster,"weapon" )
    call DestroyEffect(AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", Caster, "chest" ))
    call SetUnitPositionLocFacingBJ( Caster, PolarProjectionBJ(GetUnitLoc(Target), 50.00, GetRandomDirectionDeg()), AngleBetweenPoints(GetUnitLoc(Caster), GetUnitLoc(Target)) )
    call UnitDamageTarget( Caster, Target, Damage, false, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_AXE_MEDIUM_CHOP )
    call SetUnitAnimation( Caster, "attack" )
    call TriggerSleepAction( 0.25 )
    call SelectUnitRemove( Caster )    
    loop
        set i = i + 1        
        exitwhen i > Amount 
            set UnitGroup = GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(Caster), Condition(function Unit_Group))
            if ( IsUnitGroupEmptyBJ(UnitGroup) == false ) then
                set TargetRandom = GroupPickRandomUnit(UnitGroup)
                set R = GetUnitLoc(TargetRandom)
                call DestroyEffect(AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", Caster, "chest" ))
                call SetUnitPositionLocFacingBJ( Caster, PolarProjectionBJ(R, 50.00, GetRandomDirectionDeg()), AngleBetweenPoints(GetUnitLoc(Caster), GetUnitLoc(TargetRandom)) )
                call UnitDamageTarget( Caster, TargetRandom, Damage, false, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_AXE_MEDIUM_CHOP )
                call SetUnitAnimation( Caster, "attack" )
                call RemoveLocation ( R )
                call TriggerSleepAction( 0.25 )
                call SelectUnitRemove( Caster )                
            else
            endif 
            call DestroyGroup(UnitGroup)           
        endloop    
    call SelectUnitForPlayerSingle( Caster, GetTriggerPlayer() )
    call SetUnitInvulnerable( Caster, false )
    call SetUnitVertexColor( Caster, 255, 255, 255, 255 )
    call DestroyEffect( Phoenix )  
    set Phoenix = null    
    set Caster = null     
    set UnitGroup = null
    set TargetRandom = null
    set Target = null    
    set Amount = 0
    set R = null
    set Damage = 0
endfunction

//===========================================================================
function InitTrig_Omnislash takes nothing returns nothing
    set gg_trg_Omnislash = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Omnislash, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( gg_trg_Omnislash, Condition( function Trig_Omnislash_Conditions ) )
    call TriggerAddAction( gg_trg_Omnislash, function Trig_Omnislash_Actions )
endfunction
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
Omnislash is ancient, it is actually looked down upon to create another omnislash. Integers, reals, strings, booleans and players do not need to be nulled either. Give me some time and I'll see if I can make your request, it will require vJass and the struct attachment system HSAS though.
 

Dryvnt

New Member
Reaction score
10
You missed alot of location leaks, now the code should be leak free AFAIK... Great spell otherwise ! :D

JASS:
function Trig_Omnislash_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A055'        
endfunction

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

function Trig_Omnislash_Actions takes nothing returns nothing
    local unit Caster = GetTriggerUnit()
    local integer i = 0
    local group UnitGroup
    local unit TargetRandom
    local unit Target = GetSpellTargetUnit()
    local effect Phoenix = AddSpecialEffectTarget("Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl",Caster,"weapon" )
    local location R
    local real Damage = 250 
    local integer Amount = 1 + ( GetUnitAbilityLevelSwapped('A055', Caster) * 3 )
    local location Targetpoint = GetUnitLoc(Target)
    local location Polar = PolarProjectionBJ(Targetpoint, 50, GetRandomDirectionDeg())
    local location Casterpoint = GetUnitLoc(Caster)
    local location Targetrandompoint
    call TriggerSleepAction( 0.20 )
    call SelectUnitRemove( Caster )
    call SetUnitVertexColor( Caster, 150, 150, 150, 150 )
    call SetUnitInvulnerable( Caster, true )
    //call DestroyEffect(AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", Caster, "chest" )) //What is this for? All you do is to create and then right after delete it?
    call SetUnitPositionLocFacingBJ( Caster, Polar,  AngleBetweenPoints(Casterpoint, Targetpoint))
    call UnitDamageTarget( Caster, Target, Damage, false, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_AXE_MEDIUM_CHOP )
    call SetUnitAnimation( Caster, "attack" )
    call TriggerSleepAction( 0.25 )
    call SelectUnitRemove( Caster )    
    loop 
        set i = i + 1       
        exitwhen i > Amount 
            set UnitGroup = GetUnitsInRangeOfLocMatching(600.00, Casterpoint, Condition(function Unit_Group))
            if ( IsUnitGroupEmptyBJ(UnitGroup) == false ) then
                set TargetRandom = GroupPickRandomUnit(UnitGroup)
                set R = GetUnitLoc(TargetRandom)
                call DestroyEffect(AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl", Caster, "chest" ))
                call RemoveLocation(Polar)
                call RemoveLocation(Targetrandompoint)
                call RemoveLocation(Casterpoint)
                set Casterpoint = GetUnitLoc(Caster)
                set Polar = PolarProjectionBJ(Targetpoint, 50, GetRandomDirectionDeg())
                set Targetrandompoint = GetUnitLoc(TargetRandom)
                call SetUnitPositionLocFacingBJ( Caster, Polar, AngleBetweenPoints(Casterpoint, Targetrandompoint) )
                call UnitDamageTarget( Caster, TargetRandom, Damage, false, true, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_AXE_MEDIUM_CHOP )
                call SetUnitAnimation( Caster, "attack" )
                call RemoveLocation ( R )
                call TriggerSleepAction( 0.25 )
                call SelectUnitRemove( Caster )                    
            else
            endif 
            call DestroyGroup(UnitGroup)           
        endloop    
    call SelectUnitForPlayerSingle( Caster, GetTriggerPlayer() )
    call SetUnitInvulnerable( Caster, false )
    call SetUnitVertexColor( Caster, 255, 255, 255, 255 )
    call DestroyEffect( Phoenix ) 
    call RemoveLocation(Polar)
    call RemoveLocation(Targetrandompoint)
    call RemoveLocation(Casterpoint)
    call RemoveLocation(Targetpoint)
    set Targetpoint = null
    set Casterpoint = null
    set Targetrandompoint = null
    set Casterpoint = null
    set Phoenix = null    
    set Caster = null     
    set UnitGroup = null
    set TargetRandom = null
    set Target = null    
    set R = null
endfunction

//===========================================================================
function InitTrig_Omnislash takes nothing returns nothing
    local trigger Omnislash = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( Omnislash, EVENT_PLAYER_UNIT_SPELL_CAST )
    call TriggerAddCondition( Omnislash, Condition( function Trig_Omnislash_Conditions ) )
    call TriggerAddAction( Omnislash, function Trig_Omnislash_Actions )
    set Omnislash = null
endfunction


Edit: Use JASS tags instead of code tags
 

GameOver[GR]

New Member
Reaction score
11
hey man i did not want you to check my omnislash i just want you to try helping me a little and not playing around , so if you want to help me give me the Jass for the spell i asked you
 

Dryvnt

New Member
Reaction score
10
Oh sry :/... Just wanted to help you get better at JASS... By learning you that you missed some leaks, because i saw you had removed all other leaks... :( Sry if you was offended by that...
 

GameOver[GR]

New Member
Reaction score
11
no man it is ok but i did not asked you to help me clean leaks i just want you to try my ability now ok?

Here you can check for leaks if you want ^^
also i think this is the start :

Code:
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == 'AHtb' ) ) then
        return false
    endif
    return true
endfunction

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
    call SetUnitPositionLoc( GetTriggerUnit(), GetUnitLoc(GetSpellTargetUnit()) )
    call IssueTargetOrderBJ( GetTriggerUnit(), "attack", GetSpellTargetUnit() )
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
    call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
 

Azlier

Old World Ghost
Reaction score
461
JASS:

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
local location TargetLoc = GetUnitLoc(GetSpellTargetUnit())
local unit TrigUnit = GetTriggerUnit()
if GetSpellAbilityId() != 'AHtb' then
    call DestroyEffect(AddSpecialEffectTarget( "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" , TrigUnit, "overhead" ))
    call SetUnitPositionLoc(TrigUnit, TargetLoc )
    call IssueTargetOrder(TrigUnit, "attack", GetSpellTargetUnit())
endif
call RemoveLocation(TargetLoc)
set TargetLoc = null
set TrigUnit = null
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_001, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction


I don't even know if it's any good, since I don't have Warcraft to compile it. But, I guess it was good practice for me.
 

GameOver[GR]

New Member
Reaction score
11
1rst) locals should be before if .......
2) it is not working.

So i still need Work For this ability

Thanks for trying but it is NOT working
 

Azlier

Old World Ghost
Reaction score
461
Gah! You're right! That proves that I am still 100% JASS noob. Fixed it... I think.
 

GameOver[GR]

New Member
Reaction score
11
call IssueTargetOrder(TrigUnit, "attack", GetSpellTargetUnit()
this is error Syntax Error

hmm you think i am noob ? look at what you have write man :

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
local location TargetLoc = GetUnitLoc(GetSpellTargetUnit())
local unit TrigUnit = GetTriggerUnit()
if GetSpellAbilityId() != 'AHtb' then
call DestroyEffect(AddSpecialEffectTargetUnit( "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" , TrigUnit, "overhead" ))

Call destroy yea how to destroy something there is not in the map?

and wtf is this :

endif
call RemoveLocation(TargetLoc)

That i request or i said i do not know good jass does not mean that i can not read too.Your text it noob my friend call destroy without creating? how is that possible?

So i still need Work For this ability

Thanks for trying but it is NOT working
 

Azlier

Old World Ghost
Reaction score
461
hmm you think i am noob ?

At what point did I ever call you a noob?

The DestroyEffect(AddSpecialEffect... Is just a shortened form of creating the effect and destroying it on the next line. I took it directly from AceHart's optimized Heal All spell.

end if means else if.
Erm, what?

call IssueTargetOrder(TrigUnit, "attack", GetSpellTargetUnit())

I made a mistake there, forgot a ) at the end. I hope it works now.
 

GameOver[GR]

New Member
Reaction score
11
man are you sure you can do it? you tried 3 time until now and you made 3 times errors or forgot something here is the next error :

call DestroyEffect(AddSpecialEffectTargetUnit("Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" , TrigUnit , "overhead"))

Undeclared function AddSpecialEffectTargetUnit.
Also error with this variable : set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top