• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Omnislash JASS Spell 1.3

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: deepstrasz
Made by Barathrum (Dark_Lord_12)

Omnislash from DotA made in JASS.
Cast Omnislash, wich hits 5 x level of ability. Deals 75 x level of ability.

Update 1: I fixed many things that i was suggested in comments.
Update 2: Fixed some more things suggested in comments. If caster dies he stops slashing now.
Update 3: Made spell easier to edit.
Contents

Omnislash JASS Spell (Map)

Reviews
11:30, 24th Aug 2009 hvo-busterkomo: The spell will need a lot of optimizations in order to be ready for approval. Use GroupUtils instead of a local group, switch from locations to coordinates, and use a single line to create and destroy the effect.

Moderator

M

Moderator

11:30, 24th Aug 2009
hvo-busterkomo: The spell will need a lot of optimizations in order to be ready for approval. Use GroupUtils instead of a local group, switch from locations to coordinates, and use a single line to create and destroy the effect.
 
Level 31
Joined
May 3, 2008
Messages
3,155
This is make in GUI and convert it to JASS.

If my memory serves me right, here leak 16 boolexpr... :p

JASS:
function InitTrig_Slash takes nothing returns nothing
 set gg_trg_Slash = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Slash, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_Slash, Condition(function Slash_Condition))
    call TriggerAddAction(gg_trg_Slash, function Slash_Actions)
endfunction

It also a clear sign of you making this in GUI and convert it to JASS. :p

And nobody going to name a function like this.

function Trig_Untitled_Trigger_001_Func00100200
 
Level 9
Joined
Aug 2, 2008
Messages
219
Here we have another omnislash, but not very well made
I´ve some complainments about the code:
1.Replace IsUnitDeadBJ(SomeUnit) with GetWidgetLife(SomeUnit) > 0

2.
You used some other BJ which can be evaded

3.
Get Rid of the TSA

4.
ATM your spell is a bit hard to configurate i think, you could add some constants to make it easier

5.
That code is hardly readable, do some better indention and add some free lines

And i also noticed if there are some dead units near the caster the spell somtimes bugs...instead of for example 10 slashes the caster slashes only 2 or 3 times
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
This is make in GUI and convert it to JASS.

If my memory serves me right, here leak 16 boolexpr... :p

JASS:
function InitTrig_Slash takes nothing returns nothing
 set gg_trg_Slash = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Slash, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_Slash, Condition(function Slash_Condition))
    call TriggerAddAction(gg_trg_Slash, function Slash_Actions)
endfunction
It also a clear sign of you making this in GUI and convert it to JASS. :p

And nobody going to name a function like this.

function Trig_Untitled_Trigger_001_Func00100200

Well i'm begginer at JASS.. offcorse i have to convert some stuff still...

Oh btw. what's wrong with BJs anyway?
 
Level 9
Joined
Aug 2, 2008
Messages
219
BJ are bad because the they often just call natives.
For example:
JASS:
function PauseUnitBJ takes boolean pause, unit whichUnit returns nothing
    call PauseUnit(whichUnit, pause)
endfunction
this way of calling functions is slow and can be easily evaded. In my example you just have to remove the BJ. Other BJ as for example TriggerRegisterAnyUnitEventBJ need to be inlined because they do some more stuff than just calling a native.

[Edit]
Oh sorry Septimus was faster..
 
Level 10
Joined
Aug 19, 2008
Messages
491
Hey, to be a commonly uploaded DotA spell this isn't very bad, after all it's MUI.
I'm not saying it's good, but it isn't crap.
Anyway here are things I found:
  • temp_loc is never nulled
  • temp is only sometimes nulled
  • blinkEffect and targetEffect are never nulled

    Coding:
  • set blinkEffect = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", GetUnitLoc (caster)) call DestroyEffect (blinkEffect)

    can be replaced with:
    call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", GetUnitLoc (caster)))

    Thus avoiding the two variables that wern't nulled.
  • In first If statment (in the loop) there's an empty "else", just remove it
  • Uses alot of short TriggerSleepAction() which might cause obscure bugs. If you can, replace it with a Timer.
  • Replace the IsUnitDeadBJ( GetFilterUnit() ) with GetWidgetLife( GetFilterUnit() ) < 0.405. It's faster and more reliable.
  • This is a minor issue, but I suggest you use exitwhen count <= 0 instead of == 0, cause if the CPU calculates alot of stuff and happens to "miss" the exitwhen count == 0, you're garantueed that it will still exit (just giving you an additional target)

    Improvements:
  • Setup section? Currently you have to change 3 params if you get another rawcode for the spell. It would be alot more userfriendly :p

I hope it helps. If you're confused just ask, I'm here to help not judge.
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
This is make in GUI and convert it to JASS.

If my memory serves me right, here leak 16 boolexpr... :p

JASS:
function InitTrig_Slash takes nothing returns nothing
 set gg_trg_Slash = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Slash, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_Slash, Condition(function Slash_Condition))
    call TriggerAddAction(gg_trg_Slash, function Slash_Actions)
endfunction
It also a clear sign of you making this in GUI and convert it to JASS. :p

And nobody going to name a function like this.

function Trig_Untitled_Trigger_001_Func00100200

Here we have another omnislash, but not very well made
I´ve some complainments about the code:
1.Replace IsUnitDeadBJ(SomeUnit) with GetWidgetLife(SomeUnit) > 0

2.
You used some other BJ which can be evaded

3.
Get Rid of the TSA

4.
ATM your spell is a bit hard to configurate i think, you could add some constants to make it easier

5.
That code is hardly readable, do some better indention and add some free lines
And i also noticed if there are some dead units near the caster the spell somtimes bugs...instead of for example 10 slashes the caster slashes only 2 or 3 times

Hey, to be a commonly uploaded DotA spell this isn't very bad, after all it's MUI.
I'm not saying it's good, but it isn't crap.
Anyway here are things I found:
  • temp_loc is never nulled
  • temp is only sometimes nulled
  • blinkEffect and targetEffect are never nulled

    Coding:
  • set blinkEffect = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", GetUnitLoc (caster)) call DestroyEffect (blinkEffect)
    can be replaced with:
    call DestroyEffect( AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl", GetUnitLoc (caster)))
    Thus avoiding the two variables that wern't nulled.
  • In first If statment (in the loop) there's an empty "else", just remove it
  • Uses alot of short TriggerSleepAction() which might cause obscure bugs. If you can, replace it with a Timer.
  • Replace the IsUnitDeadBJ( GetFilterUnit() ) with GetWidgetLife( GetFilterUnit() ) < 0.405. It's faster and more reliable.
  • This is a minor issue, but I suggest you use exitwhen count <= 0 instead of == 0, cause if the CPU calculates alot of stuff and happens to "miss" the exitwhen count == 0, you're garantueed that it will still exit (just giving you an additional target)

    Improvements:
  • Setup section? Currently you have to change 3 params if you get another rawcode for the spell. It would be alot more userfriendly :p

I hope it helps. If you're confused just ask, I'm here to help not judge.

Well I won't check, but I'd say something:
I've seen some very well done omni-slashes, making this useless to anyone.
I'm not trying to offend you in any way, but spells made for practice, shouldn't be posted here...


I have fixed many things of your comments, i think not all yet tho.
 
Level 9
Joined
Aug 2, 2008
Messages
219
Yeah but if you set the movement speed to 0 that doesn´t really mean it´s 0. Every unit has a minimal movement speed. You can´t set the unit movement speed under that value, not even with triggers..(I´ve expierienced this by one of my experiments). Pausing would be the best way aslong you unpause the unit when the spell is done.
 
Level 9
Joined
Nov 25, 2008
Messages
194
Yeah i don't know why you should pause or stop him anyway, even in dota it is possible, that yurnero attakcs enemys while slashing. So the best possibility is to add something, that whenever the caster receives an order, he instantly receives to order to attack the current target
 
Level 9
Joined
Nov 25, 2008
Messages
194
Well, I finally got to test this ingame.

Some things to mention: If you copy something do it good:
-In DotA hero becomes invulnerable
-In DotA attachment stays all the time. Just add the attachment outside the loops and then remove it at the end, and you will have that fancy red "stripe" following him.
-I think the interval is lower.

I think the minimum for TSA's is 0,27

EDIT: One thing I missed with the dota stuff: In DotA it's a traget unit ability
EDIT2: Two more things: First the caster doesn't stop when he is dead, second is the animation. In DotA he plays the slam anim, which looks much better.
 
Level 9
Joined
Aug 2, 2008
Messages
219
Super-Sheep you´re right about the 6.61....well in that version the caster gets neither paused nor movement reduction...I think it´s the same as in this version of omni slash so i guess we´re finished with that pause or not problem.

What i meant with unpickable was just, if you pick the hero during omnislash it gets immedeatly unpicked (probably by a trigger or smth).
 
Level 22
Joined
Feb 3, 2009
Messages
3,292
Well, I finally got to test this ingame.

Some things to mention: If you copy something do it good:
-In DotA hero becomes invulnerable
-In DotA attachment stays all the time. Just add the attachment outside the loops and then remove it at the end, and you will have that fancy red "stripe" following him.
-I think the interval is lower.

I think the minimum for TSA's is 0,27

EDIT: One thing I missed with the dota stuff: In DotA it's a traget unit ability
EDIT2: Two more things: First the caster doesn't stop when he is dead, second is the animation. In DotA he plays the slam anim, which looks much better.

Fixed so that you can set either the caster should get invuernable or not (by default he is), changed to slam animation, now is a target unit spell (goes on the target unit first)
As for the fire misle on sword, i made it but even i used the call DestroyEffect thing, it still didn't get removed, so had to delete it.
 
Level 2
Joined
Aug 16, 2009
Messages
6
Bara u wrote in first message : add my spell but this is a problem how can i add your spell
 
Top