• 🏆 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!

Advanced Player Kill Messages.

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,551
Hi there. I want triggers, that I need for my project. Also, how to make players' names colored?

When Player one kills Player two's hero, a following message will be displayed:

[name of killing player] pwned [name of dying player]'s head for a bounty of (200 + (5 x level of dying hero)) gold!
Example: Titania pwned Apheraz Lucent's head for a bounty of 255 gold!

When Player one denies his ally, Player two's hero, a following message will be displayed:

[name of killing player] denied [name of dying player]!
Example: Titania denied Apheraz Lucent!

When Player one kills herself/himself with, example, suicide, a following message will be displayed:

[name of suicidal player] has killed herself/himself!
Example: Titania has killed herself/himself!

When Player one dies to neutral hostile creeps, a following message will be displayed:

[name of dying player] has been killed by neutral creeps.
Example: Titania has been killed by neutral creeps.

When Player one destroys/denies enemy's building, a following message will be displayed:

[name of destroying player] has destroyed a building.
[name of destroying player] has denied a building.
Example: Titania has denied a building.
 
Last edited:
Level 15
Joined
Oct 16, 2010
Messages
941
This will set player names to their respective colors:

  • Player Colors
  • Events
  • Time - Elapsed game time is 0.50 seconds
  • Conditions
  • Actions
  • Set Player_Colors[1] = |c008B7500
  • Set Player_Colors[2] = |c000000FF
  • Set Player_Colors[3] = |c0000FFFF
  • Set Player_Colors[4] = |c009B30FF
  • Set Player_Colors[5] = |c00FFFF00
  • Set Player_Colors[6] = |c00FFA500
  • Set Player_Colors[7] = |c0000868B
  • Set Player_Colors[8] = |c00FF1493
  • Set Player_Colors[9] = |c004F4F4F
  • Set Player_Colors[10] = |c00436EEE
  • Set Player_Colors[11] = |c00006400
  • Set Player_Colors[12] = |c008B4513
  • For each (Integer A) from 1 to 12, do (Actions)
  • Loop - Actions
  • Player - Set name of (Player((Integer A))) to (Player_Colors[(Integer A)] + ((Name of (Player((Integer A)))) + |r))
If you want to set the names to other colors then just follow the same logic for each individual name.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
EDIT: Well, I tried. >.>

When Player one kills Player two's hero, a following message will be displayed:
[name of killing player] pwned [name of dying player]'s head for a bounty of (200 + (5 x level of dying hero)) gold!
Example: Titania pwned Apheraz Lucent's head for a bounty of 255 gold!
  • Hero Kill Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to (==) True
      • ((Killing unit) is A Hero) Equal to (==) True
    • Actions
      • Set HeroLevel = (Hero level of (Dying unit))
      • Set Bounty = (200 + (5 x HeroLevel))
      • Set Message = ((Name of (Owner of (Killing unit))) + ( pwned + ((Name of (Owner of (Dying unit))) + ('s head for a bounty of |cffffcc00 + ((String(Bounty)) + |r gold!)))))
      • Game - Display to (All players) the text: Message
When Player one kills herself/himself with, example, suicide, a following message will be displayed:
[name of suicidal player] has killed herself/himself!
Example: Titania has killed herself/himself!
  • Suicide
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to (==) (Killing unit)
    • Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has killed themselves!)
When Player one dies to neutral hostile creeps, a following message will be displayed:
[name of dying player] has been killed by neutral creeps.
Example: Titania has been killed by neutral creeps.
  • Death by Creep
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to (==) True
      • ((Killing unit) is A Hero) Equal to (==) False
    • Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Dying unit))) + has been killed by neutral creeps.)
Those ought to do what you want them to do. I'm not sure about the player color thing, though. Not sure how to carry that over. But this is definitely a start.

Not sure how to do the other two though. Sorry, mate.
 
Last edited:
Level 12
Joined
Jan 30, 2009
Messages
1,067
Never claimed to be any good with triggers. :p

Just tried to help. From a logical standpoint, it should work, but oh well. If it don't work, it don't work.
 
Level 9
Joined
Jun 25, 2009
Messages
427
Aspheraz, i will help you, although it will take few minutes to open meh map.

  • Sounds System Normal
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True
        • Then - Actions
          • Set Bounty=(200 + (5 x (Level of (Triggering Unit))))
          • Game - Display to (All players) the text: (Murder_Player_Number[(Player number of (Owner of (Killing unit)))] + ( has owned + (Player_Number[(Player number of (Owner of (Triggering unit)))] + ( for + Bounty + gold.))))
          • Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - Bounty)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) is an ally of (Owner of (Killing unit))) Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: (Player_Number[(Player number of (Owner of (Triggering unit)))] + ( has been killed by his teammate + Murder_Player_Number[(Player number of (Owner of (Killing unit)))]))
            • Else - Actions
              • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Triggering unit)))] + has commited suicide!!)
I set the coloured names into another trigger, then, the neutrals are written as Creeps, so it writes: Creeps has owned Tiche3 or something, be right back, i will add a deny stuff.

  • The towasz
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A structure) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Naga Defender - Level 1
          • (Unit-type of (Triggering unit)) Equal to Naga Defender - Level 2
          • (Unit-type of (Triggering unit)) Equal to Naga Defender - Level 3
          • (Unit-type of (Triggering unit)) Equal to Ancient Protector - Level 1
          • (Unit-type of (Triggering unit)) Equal to Ancient Protector - Level 2
          • (Unit-type of (Triggering unit)) Equal to Ancient Protector - Level 3
          • (Unit-type of (Triggering unit)) Equal to Barracks
          • (Unit-type of (Triggering unit)) Equal to Ancient of Mystic
          • (Unit-type of (Triggering unit)) Equal to Barracks [NAGA]
          • (Unit-type of (Triggering unit)) Equal to Barracks of Heroes
    • Actions
      • Set Player_Group = (All allies of Player 1 (Red))
      • Set Player_Group2 = (All allies of Player 12 (Brown))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has denied a tower!)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Ancient Protector - Level 1
            • Then - Actions
              • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has destroyed a tower!)
              • Player Group - Pick every player in Player_Group and do (Player - Add 200 to (Picked player) Current gold)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Triggering unit)) Equal to Ancient Protector - Level 2
                • Then - Actions
                  • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has destroyed a tower!)
                  • Player Group - Pick every player in Player_Group and do (Player - Add 200 to (Picked player) Current gold)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Triggering unit)) Equal to Ancient Protector - Level 3
                    • Then - Actions
                      • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has destroyed a tower!)
                      • Player Group - Pick every player in Player_Group and do (Player - Add 200 to (Picked player) Current gold)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Triggering unit)) Equal to Naga Defender - Level 1
                        • Then - Actions
                          • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has destroyed a tower!)
                          • Player Group - Pick every player in Player_Group2 and do (Player - Add 200 to (Picked player) Current gold)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of (Triggering unit)) Equal to Naga Defender - Level 2
                            • Then - Actions
                              • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has destroyed a tower!)
                              • Player Group - Pick every player in Player_Group2 and do (Player - Add 200 to (Picked player) Current gold)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of (Triggering unit)) Equal to Naga Defender - Level 3
                                • Then - Actions
                                  • Game - Display to (All players) the text: (Player_Colored_Names[(Player number of (Owner of (Killing unit)))] + has destroyed a tower!)
                                  • Player Group - Pick every player in Player_Group2 and do (Player - Add 200 to (Picked player) Current gold)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Unit-type of (Triggering unit)) Equal to Barracks [NAGA]
                                    • Then - Actions
                                      • Game - Display to (All players) the text: Barracks has been d...
                                      • Player Group - Pick every player in Player_Group2 and do (Player - Add 200 to (Picked player) Current gold)
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (Unit-type of (Triggering unit)) Equal to Barracks of Heroes
                                        • Then - Actions
                                          • Game - Display to (All players) the text: Barracks has been d...
                                          • Player Group - Pick every player in Player_Group2 and do (Player - Add 200 to (Picked player) Current gold)
                                        • Else - Actions
                                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            • If - Conditions
                                              • (Unit-type of (Triggering unit)) Equal to Barracks
                                            • Then - Actions
                                              • Game - Display to (All players) the text: Barracks has been d...
                                              • Player Group - Pick every player in Player_Group and do (Player - Add 200 to (Picked player) Current gold)
                                            • Else - Actions
                                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                • If - Conditions
                                                  • (Unit-type of (Triggering unit)) Equal to Ancient of Mystic
                                                • Then - Actions
                                                  • Game - Display to (All players) the text: Barracks has been d...
                                                  • Player Group - Pick every player in Player_Group and do (Player - Add 200 to (Picked player) Current gold)
                                                • Else - Actions
      • Custom script: call DestroyForce(udg_Player_Group)
      • Custom script: call DestroyForce(udg_Player_Group2)
Meh, i just put the whole trigger, so that you can see how it goes.
 
Level 9
Joined
Jun 25, 2009
Messages
427
Tiche, you really are 'Addicted to helpin' others'. For that, another 2 rep will be rewarded.

Thank you bro :)

And i'm addicted to help because: I love when people are happy and they make their maps better with my help and i love when people help me.

Anyway, for me it's holidays, so i have more time to spend helping others than playing DotA or homework.

Tiche3
 
Status
Not open for further replies.
Top