System DotA Spree & Assistance System

Leazy

You can change this now in User CP.
Reaction score
50
DotA Spree & Assistance System

Hello!

I have always felt like the most maps that I have started on would look better with the DotA Spree and Assistance system, so I made them. The systems are GUI, leakless (I think) and bugfree (I think).

Code:
(Spree System)
Trigger:
  • Killing System setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Setup Spree Sounds --------
      • Set Spree_Sounds[1] = No sound
      • Set Spree_Sounds[2] = No sound
      • Set Spree_Sounds[3] = Killing_Spree <gen>
      • Set Spree_Sounds[4] = Dominating <gen>
      • Set Spree_Sounds[5] = MegaKill <gen>
      • Set Spree_Sounds[6] = Unstoppable <gen>
      • Set Spree_Sounds[7] = WhickedSick <gen>
      • Set Spree_Sounds[8] = MonsterKill <gen>
      • Set Spree_Sounds[9] = GodLike <gen>
      • Set Spree_Sounds[10] = HolyShit <gen>
      • -------- Setup Get Spree Text --------
      • Set Spree_Texts[1] = <Empty String>
      • Set Spree_Texts[2] = <Empty String>
      • Set Spree_Texts[3] = |ris on a |cff00FF00killing spree|r!
      • Set Spree_Texts[4] = |ris |cff551A8Bdominating|r!
      • Set Spree_Texts[5] = |rhas a |cffCD1076mega kill|r!
      • Set Spree_Texts[6] = |ris |cffFF8C00unstoppable|r!!
      • Set Spree_Texts[7] = |ris |cff006400wicked sick|r!!
      • Set Spree_Texts[8] = |rhas a |cffFF6EB4monster kill|r!!
      • Set Spree_Texts[9] = |ris |CFFFF0303GODLIKE|r!!!
      • Set Spree_Texts[10] = |ris |CffDAA520beyond GODLIKE|r. Someone KILL HIM!!!
      • -------- Setup End Spree Text --------
      • Set SpreeEnd_Texts[1] = <Empty String>
      • Set SpreeEnd_Texts[2] = <Empty String>
      • Set SpreeEnd_Texts[3] = |cff00FF00killing spree|r
      • Set SpreeEnd_Texts[4] = |cff551A8Bdominating|r
      • Set SpreeEnd_Texts[5] = |cffCD1076mega kill|r
      • Set SpreeEnd_Texts[6] = |cffFF8C00unstoppable|r
      • Set SpreeEnd_Texts[7] = |cff006400wicked sick|r
      • Set SpreeEnd_Texts[8] = |cffFF6EB4monster kill|r
      • Set SpreeEnd_Texts[9] = |CFFFF0303GODLIKE|r
      • Set SpreeEnd_Texts[10] = |CffDAA520beyond GODLIKE|r
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )


Trigger:
  • Killing System
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local string Message1
      • Custom script: local string Message2
      • Custom script: local string Message3
      • Custom script: local sound Sound1
      • Custom script: local sound Sound2
      • Custom script: local sound Sound3
      • If (Spree_Count[(Player number of (Owner of (Killing unit)))] Less than 10) then do (Set Spree_Count[(Player number of (Owner of (Killing unit)))] = (Spree_Count[(Player number of (Owner of (Killing unit)))] + 1)) else do (Do nothing)
      • -------- Kill Message --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spree_Count[(Player number of (Owner of (Triggering unit)))] Less than or equal to 2
        • Then - Actions
          • -------- You didn't end a spree. --------
          • Set General_Integer[1] = 5
          • Player - Add General_Integer[1] to (Owner of (Killing unit)) Current gold
          • Game - Display to (All players) the text: (PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + ((|r just pawned + PlayerColors[(Player number of (Owner of (Dying unit)))]) + ((Name of (Owner of (Dying unit))) + (|r's head for |CFFFFFF01 + ((String(Gene
        • Else - Actions
          • -------- You did end a spree. --------
          • Set General_Integer[1] = (5 + Spree_Count[(Player number of (Owner of (Triggering unit)))])
          • Game - Display to (All players) the text: (PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + ((|r has just ended + PlayerColors[(Player number of (Owner of (Dying unit)))]) + ((Name of (Owner of (Dying unit))) + ((|r's + SpreeEnd_Texts[Spree_Count[(
      • Set Spree_Count[(Player number of (Owner of (Triggering unit)))] = 0
      • -------- First Blood --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FirstBlood Equal to False
        • Then - Actions
          • Set FirstBlood = True
          • Set General_String[1] = (PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + (|r + just drew |CFFFF0303first blood!|r (+10 gold))))
          • Game - Display to (All players) the text: General_String[1]
        • Else - Actions
      • -------- Spree --------
      • Set General_String[2] = (PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + Spree_Texts[Spree_Count[(Player number of (Owner of (Killing unit)))]]))
      • Custom script: set Message2 = udg_General_String[2]
      • Custom script: set Sound2 = udg_Spree_Sounds[udg_Spree_Count[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnit()))]]
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Spree_Count[(Player number of (Owner of (Killing unit)))] Less than or equal to 2
        • Then - Actions
          • Custom script: set Message2 = ""
        • Else - Actions
      • -------- Double/Triple Kill --------
      • Set General_Point[1] = (Center of (Playable map area))
      • Unit - Create 1 Dummy Unit (Double / Triple Kill Counter) for (Owner of (Killing unit)) at General_Point[1] facing Default building facing degrees
      • Set General_Unitgroup[1] = (Units owned by (Owner of (Killing unit)) of type Dummy Unit (Double / Triple Kill Counter))
      • Unit Group - Pick every unit in General_Unitgroup[1] and do (Unit - Set life of (Picked unit) to 100.00%)
      • Custom script: call DestroyGroup (udg_General_Unitgroup[1])
      • -------- Double Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by (Owner of (Killing unit)) of type Dummy Unit (Double / Triple Kill Counter))) Equal to 2
        • Then - Actions
          • Set General_String[3] = (PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + (|r + |rjust got a |cff00008BDouble Kill|r!)))
          • Custom script: set Message3 = udg_General_String[3]
          • Custom script: set Sound3 = gg_snd_Double_Kill
        • Else - Actions
      • -------- Triple Kill --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units owned by (Owner of (Killing unit)) of type Dummy Unit (Double / Triple Kill Counter))) Greater than or equal to 3
        • Then - Actions
          • Set General_String[3] = (PlayerColors[(Player number of (Owner of (Killing unit)))] + ((Name of (Owner of (Killing unit))) + (|r + |rjust got a |cff00FF00Triple Kill|r!!!)))
          • Custom script: set Message3 = udg_General_String[3]
          • Custom script: set Sound3 = gg_snd_triple_kill
        • Else - Actions
      • -------- Display Messages & Play Sounds --------
      • Wait 0.50 seconds
      • Custom script: call PlaySoundBJ( Sound2 )
      • Custom script: if Message2 != "" then
      • Custom script: call DisplayTextToForce( GetPlayersAll(), Message2 )
      • Custom script: endif
      • Wait 1.50 seconds
      • Custom script: call PlaySoundBJ( Sound3 )
      • Custom script: if Message3 != "" then
      • Custom script: call DisplayTextToForce( GetPlayersAll(), Message3 )
      • Custom script: endif


(Assistance System)
Trigger:
  • Assistance System Setup 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Get Assist <gen> the event (Unit - (Picked unit) Takes damage)


Trigger:
  • Assistance System Setup 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Get Assist <gen> the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • Get Assist
    • Events
    • Conditions
    • Actions
      • Set General_Unitgroup[1] = (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to ) and ((Custom value of (Matching unit)) Equal to (Player number of (Owner of (Damage source))))))
      • Set General_Point[1] = (Position of (Triggering unit))
      • Set General_Point[2] = (General_Point[1] offset by 1000000000.00 towards 180.00 degrees)
      • Unit Group - Pick every unit in General_Unitgroup[1] and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Unit - Create 1 for (Owner of (Triggering unit)) at General_Point[2] facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to (Player number of (Owner of (Damage source)))
      • Custom script: call RemoveLocation (udg_General_Point[1])
      • Custom script: call RemoveLocation (udg_General_Point[2])
      • Custom script: call DestroyGroup(udg_General_Unitgroup[1])


Trigger:
  • Assist Message
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • (Number of units in (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to ) and ((Custom value of (Matching unit)) Not equal to (Player number of (Owner of (Killing unit))))))) Greater than 0
    • Actions
      • Custom script: local string Message
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Player((Integer A))) controller) Equal to User
                  • (Player((Integer A))) Not equal to (Owner of (Killing unit))
                  • ((Player((Integer A))) is an enemy of (Owner of (Triggering unit))) Equal to True
                  • (Number of units in (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to ) and ((Custom value of (Matching unit)) Equal to (Integer A))))) Greater than 0
            • Then - Actions
              • Set General_String[(Integer A)] = (( + PlayerColors[(Integer A)]) + ((Name of (Player((Integer A)))) + |cff828282,))
            • Else - Actions
              • Set General_String[(Integer A)] = <Empty String>
      • Set General_String[13] = (|cff828282Assists: + (General_String[1] + (General_String[2] + (General_String[3] + (General_String[4] + (General_String[5] + (General_String[6] + (General_String[7] + (General_String[8] + (General_String[9] + (General_String[10] + (General_String[11] + Gene
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • General_String[13] Equal to |cff828282Assists:
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • Custom script: set Message = udg_General_String[13]
      • Wait 0.10 seconds
      • Custom script: call DisplayTimedTextToForce( GetPlayersAll(), 10.00, Message)


Thanks to TheWarcraft & Sevion for helping me solve some buggs.

Enjoy!
 

Attachments

  • DotA Spree & Assistance System (GUI).w3x
    162.2 KB · Views: 680

Igor_Z

You can change this now in User CP.
Reaction score
61
I got a question... How long have you made this triggers? They are preatty hard work. Nice job. I will test it and +rep you if everything works
Btw you have a little leak here: (Number of units in (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to ) and ((Custom value of (Matching unit)) Not equal to (Player number of (Owner of (Killing unit))))))) Greater than 0 - In the Assist Message Trigger... And why is this((Unit-type of (Matching unit)) Equal to )) here?
 

Romek

Super Moderator
Reaction score
964
Those dummy counter units are pointless. How about using an integer array?
You also seem to use a lot of BJs in the Custom Script.
 

Leazy

You can change this now in User CP.
Reaction score
50
> And why is this((Unit-type of (Matching unit)) Equal to )) here?
Fixed. Probably happened when I imported it sloppy.

> Btw you have a little leak here: (Number of units in (Units owned by (Owner of (Triggering unit)) matching (((Unit-type of (Matching unit)) Equal to ) and ((Custom value of (Matching unit)) Not equal to (Player number of (Owner of (Killing unit))))))) Greater than 0

Does it really leak if you just check, and don't pick?

> I got a question... How long have you made this triggers?

Hmm, I have developed this system for like a year, slowly. I started at my first map (a AOS), then the system failed and had like 10 triggers and bugged all the time. And from there I have worked in grades until today when I decided to polish it. As for the assistance system, it took 1 hour max.

> How about using an integer array?

And how would that work with for example double/triple kill? A periodic timer that sets it to -1 of what it is? What happens if you make a kill exactly before the periodic timer strikes, then your on 0 almost instantly. I tried with integer variable at first, if you can find some way to do it with it, then be my guest and tell me how :)

About the BJ's, I don't know how to fix them, I'm really not familiar with jass, I just asked some on this site and converted GUI triggers.
 

Romek

Super Moderator
Reaction score
964
Same person on two accounts, say (some of) the IPs.
...Leazy or Saiza. Mind explaining?
 

Leazy

You can change this now in User CP.
Reaction score
50
Saiza is my brother, I made this and he just did the last things :p
 

Leazy

You can change this now in User CP.
Reaction score
50
bump. Found anything that could be improved or any bugs?
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Mind explaining how the assist system works? Do you devide gold of the killed hero to all damage sources or? I don't get how the system works really. For Ex:
Unit 1: Deals 100 DMG
Unit 2: Deals 50 DMG
Unit 3: Deals 500 DMG
Unit 4: Deals 25 DMG but kills the unit
How will the gold be properly devided?
 

Leazy

You can change this now in User CP.
Reaction score
50
No gold will be devided, however people will notice and appreciate the assists more.
 

BRUTAL

I'm working
Reaction score
118
dont you need to null your local sting variables in that one trigger?
i hope i havent been nulling them for no reason T_T
 

Leazy

You can change this now in User CP.
Reaction score
50
Well, it's not better in any way not to destroy it. And do I need to null the strings?
 

Leazy

You can change this now in User CP.
Reaction score
50
k, if anyone else can verify that they need to be nulled i'll do it =)
 

Romek

Super Moderator
Reaction score
964
> You do not have to make you trigger static (means destroy it). You can leave it like that.
Do you have any idea what you're talking about?

No, you don't null strings. They leak, but string leaks cannot be fixed.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top