• 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.

[Trigger] Review

Status
Not open for further replies.
Level 15
Joined
Mar 31, 2009
Messages
1,397
Updating an old sheep tag I like, and noticed maker did some crap triggering, I've managed to make some of them less crappy and would like a review of two triggers I think I may have messed up.
Also chose GUI for beta because easier to modify.


  • UniversalText
    • Events
      • Player - Player 1 (Red) types a chat message containing - as A substring
      • Player - Player 2 (Blue) types a chat message containing - as A substring
      • Player - Player 3 (Teal) types a chat message containing - as A substring
      • Player - Player 4 (Purple) types a chat message containing - as A substring
      • Player - Player 5 (Yellow) types a chat message containing - as A substring
      • Player - Player 6 (Orange) types a chat message containing - as A substring
      • Player - Player 7 (Green) types a chat message containing - as A substring
      • Player - Player 8 (Pink) types a chat message containing - as A substring
      • Player - Player 9 (Gray) types a chat message containing - as A substring
      • Player - Player 10 (Light Blue) types a chat message containing - as A substring
      • Player - Player 11 (Dark Green) types a chat message containing - as A substring
      • Player - Player 12 (Brown) types a chat message containing - as A substring
    • Conditions
    • Actions
      • -------- Boot Function --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering player) Equal to Player 1 (Red)
        • Then - Actions
          • If (((Entered chat string) Equal to -kick blue) or (((Entered chat string) Equal to -boot blue) or ((Entered chat string) Equal to -ban blue))) then do (Game - Defeat Player 2 (Blue) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick teal) or (((Entered chat string) Equal to -boot teal) or ((Entered chat string) Equal to -ban teal))) then do (Game - Defeat Player 3 (Teal) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick purple) or (((Entered chat string) Equal to -boot purple) or ((Entered chat string) Equal to -ban purple))) then do (Game - Defeat Player 4 (Purple) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick yellow) or (((Entered chat string) Equal to -boot yellow) or ((Entered chat string) Equal to -ban yellow))) then do (Game - Defeat Player 5 (Yellow) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick orange) or (((Entered chat string) Equal to -boot orange) or ((Entered chat string) Equal to -ban orange))) then do (Game - Defeat Player 6 (Orange) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick green) or (((Entered chat string) Equal to -boot green) or ((Entered chat string) Equal to -ban green))) then do (Game - Defeat Player 7 (Green) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick pink) or (((Entered chat string) Equal to -boot pink) or ((Entered chat string) Equal to -ban pink))) then do (Game - Defeat Player 8 (Pink) with the message: You were disconnect...) else do (Do nothing)
          • If ((((Entered chat string) Equal to -kick gray) or ((Entered chat string) Equal to -kick grey)) or ((((Entered chat string) Equal to -boot gray) or ((Entered chat string) Equal to -boot grey)) or (((Entered chat string) Equal to -ban grey) or ((Entered chat str then do (Game - Defeat Player 9 (Gray) with the message: You were disconnect...) else do (Do nothing)
          • If ((((Entered chat string) Equal to -kick lightblue) or ((Entered chat string) Equal to -kick light blue)) or ((((Entered chat string) Equal to -boot lightblue) or ((Entered chat string) Equal to -boot light blue)) or (((Entered chat string) Equal to -ban light then do (Game - Defeat Player 10 (Light Blue) with the message: You were disconnect...) else do (Do nothing)
          • If ((((Entered chat string) Equal to -kick darkgreen) or ((Entered chat string) Equal to -kick dark green)) or ((((Entered chat string) Equal to -boot darkgreen) or ((Entered chat string) Equal to -boot dark green)) or (((Entered chat string) Equal to -ban darkg then do (Game - Defeat Player 11 (Dark Green) with the message: You were disconnect...) else do (Do nothing)
          • If (((Entered chat string) Equal to -kick brown) or (((Entered chat string) Equal to -boot brown) or ((Entered chat string) Equal to -ban brown))) then do (Game - Defeat Player 12 (Brown) with the message: You were disconnect...) else do (Do nothing)
        • Else - Actions
          • Do nothing
      • -------- Hide/Show Leaderboard --------
      • If ((Entered chat string) Equal to -hide) then do (Leaderboard - Hide (Leaderboard of (Triggering player))) else do (Do nothing)
      • If ((Entered chat string) Equal to -show) then do (Leaderboard - Show (Leaderboard of (Triggering player))) else do (Do nothing)
      • -------- Sheep Sounds --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in Wolf) Equal to False
        • Then - Actions
          • If ((Entered chat string) Equal to -sound 1) then do (Sound - Play GetMeOutofHere <gen>) else do (Do nothing)
          • If ((Entered chat string) Equal to -sound 2) then do (Sound - Play SaveUs <gen>) else do (Do nothing)
          • If ((Entered chat string) Equal to -sound 3) then do (Sound - Play Sheep1 <gen>) else do (Do nothing)
          • If ((Entered chat string) Equal to -sound 4) then do (Sound - Play ThankYouForHelpingMe <gen>) else do (Do nothing)
          • If ((Entered chat string) Equal to -sound 5) then do (Sound - Play UBastard <gen>) else do (Do nothing)
          • If ((Entered chat string) Equal to -sound 6) then do (Sound - Play WeMustHelpHer <gen>) else do (Do nothing)
          • Sound - Destroy (Last played sound)
        • Else - Actions
          • Do nothing
      • -------- FunStuff --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to *censored*
          • (Triggering player) Equal to Player 1 (Red)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Name Equal to False
            • Then - Actions
              • Set Name = True
              • For each (Integer A) from 1 to 12, do (Set Naming[(Integer A)] = (Name of (Player((Integer A)))))
              • Player Group - Pick every player in (All players) and do (Player - Set name of (Picked player) to *censored*)
            • Else - Actions
              • Set Name = False
              • For each (Integer A) from 1 to 12, do (Player - Set name of (Player((Integer A))) to Naming[(Integer A)])
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to *censored*
          • (Triggering player) Equal to Player 1 (Red)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Pinky Equal to False
            • Then - Actions
              • Set Pinky = True
              • Unit Group - Pick every unit in (Units in (Entire map)) and do (Unit - Change color of (Picked unit) to Pink)
              • Trigger - Turn on PinkyRun <gen>
            • Else - Actions
              • Set Pinky = False
              • For each (Integer A) from 1 to 12, do (Unit Group - Pick every unit in (Units in (Entire map) owned by (Player((Integer A)))) and do (Unit - Change color of (Picked unit) to (Color of (Player((Integer A))))))
              • Trigger - Turn off PinkyRun <gen>
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to *censored*
          • (Triggering player) Equal to Player 1 (Red)
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Bloody Equal to False
            • Then - Actions
              • Set Bloody = True
              • Trigger - Turn on BloodyFun <gen>
            • Else - Actions
              • Set Bloody = False
              • Trigger - Turn off BloodyFun <gen>
        • Else - Actions
          • Do nothing
Sheep are supposed to get 1 gold every 2 seconds, Sheep Spirits same.

  • Gold
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in Wolf and do (Player - Add 1 to (Picked player) Current gold)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Money Equal to False
        • Then - Actions
          • Player Group - Pick every player in Sheep and do (Player - Add 1 to (Picked player) Current gold)
          • Set Money = True
          • Set FarmGold = 1
          • For each (Integer A) from 1 to 8, do (Unit Group - Pick every unit in (Units owned by (Player((Integer A))) of type Saving Farm) and do (If (((Picked unit) is alive) Equal to True) then do (Player - Add FarmGold to (Player((Integer A))) Current gold) else do (Do nothing)))
        • Else - Actions
          • Player Group - Pick every player in Spirit and do (Player - Add 1 to (Picked player) Current gold)
          • Set Money = False
 
Level 4
Joined
Oct 29, 2008
Messages
65
I fail to see how half of any of the initial triggers are of any use, other than to annoy the crap out of people. The kick trigger is also very inefficient. Why not just use player number substrings?

As for the gold trigger, why not just make separate triggers? Would be simpler.

Every 1 seconds, run Trigger - Wolf Income

Every 2 seconds, run Trigger - Sheep Income, run Trigger - Sheep Spirit Income

Also, integers don't leak. So it would not matter if you have FarmGold or not unless you plan to make it greater than 1 at any point.
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
Nah global triggers are funner

And you could say the boot trigger is inefficient, but then again it allows -ban, -boot, and -kick

It also allows either darkgreen/lightblue or dark green/light blue and both spellings of Grey/Gray

Whats wrong with that?

And how I have the gold trigger setup is that every second it alternates between Spirit Gold and Sheep Gold, both get .5 gps, just at different times

And those triggers keep it fun, everyones pink :D, all those triggers don't mess with gameplay much sooo. Also there is no size increase/decrease due to gameplay changes then
 
Last edited:
Level 15
Joined
Mar 31, 2009
Messages
1,397
Blarg, Ill have to test that destroying sound

Taishaku, if you have a better boot trigger, then why don't you show it and I'll integrate it. Ill even put a little thank you in the Quest Credits.

Heck if it's so good then post it in its own thread
 
Level 4
Joined
Oct 29, 2008
Messages
65
Taishaku, if you have a better boot trigger, then why don't you show it and I'll integrate it. Ill even put a little thank you in the Quest Credits.

Are you kidding me? This is not a trigger to be proud of and I am not writing triggers for other people. So instead of trying to bait me to do your job of improving your map, perhaps you should figure out why your triggers are subpar.

EDIT: Actually, I changed my mind. I will demonstrate a better way to write the first of your inefficient triggers.

Your trigger:
  • Events
  • Player - Player 1 (Red) types a chat message containing - as A substring
  • Player - Player 2 (Blue) types a chat message containing - as A substring
  • Player - Player 3 (Teal) types a chat message containing - as A substring
  • Player - Player 4 (Purple) types a chat message containing - as A substring
  • Player - Player 5 (Yellow) types a chat message containing - as A substring
  • Player - Player 6 (Orange) types a chat message containing - as A substring
  • Player - Player 7 (Green) types a chat message containing - as A substring
  • Player - Player 8 (Pink) types a chat message containing - as A substring
  • Player - Player 9 (Gray) types a chat message containing - as A substring
  • Player - Player 10 (Light Blue) types a chat message containing - as A substring
  • Player - Player 11 (Dark Green) types a chat message containing - as A substring
  • Player - Player 12 (Brown) types a chat message containing - as A substring
  • Conditions
  • Actions
  • -------- Boot Function --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Triggering player) Equal to Player 1 (Red)
  • Then - Actions
  • If (((Entered chat string) Equal to -kick blue) or (((Entered chat string) Equal to -boot blue) or ((Entered chat string) Equal to -ban blue))) then do (Game - Defeat Player 2 (Blue) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick teal) or (((Entered chat string) Equal to -boot teal) or ((Entered chat string) Equal to -ban teal))) then do (Game - Defeat Player 3 (Teal) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick purple) or (((Entered chat string) Equal to -boot purple) or ((Entered chat string) Equal to -ban purple))) then do (Game - Defeat Player 4 (Purple) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick yellow) or (((Entered chat string) Equal to -boot yellow) or ((Entered chat string) Equal to -ban yellow))) then do (Game - Defeat Player 5 (Yellow) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick orange) or (((Entered chat string) Equal to -boot orange) or ((Entered chat string) Equal to -ban orange))) then do (Game - Defeat Player 6 (Orange) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick green) or (((Entered chat string) Equal to -boot green) or ((Entered chat string) Equal to -ban green))) then do (Game - Defeat Player 7 (Green) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick pink) or (((Entered chat string) Equal to -boot pink) or ((Entered chat string) Equal to -ban pink))) then do (Game - Defeat Player 8 (Pink) with the message: You were disconnect...) else do (Do nothing)
  • If ((((Entered chat string) Equal to -kick gray) or ((Entered chat string) Equal to -kick grey)) or ((((Entered chat string) Equal to -boot gray) or ((Entered chat string) Equal to -boot grey)) or (((Entered chat string) Equal to -ban grey) or ((Entered chat str then do (Game - Defeat Player 9 (Gray) with the message: You were disconnect...) else do (Do nothing)
  • If ((((Entered chat string) Equal to -kick lightblue) or ((Entered chat string) Equal to -kick light blue)) or ((((Entered chat string) Equal to -boot lightblue) or ((Entered chat string) Equal to -boot light blue)) or (((Entered chat string) Equal to -ban light then do (Game - Defeat Player 10 (Light Blue) with the message: You were disconnect...) else do (Do nothing)
  • If ((((Entered chat string) Equal to -kick darkgreen) or ((Entered chat string) Equal to -kick dark green)) or ((((Entered chat string) Equal to -boot darkgreen) or ((Entered chat string) Equal to -boot dark green)) or (((Entered chat string) Equal to -ban darkg then do (Game - Defeat Player 11 (Dark Green) with the message: You were disconnect...) else do (Do nothing)
  • If (((Entered chat string) Equal to -kick brown) or (((Entered chat string) Equal to -boot brown) or ((Entered chat string) Equal to -ban brown))) then do (Game - Defeat Player 12 (Brown) with the message: You were disconnect...) else do (Do nothing)
  • Else - Actions
  • Do nothing
My trigger:
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
      • Player - Player 1 (Red) types a chat message containing -boot as A substring
    • Conditions
      • (Length of (Entered chat string)) Equal to 7
    • Actions
      • Set Integer = (Integer((Substring((Entered chat string), 7, 7))))
      • Game - Defeat (Player(Integer)) with the message: Kicked!
Note the disparity in length and the increased flexibility. This is primarily because it is idiotic to set "-" as a substring. Instead of running through all of those above triggers, it would be smarter to subdivide them, if only to cut down on processing time. So instead of one inefficient supertrigger, it would be simpler to have multiple, smaller triggers, that can be easily connected (say, I can connect this trigger to a leaver gold/asset redistribution trigger alongside the leaver announcement trigger) or customized.

There are a few differences and assumptions.

1) I am assuming there are 1-9 players. If you want it for 12, figure out how to use substrings and increase the length yourself.
2) I am not including -ban because some players use banlist and whatnot, and this may cause unintended screwups.
3) I am assuming people are smart enough to know player numbers.
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
1. People shall be confuzzulated by the p# system, it's not widely used at all.
2. LOL it's a bunch of Condition's to check, that takes almost no CPU time
3. I have not seen a banlist yet that uses - , I have however seen / . | =
4. Very well made trigger however. But it has no place in Mr. Global
 
Level 4
Joined
Oct 29, 2008
Messages
65
1. People shall be confuzzulated by the p# system, it's not widely used at all.
2. LOL it's a bunch of Condition's to check, that takes almost no CPU time
3. I have not seen a banlist yet that uses - , I have however seen / . | =
4. Very well made trigger however. But it has no place in Mr. Global

1) Oh yeah. Because in DotA, they type "-swap blue." No. Numbers are more commonly used than colors, simply because DotA is the most commonly played map. I mean honestly, I usually think people would have to be pretty dumb to not understand it.
2) Depends on how busy the map is. But I primarily would do it my way because it is more flexible. Sticking everything into one trigger with a If/Then/Else is a horror in GUI because of the forks.
3) The idea is that I do not wish it to ever conflict with a proper ban command. Ban generally has a different meaning anyhow, kick and boot are more common for forcing a player to leave.
4) Mr. Global? Oo"
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
Dota lol, Read my first post, it's for a SHEEP TAG, the last thing a dota lover would play

I hate how all the Tree Tags, Sheep Tags, FvH, and Mauls that were all over when TFT came out have been replaced by crap Dotas, RPG's, and BattleShits

Also, me likey the fork challenge
 
Level 4
Joined
Oct 29, 2008
Messages
65
@BlargHonk
I know this is a Sheep Tag. But look, the vast majority of WC3 players have played DotA at one point or another.

I agree that map variety and quality has decreased... but DotA itself is a well-constructed map. And AoS has always been popular.

I recommend you try my new Wintermaul map.

Here's a link:
Wintermaul Redux 1.06 - The Hive Workshop - A Warcraft III Modding Site

It's a rebuild from the ground up, so no Easymaul or Crappypathingmaul.

Has an issue with server splits (also known as desynchronization) though. I'm trying to fix it... but apparently nothing I am doing is a traditional basis for server splitting.

Er... forks are apart of the JASS... nevermind.
 
Taishaku, this is not the place to be advertising your map. He asked for words to be used in his trigger as opposed to numbers.

I would suggest avoiding both all together and instead using a GUI based interface; a building with a series of dummy abilities pointing to kick a player would work.

However if words are what you're looking for, I'd reccomend a similar action to Taishaku's post here, but instead of refering to an integer variable, refer to a string variable through a loop like this:

string[1] = red
string[2] = blue
...
loop 1 through 12
if entered chat substring matches loopValue then
kick player(loopValue) with the message kicked!
endloop

obviously not a real script/trigger, but I hope this helps.
 
Level 15
Joined
Mar 31, 2009
Messages
1,397
Me likey integer/string, I'll go make it, although it doesn't actually need to be a sub string, with the system you proposed you could accidently boot some with -blue

Edit: NVM, won't work unless I use only one way of saying each boot. I could do an integer loop but I would need 12 of them
 
Last edited:
Level 15
Joined
Mar 31, 2009
Messages
1,397
Nah but it's a global trigger, thats the entire thing about it.

Although I did think of a solution when I layed down on my bed last night, can't remember it now >.<

Edit: I REMEMBERED IT!

  • Boot
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Substring((Entered chat string), 2, 5)) Equal to boot) or ((Substring((Entered chat string), 2, 5)) Equal to kick)
        • Then - Actions
          • 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
                  • (Substring((Entered chat string), 7, 17)) Equal to BootString[(Integer A)]
                • Then - Actions
                  • Game - Defeat (Player((Integer A))) with the message: Defeat!
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Triggering player) is in DualBootname) Equal to True
                      • (Substring((Entered chat string), 7, 17)) Equal to BootString[((Integer A) + 4)]
                    • Then - Actions
                      • Game - Defeat (Player((Integer A))) with the message: Defeat!
                    • Else - Actions
        • Else - Actions
And I'll just stick this in with the Initialization Triggers:
  • BootVariable
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 9 to 11, do (Player Group - Add (Player((Integer A))) to DualBootname)
      • Set BootString[1] = red
      • Set BootString[2] = blue
      • Set BootString[3] = teal
      • Set BootString[4] = purple
      • Set BootString[5] = yellow
      • Set BootString[6] = orange
      • Set BootString[7] = green
      • Set BootString[8] = pink
      • Set BootString[9] = grey
      • Set BootString[10] = light blue
      • Set BootString[11] = dark green
      • Set BootString[12] = brown
      • Set BootString[13] = gray
      • Set BootString[14] = lightblue
      • Set BootString[15] = darkgreen
 
Last edited:
Level 15
Joined
Mar 31, 2009
Messages
1,397
the - is included inside the censor

I don't want people to know the codes, they are meant to be fun codes for friends.

But I'm surprised you haven't figured out the problem with it.

Because of this little bugger:
  • (Substring((Entered chat string), 7, 17)) Equal to BootString[(Integer A)]
Because Red is only 3 letters, 10-17 aren't used and it might glitch out >.<
 
Status
Not open for further replies.
Top