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

Warcraft III Advanced Chat System v1.0.5

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: deepstrasz
1. You can easily edit the system by changing all editable values
2. The triggers are so easy to understand
3. There's a dynamic guide book at the quest menu to help you discover my system. I call it dynamic because it can change it's self even you have changed the value of editable variables. So don't worry to change them (editable values) all
4. There is a Hastable that will save all players recent messages. And can be automatically loaded when you open the chat window
5. You can create your own chat window by all of your creativity as you like easily
6. I think my system will be useful in a RPG game
7. I use a 192x192 map size so people can use my system as their base map
8. Now the font colors are editable

Warning!
Using an image as the chat window background is very not good because upon you open the chat window it will be shown to all players even they are not registered and don't open the chat window. So you can make a beautiful view in your map, then pan all registered player's camera to that area with the best angle of view or something else, so the other player must not see the chat window. If you use an image for the background, don't forget to reset the fog for the best view


allfeatures.jpg
clearcommand.jpg

showrecentmessages.jpg





v1.0.0
- Added chat all feature
- Added sent message box feature
- Added register system
v1.0.1
-Added clear command
- All reported leaks fixed
- System optimized
- Added more documentation
v1.0.2
- Added chat team feature
- Added private message feature
- Added dynamic guide book to help you discover my system
- Some wrong triggers fixed
- Register system error fixed
- More documentations
- The system has been optimized by skiping unused triggers
- Added example for chat window
v1.0.3
- Totally new composition of triggers
- All leaks have been fixed
- Useless actions have been removed
- Optimize all action's work
v1.0.4
- Player chat errors fixed
- Added colour dictionary trigger
- Font colors are now editable
v1.0.4rev1
- Leaks at chat player have been fixed
- Unused actions at chat event trigger have been removed
v1.0.5
- Wrong variables at chat all & chat team have been fixed
- Leak at command open trigger have been fixed
- Now you don't have to type "0" before the number of target in chat player (ex. /p1 Hello! It's Work!)
- Useless condition at chat player trigger have been removed
- Now we can't send the PM to unregistered players
- Chat player feature have been improved and optimized
- Now you don't have to configure the number of string of each command. It's configured automatically
Required trigger = PlayerName
  • PlayerName
    • Events
    • Conditions
    • Actions
      • Set PlayerColor[1] = |cffff0000
      • Set PlayerColor[2] = |cff0000ff
      • Set PlayerColor[3] = |cff00ffff
      • Set PlayerColor[4] = |cffa020f0
      • Set PlayerColor[5] = |cffffff00
      • Set PlayerColor[6] = |cffffa500
      • Set PlayerColor[7] = |cff00ff00
      • Set PlayerColor[8] = |cffffc0cb
      • Set PlayerColor[9] = |cffbebebe
      • Set PlayerColor[10] = |cffadd8e6
      • Set PlayerColor[11] = |cff006400
      • Set PlayerColor[12] = |cff8b4513
      • Set PlayerName[1] = (PlayerColor[1] + ((Name of Player 1 (Red)) + |r))
      • Set PlayerName[2] = (PlayerColor[2] + ((Name of Player 2 (Blue)) + |r))
      • Set PlayerName[3] = (PlayerColor[3] + ((Name of Player 3 (Teal)) + |r))
      • Set PlayerName[4] = (PlayerColor[4] + ((Name of Player 4 (Purple)) + |r))
      • Set PlayerName[5] = (PlayerColor[5] + ((Name of Player 5 (Yellow)) + |r))
      • Set PlayerName[6] = (PlayerColor[6] + ((Name of Player 6 (Orange)) + |r))
      • Set PlayerName[7] = (PlayerColor[7] + ((Name of Player 7 (Green)) + |r))
      • Set PlayerName[8] = (PlayerColor[8] + ((Name of Player 8 (Pink)) + |r))
      • Set PlayerName[9] = (PlayerColor[9] + ((Name of Player 9 (Gray)) + |r))
      • Set PlayerName[10] = (PlayerColor[10] + ((Name of Player 10 (Light Blue)) + |r))
      • Set PlayerName[11] = (PlayerColor[11] + ((Name of Player 11 (Dark Green)) + |r))
      • Set PlayerName[12] = (PlayerColor[12] + ((Name of Player 12 (Brown)) + |r))
Required trigger = Color Dictionary
  • ColorDictionary
    • Events
    • Conditions
    • Actions
      • If (CS_FontColor Equal to snow) then do (Set CS_FontColor = |CFFFFFAFA) else do (Do nothing)
      • If (CS_FontColor Equal to ghostwhite) then do (Set CS_FontColor = |CFFF8F8FF) else do (Do nothing)
      • If (CS_FontColor Equal to whitesmoke) then do (Set CS_FontColor = |CFFF5F5F5) else do (Do nothing)
      • If (CS_FontColor Equal to gainsboro) then do (Set CS_FontColor = |CFFDCDCDC) else do (Do nothing)
      • If (CS_FontColor Equal to floralwhite) then do (Set CS_FontColor = |CFFFFFAF0) else do (Do nothing)
      • If (CS_FontColor Equal to oldlace) then do (Set CS_FontColor = |CFFFDF5E6) else do (Do nothing)
      • If (CS_FontColor Equal to linen) then do (Set CS_FontColor = |CFFFAF0E6) else do (Do nothing)
      • If (CS_FontColor Equal to antiquewhite) then do (Set CS_FontColor = |CFFFAEBD7) else do (Do nothing)
      • If (CS_FontColor Equal to papayawhip) then do (Set CS_FontColor = |CFFFFEFD5) else do (Do nothing)
      • If (CS_FontColor Equal to blanchedalmond) then do (Set CS_FontColor = |CFFFFEBCD) else do (Do nothing)
      • If (CS_FontColor Equal to bisque) then do (Set CS_FontColor = |CFFFFE4C4) else do (Do nothing)
      • If (CS_FontColor Equal to peachpuff) then do (Set CS_FontColor = |CFFFFDAB9) else do (Do nothing)
      • If (CS_FontColor Equal to navajowhite) then do (Set CS_FontColor = |CFFFFDEAD) else do (Do nothing)
      • If (CS_FontColor Equal to moccasin) then do (Set CS_FontColor = |CFFFFE4B5) else do (Do nothing)
      • If (CS_FontColor Equal to cornsilk) then do (Set CS_FontColor = |CFFFF8DC) else do (Do nothing)
      • If (CS_FontColor Equal to ivory) then do (Set CS_FontColor = |CFFFFFFF0) else do (Do nothing)
      • If (CS_FontColor Equal to lemonchiffon) then do (Set CS_FontColor = |CFFFFFACD) else do (Do nothing)
      • If (CS_FontColor Equal to seashell) then do (Set CS_FontColor = |CFFFFF5EE) else do (Do nothing)
      • If (CS_FontColor Equal to honeydew) then do (Set CS_FontColor = |CFFF0FFF0) else do (Do nothing)
      • If (CS_FontColor Equal to mintcream) then do (Set CS_FontColor = |CFFF5FFFA) else do (Do nothing)
      • If (CS_FontColor Equal to azure) then do (Set CS_FontColor = |CFFF0FFFF) else do (Do nothing)
      • If (CS_FontColor Equal to aliceblue) then do (Set CS_FontColor = |CFFF0F8FF) else do (Do nothing)
      • If (CS_FontColor Equal to lavender) then do (Set CS_FontColor = |CFFE6E6FA) else do (Do nothing)
      • If (CS_FontColor Equal to lavenderblush) then do (Set CS_FontColor = |CFFFFF0F5) else do (Do nothing)
      • If (CS_FontColor Equal to mystirose) then do (Set CS_FontColor = |CFFFFE4E1) else do (Do nothing)
      • If (CS_FontColor Equal to darkslategray) then do (Set CS_FontColor = |CFF2F4F4F) else do (Do nothing)
      • If (CS_FontColor Equal to dimgrey) then do (Set CS_FontColor = |CFF696969) else do (Do nothing)
      • If (CS_FontColor Equal to slategrey) then do (Set CS_FontColor = |CFF708090) else do (Do nothing)
      • If (CS_FontColor Equal to lightslategray) then do (Set CS_FontColor = |CFF778899) else do (Do nothing)
      • If (CS_FontColor Equal to lightgrey) then do (Set CS_FontColor = |CFFD3D3D3) else do (Do nothing)
      • If (CS_FontColor Equal to midnightblue) then do (Set CS_FontColor = |CFF191970) else do (Do nothing)
      • If (CS_FontColor Equal to navyblue) then do (Set CS_FontColor = |CFF000080) else do (Do nothing)
      • If (CS_FontColor Equal to cornflowerblue) then do (Set CS_FontColor = |CFF6495ED) else do (Do nothing)
      • If (CS_FontColor Equal to darkslateblue) then do (Set CS_FontColor = |CFF483D8B) else do (Do nothing)
      • If (CS_FontColor Equal to slateblue) then do (Set CS_FontColor = |CFF6A5ACD) else do (Do nothing)
      • If (CS_FontColor Equal to mediumslateblue) then do (Set CS_FontColor = |CFF7B68EE) else do (Do nothing)
      • If (CS_FontColor Equal to lightslateblue) then do (Set CS_FontColor = |CFF8470FF) else do (Do nothing)
      • If (CS_FontColor Equal to mediumblue) then do (Set CS_FontColor = |CFF0000CD) else do (Do nothing)
      • If (CS_FontColor Equal to royalblue) then do (Set CS_FontColor = |CFF4169E1) else do (Do nothing)
      • If (CS_FontColor Equal to dodgerblue) then do (Set CS_FontColor = |CFF1E90FF) else do (Do nothing)
      • If (CS_FontColor Equal to deepskyblue) then do (Set CS_FontColor = |CFF00BFFF) else do (Do nothing)
      • If (CS_FontColor Equal to skyblue) then do (Set CS_FontColor = |CFF87CEEB) else do (Do nothing)
      • If (CS_FontColor Equal to lightskyblue) then do (Set CS_FontColor = |CFF87CEFA) else do (Do nothing)
      • If (CS_FontColor Equal to steelblue) then do (Set CS_FontColor = |CFF4682B4) else do (Do nothing)
      • If (CS_FontColor Equal to lightsteelblue) then do (Set CS_FontColor = |CFFB0C4DE) else do (Do nothing)
      • If (CS_FontColor Equal to lightblue) then do (Set CS_FontColor = |CFFADD8E6) else do (Do nothing)
      • If (CS_FontColor Equal to powderblue) then do (Set CS_FontColor = |CFFB0E0E6) else do (Do nothing)
      • If (CS_FontColor Equal to paleturquoise) then do (Set CS_FontColor = |CFFAFEEEE) else do (Do nothing)
      • If (CS_FontColor Equal to darkturquoise) then do (Set CS_FontColor = |CFF00CED1) else do (Do nothing)
      • If (CS_FontColor Equal to mediumturquoise) then do (Set CS_FontColor = |CFF48D1CC) else do (Do nothing)
      • If (CS_FontColor Equal to turquoise) then do (Set CS_FontColor = |CFF40E0D0) else do (Do nothing)
      • If (CS_FontColor Equal to lightcyan) then do (Set CS_FontColor = |CFFE0FFFF) else do (Do nothing)
      • If (CS_FontColor Equal to cadetblue) then do (Set CS_FontColor = |CFF5F9EA0) else do (Do nothing)
      • If (CS_FontColor Equal to mediumaquamarine) then do (Set CS_FontColor = |CFF66CDAA) else do (Do nothing)
      • If (CS_FontColor Equal to aquamarine) then do (Set CS_FontColor = |CFF7FFFD4) else do (Do nothing)
      • If (CS_FontColor Equal to darkolivegreen) then do (Set CS_FontColor = |CFF556B2F) else do (Do nothing)
      • If (CS_FontColor Equal to darkseagreen) then do (Set CS_FontColor = |CFF8FBC8F) else do (Do nothing)
      • If (CS_FontColor Equal to seagreen) then do (Set CS_FontColor = |CFF2E8B57) else do (Do nothing)
      • If (CS_FontColor Equal to mediumseagreen) then do (Set CS_FontColor = |CFF3CB371) else do (Do nothing)
      • If (CS_FontColor Equal to lightseagreen) then do (Set CS_FontColor = |CFF20B2AA) else do (Do nothing)
      • If (CS_FontColor Equal to palegreen) then do (Set CS_FontColor = |CFF98FB98) else do (Do nothing)
      • If (CS_FontColor Equal to springgreen) then do (Set CS_FontColor = |CFF00FF7F) else do (Do nothing)
      • If (CS_FontColor Equal to lawngreen) then do (Set CS_FontColor = |CFF7CFC00) else do (Do nothing)
      • If (CS_FontColor Equal to chartreuse) then do (Set CS_FontColor = |CFF7FFF00) else do (Do nothing)
      • If (CS_FontColor Equal to medspringgreen) then do (Set CS_FontColor = |CFF00FA9A) else do (Do nothing)
      • If (CS_FontColor Equal to greenyellow) then do (Set CS_FontColor = |CFFADFF2F) else do (Do nothing)
      • If (CS_FontColor Equal to limeyellow) then do (Set CS_FontColor = |CFF32CD32) else do (Do nothing)
      • If (CS_FontColor Equal to yellowgreen) then do (Set CS_FontColor = |CFF9ACD32) else do (Do nothing)
      • If (CS_FontColor Equal to forestgreen) then do (Set CS_FontColor = |CFF228B22) else do (Do nothing)
      • If (CS_FontColor Equal to olivedrab) then do (Set CS_FontColor = |CFF6B8E23) else do (Do nothing)
      • If (CS_FontColor Equal to darkkhaki) then do (Set CS_FontColor = |CFFBDB76B) else do (Do nothing)
      • If (CS_FontColor Equal to palegoldenrod) then do (Set CS_FontColor = |CFFEEE8AA) else do (Do nothing)
      • If (CS_FontColor Equal to lightgoldenrodyellow) then do (Set CS_FontColor = |CFFFAFAD2) else do (Do nothing)
      • If (CS_FontColor Equal to lightyellow) then do (Set CS_FontColor = |CFFFFFFE0) else do (Do nothing)
      • If (CS_FontColor Equal to gold) then do (Set CS_FontColor = |CFFFFD700) else do (Do nothing)
      • If (CS_FontColor Equal to lightgoldenrod) then do (Set CS_FontColor = |CFFEEDD82) else do (Do nothing)
      • If (CS_FontColor Equal to goldenrod) then do (Set CS_FontColor = |CFFDAA520) else do (Do nothing)
      • If (CS_FontColor Equal to darkgoldenrod) then do (Set CS_FontColor = |CFFB8860B) else do (Do nothing)
      • If (CS_FontColor Equal to rosybrown) then do (Set CS_FontColor = |CFFBC8F8F) else do (Do nothing)
      • If (CS_FontColor Equal to indianred) then do (Set CS_FontColor = |CFFCD5C5C) else do (Do nothing)
      • If (CS_FontColor Equal to saddlebrown) then do (Set CS_FontColor = |CFF8B4513) else do (Do nothing)
      • If (CS_FontColor Equal to sienna) then do (Set CS_FontColor = |CFFA0522D) else do (Do nothing)
      • If (CS_FontColor Equal to peru) then do (Set CS_FontColor = |CFFCD853F) else do (Do nothing)
      • If (CS_FontColor Equal to borlybrown) then do (Set CS_FontColor = |CFFDEB887) else do (Do nothing)
      • If (CS_FontColor Equal to beige) then do (Set CS_FontColor = |CFFF5F5DC) else do (Do nothing)
      • If (CS_FontColor Equal to wheat) then do (Set CS_FontColor = |CFFF5DEB3) else do (Do nothing)
      • If (CS_FontColor Equal to sandybrown) then do (Set CS_FontColor = |CFFF4A460) else do (Do nothing)
      • If (CS_FontColor Equal to tan) then do (Set CS_FontColor = |CFFD2B48C) else do (Do nothing)
      • If (CS_FontColor Equal to chocolate) then do (Set CS_FontColor = |CFFD2691E) else do (Do nothing)
      • If (CS_FontColor Equal to firebrick) then do (Set CS_FontColor = |CFFB22222) else do (Do nothing)
      • If (CS_FontColor Equal to darksalmon) then do (Set CS_FontColor = |CFFE9967A) else do (Do nothing)
      • If (CS_FontColor Equal to salmon) then do (Set CS_FontColor = |CFFFA8072) else do (Do nothing)
      • If (CS_FontColor Equal to lightsalmon) then do (Set CS_FontColor = |CFFFFA07A) else do (Do nothing)
      • If (CS_FontColor Equal to darkorange) then do (Set CS_FontColor = |CFFFF8C00) else do (Do nothing)
      • If (CS_FontColor Equal to coral) then do (Set CS_FontColor = |CFFFF7F50) else do (Do nothing)
      • If (CS_FontColor Equal to lightcoral) then do (Set CS_FontColor = |CFFF08080) else do (Do nothing)
      • If (CS_FontColor Equal to tomato) then do (Set CS_FontColor = |CFFFF6347) else do (Do nothing)
      • If (CS_FontColor Equal to orangered) then do (Set CS_FontColor = |CFFFF4500) else do (Do nothing)
      • If (CS_FontColor Equal to hotpink) then do (Set CS_FontColor = |CFFFF69B4) else do (Do nothing)
      • If (CS_FontColor Equal to deeppink) then do (Set CS_FontColor = |CFFFF1493) else do (Do nothing)
      • If (CS_FontColor Equal to lightpink) then do (Set CS_FontColor = |CFFFFB6C1) else do (Do nothing)
      • If (CS_FontColor Equal to palevioletred) then do (Set CS_FontColor = |CFFDB7093) else do (Do nothing)
      • If (CS_FontColor Equal to maroon) then do (Set CS_FontColor = |CFFB03060) else do (Do nothing)
      • If (CS_FontColor Equal to mediumvioletred) then do (Set CS_FontColor = |CFFC71585) else do (Do nothing)
      • If (CS_FontColor Equal to violetred) then do (Set CS_FontColor = |CFFD02090) else do (Do nothing)
      • If (CS_FontColor Equal to violet) then do (Set CS_FontColor = |CFFEE82EE) else do (Do nothing)
      • If (CS_FontColor Equal to plum) then do (Set CS_FontColor = |CFFDDA0DD) else do (Do nothing)
      • If (CS_FontColor Equal to orchid) then do (Set CS_FontColor = |CFFDA70D6) else do (Do nothing)
      • If (CS_FontColor Equal to mediumorchid) then do (Set CS_FontColor = |CFFBA55D3) else do (Do nothing)
      • If (CS_FontColor Equal to darkorchid) then do (Set CS_FontColor = |CFF9932CC) else do (Do nothing)
      • If (CS_FontColor Equal to darkviolet) then do (Set CS_FontColor = |CFF9400D3) else do (Do nothing)
      • If (CS_FontColor Equal to blueviolet) then do (Set CS_FontColor = |CFF8A2BE2) else do (Do nothing)
      • If (CS_FontColor Equal to mediumpurple) then do (Set CS_FontColor = |CFF9370DB) else do (Do nothing)
      • If (CS_FontColor Equal to thistle) then do (Set CS_FontColor = |CFFD8BFD8) else do (Do nothing)
      • If (CS_FontColor Equal to blue) then do (Set CS_FontColor = |CFF0000FF) else do (Do nothing)
      • If (CS_FontColor Equal to darkblue) then do (Set CS_FontColor = |CFF00008B) else do (Do nothing)
      • If (CS_FontColor Equal to red) then do (Set CS_FontColor = |CFFFF0000) else do (Do nothing)
      • If (CS_FontColor Equal to darkred) then do (Set CS_FontColor = |CFF8B0000) else do (Do nothing)
      • If (CS_FontColor Equal to green) then do (Set CS_FontColor = |CFF00FF00) else do (Do nothing)
      • If (CS_FontColor Equal to lightyellow) then do (Set CS_FontColor = |CFFFFFF00) else do (Do nothing)
      • If (CS_FontColor Equal to yellow) then do (Set CS_FontColor = |CFFFFCC00) else do (Do nothing)
      • If (CS_FontColor Equal to darkyellow) then do (Set CS_FontColor = |CFF8B8B00) else do (Do nothing)
      • If (CS_FontColor Equal to magenta) then do (Set CS_FontColor = |CFFFF00FF) else do (Do nothing)
      • If (CS_FontColor Equal to purple) then do (Set CS_FontColor = |CFFA020F0) else do (Do nothing)
      • If (CS_FontColor Equal to cyan) then do (Set CS_FontColor = |CFF00FFFF) else do (Do nothing)
      • If (CS_FontColor Equal to brown) then do (Set CS_FontColor = |CFFA52A2A) else do (Do nothing)
      • If (CS_FontColor Equal to orange) then do (Set CS_FontColor = |CFFFFA500) else do (Do nothing)
      • If (CS_FontColor Equal to black) then do (Set CS_FontColor = |CFF000000) else do (Do nothing)
      • If (CS_FontColor Equal to white) then do (Set CS_FontColor = |CFFFFFFFF) else do (Do nothing)
      • If (CS_FontColor Equal to grey) then do (Set CS_FontColor = |CFFBEBEBE) else do (Do nothing)
      • If (CS_FontColor Equal to darkgrey) then do (Set CS_FontColor = |CFFA9A9A9) else do (Do nothing)
      • If (CS_FontColor Equal to darkgreen) then do (Set CS_FontColor = |CFF006400) else do (Do nothing)
      • If (CS_FontColor Equal to lightgreen) then do (Set CS_FontColor = |CFF90EE90) else do (Do nothing)
      • If (CS_FontColor Equal to darkcyan) then do (Set CS_FontColor = |CFF008B8B) else do (Do nothing)
      • If (CS_FontColor Equal to darkmagenta) then do (Set CS_FontColor = |CFF8B008B) else do (Do nothing)
      • If (CS_FontColor Equal to pink) then do (Set CS_FontColor = |CFFFFC0CB) else do (Do nothing)
Initialize
  • Initialize
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- -------------------------------------------------------------------------------------------- --------
      • -------- Here are the editable values.. Don't touch the other! --------
      • -------- -------------------------------------------------------------------------------------------- --------
      • -------- For the color name just look at colour dictionary --------
      • -------- Set font color for system message --------
      • Set CS_SMFontColor = purple
      • -------- ----------------------------- --------
      • Set CS_FontColor = CS_SMFontColor
      • Trigger - Run ColorDictionary <gen> (checking conditions)
      • Set CS_SMFontColor = CS_FontColor
      • Set CS_SMMessage = ([ + (CS_SMFontColor + SM|r] ))
      • -------- Set font color for chat all system message --------
      • Set CS_AllFontColor = sandybrown
      • -------- ----------------------------- --------
      • Set CS_FontColor = CS_AllFontColor
      • Trigger - Run ColorDictionary <gen> (checking conditions)
      • Set CS_AllFontColor = CS_FontColor
      • Set CS_AllMessage = ([ + (CS_AllFontColor + All|r] ))
      • -------- Set font color for chat team system message --------
      • Set CS_TeamFontColor = olivedrab
      • -------- ----------------------------- --------
      • Set CS_FontColor = CS_TeamFontColor
      • Trigger - Run ColorDictionary <gen> (checking conditions)
      • Set CS_TeamFontColor = CS_FontColor
      • Set CS_TeamMessage = ([ + (CS_TeamFontColor + Team|r] ))
      • -------- Set font color for chat player system message --------
      • Set CS_PrivateFontColor = indianred
      • -------- ----------------------------- --------
      • Set CS_FontColor = CS_PrivateFontColor
      • Trigger - Run ColorDictionary <gen> (checking conditions)
      • Set CS_PrivateFontColor = CS_FontColor
      • Set CS_PrivateMessage = ([ + (CS_PrivateFontColor + Private|r] ))
      • -------- Set font color for player's message --------
      • Set CS_MsgColor = darkgreen
      • -------- ----------------------------- --------
      • Set CS_FontColor = CS_MsgColor
      • Trigger - Run ColorDictionary <gen> (checking conditions)
      • Set CS_MsgColor = CS_FontColor
      • -------- Set maximum characters per message --------
      • Set CS_MsgMaxSize = 32
      • -------- Set command message to open/close the chat window --------
      • Set CS_CommandOpen = LoL
      • -------- Set initial command to send message to team or to all. Must add one space at the end of string --------
      • Set CS_CommandChatAll = /a
      • Set CS_CommandChatTeam = /t
      • -------- Command to chat someone. Only can be sent to a friend --------
      • Set CS_CommandChatPlayer = /p
      • -------- Set command to clear the screen from message --------
      • Set CS_CommandClear = /clear
      • -------- Set command to register ur self --------
      • Set CS_CommandRegister = -signup
      • -------- Maximum number of messages that will saved at the Hastable. 10 is maximum. --------
      • Set CS_HastableMaxSize = 10
      • -------- Register players into chat group. Use 1 to 12 loop int to initialy register all players. --------
      • For each (Integer A) from 2 to 3, do (Actions)
        • Loop - Actions
          • Player Group - Add (Player((Integer A))) to CS_ChatGroup
      • -------- ----------------------------------------------- --------
      • -------- End Here! --------
      • -------- ----------------------------------------------- --------
      • -------- Set number of characters in the open command --------
      • Set CS_CommandOpenMsgSize = (Length of CS_CommandOpen)
      • -------- Set number of characters in the chat all command --------
      • Set CS_ChatAllMsgSize = (Length of CS_CommandChatAll)
      • -------- Set number of characters in the chat team command --------
      • Set CS_ChatTeamMsgSize = (Length of CS_CommandChatTeam)
      • -------- Set number of characters in the chat player command --------
      • Set CS_ChatPlayerMsgSize = (Length of CS_CommandChatPlayer)
      • -------- Set number of characters in the clear command --------
      • Set CS_ChatClearSize = (Length of CS_CommandClear)
      • -------- Set number of characters in the register command --------
      • Set CS_ChatRegisterSize = (Length of CS_CommandRegister)
      • -------- ----------------------------------------- --------
      • Trigger - Run PlayerName <gen> (checking conditions)
      • -------- Create a hastable for saving chat string --------
      • Hashtable - Create a hashtable
      • Set CS_Hastable = (Last created hashtable)
Chat Event
  • ChatEvent
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
      • Player - Player 2 (Blue) types a chat message containing <Empty String> as A substring
      • Player - Player 3 (Teal) types a chat message containing <Empty String> as A substring
      • Player - Player 4 (Purple) types a chat message containing <Empty String> as A substring
      • Player - Player 5 (Yellow) types a chat message containing <Empty String> as A substring
      • Player - Player 6 (Orange) types a chat message containing <Empty String> as A substring
      • Player - Player 7 (Green) types a chat message containing <Empty String> as A substring
      • Player - Player 8 (Pink) types a chat message containing <Empty String> as A substring
      • Player - Player 9 (Gray) types a chat message containing <Empty String> as A substring
      • Player - Player 10 (Light Blue) types a chat message containing <Empty String> as A substring
      • Player - Player 11 (Dark Green) types a chat message containing <Empty String> as A substring
      • Player - Player 12 (Brown) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • -------- Set the entered chat string into a variable --------
      • Set CS_EnteredString = (Entered chat string)
      • -------- This is to register triggering player to the chat room --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring(CS_EnteredString, 1, CS_ChatRegisterSize)) Equal to CS_CommandRegister
        • Then - Actions
          • -------- Set the sender into a variable --------
          • Set CS_TriggeringP = (Triggering player)
          • -------- Run the system --------
          • Trigger - Run Command Register <gen> (checking conditions)
          • -------- We skip the other proccess to increase the system's efficiency --------
          • Skip remaining actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring(CS_EnteredString, 1, CS_CommandOpenMsgSize)) Equal to CS_CommandOpen
        • Then - Actions
          • -------- This is to open the chat window --------
          • -------- Boolean is false means the chat window is closed currently --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CS_Boolean[(Player number of (Triggering player))] Equal to False
            • Then - Actions
              • -------- Set the sender into a variable --------
              • Set CS_TriggeringP = (Triggering player)
              • -------- Run the system --------
              • Trigger - Run Command Open <gen> (checking conditions)
              • -------- We skip the other proccess to increase the system's efficiency --------
              • Skip remaining actions
            • Else - Actions
          • -------- This is to close the chat window --------
          • -------- Boolean is true means the chat window is opened currently --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CS_Boolean[(Player number of (Triggering player))] Equal to True
            • Then - Actions
              • -------- Set the sender into a variable --------
              • Set CS_TriggeringP = (Triggering player)
              • -------- Run the system --------
              • Trigger - Run Command Close <gen> (checking conditions)
              • -------- We skip the other proccess to increase the system's efficiency --------
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_Boolean[(Player number of (Triggering player))] Equal to True
        • Then - Actions
          • -------- This is to send message to all players --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring(CS_EnteredString, 1, CS_ChatAllMsgSize)) Equal to CS_CommandChatAll
            • Then - Actions
              • -------- This is to check that the entered message is an empty string or not --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring(CS_EnteredString, (CS_ChatAllMsgSize + 1), (CS_MsgMaxSize + CS_ChatAllMsgSize))) Not equal to <Empty String>
                  • (Substring(CS_EnteredString, (CS_ChatAllMsgSize + 1), (CS_MsgMaxSize + CS_ChatAllMsgSize))) Not equal to
                • Then - Actions
                  • -------- Set the sender into a variable --------
                  • Set CS_TriggeringP = (Triggering player)
                  • -------- Run the system --------
                  • Trigger - Run Chat All <gen> (checking conditions)
                  • -------- We skip the other proccess to increase the system's efficiency --------
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
          • -------- This is to send message to sender's team --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring(CS_EnteredString, 1, CS_ChatTeamMsgSize)) Equal to CS_CommandChatTeam
            • Then - Actions
              • -------- This is to check that the entered message is an empty string or not --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Substring(CS_EnteredString, (CS_ChatTeamMsgSize + 1), (CS_MsgMaxSize + CS_ChatTeamMsgSize))) Not equal to <Empty String>
                  • (Substring(CS_EnteredString, (CS_ChatTeamMsgSize + 1), (CS_MsgMaxSize + CS_ChatTeamMsgSize))) Not equal to
                • Then - Actions
                  • -------- Set the sender into a variable --------
                  • Set CS_TriggeringP = (Triggering player)
                  • -------- Run the system --------
                  • Trigger - Run Chat Team <gen> (checking conditions)
                  • -------- We skip the other proccess to increase the system's efficiency --------
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
          • -------- This is command to send private message to somebody --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring(CS_EnteredString, 1, CS_ChatPlayerMsgSize)) Equal to CS_CommandChatPlayer
            • Then - Actions
              • -------- Set the sender into a variable --------
              • Set CS_TriggeringP = (Triggering player)
              • -------- Run the system --------
              • Trigger - Run Chat Player <gen> (checking conditions)
              • -------- We skip the other proccess to increase the system's efficiency --------
              • Skip remaining actions
            • Else - Actions
          • -------- This is command to clear the screen from messages --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring(CS_EnteredString, 1, CS_ChatClearSize)) Equal to CS_CommandClear
            • Then - Actions
              • -------- Set the sender into a variable --------
              • Set CS_TriggeringP = (Triggering player)
              • -------- Run the system --------
              • Trigger - Run Command Clear <gen> (checking conditions)
            • Else - Actions
        • Else - Actions
Command Register
  • Command Register
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Add the sender into triggering group --------
      • Set CS_TriggeringPGroup = (Player group(CS_TriggeringP))
      • -------- Register your self --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring(CS_EnteredString, 1, CS_ChatRegisterSize)) Equal to CS_CommandRegister
        • Then - Actions
          • -------- If the triggering player has not registered yet --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CS_TriggeringP is in CS_ChatGroup) Equal to False
            • Then - Actions
              • -------- Add the registering player to the chat group --------
              • Player Group - Add CS_TriggeringP to CS_ChatGroup
              • -------- Show the notice when some one has registered --------
              • Game - Display to CS_TriggeringPGroup the text: You have been regis...
            • Else - Actions
        • Else - Actions
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)
Command Open
  • Command Open
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Add the sender into triggering group --------
      • Set CS_TriggeringPGroup = (Player group(CS_TriggeringP))
      • -------- If you are not registered --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CS_TriggeringP is in CS_ChatGroup) Equal to False
        • Then - Actions
          • -------- Show warning to unregistered players to register their selves. --------
          • Game - Display to CS_TriggeringPGroup the text: (You are not registered to the system. Type |cffffcc00 + (CS_CommandRegister + |r to register your self))
          • -------- We skip the other proccess to increase the system's efficiency --------
          • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)
          • Skip remaining actions
        • Else - Actions
      • -------- Show the notice that someone has been registered --------
      • Cinematic - Clear the screen of text messages for CS_TriggeringPGroup
      • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: (CS_SMMessage + (CS_MsgColor + You have entered the chat room. Here you can send/read all messages both to or from your friends or enemies|r))
      • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: ((CS_SMMessage + ((CS_MsgColor + Type|r ) + |cffffcc00)) + (CS_CommandOpen + ((|r + CS_MsgColor) + to open/close the chat window|r)))
      • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: ((CS_SMMessage + ((CS_MsgColor + Type|r ) + |cffffcc00)) + (CS_CommandChatAll + ((|r + CS_MsgColor) + as the initial of your message to send message to all players|r)))
      • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: ((CS_SMMessage + ((CS_MsgColor + Type|r ) + |cffffcc00)) + (CS_CommandChatTeam + ((|r + CS_MsgColor) + as the initial of your message to send message only to your team|r)))
      • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: ((CS_SMMessage + ((CS_MsgColor + Type|r ) + |cffffcc00)) + ((CS_CommandChatPlayer + ((+target number|r + (CS_MsgColor + (|r |cffaaccffex. )) + (CS_CommandChatPlayer + ((String((Random integer number between 1 and 12))) + (|r + CS_MsgColor))))) + (CS_MsgColor
      • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: ((CS_SMMessage + ((CS_MsgColor + Type|r ) + |cffffcc00)) + (CS_CommandClear + ((|r + CS_MsgColor) + to clear your screen from messages|r)))
      • -------- Set boolean to trus means the chat window has been opened --------
      • Set CS_Boolean[CS_ChatterPlayerNumber] = True
      • -------- Then we open the window --------
      • Trigger - Turn on OpenWindow <gen>
      • -------- Show recent sent message picked from hastable --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Load 1 of CS_ChatterPlayerNumber from CS_Hastable) Not equal to <Empty String>
        • Then - Actions
          • -------- The boolean above checks that the hastable save any player's message or not. If not the recent message will not shown. --------
          • -------- Display the recent message then --------
          • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: |cff0000ffYour rece...
          • -------- Load the saved string --------
          • For each (Integer A) from 1 to CS_HastableMaxSize, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load (Integer A) of CS_ChatterPlayerNumber from CS_Hastable) Not equal to <Empty String>
                • Then - Actions
                  • -------- Show the recent messages then --------
                  • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: ((|cffffff00 + ((String((Integer A))) + |r)) + (. + (Load (Integer A) of CS_ChatterPlayerNumber from CS_Hastable)))
                • Else - Actions
          • -------- Why do I add this space? Because when we type a message, there will be a fvckn undefeatable text at the left bottom of the screen --------
          • -------- They will block the recent message --------
          • -------- Why do I call them undefeatable? Bcoz there is no way I can clear them --------
          • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text:
        • Else - Actions
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)
Command Close
  • Command Close
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Add the sender into triggering group --------
      • Set CS_TriggeringPGroup = (Player group(CS_TriggeringP))
      • -------- Set boolean to false becos the window has been closed --------
      • Set CS_Boolean[CS_ChatterPlayerNumber] = False
      • -------- Exit the window --------
      • Cinematic - Clear the screen of text messages for CS_TriggeringPGroup
      • -------- End the window creating --------
      • Trigger - Turn off OpenWindow <gen>
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)
Command Clear
  • Command Clear
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Add the sender into triggering group --------
      • Set CS_TriggeringPGroup = (Player group(CS_TriggeringP))
      • -------- Clear the screen from messages then --------
      • Cinematic - Clear the screen of text messages for CS_TriggeringPGroup
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)
Chat All
  • Chat All
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Set the target of that message --------
      • Set CS_MsgFinalTarget = (Player group(CS_TriggeringP))
      • -------- Set the message value --------
      • Set CS_MsgValue[CS_ChatterPlayerNumber] = (Substring(CS_EnteredString, (CS_ChatAllMsgSize + 1), (CS_MsgMaxSize + (CS_ChatAllMsgSize + 1))))
      • -------- This is the final message that will be shown to target's screen and will be saved --------
      • Set CS_MsgValueFinal[CS_ChatterPlayerNumber] = (CS_AllMessage + (PlayerName[CS_ChatterPlayerNumber] + ((: + CS_MsgColor) + (CS_MsgValue[CS_ChatterPlayerNumber] + |r))))
      • -------- Show time! --------
      • Game - Display to CS_MsgFinalTarget for 1000000000.00 seconds the text: CS_MsgValueFinal[CS_ChatterPlayerNumber]
      • -------- Okay, we will save that message now --------
      • -------- Set the total count of message in sender's sent box --------
      • Set CS_HastableCurrentNumber[CS_ChatterPlayerNumber] = (CS_HastableCurrentNumber[CS_ChatterPlayerNumber] + 1)
      • -------- If the sent box is not full yet the message will directly saved --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_HastableCurrentNumber[CS_ChatterPlayerNumber] Less than or equal to CS_HastableMaxSize
        • Then - Actions
          • Hashtable - Save CS_MsgValueFinal[CS_ChatterPlayerNumber] as CS_HastableCurrentNumber[CS_ChatterPlayerNumber] of CS_ChatterPlayerNumber in CS_Hastable
        • Else - Actions
      • -------- If the sent box is full this part will replace the oldest message with the newer one --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_HastableCurrentNumber[CS_ChatterPlayerNumber] Greater than CS_HastableMaxSize
        • Then - Actions
          • -------- Load all sent messages and set into a dummy string first --------
          • For each (Integer A) from 1 to CS_HastableMaxSize, do (Actions)
            • Loop - Actions
              • Set CS_DummyString[(Integer A)] = (Load (Integer A) of CS_ChatterPlayerNumber from CS_Hastable)
          • -------- We set the newest message into a dummy string too --------
          • Set CS_DummyString[(CS_HastableMaxSize + 1)] = CS_MsgValueFinal[CS_ChatterPlayerNumber]
          • -------- This part will updates the ole=der sent box into a new sent box --------
          • For each (Integer A) from 2 to (CS_HastableMaxSize + 1), do (Actions)
            • Loop - Actions
              • Set CS_DummyString[((Integer A) - 1)] = CS_DummyString[(Integer A)]
              • Hashtable - Save CS_DummyString[((Integer A) - 1)] as ((Integer A) - 1) of CS_ChatterPlayerNumber in CS_Hastable
          • -------- This part makes the current number of message does not oversize the max size of sent box --------
          • Set CS_HastableCurrentNumber[CS_ChatterPlayerNumber] = CS_HastableMaxSize
        • Else - Actions
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_MsgFinalTarget)
Chat Team
  • Chat Team
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Set the target of that message --------
      • Set CS_MsgFinalTarget = (Player group(CS_TriggeringP))
      • -------- Set the entered message value --------
      • Set CS_MsgValue[CS_ChatterPlayerNumber] = (Substring(CS_EnteredString, (CS_ChatTeamMsgSize + 1), (CS_MsgMaxSize + (CS_ChatTeamMsgSize + 1))))
      • -------- This is the final message that will be shown to target's screen and will be saved --------
      • Set CS_MsgValueFinal[CS_ChatterPlayerNumber] = (CS_TeamMessage + (PlayerName[CS_ChatterPlayerNumber] + ((: + CS_MsgColor) + (CS_MsgValue[CS_ChatterPlayerNumber] + |r))))
      • -------- Show time! --------
      • Game - Display to CS_MsgFinalTarget for 1000000000.00 seconds the text: CS_MsgValueFinal[CS_ChatterPlayerNumber]
      • -------- For all of these actions below is just like the saving actions at prev trigger --------
      • Set CS_HastableCurrentNumber[CS_ChatterPlayerNumber] = (CS_HastableCurrentNumber[CS_ChatterPlayerNumber] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_HastableCurrentNumber[CS_ChatterPlayerNumber] Less than or equal to CS_HastableMaxSize
        • Then - Actions
          • Hashtable - Save CS_MsgValueFinal[CS_ChatterPlayerNumber] as CS_HastableCurrentNumber[CS_ChatterPlayerNumber] of CS_ChatterPlayerNumber in CS_Hastable
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_HastableCurrentNumber[CS_ChatterPlayerNumber] Greater than CS_HastableMaxSize
        • Then - Actions
          • For each (Integer A) from 1 to CS_HastableMaxSize, do (Actions)
            • Loop - Actions
              • Set CS_DummyString[(Integer A)] = (Load (Integer A) of CS_ChatterPlayerNumber from CS_Hastable)
          • Set CS_DummyString[(CS_HastableMaxSize + 1)] = CS_MsgValueFinal[CS_ChatterPlayerNumber]
          • For each (Integer A) from 2 to (CS_HastableMaxSize + 1), do (Actions)
            • Loop - Actions
              • Set CS_DummyString[((Integer A) - 1)] = CS_DummyString[(Integer A)]
              • Hashtable - Save CS_DummyString[((Integer A) - 1)] as ((Integer A) - 1) of CS_ChatterPlayerNumber in CS_Hastable
          • Set CS_HastableCurrentNumber[CS_ChatterPlayerNumber] = CS_HastableMaxSize
        • Else - Actions
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_MsgFinalTarget)
Chat Player
  • Chat Player
    • Events
    • Conditions
    • Actions
      • -------- Set the sender player number --------
      • Set CS_ChatterPlayerNumber = (Player number of CS_TriggeringP)
      • -------- Add the sender into triggering group --------
      • Set CS_TriggeringPGroup = (Player group(CS_TriggeringP))
      • -------- Set the target's player number based on entered command --------
      • Set CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] = (Integer((Substring(CS_EnteredString, (CS_ChatPlayerMsgSize + 1), (CS_ChatPlayerMsgSize + 2)))))
      • -------- Skips all remain actions if the target is not a player --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Less than 1
          • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Greater than 12
        • Then - Actions
          • Custom script: call DestroyForce(udg_CS_MsgFinalTarget)
          • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)
          • Skip remaining actions
        • Else - Actions
      • -------- Set the target of that message --------
      • Set CS_ChatPlayerTarget[CS_ChatterPlayerNumber] = (Player(CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber]))
      • -------- This will check that if the target is a neutral or hostile the message will not sent --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CS_Boolean[CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber]] Equal to True
          • (CS_ChatPlayerTarget[CS_ChatterPlayerNumber] is in CS_ChatGroup) Equal to True
          • (CS_ChatPlayerTarget[CS_ChatterPlayerNumber] is an ally of CS_TriggeringP) Equal to True
          • CS_ChatPlayerTarget[CS_ChatterPlayerNumber] Not equal to CS_TriggeringP
        • Then - Actions
          • -------- Set the entered message into a variable --------
          • Set CS_MsgValue[CS_ChatterPlayerNumber] = (Substring(CS_EnteredString, (CS_ChatPlayerMsgSize + ((Length of (String(CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber]))) + 2)), ((CS_ChatPlayerMsgSize + ((Length of (String(CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber]))) + 2)) + ((CS_ChatPlayerMsgSize +
          • -------- This is the final message that will be shown to target's screen --------
          • Set CS_MsgValueFinal[CS_ChatterPlayerNumber] = (CS_PrivateMessage + (PlayerName[CS_ChatterPlayerNumber] + ((CS_MsgColor + ( -> + (|r |cff999999You|r + (: + CS_MsgColor)))) + (CS_MsgValue[CS_ChatterPlayerNumber] + |r))))
          • -------- This is the final sent message that will be shown at sender's screen and will be saved at sent box --------
          • Set CS_ChatPlayerMessageSent[CS_ChatterPlayerNumber] = (CS_PrivateMessage + ((|cff999999You|r + (CS_MsgColor + ->|r )) + ((PlayerName[CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber]] + (: + CS_MsgColor)) + (CS_MsgValue[CS_ChatterPlayerNumber] + |r))))
          • -------- Show time! --------
          • Game - Display to CS_MsgFinalTarget for 1000000000.00 seconds the text: CS_MsgValueFinal[CS_ChatterPlayerNumber]
          • Game - Display to CS_TriggeringPGroup for 1000000000.00 seconds the text: CS_ChatPlayerMessageSent[CS_ChatterPlayerNumber]
          • -------- These actions below is just like the other saving actions. But here we save the message that shown at sender's screen before --------
          • Set CS_HastableCurrentNumber[CS_ChatterPlayerNumber] = (CS_HastableCurrentNumber[CS_ChatterPlayerNumber] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CS_HastableCurrentNumber[CS_ChatterPlayerNumber] Less than or equal to CS_HastableMaxSize
            • Then - Actions
              • Hashtable - Save CS_ChatPlayerMessageSent[CS_ChatterPlayerNumber] as CS_HastableCurrentNumber[CS_ChatterPlayerNumber] of CS_ChatterPlayerNumber in CS_Hastable
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CS_HastableCurrentNumber[CS_ChatterPlayerNumber] Greater than CS_HastableMaxSize
            • Then - Actions
              • For each (Integer A) from 1 to CS_HastableMaxSize, do (Actions)
                • Loop - Actions
                  • Set CS_DummyString[(Integer A)] = (Load (Integer A) of CS_ChatterPlayerNumber from CS_Hastable)
              • Set CS_DummyString[(CS_HastableMaxSize + 1)] = CS_ChatPlayerMessageSent[CS_ChatterPlayerNumber]
              • For each (Integer A) from 2 to (CS_HastableMaxSize + 1), do (Actions)
                • Loop - Actions
                  • Set CS_DummyString[((Integer A) - 1)] = CS_DummyString[(Integer A)]
                  • Hashtable - Save CS_DummyString[((Integer A) - 1)] as ((Integer A) - 1) of CS_ChatterPlayerNumber in CS_Hastable
              • Set CS_HastableCurrentNumber[CS_ChatterPlayerNumber] = CS_HastableMaxSize
            • Else - Actions
        • Else - Actions
      • -------- Remove leaks --------
      • Custom script: call DestroyForce(udg_CS_MsgFinalTarget)
      • Custom script: call DestroyForce(udg_CS_TriggeringPGroup)


Creator's Message
Please rate this system if the system is useful.. If you find any wrong in words or sentences spelling or any bugs or any errors or any leaks please report them to me (post at this thread or send PM to me). Thanks for trying this system. May this system will be useful for you and please credit me if used. Thanks..

1. Bad documentation *Fixed
2. Register system error *Fixed
3. Leaks *Fucked so hard
4. Use variables to change repeated func calls *Fixed
5. Type /player without any player number causes critical error *Fixed
6. There is a useless condition at chat player trigger *Fixed
7. We can send PM to unregistered players and to player who don't open the window currently *Fixed



Be careful! I use the highest resolution. You can edit these using Adobe Photoshop or another editor apps. You can convert .blp file into .tga or .jpg using Shadow Daemon's BlpLabhttp://www.hiveworkshop.com/forums/tools-560/blp-lab-v0-5-0-a-137599/

Keywords:
system,chat,message,log,warcraft,3,III,advanced
Contents

Advanced Chat System v1.0.4 rev1 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 22nd July 2012 Magtheridon96: "|cff999999" should be configurable The Color dictionary is totally unnecessary. Allow the user to configure the color string himself. Instead of...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

22nd July 2012
Magtheridon96:

  • "|cff999999" should be configurable
  • The Color dictionary is totally unnecessary. Allow the user to configure the color string himself.
  • Instead of having all those events in the ChatEvent trigger, you should loop from 1 to 12 on map init and add the events.
  • It would be good to store things you're going to repeat over and over again. It's good for efficiency.
  • In the Command Close trigger, you don't need to cache the player number because you're only referring to it once.
  • In the Command Clear trigger, you don't need to cache the player number because you aren't using it at all ._.

18 Feb 2012
Bribe: You should only remove leaks when you create the leak in the first place (see: Command Register trigger).

"Set CS_TriggeringPGroup = (All players matching ((Matching player) Equal to CS_TriggeringP))" why don't you just use "convert player to player group" instead of all this complicated stuff?

Why do you have this huge block of checking if a value is "Not equal" to a certain amount. What other value would it be? When I see huge blocks of very similar stuff like this I think of how it can be simplified:

  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 1
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 2
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 3
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 4
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 5
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 6
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 7
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 8
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 9
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 10
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 11
  • CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber] Not equal to 12
12th Feb 2012

Pharaoh_:

It leaks a lot. Use an in-game screenshot. Use variables and avoid repeating the same functions over and over again.

Instead of manually registering the events, you may want to use Trigger - Add to trigger within a loop (from 1 to 12) and by checking if Player(IntegerA) is a player and in-game, so as to educate people who are using your resource and teach them how to do things faster.

PlayerGroup(Triggering player) leaks.

Use a variable to store repeated function calls, such as (Picked player), (Triggering player) and (Player number of (Triggering player)).


Fix these and I will review it further.
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
Nice job, but you can improve it. I'm getting mad to type /all everytime I want to chat so the solution is to type /all and then the following messages be for all, same thing with other commands such as /player ...

You give me a great idea dude.. But actually you can change all the commands.. For ex. Change /all to /p.. It's easy right?
I'll add your idea later because i have to remove all the fuckin leaks first..
Thanks for ur suggestion and comment..

I have added a trailer video.. That exchanges all screenshots.. :)
And also there are a damn fuckin errors.. So I'll fix this thread soon...
 
Last edited by a moderator:
Regarding the leaks.

  • (All players matching ((Matching player) Equal to (Player(CS_ChatterPlayerNumber))))
  • Cinematic - Clear the screen of text messages for (All players matching ((Matching player) Equal to (Player(CS_ChatterPlayerNumber))))
    • Game - Display to (All players matching ((Matching player) Equal to CS_ChatPlayerFinalTarget[CS_ChatterPlayerNumber]))
You have plenty of such actions. These actions create a player group and do not get the leak cleaned. You need to create a player group variable, set its data (All players matching..) and then destroy is as
  • Custom script: call DestroyForce (udg_VariableName)
Helpful link: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

You generally don't use variables; (Triggering player), (Player number of (Triggering player)) and function calls such as
  • (Substring((Entered chat string), 1, CS_CommandOpenMsgSize))
are repeatedly used. Store them in variables and refer to those variables instead!
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
Regarding the leaks.

  • (All players matching ((Matching player) Equal to (Player(CS_ChatterPlayerNumber))))
  • Cinematic - Clear the screen of text messages for (All players matching ((Matching player) Equal to (Player(CS_ChatterPlayerNumber))))
    • Game - Display to (All players matching ((Matching player) Equal to CS_ChatPlayerFinalTarget[CS_ChatterPlayerNumber]))
You have plenty of such actions. These actions create a player group and do not get the leak cleaned. You need to create a player group variable, set its data (All players matching..) and then destroy is as
  • Custom script: call DestroyForce (udg_VariableName)
Helpful link: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/

You generally don't use variables; (Triggering player), (Player number of (Triggering player)) and function calls such as
  • (Substring((Entered chat string), 1, CS_CommandOpenMsgSize))
are repeatedly used. Store them in variables and refer to those variables instead!

Hey, actually I have know all about that.. I have finished my system yesterday but I hav not uploaded my new system yet.. Upload soon! I wish all leaks have been fixed..
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
If you ask me..
- Why do the chat player doesn't work?
It's becoz the target has not been registered yet and doesn't open the window currently
- How can I fix this?
1. Just delete the condition below
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • CS_Boolean[CS_ChatPlayerTargetNumb[CS_ChatterPlayerNumber]] Equal to True
      • (CS_ChatPlayerTarget[CS_ChatterPlayerNumber] is in CS_ChatGroup) Equal to True
at the chat player trigger!
2. Try this with your friend(s)
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
i find this completely useless sorry

what did you mean?


Just ignore Kael.

Btw (to all of you out there) Please from now on post comments related only to project itself. I will delete everything else. If you don't have question or suggestion that can help Maker or players then stay away from this thread.

Please read that message clearly! I picked that from other thread but it's important for u to read... Your comment don't related anything with my system.. your comment is more useless... and helpless..
 
Erm wc3 basic chat system has all of these things, and is a lot easier to use.
  • ColorDictionary
  • Events
  • Conditions
  • Actions
  • If (CS_FontColor Equal to snow) then do (Set CS_FontColor = |CFFFFFAFA) else do (Do nothing)
  • If (CS_FontColor Equal to ghostwhite) then do (Set CS_FontColor = |CFFF8F8FF) else do (Do nothing)
  • If (CS_FontColor Equal to whitesmoke) then do (Set CS_FontColor = |CFFF5F5F5) else do (Do nothing)
  • If (CS_FontColor Equal to gainsboro) then do (Set CS_FontColor = |CFFDCDCDC) else do (Do nothing)
  • If (CS_FontColor Equal to floralwhite) then do (Set CS_FontColor = |CFFFFFAF0) else do (Do nothing)
  • If (CS_FontColor Equal to oldlace) then do (Set CS_FontColor = |CFFFDF5E6) else do (Do nothing)
  • If (CS_FontColor Equal to linen) then do (Set CS_FontColor = |CFFFAF0E6) else do (Do nothing)
  • If (CS_FontColor Equal to antiquewhite) then do (Set CS_FontColor = |CFFFAEBD7) else do (Do nothing)
  • If (CS_FontColor Equal to papayawhip) then do (Set CS_FontColor = |CFFFFEFD5) else do (Do nothing)
  • If (CS_FontColor Equal to blanchedalmond) then do (Set CS_FontColor = |CFFFFEBCD) else do (Do nothing)
  • If (CS_FontColor Equal to bisque) then do (Set CS_FontColor = |CFFFFE4C4) else do (Do nothing)
  • If (CS_FontColor Equal to peachpuff) then do (Set CS_FontColor = |CFFFFDAB9) else do (Do nothing)
  • If (CS_FontColor Equal to navajowhite) then do (Set CS_FontColor = |CFFFFDEAD) else do (Do nothing)
  • If (CS_FontColor Equal to moccasin) then do (Set CS_FontColor = |CFFFFE4B5) else do (Do nothing)
  • If (CS_FontColor Equal to cornsilk) then do (Set CS_FontColor = |CFFFF8DC) else do (Do nothing)
  • If (CS_FontColor Equal to ivory) then do (Set CS_FontColor = |CFFFFFFF0) else do (Do nothing)
  • If (CS_FontColor Equal to lemonchiffon) then do (Set CS_FontColor = |CFFFFFACD) else do (Do nothing)
  • If (CS_FontColor Equal to seashell) then do (Set CS_FontColor = |CFFFFF5EE) else do (Do nothing)
  • If (CS_FontColor Equal to honeydew) then do (Set CS_FontColor = |CFFF0FFF0) else do (Do nothing)
  • If (CS_FontColor Equal to mintcream) then do (Set CS_FontColor = |CFFF5FFFA) else do (Do nothing)
  • If (CS_FontColor Equal to azure) then do (Set CS_FontColor = |CFFF0FFFF) else do (Do nothing)
  • If (CS_FontColor Equal to aliceblue) then do (Set CS_FontColor = |CFFF0F8FF) else do (Do nothing)
  • If (CS_FontColor Equal to lavender) then do (Set CS_FontColor = |CFFE6E6FA) else do (Do nothing)
  • If (CS_FontColor Equal to lavenderblush) then do (Set CS_FontColor = |CFFFFF0F5) else do (Do nothing)
  • If (CS_FontColor Equal to mystirose) then do (Set CS_FontColor = |CFFFFE4E1) else do (Do nothing)
  • If (CS_FontColor Equal to darkslategray) then do (Set CS_FontColor = |CFF2F4F4F) else do (Do nothing)
  • If (CS_FontColor Equal to dimgrey) then do (Set CS_FontColor = |CFF696969) else do (Do nothing)
  • If (CS_FontColor Equal to slategrey) then do (Set CS_FontColor = |CFF708090) else do (Do nothing)
  • If (CS_FontColor Equal to lightslategray) then do (Set CS_FontColor = |CFF778899) else do (Do nothing)
  • If (CS_FontColor Equal to lightgrey) then do (Set CS_FontColor = |CFFD3D3D3) else do (Do nothing)
  • If (CS_FontColor Equal to midnightblue) then do (Set CS_FontColor = |CFF191970) else do (Do nothing)
  • If (CS_FontColor Equal to navyblue) then do (Set CS_FontColor = |CFF000080) else do (Do nothing)
  • If (CS_FontColor Equal to cornflowerblue) then do (Set CS_FontColor = |CFF6495ED) else do (Do nothing)
  • If (CS_FontColor Equal to darkslateblue) then do (Set CS_FontColor = |CFF483D8B) else do (Do nothing)
  • If (CS_FontColor Equal to slateblue) then do (Set CS_FontColor = |CFF6A5ACD) else do (Do nothing)
  • If (CS_FontColor Equal to mediumslateblue) then do (Set CS_FontColor = |CFF7B68EE) else do (Do nothing)
  • If (CS_FontColor Equal to lightslateblue) then do (Set CS_FontColor = |CFF8470FF) else do (Do nothing)
  • If (CS_FontColor Equal to mediumblue) then do (Set CS_FontColor = |CFF0000CD) else do (Do nothing)
  • If (CS_FontColor Equal to royalblue) then do (Set CS_FontColor = |CFF4169E1) else do (Do nothing)
  • If (CS_FontColor Equal to dodgerblue) then do (Set CS_FontColor = |CFF1E90FF) else do (Do nothing)
  • If (CS_FontColor Equal to deepskyblue) then do (Set CS_FontColor = |CFF00BFFF) else do (Do nothing)
  • If (CS_FontColor Equal to skyblue) then do (Set CS_FontColor = |CFF87CEEB) else do (Do nothing)
  • If (CS_FontColor Equal to lightskyblue) then do (Set CS_FontColor = |CFF87CEFA) else do (Do nothing)
  • If (CS_FontColor Equal to steelblue) then do (Set CS_FontColor = |CFF4682B4) else do (Do nothing)
  • If (CS_FontColor Equal to lightsteelblue) then do (Set CS_FontColor = |CFFB0C4DE) else do (Do nothing)
  • If (CS_FontColor Equal to lightblue) then do (Set CS_FontColor = |CFFADD8E6) else do (Do nothing)
  • If (CS_FontColor Equal to powderblue) then do (Set CS_FontColor = |CFFB0E0E6) else do (Do nothing)
  • If (CS_FontColor Equal to paleturquoise) then do (Set CS_FontColor = |CFFAFEEEE) else do (Do nothing)
  • If (CS_FontColor Equal to darkturquoise) then do (Set CS_FontColor = |CFF00CED1) else do (Do nothing)
  • If (CS_FontColor Equal to mediumturquoise) then do (Set CS_FontColor = |CFF48D1CC) else do (Do nothing)
  • If (CS_FontColor Equal to turquoise) then do (Set CS_FontColor = |CFF40E0D0) else do (Do nothing)
  • If (CS_FontColor Equal to lightcyan) then do (Set CS_FontColor = |CFFE0FFFF) else do (Do nothing)
  • If (CS_FontColor Equal to cadetblue) then do (Set CS_FontColor = |CFF5F9EA0) else do (Do nothing)
  • If (CS_FontColor Equal to mediumaquamarine) then do (Set CS_FontColor = |CFF66CDAA) else do (Do nothing)
  • If (CS_FontColor Equal to aquamarine) then do (Set CS_FontColor = |CFF7FFFD4) else do (Do nothing)
  • If (CS_FontColor Equal to darkolivegreen) then do (Set CS_FontColor = |CFF556B2F) else do (Do nothing)
  • If (CS_FontColor Equal to darkseagreen) then do (Set CS_FontColor = |CFF8FBC8F) else do (Do nothing)
  • If (CS_FontColor Equal to seagreen) then do (Set CS_FontColor = |CFF2E8B57) else do (Do nothing)
  • If (CS_FontColor Equal to mediumseagreen) then do (Set CS_FontColor = |CFF3CB371) else do (Do nothing)
  • If (CS_FontColor Equal to lightseagreen) then do (Set CS_FontColor = |CFF20B2AA) else do (Do nothing)
  • If (CS_FontColor Equal to palegreen) then do (Set CS_FontColor = |CFF98FB98) else do (Do nothing)
  • If (CS_FontColor Equal to springgreen) then do (Set CS_FontColor = |CFF00FF7F) else do (Do nothing)
  • If (CS_FontColor Equal to lawngreen) then do (Set CS_FontColor = |CFF7CFC00) else do (Do nothing)
  • If (CS_FontColor Equal to chartreuse) then do (Set CS_FontColor = |CFF7FFF00) else do (Do nothing)
  • If (CS_FontColor Equal to medspringgreen) then do (Set CS_FontColor = |CFF00FA9A) else do (Do nothing)
  • If (CS_FontColor Equal to greenyellow) then do (Set CS_FontColor = |CFFADFF2F) else do (Do nothing)
  • If (CS_FontColor Equal to limeyellow) then do (Set CS_FontColor = |CFF32CD32) else do (Do nothing)
  • If (CS_FontColor Equal to yellowgreen) then do (Set CS_FontColor = |CFF9ACD32) else do (Do nothing)
  • If (CS_FontColor Equal to forestgreen) then do (Set CS_FontColor = |CFF228B22) else do (Do nothing)
  • If (CS_FontColor Equal to olivedrab) then do (Set CS_FontColor = |CFF6B8E23) else do (Do nothing)
  • If (CS_FontColor Equal to darkkhaki) then do (Set CS_FontColor = |CFFBDB76B) else do (Do nothing)
  • If (CS_FontColor Equal to palegoldenrod) then do (Set CS_FontColor = |CFFEEE8AA) else do (Do nothing)
  • If (CS_FontColor Equal to lightgoldenrodyellow) then do (Set CS_FontColor = |CFFFAFAD2) else do (Do nothing)
  • If (CS_FontColor Equal to lightyellow) then do (Set CS_FontColor = |CFFFFFFE0) else do (Do nothing)
  • If (CS_FontColor Equal to gold) then do (Set CS_FontColor = |CFFFFD700) else do (Do nothing)
  • If (CS_FontColor Equal to lightgoldenrod) then do (Set CS_FontColor = |CFFEEDD82) else do (Do nothing)
  • If (CS_FontColor Equal to goldenrod) then do (Set CS_FontColor = |CFFDAA520) else do (Do nothing)
  • If (CS_FontColor Equal to darkgoldenrod) then do (Set CS_FontColor = |CFFB8860B) else do (Do nothing)
  • If (CS_FontColor Equal to rosybrown) then do (Set CS_FontColor = |CFFBC8F8F) else do (Do nothing)
  • If (CS_FontColor Equal to indianred) then do (Set CS_FontColor = |CFFCD5C5C) else do (Do nothing)
  • If (CS_FontColor Equal to saddlebrown) then do (Set CS_FontColor = |CFF8B4513) else do (Do nothing)
  • If (CS_FontColor Equal to sienna) then do (Set CS_FontColor = |CFFA0522D) else do (Do nothing)
  • If (CS_FontColor Equal to peru) then do (Set CS_FontColor = |CFFCD853F) else do (Do nothing)
  • If (CS_FontColor Equal to borlybrown) then do (Set CS_FontColor = |CFFDEB887) else do (Do nothing)
  • If (CS_FontColor Equal to beige) then do (Set CS_FontColor = |CFFF5F5DC) else do (Do nothing)
  • If (CS_FontColor Equal to wheat) then do (Set CS_FontColor = |CFFF5DEB3) else do (Do nothing)
  • If (CS_FontColor Equal to sandybrown) then do (Set CS_FontColor = |CFFF4A460) else do (Do nothing)
  • If (CS_FontColor Equal to tan) then do (Set CS_FontColor = |CFFD2B48C) else do (Do nothing)
  • If (CS_FontColor Equal to chocolate) then do (Set CS_FontColor = |CFFD2691E) else do (Do nothing)
  • If (CS_FontColor Equal to firebrick) then do (Set CS_FontColor = |CFFB22222) else do (Do nothing)
  • If (CS_FontColor Equal to darksalmon) then do (Set CS_FontColor = |CFFE9967A) else do (Do nothing)
  • If (CS_FontColor Equal to salmon) then do (Set CS_FontColor = |CFFFA8072) else do (Do nothing)
  • If (CS_FontColor Equal to lightsalmon) then do (Set CS_FontColor = |CFFFFA07A) else do (Do nothing)
  • If (CS_FontColor Equal to darkorange) then do (Set CS_FontColor = |CFFFF8C00) else do (Do nothing)
  • If (CS_FontColor Equal to coral) then do (Set CS_FontColor = |CFFFF7F50) else do (Do nothing)
  • If (CS_FontColor Equal to lightcoral) then do (Set CS_FontColor = |CFFF08080) else do (Do nothing)
  • If (CS_FontColor Equal to tomato) then do (Set CS_FontColor = |CFFFF6347) else do (Do nothing)
  • If (CS_FontColor Equal to orangered) then do (Set CS_FontColor = |CFFFF4500) else do (Do nothing)
  • If (CS_FontColor Equal to hotpink) then do (Set CS_FontColor = |CFFFF69B4) else do (Do nothing)
  • If (CS_FontColor Equal to deeppink) then do (Set CS_FontColor = |CFFFF1493) else do (Do nothing)
  • If (CS_FontColor Equal to lightpink) then do (Set CS_FontColor = |CFFFFB6C1) else do (Do nothing)
  • If (CS_FontColor Equal to palevioletred) then do (Set CS_FontColor = |CFFDB7093) else do (Do nothing)
  • If (CS_FontColor Equal to maroon) then do (Set CS_FontColor = |CFFB03060) else do (Do nothing)
  • If (CS_FontColor Equal to mediumvioletred) then do (Set CS_FontColor = |CFFC71585) else do (Do nothing)
  • If (CS_FontColor Equal to violetred) then do (Set CS_FontColor = |CFFD02090) else do (Do nothing)
  • If (CS_FontColor Equal to violet) then do (Set CS_FontColor = |CFFEE82EE) else do (Do nothing)
  • If (CS_FontColor Equal to plum) then do (Set CS_FontColor = |CFFDDA0DD) else do (Do nothing)
  • If (CS_FontColor Equal to orchid) then do (Set CS_FontColor = |CFFDA70D6) else do (Do nothing)
  • If (CS_FontColor Equal to mediumorchid) then do (Set CS_FontColor = |CFFBA55D3) else do (Do nothing)
  • If (CS_FontColor Equal to darkorchid) then do (Set CS_FontColor = |CFF9932CC) else do (Do nothing)
  • If (CS_FontColor Equal to darkviolet) then do (Set CS_FontColor = |CFF9400D3) else do (Do nothing)
  • If (CS_FontColor Equal to blueviolet) then do (Set CS_FontColor = |CFF8A2BE2) else do (Do nothing)
  • If (CS_FontColor Equal to mediumpurple) then do (Set CS_FontColor = |CFF9370DB) else do (Do nothing)
  • If (CS_FontColor Equal to thistle) then do (Set CS_FontColor = |CFFD8BFD8) else do (Do nothing)
  • If (CS_FontColor Equal to blue) then do (Set CS_FontColor = |CFF0000FF) else do (Do nothing)
  • If (CS_FontColor Equal to darkblue) then do (Set CS_FontColor = |CFF00008B) else do (Do nothing)
  • If (CS_FontColor Equal to red) then do (Set CS_FontColor = |CFFFF0000) else do (Do nothing)
  • If (CS_FontColor Equal to darkred) then do (Set CS_FontColor = |CFF8B0000) else do (Do nothing)
  • If (CS_FontColor Equal to green) then do (Set CS_FontColor = |CFF00FF00) else do (Do nothing)
  • If (CS_FontColor Equal to lightyellow) then do (Set CS_FontColor = |CFFFFFF00) else do (Do nothing)
  • If (CS_FontColor Equal to yellow) then do (Set CS_FontColor = |CFFFFCC00) else do (Do nothing)
  • If (CS_FontColor Equal to darkyellow) then do (Set CS_FontColor = |CFF8B8B00) else do (Do nothing)
  • If (CS_FontColor Equal to magenta) then do (Set CS_FontColor = |CFFFF00FF) else do (Do nothing)
  • If (CS_FontColor Equal to purple) then do (Set CS_FontColor = |CFFA020F0) else do (Do nothing)
  • If (CS_FontColor Equal to cyan) then do (Set CS_FontColor = |CFF00FFFF) else do (Do nothing)
  • If (CS_FontColor Equal to brown) then do (Set CS_FontColor = |CFFA52A2A) else do (Do nothing)
  • If (CS_FontColor Equal to orange) then do (Set CS_FontColor = |CFFFFA500) else do (Do nothing)
  • If (CS_FontColor Equal to black) then do (Set CS_FontColor = |CFF000000) else do (Do nothing)
  • If (CS_FontColor Equal to white) then do (Set CS_FontColor = |CFFFFFFFF) else do (Do nothing)
  • If (CS_FontColor Equal to grey) then do (Set CS_FontColor = |CFFBEBEBE) else do (Do nothing)
  • If (CS_FontColor Equal to darkgrey) then do (Set CS_FontColor = |CFFA9A9A9) else do (Do nothing)
  • If (CS_FontColor Equal to darkgreen) then do (Set CS_FontColor = |CFF006400) else do (Do nothing)
  • If (CS_FontColor Equal to lightgreen) then do (Set CS_FontColor = |CFF90EE90) else do (Do nothing)
  • If (CS_FontColor Equal to darkcyan) then do (Set CS_FontColor = |CFF008B8B) else do (Do nothing)
  • If (CS_FontColor Equal to darkmagenta) then do (Set CS_FontColor = |CFF8B008B) else do (Do nothing)
  • If (CS_FontColor Equal to pink) then do (Set CS_FontColor = |CFFFFC0CB) else do (Do nothing)
And this is as inefficient as it gets, do you know what the do nothing function does? It takes up space. Instead of doing all of this if/then/else crap
Save the color name string into a hashtable and save it's color used, so when you want to call on certain colors just use the color name as the array.

Secondly /anything after a forward slash cannot be detected through triggers in multiplayer.

The triggering needs MUCH work and the system requires the player to loose all control of everything when they enter chat.
+Costs a import.

You don't need to tell every little thing you are doing in your triggers. It's like creating a unit and saying "Create the unit..."
("Remove the leaks")
Using Integer A/B is a big no no, use a integer variable

This spell is rejected until the required changes are applied.
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
Erm wc3 basic chat system has all of these things, and is a lot easier to use.
  • ColorDictionary
  • Events
  • Conditions
  • Actions
  • If (CS_FontColor Equal to snow) then do (Set CS_FontColor = |CFFFFFAFA) else do (Do nothing)
  • If (CS_FontColor Equal to ghostwhite) then do (Set CS_FontColor = |CFFF8F8FF) else do (Do nothing)
  • If (CS_FontColor Equal to whitesmoke) then do (Set CS_FontColor = |CFFF5F5F5) else do (Do nothing)
  • If (CS_FontColor Equal to gainsboro) then do (Set CS_FontColor = |CFFDCDCDC) else do (Do nothing)
  • If (CS_FontColor Equal to floralwhite) then do (Set CS_FontColor = |CFFFFFAF0) else do (Do nothing)
  • If (CS_FontColor Equal to oldlace) then do (Set CS_FontColor = |CFFFDF5E6) else do (Do nothing)
  • If (CS_FontColor Equal to linen) then do (Set CS_FontColor = |CFFFAF0E6) else do (Do nothing)
  • If (CS_FontColor Equal to antiquewhite) then do (Set CS_FontColor = |CFFFAEBD7) else do (Do nothing)
  • If (CS_FontColor Equal to papayawhip) then do (Set CS_FontColor = |CFFFFEFD5) else do (Do nothing)
  • If (CS_FontColor Equal to blanchedalmond) then do (Set CS_FontColor = |CFFFFEBCD) else do (Do nothing)
  • If (CS_FontColor Equal to bisque) then do (Set CS_FontColor = |CFFFFE4C4) else do (Do nothing)
  • If (CS_FontColor Equal to peachpuff) then do (Set CS_FontColor = |CFFFFDAB9) else do (Do nothing)
  • If (CS_FontColor Equal to navajowhite) then do (Set CS_FontColor = |CFFFFDEAD) else do (Do nothing)
  • If (CS_FontColor Equal to moccasin) then do (Set CS_FontColor = |CFFFFE4B5) else do (Do nothing)
  • If (CS_FontColor Equal to cornsilk) then do (Set CS_FontColor = |CFFFF8DC) else do (Do nothing)
  • If (CS_FontColor Equal to ivory) then do (Set CS_FontColor = |CFFFFFFF0) else do (Do nothing)
  • If (CS_FontColor Equal to lemonchiffon) then do (Set CS_FontColor = |CFFFFFACD) else do (Do nothing)
  • If (CS_FontColor Equal to seashell) then do (Set CS_FontColor = |CFFFFF5EE) else do (Do nothing)
  • If (CS_FontColor Equal to honeydew) then do (Set CS_FontColor = |CFFF0FFF0) else do (Do nothing)
  • If (CS_FontColor Equal to mintcream) then do (Set CS_FontColor = |CFFF5FFFA) else do (Do nothing)
  • If (CS_FontColor Equal to azure) then do (Set CS_FontColor = |CFFF0FFFF) else do (Do nothing)
  • If (CS_FontColor Equal to aliceblue) then do (Set CS_FontColor = |CFFF0F8FF) else do (Do nothing)
  • If (CS_FontColor Equal to lavender) then do (Set CS_FontColor = |CFFE6E6FA) else do (Do nothing)
  • If (CS_FontColor Equal to lavenderblush) then do (Set CS_FontColor = |CFFFFF0F5) else do (Do nothing)
  • If (CS_FontColor Equal to mystirose) then do (Set CS_FontColor = |CFFFFE4E1) else do (Do nothing)
  • If (CS_FontColor Equal to darkslategray) then do (Set CS_FontColor = |CFF2F4F4F) else do (Do nothing)
  • If (CS_FontColor Equal to dimgrey) then do (Set CS_FontColor = |CFF696969) else do (Do nothing)
  • If (CS_FontColor Equal to slategrey) then do (Set CS_FontColor = |CFF708090) else do (Do nothing)
  • If (CS_FontColor Equal to lightslategray) then do (Set CS_FontColor = |CFF778899) else do (Do nothing)
  • If (CS_FontColor Equal to lightgrey) then do (Set CS_FontColor = |CFFD3D3D3) else do (Do nothing)
  • If (CS_FontColor Equal to midnightblue) then do (Set CS_FontColor = |CFF191970) else do (Do nothing)
  • If (CS_FontColor Equal to navyblue) then do (Set CS_FontColor = |CFF000080) else do (Do nothing)
  • If (CS_FontColor Equal to cornflowerblue) then do (Set CS_FontColor = |CFF6495ED) else do (Do nothing)
  • If (CS_FontColor Equal to darkslateblue) then do (Set CS_FontColor = |CFF483D8B) else do (Do nothing)
  • If (CS_FontColor Equal to slateblue) then do (Set CS_FontColor = |CFF6A5ACD) else do (Do nothing)
  • If (CS_FontColor Equal to mediumslateblue) then do (Set CS_FontColor = |CFF7B68EE) else do (Do nothing)
  • If (CS_FontColor Equal to lightslateblue) then do (Set CS_FontColor = |CFF8470FF) else do (Do nothing)
  • If (CS_FontColor Equal to mediumblue) then do (Set CS_FontColor = |CFF0000CD) else do (Do nothing)
  • If (CS_FontColor Equal to royalblue) then do (Set CS_FontColor = |CFF4169E1) else do (Do nothing)
  • If (CS_FontColor Equal to dodgerblue) then do (Set CS_FontColor = |CFF1E90FF) else do (Do nothing)
  • If (CS_FontColor Equal to deepskyblue) then do (Set CS_FontColor = |CFF00BFFF) else do (Do nothing)
  • If (CS_FontColor Equal to skyblue) then do (Set CS_FontColor = |CFF87CEEB) else do (Do nothing)
  • If (CS_FontColor Equal to lightskyblue) then do (Set CS_FontColor = |CFF87CEFA) else do (Do nothing)
  • If (CS_FontColor Equal to steelblue) then do (Set CS_FontColor = |CFF4682B4) else do (Do nothing)
  • If (CS_FontColor Equal to lightsteelblue) then do (Set CS_FontColor = |CFFB0C4DE) else do (Do nothing)
  • If (CS_FontColor Equal to lightblue) then do (Set CS_FontColor = |CFFADD8E6) else do (Do nothing)
  • If (CS_FontColor Equal to powderblue) then do (Set CS_FontColor = |CFFB0E0E6) else do (Do nothing)
  • If (CS_FontColor Equal to paleturquoise) then do (Set CS_FontColor = |CFFAFEEEE) else do (Do nothing)
  • If (CS_FontColor Equal to darkturquoise) then do (Set CS_FontColor = |CFF00CED1) else do (Do nothing)
  • If (CS_FontColor Equal to mediumturquoise) then do (Set CS_FontColor = |CFF48D1CC) else do (Do nothing)
  • If (CS_FontColor Equal to turquoise) then do (Set CS_FontColor = |CFF40E0D0) else do (Do nothing)
  • If (CS_FontColor Equal to lightcyan) then do (Set CS_FontColor = |CFFE0FFFF) else do (Do nothing)
  • If (CS_FontColor Equal to cadetblue) then do (Set CS_FontColor = |CFF5F9EA0) else do (Do nothing)
  • If (CS_FontColor Equal to mediumaquamarine) then do (Set CS_FontColor = |CFF66CDAA) else do (Do nothing)
  • If (CS_FontColor Equal to aquamarine) then do (Set CS_FontColor = |CFF7FFFD4) else do (Do nothing)
  • If (CS_FontColor Equal to darkolivegreen) then do (Set CS_FontColor = |CFF556B2F) else do (Do nothing)
  • If (CS_FontColor Equal to darkseagreen) then do (Set CS_FontColor = |CFF8FBC8F) else do (Do nothing)
  • If (CS_FontColor Equal to seagreen) then do (Set CS_FontColor = |CFF2E8B57) else do (Do nothing)
  • If (CS_FontColor Equal to mediumseagreen) then do (Set CS_FontColor = |CFF3CB371) else do (Do nothing)
  • If (CS_FontColor Equal to lightseagreen) then do (Set CS_FontColor = |CFF20B2AA) else do (Do nothing)
  • If (CS_FontColor Equal to palegreen) then do (Set CS_FontColor = |CFF98FB98) else do (Do nothing)
  • If (CS_FontColor Equal to springgreen) then do (Set CS_FontColor = |CFF00FF7F) else do (Do nothing)
  • If (CS_FontColor Equal to lawngreen) then do (Set CS_FontColor = |CFF7CFC00) else do (Do nothing)
  • If (CS_FontColor Equal to chartreuse) then do (Set CS_FontColor = |CFF7FFF00) else do (Do nothing)
  • If (CS_FontColor Equal to medspringgreen) then do (Set CS_FontColor = |CFF00FA9A) else do (Do nothing)
  • If (CS_FontColor Equal to greenyellow) then do (Set CS_FontColor = |CFFADFF2F) else do (Do nothing)
  • If (CS_FontColor Equal to limeyellow) then do (Set CS_FontColor = |CFF32CD32) else do (Do nothing)
  • If (CS_FontColor Equal to yellowgreen) then do (Set CS_FontColor = |CFF9ACD32) else do (Do nothing)
  • If (CS_FontColor Equal to forestgreen) then do (Set CS_FontColor = |CFF228B22) else do (Do nothing)
  • If (CS_FontColor Equal to olivedrab) then do (Set CS_FontColor = |CFF6B8E23) else do (Do nothing)
  • If (CS_FontColor Equal to darkkhaki) then do (Set CS_FontColor = |CFFBDB76B) else do (Do nothing)
  • If (CS_FontColor Equal to palegoldenrod) then do (Set CS_FontColor = |CFFEEE8AA) else do (Do nothing)
  • If (CS_FontColor Equal to lightgoldenrodyellow) then do (Set CS_FontColor = |CFFFAFAD2) else do (Do nothing)
  • If (CS_FontColor Equal to lightyellow) then do (Set CS_FontColor = |CFFFFFFE0) else do (Do nothing)
  • If (CS_FontColor Equal to gold) then do (Set CS_FontColor = |CFFFFD700) else do (Do nothing)
  • If (CS_FontColor Equal to lightgoldenrod) then do (Set CS_FontColor = |CFFEEDD82) else do (Do nothing)
  • If (CS_FontColor Equal to goldenrod) then do (Set CS_FontColor = |CFFDAA520) else do (Do nothing)
  • If (CS_FontColor Equal to darkgoldenrod) then do (Set CS_FontColor = |CFFB8860B) else do (Do nothing)
  • If (CS_FontColor Equal to rosybrown) then do (Set CS_FontColor = |CFFBC8F8F) else do (Do nothing)
  • If (CS_FontColor Equal to indianred) then do (Set CS_FontColor = |CFFCD5C5C) else do (Do nothing)
  • If (CS_FontColor Equal to saddlebrown) then do (Set CS_FontColor = |CFF8B4513) else do (Do nothing)
  • If (CS_FontColor Equal to sienna) then do (Set CS_FontColor = |CFFA0522D) else do (Do nothing)
  • If (CS_FontColor Equal to peru) then do (Set CS_FontColor = |CFFCD853F) else do (Do nothing)
  • If (CS_FontColor Equal to borlybrown) then do (Set CS_FontColor = |CFFDEB887) else do (Do nothing)
  • If (CS_FontColor Equal to beige) then do (Set CS_FontColor = |CFFF5F5DC) else do (Do nothing)
  • If (CS_FontColor Equal to wheat) then do (Set CS_FontColor = |CFFF5DEB3) else do (Do nothing)
  • If (CS_FontColor Equal to sandybrown) then do (Set CS_FontColor = |CFFF4A460) else do (Do nothing)
  • If (CS_FontColor Equal to tan) then do (Set CS_FontColor = |CFFD2B48C) else do (Do nothing)
  • If (CS_FontColor Equal to chocolate) then do (Set CS_FontColor = |CFFD2691E) else do (Do nothing)
  • If (CS_FontColor Equal to firebrick) then do (Set CS_FontColor = |CFFB22222) else do (Do nothing)
  • If (CS_FontColor Equal to darksalmon) then do (Set CS_FontColor = |CFFE9967A) else do (Do nothing)
  • If (CS_FontColor Equal to salmon) then do (Set CS_FontColor = |CFFFA8072) else do (Do nothing)
  • If (CS_FontColor Equal to lightsalmon) then do (Set CS_FontColor = |CFFFFA07A) else do (Do nothing)
  • If (CS_FontColor Equal to darkorange) then do (Set CS_FontColor = |CFFFF8C00) else do (Do nothing)
  • If (CS_FontColor Equal to coral) then do (Set CS_FontColor = |CFFFF7F50) else do (Do nothing)
  • If (CS_FontColor Equal to lightcoral) then do (Set CS_FontColor = |CFFF08080) else do (Do nothing)
  • If (CS_FontColor Equal to tomato) then do (Set CS_FontColor = |CFFFF6347) else do (Do nothing)
  • If (CS_FontColor Equal to orangered) then do (Set CS_FontColor = |CFFFF4500) else do (Do nothing)
  • If (CS_FontColor Equal to hotpink) then do (Set CS_FontColor = |CFFFF69B4) else do (Do nothing)
  • If (CS_FontColor Equal to deeppink) then do (Set CS_FontColor = |CFFFF1493) else do (Do nothing)
  • If (CS_FontColor Equal to lightpink) then do (Set CS_FontColor = |CFFFFB6C1) else do (Do nothing)
  • If (CS_FontColor Equal to palevioletred) then do (Set CS_FontColor = |CFFDB7093) else do (Do nothing)
  • If (CS_FontColor Equal to maroon) then do (Set CS_FontColor = |CFFB03060) else do (Do nothing)
  • If (CS_FontColor Equal to mediumvioletred) then do (Set CS_FontColor = |CFFC71585) else do (Do nothing)
  • If (CS_FontColor Equal to violetred) then do (Set CS_FontColor = |CFFD02090) else do (Do nothing)
  • If (CS_FontColor Equal to violet) then do (Set CS_FontColor = |CFFEE82EE) else do (Do nothing)
  • If (CS_FontColor Equal to plum) then do (Set CS_FontColor = |CFFDDA0DD) else do (Do nothing)
  • If (CS_FontColor Equal to orchid) then do (Set CS_FontColor = |CFFDA70D6) else do (Do nothing)
  • If (CS_FontColor Equal to mediumorchid) then do (Set CS_FontColor = |CFFBA55D3) else do (Do nothing)
  • If (CS_FontColor Equal to darkorchid) then do (Set CS_FontColor = |CFF9932CC) else do (Do nothing)
  • If (CS_FontColor Equal to darkviolet) then do (Set CS_FontColor = |CFF9400D3) else do (Do nothing)
  • If (CS_FontColor Equal to blueviolet) then do (Set CS_FontColor = |CFF8A2BE2) else do (Do nothing)
  • If (CS_FontColor Equal to mediumpurple) then do (Set CS_FontColor = |CFF9370DB) else do (Do nothing)
  • If (CS_FontColor Equal to thistle) then do (Set CS_FontColor = |CFFD8BFD8) else do (Do nothing)
  • If (CS_FontColor Equal to blue) then do (Set CS_FontColor = |CFF0000FF) else do (Do nothing)
  • If (CS_FontColor Equal to darkblue) then do (Set CS_FontColor = |CFF00008B) else do (Do nothing)
  • If (CS_FontColor Equal to red) then do (Set CS_FontColor = |CFFFF0000) else do (Do nothing)
  • If (CS_FontColor Equal to darkred) then do (Set CS_FontColor = |CFF8B0000) else do (Do nothing)
  • If (CS_FontColor Equal to green) then do (Set CS_FontColor = |CFF00FF00) else do (Do nothing)
  • If (CS_FontColor Equal to lightyellow) then do (Set CS_FontColor = |CFFFFFF00) else do (Do nothing)
  • If (CS_FontColor Equal to yellow) then do (Set CS_FontColor = |CFFFFCC00) else do (Do nothing)
  • If (CS_FontColor Equal to darkyellow) then do (Set CS_FontColor = |CFF8B8B00) else do (Do nothing)
  • If (CS_FontColor Equal to magenta) then do (Set CS_FontColor = |CFFFF00FF) else do (Do nothing)
  • If (CS_FontColor Equal to purple) then do (Set CS_FontColor = |CFFA020F0) else do (Do nothing)
  • If (CS_FontColor Equal to cyan) then do (Set CS_FontColor = |CFF00FFFF) else do (Do nothing)
  • If (CS_FontColor Equal to brown) then do (Set CS_FontColor = |CFFA52A2A) else do (Do nothing)
  • If (CS_FontColor Equal to orange) then do (Set CS_FontColor = |CFFFFA500) else do (Do nothing)
  • If (CS_FontColor Equal to black) then do (Set CS_FontColor = |CFF000000) else do (Do nothing)
  • If (CS_FontColor Equal to white) then do (Set CS_FontColor = |CFFFFFFFF) else do (Do nothing)
  • If (CS_FontColor Equal to grey) then do (Set CS_FontColor = |CFFBEBEBE) else do (Do nothing)
  • If (CS_FontColor Equal to darkgrey) then do (Set CS_FontColor = |CFFA9A9A9) else do (Do nothing)
  • If (CS_FontColor Equal to darkgreen) then do (Set CS_FontColor = |CFF006400) else do (Do nothing)
  • If (CS_FontColor Equal to lightgreen) then do (Set CS_FontColor = |CFF90EE90) else do (Do nothing)
  • If (CS_FontColor Equal to darkcyan) then do (Set CS_FontColor = |CFF008B8B) else do (Do nothing)
  • If (CS_FontColor Equal to darkmagenta) then do (Set CS_FontColor = |CFF8B008B) else do (Do nothing)
  • If (CS_FontColor Equal to pink) then do (Set CS_FontColor = |CFFFFC0CB) else do (Do nothing)
And this is as inefficient as it gets, do you know what the do nothing function does? It takes up space. Instead of doing all of this if/then/else crap
Save the color name string into a hashtable and save it's color used, so when you want to call on certain colors just use the color name as the array.

Secondly /anything after a forward slash cannot be detected through triggers in multiplayer.

The triggering needs MUCH work and the system requires the player to loose all control of everything when they enter chat.
+Costs a import.

You don't need to tell every little thing you are doing in your triggers. It's like creating a unit and saying "Create the unit..."
("Remove the leaks")
Using Integer A/B is a big no no, use a integer variable

This spell is rejected until the required changes are applied.

You are the moderator that I needed really.. :D thnks for your reports.. But I can't fix them all now.. My PC is now broken currently... R.I.P
:goblin_cry:
 
Top