Moderator
M
Moderator
4th Dec 2015
IcemanBo: Posted in thread.
IcemanBo: Posted in thread.
JSL Configuration
- JSL Configuration
- Events
- Map initialization
- Conditions
- Actions
- -------- ==================== JS's Letter Shouting/Binding , version 1.0.3b. ================== --------
- -------- ======================================== HASHTABLE SECTION ====================================== --------
- -------- JSL's Hashtable, it is important to store bound texts (saved texts) according to every player. --------
- Hashtable - Create a hashtable
- Set JSL_Hashtable = (Last created hashtable)
- -------- JSL's Hashtable2, it is surely important to save floating texts of units according to the owner player without overwritting the first hashtable's child keys. --------
- Hashtable - Create a hashtable
- Set JSL_Hashtable2 = (Last created hashtable)
- -------- JSL's Hashtable3, very useful to index units according to the owner player without using UserData (Custom value) and without overwritting other hashtables' child keys. --------
- Hashtable - Create a hashtable
- Set JSL_Hashtable3 = (Last created hashtable)
- -------- --------
- -------- ======================================== GENERAL SECTION ====================================== --------
- -------- The minmum interval is the minimum time to jump from a letter to other. --------
- -------- The maximum interval is the maximum time to jump from a letter to other. --------
- -------- With Min and Max intervals, robo-texts will look realistic. Whereas also they determine the speed of the robo-texting. --------
- Set JSL_GeneralMinInterval = 0.03
- Set JSL_GeneralMaxInterval = 0.10
- -------- --------
- -------- Set this to TRUE if you want to play typing-SFXs along with the robo-text. --------
- Set JSL_SoundEffectMode = True
- -------- --------
- -------- If you notice some |r symbol flashing at the end of the message everytime, try to change this magical variable by 2 (Either increase by 2 or decrease). See if anything changes #NO GUARANTEE# --------
- -------- You can add 2, 4, 6, 8 or substract 2 or 4. The reason you should add only multipliers of 2 because the |r symbol contains two letters. I suggest trying to substract first. --------
- -------- You may like to know the reason of this. The reason is the colour checking algorithm. Everytime a colour is added, there must be a |r added to the end of the message too, so this depends on how many colours are added. --------
- -------- NOTE : Don't adjust this to a value that's under 2 ! --------
- Set JSL_BugSafetyInteger = 3
- -------- --------
- -------- ======================================== BIND MODE SECTION ====================================== --------
- -------- Bind mode is basically the mode, when players bind a key, a string will be bound to it so they won't need to type it again. --------
- -------- Available Bind Keys are : ESC - Arrow Keys and single letters (Numbers or Langage Letters) --------
- -------- NOTE : Bind Mode doesn't work if Shout_Mode is OFF ! --------
- -------- NOTE : Unbind command won't work if this is OFF, obviously. --------
- Set JSL_BindMode = True
- -------- --------
- -------- ======================================== SHOUT MODE SECTION ====================================== --------
- -------- A simple sample, let's assume ShoutTitle = "Shouts", when someone drops a message, it'll be shown "Player 1 Shouts :" as either a floating text or a game-message text. (Following options to configure each) --------
- -------- Shout Mode. It's basically the operation of showing chat texts as robo-texts to take attention. --------
- -------- Since there is no action to type a message in chat. Shout Mode will work as either a "Game message" or a "Floating Text" above the unit you want. --------
- Set JSL_ShoutMode = True
- -------- --------
- -------- Set this to true if you want the floating text mode ON. [][] NOTE : This won't work if the ShoutMode is set OFF. --------
- Set JSL_ShoutFloatingTextMode = True
- -------- --------
- -------- Set this to true if you want the game text mode ON. [][] NOTE : This won't work if ShoutMode is OFF. --------
- Set JSL_ShoutGameTextMode = True
- -------- --------
- -------- The shout title (verb) is the title that is shown after the player name and before the ":" comma --------
- -------- A simple sample, let's assume ShoutTitle = "Shouts", when someone drops a message, it'll be shown "Player 1 Shouts :" --------
- Set JSL_ShoutTitle = Shouts
- -------- --------
- -------- This is a variable to set the time that the text takes to disappear. Unfortunately it uses integers. --------
- -------- If both Floating-Text and Game-text are on, then 1 = 1 second. --------
- -------- If either Floating text mode or game text mode is on (not both), then 1 = 0.5 second. --------
- Set JSL_ShoutingTextLength = 4
- -------- --------
- -------- ======================================== QUEST MODE SECTION ====================================== --------
- -------- This variable is about how long the quest text lasts after it's fully shown. The higher this is , the faster the quest text gets hidden. --------
- -------- The mystery beyond this, is that the length of the quest message (Unit : number of letters) will be divided by this variable. --------
- -------- Which also means this will make the message auto-timed, but according to a factor that makes it longer or shorter. --------
- Set JSL_QuestTextDurationFactor = 24.00
JSL Setup
- JSL Setup
- Events
- Map initialization
- Conditions
- Actions
- -------- It's recommended not to touch any of these as they will affect the use of the system. --------
- -------- Setting that all buttons are of course unbound, otherwise, if you set this to true, a player can shout a void/empty/blank message. --------
- For each (Integer A) from 1 to 200, do (Actions)
- Loop - Actions
- Set JSL_ButtonIsUnbound[(Integer A)] = True
- -------- Setting Players' colors. --------
- Set JSL_PlayersColors[1] = |c00FF0303
- Set JSL_PlayersColors[2] = |c000042FF
- Set JSL_PlayersColors[3] = |c001CE6B9
- Set JSL_PlayersColors[4] = |c00540081
- Set JSL_PlayersColors[5] = |c00FFFC01
- Set JSL_PlayersColors[6] = |c00FEBA0E
- Set JSL_PlayersColors[7] = |c0020C000
- Set JSL_PlayersColors[8] = |c00E55BB0
- Set JSL_PlayersColors[9] = |c00959697
- Set JSL_PlayersColors[10] = |c007EBFF1
- Set JSL_PlayersColors[11] = |c00106246
- Set JSL_PlayersColors[12] = |c004E2A04
- -------- Settings Letters as numbers. [[ THIS IS NOT INCLUDED IN THIS VERSION YET. SOON IT'LL BE SUPPORTED ]] --------
- Set JSL_Letters = abcdefghijklmnopqrstuvwxyz1234567890
- For each (Integer A) from 1 to 26, do (Actions)
- Loop - Actions
- Hashtable - Save (Substring(JSL_Letters, (Integer A), (Integer A))) as (Integer A) of 13 in JSL_Hashtable
- -------- So this is to store colours as "hex codes", each color has an array that determines it. --------
- Set JSL_ColourEnglish[0] = WHITE
- Set JSL_ColourEnglish[1] = RED
- Set JSL_ColourEnglish[2] = BLUE
- Set JSL_ColourEnglish[3] = TEAL
- Set JSL_ColourEnglish[4] = PURPLE
- Set JSL_ColourEnglish[5] = YELLOW
- Set JSL_ColourEnglish[6] = ORANGE
- Set JSL_ColourEnglish[7] = GREEN
- Set JSL_ColourEnglish[8] = PINK
- Set JSL_ColourEnglish[9] = GRAY
- Set JSL_ColourEnglish[10] = CYAN
- Set JSL_ColourEnglish[11] = DRKGRN
- Set JSL_ColourEnglish[12] = BROWN
- Set JSL_ColourEnglish[13] = BLACK
- Set JSL_ColourHexed[0] = |c00FFFFFF
- Set JSL_ColourHexed[1] = |c00FF0303
- Set JSL_ColourHexed[2] = |c000042FF
- Set JSL_ColourHexed[3] = |c001CE6B9
- Set JSL_ColourHexed[4] = |c00540081
- Set JSL_ColourHexed[5] = |c00FFFC01
- Set JSL_ColourHexed[6] = |c00FEBA0E
- Set JSL_ColourHexed[7] = |c0020C000
- Set JSL_ColourHexed[8] = |c00E55BB0
- Set JSL_ColourHexed[9] = |c00959697
- Set JSL_ColourHexed[10] = |c007EBFF1
- Set JSL_ColourHexed[11] = |c00106246
- Set JSL_ColourHexed[12] = |c004E2A04
- Set JSL_ColourHexed[13] = |c00000000
JSL Binding Trigger
- JSL Binding Trigger
- Events
- Player - Player 1 (Red) types a chat message containing -bind as A substring
- Player - Player 2 (Blue) types a chat message containing -bind as A substring
- Player - Player 3 (Teal) types a chat message containing -bind as A substring
- Player - Player 4 (Purple) types a chat message containing -bind as A substring
- Player - Player 5 (Yellow) types a chat message containing -bind as A substring
- Player - Player 6 (Orange) types a chat message containing -bind as A substring
- Player - Player 7 (Green) types a chat message containing -bind as A substring
- Player - Player 8 (Pink) types a chat message containing -bind as A substring
- Player - Player 9 (Gray) types a chat message containing -bind as A substring
- Player - Player 10 (Light Blue) types a chat message containing -bind as A substring
- Player - Player 11 (Dark Green) types a chat message containing -bind as A substring
- Player - Player 12 (Brown) types a chat message containing -bind as A substring
- Conditions
- JSL_BindMode Equal to True
- Actions
- -------- Storing player's number to avoid calling it repeatedly. --------
- Set JSL_PNi = (Player number of (Triggering player))
- -------- The Conditions simply introduce : - Detecting which key the text is bound to. - --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 7, 9)) Equal to esc
- Then - Actions
- -------- The "esc" button is called by the integer 100. So everything with the number 100 has to do something with "esc" button. --------
- -------- Storing the entered chat string as 100 in the hashtable. 100 means "esc", it's just impossible to store something under a string key. Keys are integers. --------
- Hashtable - Save (Substring((Entered chat string), 10, (Length of (Entered chat string)))) as 100 of JSL_PNi in JSL_Hashtable
- -------- Setting how long the entered string is. --------
- Set JSL_SM_RoboFullInteger[JSL_PNi] = ((Length of (Entered chat string)) - 9)
- -------- Storing the length of the chat string in the hashtable. --------
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 300 of JSL_PNi in JSL_Hashtable
- -------- Setting the key to "bound". Since it's already bound with some text. --------
- Set JSL_ButtonIsUnbound[100] = False
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 7, 8)) Equal to Up
- Then - Actions
- -------- So everything done with the "esc" button is repeated here. Nothing's new. Just new button integers. --------
- Hashtable - Save (Substring((Entered chat string), 9, (Length of (Entered chat string)))) as 101 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = ((Length of (Entered chat string)) - 8)
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 301 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[101] = False
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 7, 12)) Equal to Right
- Then - Actions
- Hashtable - Save (Substring((Entered chat string), 13, (Length of (Entered chat string)))) as 102 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = ((Length of (Entered chat string)) - 12)
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 302 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[102] = False
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 7, 11)) Equal to Left
- Then - Actions
- Hashtable - Save (Substring((Entered chat string), 12, (Length of (Entered chat string)))) as 103 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = ((Length of (Entered chat string)) - 11)
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 303 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[103] = False
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 7, 11)) Equal to Down
- Then - Actions
- Hashtable - Save (Substring((Entered chat string), 12, (Length of (Entered chat string)))) as 104 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = ((Length of (Entered chat string)) - 11)
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 304 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[104] = False
- Else - Actions
- For each (Integer A) from 1 to 26, do (Actions)
- Loop - Actions
JSL Unbinding Trigger
- JSL Unbinding Trigger
- Events
- Player - Player 1 (Red) types a chat message containing -unbind as A substring
- Player - Player 2 (Blue) types a chat message containing -unbind as A substring
- Player - Player 3 (Teal) types a chat message containing -unbind as A substring
- Player - Player 4 (Purple) types a chat message containing -unbind as A substring
- Player - Player 5 (Yellow) types a chat message containing -unbind as A substring
- Player - Player 6 (Orange) types a chat message containing -unbind as A substring
- Player - Player 7 (Green) types a chat message containing -unbind as A substring
- Player - Player 8 (Pink) types a chat message containing -unbind as A substring
- Player - Player 9 (Gray) types a chat message containing -unbind as A substring
- Player - Player 10 (Light Blue) types a chat message containing -unbind as A substring
- Player - Player 11 (Dark Green) types a chat message containing -unbind as A substring
- Player - Player 12 (Brown) types a chat message containing -unbind as A substring
- Conditions
- JSL_BindMode Equal to True
- (Substring((Entered chat string), 1, 7)) Equal to -unbind
- Actions
- Set JSL_PNi = (Player number of (Triggering player))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 9, 11)) Equal to esc
- Then - Actions
- Hashtable - Save <Empty String> as 100 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = 0
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 300 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[100] = True
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 9, 10)) Equal to Up
- Then - Actions
- Hashtable - Save <Empty String> as 101 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = 0
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 301 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[101] = True
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 9, 14)) Equal to Right
- Then - Actions
- Hashtable - Save <Empty String> as 102 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = 0
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 302 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[102] = True
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 9, 13)) Equal to Left
- Then - Actions
- Hashtable - Save <Empty String> as 103 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = 0
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 303 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[103] = True
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring((Entered chat string), 9, 13)) Equal to Down
- Then - Actions
- Hashtable - Save <Empty String> as 104 of JSL_PNi in JSL_Hashtable
- Set JSL_SM_RoboFullInteger[JSL_PNi] = 0
- Hashtable - Save JSL_SM_RoboFullInteger[JSL_PNi] as 304 of JSL_PNi in JSL_Hashtable
- Set JSL_ButtonIsUnbound[104] = True
- Else - Actions
JSL Responding to ESC
- JSL Responding to ESC
- Events
- Player - Player 1 (Red) skips a cinematic sequence
- Player - Player 2 (Blue) skips a cinematic sequence
- Player - Player 3 (Teal) skips a cinematic sequence
- Player - Player 4 (Purple) skips a cinematic sequence
- Player - Player 5 (Yellow) skips a cinematic sequence
- Player - Player 6 (Orange) skips a cinematic sequence
- Player - Player 7 (Green) skips a cinematic sequence
- Player - Player 8 (Pink) skips a cinematic sequence
- Player - Player 9 (Gray) skips a cinematic sequence
- Player - Player 10 (Light Blue) skips a cinematic sequence
- Player - Player 11 (Dark Green) skips a cinematic sequence
- Player - Player 12 (Brown) skips a cinematic sequence
- Conditions
- JSL_BindMode Equal to True
- JSL_ShoutMode Equal to True
- JSL_IsShouting[(Player number of (Triggering player))] Equal to False
- JSL_ButtonIsUnbound[100] Equal to False
- Actions
- -------- Storing player number in order to use it several times. --------
- Set JSL_PNi = (Player number of (Triggering player))
- -------- Setting which key has been used, in this case it's "esc" that has the number 100. --------
- Set JSL_TappedKey[JSL_PNi] = 100
- -------- Saving the bound text temporarily in order to not overwrite the original one , thus colour tags remain the same everytime. --------
- Hashtable - Save (Load JSL_TappedKey[JSL_PNi] of JSL_PNi from JSL_Hashtable) as JSL_TappedKey[JSL_PNi] of (JSL_PNi + 20) in JSL_Hashtable
- -------- Setting from which letter to start the chat string robo-texting. --------
- Set JSL_SM_RoboInteger[JSL_PNi] = 1
- -------- Calling the length of the chat string that's bound to "echap" button. --------
- Set JSL_SM_RoboFullInteger[JSL_PNi] = (Load 300 of JSL_PNi from JSL_Hashtable)
- -------- Setting that the player is actually shouting now. --------
- Set JSL_IsShouting[JSL_PNi] = True
- -------- Adding the player to ShoutingGroup, thus the robo-texting starts. --------
- Player Group - Add (Triggering player) to JSL_ShoutingPlayers
JSL Responding to ArrowUp
- JSL Responding to ArrowUp
- Events
- Player - Player 1 (Red) Presses the Up Arrow key
- Player - Player 2 (Blue) Presses the Up Arrow key
- Player - Player 3 (Teal) Presses the Up Arrow key
- Player - Player 4 (Purple) Presses the Up Arrow key
- Player - Player 5 (Yellow) Presses the Up Arrow key
- Player - Player 6 (Orange) Presses the Up Arrow key
- Player - Player 7 (Green) Presses the Up Arrow key
- Player - Player 8 (Pink) Presses the Up Arrow key
- Player - Player 9 (Gray) Presses the Up Arrow key
- Player - Player 10 (Light Blue) Presses the Up Arrow key
- Player - Player 11 (Dark Green) Presses the Up Arrow key
- Player - Player 12 (Brown) Presses the Up Arrow key
- Conditions
- JSL_BindMode Equal to True
- JSL_ShoutMode Equal to True
- JSL_IsShouting[(Player number of (Triggering player))] Equal to False
- JSL_ButtonIsUnbound[101] Equal to False
- Actions
- -------- Everything in "JSL Responding to esc" trigger is similar to this one. --------
- Set JSL_PNi = (Player number of (Triggering player))
- Set JSL_TappedKey[JSL_PNi] = 101
- Hashtable - Save (Load JSL_TappedKey[JSL_PNi] of JSL_PNi from JSL_Hashtable) as JSL_TappedKey[JSL_PNi] of (JSL_PNi + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PNi] = 1
- Set JSL_SM_RoboFullInteger[JSL_PNi] = (Load 301 of JSL_PNi from JSL_Hashtable)
- Set JSL_IsShouting[JSL_PNi] = True
- Player Group - Add (Triggering player) to JSL_ShoutingPlayers
JSL Responding to ArrowRight
- JSL Responding to ArrowRight
- Events
- Player - Player 1 (Red) Presses the Right Arrow key
- Player - Player 2 (Blue) Presses the Right Arrow key
- Player - Player 3 (Teal) Presses the Right Arrow key
- Player - Player 4 (Purple) Presses the Right Arrow key
- Player - Player 5 (Yellow) Presses the Right Arrow key
- Player - Player 6 (Orange) Presses the Right Arrow key
- Player - Player 7 (Green) Presses the Right Arrow key
- Player - Player 8 (Pink) Presses the Right Arrow key
- Player - Player 9 (Gray) Presses the Right Arrow key
- Player - Player 10 (Light Blue) Presses the Right Arrow key
- Player - Player 11 (Dark Green) Presses the Right Arrow key
- Player - Player 12 (Brown) Presses the Right Arrow key
- Conditions
- JSL_BindMode Equal to True
- JSL_ShoutMode Equal to True
- JSL_IsShouting[(Player number of (Triggering player))] Equal to False
- JSL_ButtonIsUnbound[102] Equal to False
- Actions
- -------- Everything in "JSL Responding to esc" trigger is similar to this one. --------
- Set JSL_PNi = (Player number of (Triggering player))
- Set JSL_TappedKey[JSL_PNi] = 102
- Hashtable - Save (Load JSL_TappedKey[JSL_PNi] of JSL_PNi from JSL_Hashtable) as JSL_TappedKey[JSL_PNi] of (JSL_PNi + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PNi] = 1
- Set JSL_SM_RoboFullInteger[JSL_PNi] = (Load 302 of JSL_PNi from JSL_Hashtable)
- Set JSL_IsShouting[JSL_PNi] = True
- Player Group - Add (Triggering player) to JSL_ShoutingPlayers
JSL Responding to ArrowLeft
- JSL Responding to ArrowLeft
- Events
- Player - Player 1 (Red) Presses the Left Arrow key
- Player - Player 2 (Blue) Presses the Left Arrow key
- Player - Player 3 (Teal) Presses the Left Arrow key
- Player - Player 4 (Purple) Presses the Left Arrow key
- Player - Player 5 (Yellow) Presses the Left Arrow key
- Player - Player 6 (Orange) Presses the Left Arrow key
- Player - Player 7 (Green) Presses the Left Arrow key
- Player - Player 8 (Pink) Presses the Left Arrow key
- Player - Player 9 (Gray) Presses the Left Arrow key
- Player - Player 10 (Light Blue) Presses the Left Arrow key
- Player - Player 11 (Dark Green) Presses the Left Arrow key
- Player - Player 12 (Brown) Presses the Left Arrow key
- Conditions
- JSL_BindMode Equal to True
- JSL_ShoutMode Equal to True
- JSL_IsShouting[(Player number of (Triggering player))] Equal to False
- JSL_ButtonIsUnbound[103] Equal to False
- Actions
- -------- Everything in "JSL Responding to esc" trigger is similar to this one. --------
- Set JSL_PNi = (Player number of (Triggering player))
- Set JSL_TappedKey[JSL_PNi] = 103
- Hashtable - Save (Load JSL_TappedKey[JSL_PNi] of JSL_PNi from JSL_Hashtable) as JSL_TappedKey[JSL_PNi] of (JSL_PNi + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PNi] = 1
- Set JSL_SM_RoboFullInteger[JSL_PNi] = (Load 303 of JSL_PNi from JSL_Hashtable)
- Set JSL_IsShouting[JSL_PNi] = True
- Player Group - Add (Triggering player) to JSL_ShoutingPlayers
JSL Responding to ArrowDown
- JSL Responding to ArrowDown
- Events
- Player - Player 1 (Red) Presses the Down Arrow key
- Player - Player 2 (Blue) Presses the Down Arrow key
- Player - Player 3 (Teal) Presses the Down Arrow key
- Player - Player 4 (Purple) Presses the Down Arrow key
- Player - Player 5 (Yellow) Presses the Down Arrow key
- Player - Player 6 (Orange) Presses the Down Arrow key
- Player - Player 7 (Green) Presses the Down Arrow key
- Player - Player 8 (Pink) Presses the Down Arrow key
- Player - Player 9 (Gray) Presses the Down Arrow key
- Player - Player 10 (Light Blue) Presses the Down Arrow key
- Player - Player 11 (Dark Green) Presses the Down Arrow key
- Player - Player 12 (Brown) Presses the Down Arrow key
- Conditions
- JSL_BindMode Equal to True
- JSL_ShoutMode Equal to True
- JSL_IsShouting[(Player number of (Triggering player))] Equal to False
- JSL_ButtonIsUnbound[104] Equal to False
- Actions
- -------- Everything in "JSL Responding to esc" trigger is similar to this one. --------
- Set JSL_PNi = (Player number of (Triggering player))
- Set JSL_TappedKey[JSL_PNi] = 104
- Hashtable - Save (Load JSL_TappedKey[JSL_PNi] of JSL_PNi from JSL_Hashtable) as JSL_TappedKey[JSL_PNi] of (JSL_PNi + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PNi] = 1
- Set JSL_SM_RoboFullInteger[JSL_PNi] = (Load 304 of JSL_PNi from JSL_Hashtable)
- Set JSL_IsShouting[JSL_PNi] = True
- Player Group - Add (Triggering player) to JSL_ShoutingPlayers
JSL Responding to Any Message
- JSL Responding to any message
- 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
- (Length of (Entered chat string)) Greater than or equal to 1
- JSL_IsShouting[(Player number of (Triggering player))] Equal to False
- (Substring((Entered chat string), 1, 5)) Not equal to -bind
- (Substring((Entered chat string), 1, 7)) Not equal to -unbind
- Actions
- -------- ---- Storing (Chat-Submitting Player) which is (Triggering Player) in a variable to use it several times ----- --------
- Set JSL_PNi = (Player number of (Triggering player))
- -------- ---- Storing the entered message to use it in this trigger many times ---- --------
- Set JSL_SM_TempoMessage = (Entered chat string)
- -------- Now this trigger is not responding to any key. This is just a trigger to responde to a submitted message, that means no key is used, we use the "0" value in this case. --------
- Set JSL_TappedKey[JSL_PNi] = 0
- -------- Calling the chat string length. --------
- Set JSL_SM_RoboFullInteger[JSL_PNi] = (Length of JSL_SM_TempoMessage)
- -------- Which letter to start robo-texting from. Now this will detect the "-unrobo" command at the end of the message. If it really exists, no robo-texting will even occur. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Substring(JSL_SM_TempoMessage, ((Length of JSL_SM_TempoMessage) - 6), (Length of JSL_SM_TempoMessage))) Equal to -unrobo
- Then - Actions
- -------- --- The actions below will run only if the -unrobo command is detected at the end of the message. --------
- -------- Now since -unrobo contains 7 letters. We'll substract 6 letters from the length of the chat string (Uncounting the last letter). --------
- Set JSL_SM_RoboInteger[JSL_PNi] = ((Length of JSL_SM_TempoMessage) - 6)
- -------- Now storing our final-ready message without that -unrobo command in a temporary string variable that'll be also stored later in the hashtable. --------
- Set JSL_SM_TempoMessage = (Substring(JSL_SM_TempoMessage, 1, ((Length of JSL_SM_TempoMessage) - 6)))
- Else - Actions
- -------- The action below will run only if no -unrobo command is detected. --------
- -------- This variable represents which letter the system should start robo-ing the text from. --------
- Set JSL_SM_RoboInteger[JSL_PNi] = 1
- -------- Saving the entered text as "0" (no button) in the first hashtable. --------
- Hashtable - Save JSL_SM_TempoMessage as 0 of JSL_PNi in JSL_Hashtable
- -------- Calling that the player started shouting. --------
- Set JSL_IsShouting[JSL_PNi] = True
- Player Group - Add (Triggering player) to JSL_ShoutingPlayers
JSL Shouting Refresher
- JSL Shouting Refresher
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- JSL_ShoutMode Equal to True
- Actions
- -------- NOTE : This trigger works simulatineously with "JSL Shouting Show" trigger. If one of them is off, the system won't be able to work properly (It won't even work). --------
- -------- This trigger works in two phases. First , it refreshes every message that's currently being robo-ed, and detecting whether it reached the last letter or not. --------
- -------- . It also randomizes that small period to jump from a letter to another (The first picking loop). --------
- -------- The second picking loop is just to increase time variable for those whose messages have finished being shown. That's just to auto-time the message. --------
- Player Group - Pick every player in JSL_ShoutingPlayers and do (Actions)
- Loop - Actions
- -------- --- First of all of course, we store the player number. ---- --------
- Set JSL_PlayerTempInteger = (Player number of (Picked player))
- -------- ---- Increasing time variable ---- --------
- Set JSL_ShoutingReal[JSL_PlayerTempInteger] = (JSL_ShoutingReal[JSL_PlayerTempInteger] + 0.01)
- -------- --- Randomizing a time variable between the min and max interval to jump from a letter to another. ----- --------
- Set JSL_GeneralRandomer = (Random real number between JSL_GeneralMinInterval and JSL_GeneralMaxInterval)
- -------- Now since we have an increasing counting time variable. We'll see if it reaches the randomized interval or not, if not, we'll just keep the last string as it is. If it's reached, we show one additional letter. --------
- -------- The condition below represents what's explained in the previous line. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingReal[JSL_PlayerTempInteger] Less than or equal to JSL_GeneralRandomer
- Then - Actions
- -------- These actions will run only if the time isn't up yet to add a new letter. Which means we refresh the message again. --------
- -------- Running colour-checking algorithms for the first colour tag in the very beginning of the sentence. This is just to read colour tags that are put in the first of the sentence. --------
- -------- === Starting Color tags analyzing algorithm, this is not really heavy , nor complicated. It works well with a periodic trigger ==== --------
- -------- Checking just for "RED" Colour (since it contains 3 letters, it's the only one that will run under the loop below) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 4)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- -------- This will only run if the #COLOURTAG# is detected. --------
- -------- Adding seven additional letters to Text Length, because we'll add |r in the end. --------
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- -------- Dividing the message to a string that's before the colour tag, a string that's after the colour tag, and a full string that compiles 'em all. --------
- -------- Before-the-colour-tag string. --------
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- -------- After-the-colour-tag string. --------
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 5), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- -------- Compiling everything, +including the colour hex code. --------
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- -------- Saving the final string, to refresh it later. --------
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- -------- Adding 10 to RoboInteger since there are 10 letters in a colour hex code. --------
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- Four letters Colours (Blue, Pink, Teal, Cyan, Gray) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 5)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 6), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- Five Letter Colours(BROWN, GREEN, BLACK, WHITE) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 6)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 7), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- Six Letters Colours (Yellow, Orange, DRKGRN , Purple) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 7)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 8), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- =========== ----- Ending of Colour-Analyzing-Algorithmic Operation ------ ================= --------
- Set JSL_BoundText[JSL_PlayerTempInteger] = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, JSL_SM_RoboInteger[JSL_PlayerTempInteger]))
- -------- Playing some sound , this won't work if SFXMode is off. --------
- If (JSL_SoundEffectMode Equal to True) then do (Sound - Play JSL___Key_Stroke <gen>) else do (Do nothing)
- Else - Actions
- -------- These actions will run only if it's high time to add a new letter. --------
- -------- Increasing letters number by one, which means we add a new letter. --------
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 1)
- -------- === Starting Color tags analyzing algorithm, this is not really heavy , nor complicated. It works well with a periodic trigger ==== --------
- -------- Checking just for "RED" Colour (since it contains 3 letters, it's the only one that will run under the loop below) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 4)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- -------- This will only run if the #COLOURTAG# is detected. --------
- -------- Adding seven additional letters to Text Length, because we'll add |r in the end. --------
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- -------- Dividing the message to a string that's before the colour tag, a string that's after the colour tag, and a full string that compiles 'em all. --------
- -------- Before-the-colour-tag string. --------
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- -------- After-the-colour-tag string. --------
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 5), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- -------- Compiling everything, +including the colour hex code. --------
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- -------- Saving the final string, to refresh it later. --------
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- -------- Adding 10 to RoboInteger since there are 10 letters in a colour hex code. --------
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- Four letters Colours (Blue, Pink, Teal, Cyan, Gray) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 5)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 6), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- Five Letter Colours(BROWN, GREEN, BLACK, WHITE) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 6)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 7), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- Six Letters Colours (Yellow, Orange, DRKGRN , Purple) --------
- Set JSL_CAC_TempString = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), JSL_SM_RoboInteger[JSL_PlayerTempInteger], (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 7)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), 1, (JSL_SM_RoboInteger[JSL_PlayerTempInteger] - 1)))
- Set JSL_CAC_TempString3 = (Substring((Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable), (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 8), (JSL_SM_RoboFullInteger[JSL_PlayerTempInteger] - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Hashtable - Save JSL_CAC_TempStringFinal as JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = (JSL_SM_RoboInteger[JSL_PlayerTempInteger] + 10)
- Else - Actions
- -------- =========== ----- Ending of Colour-Analyzing-Algorithmic Operation ------ ================= --------
- -------- Now restarting the time variable counter for this trigger. Which means we'll randomize another period to jump from a letter to another in the next instance loop of this trigger. --------
- Set JSL_ShoutingReal[JSL_PlayerTempInteger] = 0.00
- -------- Now the condition below verifies if the last letter is reached or not. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_SM_RoboInteger[JSL_PlayerTempInteger] Greater than JSL_SM_RoboFullInteger[JSL_PlayerTempInteger]
- Then - Actions
- -------- These actions will only run if the last letter is reached (RoboInteger = RoboFullInteger) [NOTE : RoboFullInteger is actually the length of the message called , whether it's bound or just entered in chat] --------
- -------- Playing the end stroke sound effect. Only if SFXMode is on, this works. --------
- If (JSL_SoundEffectMode Equal to True) then do (Sound - Play JSL___Return_SFX <gen>) else do (Do nothing)
- -------- Saving the final full message to refresh it later since it's "finished", it'll be refreshed in another method. It'll no longer be used under that first loop. --------
- Hashtable - Save (Load JSL_TappedKey[JSL_PlayerTempInteger] of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) as 200 of (JSL_PlayerTempInteger + 20) in JSL_Hashtable
- -------- Resetting the RoboInteger to 1, (Bug-safety). --------
- Set JSL_SM_RoboInteger[JSL_PlayerTempInteger] = 1
- -------- Removing the message owner from robo-text messages group. Adding him to another group , which is the group of those whose messages have finished being fully shown. So these messages will be auto-timed. --------
- Player Group - Remove (Picked player) from JSL_ShoutingPlayers
- Player Group - Add (Picked player) to JSL_ShoutingFinishedPlayers
- Else - Actions
- -------- Now the second loop which concerns players whose messages have finally been shown. --------
- Player Group - Pick every player in JSL_ShoutingFinishedPlayers and do (Actions)
- Loop - Actions
- -------- Storing temporarily the player number of picked unit. --------
- Set JSL_PlayerTempInteger = (Player number of (Picked player))
- -------- Increasing time variable by 0.01 (Since the periodic trigger is set to [every 0.01 seconds]). --------
- Set JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] = (JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] + 0.01)
JSL Shouting Show
- JSL Shouting Show
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- JSL_ShoutMode Equal to True
- Actions
- -------- As you can see, there are two conditions below. The first one will check if there is even a ShoutMode enabled, if yes, it'll detect if a quest is currently shown. --------
- -------- Of course, players' messages won't be shown if a quest message is currently shown. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutGameTextMode Equal to True
- JSL_ThereISaQuest Equal to False
- Then - Actions
- -------- Clearing all messages (Unfortunately we can't clear a certain message, which is bad). That's why this affects all other game-messages. We clear message because they'll be refreshed within the next actions periodically. --------
- Cinematic - Clear the screen of text messages for (All players)
- -------- Now there are two player groups, a player group whose texts are currently robo-ed (Shouting Players), and another player group whose texts have been finished robo-ing. --------
- -------- The first group's texts are easy to show. Just show the string that's being refreshed in "JSL Shouting Refresher". --------
- Player Group - Pick every player in JSL_ShoutingPlayers and do (Actions)
- Loop - Actions
- Set JSL_PlayerTempInteger = (Player number of (Picked player))
- -------- The condition below is just to check if the player's message is currently being robo-ed or not. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_IsShouting[JSL_PlayerTempInteger] Equal to True
- Then - Actions
- Game - Display to (All players) for 0.30 seconds the text: ((((JSL_PlayersColors[JSL_PlayerTempInteger] + (Name of (Picked player))) + |r) + ( Shouts + : )) + JSL_BoundText[JSL_PlayerTempInteger])
- Else - Actions
- -------- Now if you noticed, when some player's text finishes being robo-ed, a point that will be refreshed every 0.5 seconds will be flashing. This is a small operation to do that. Otherwise it'd be simpler. --------
- Player Group - Pick every player in JSL_ShoutingFinishedPlayers and do (Actions)
- Loop - Actions
- Set JSL_PlayerTempInteger = (Player number of (Picked player))
- -------- The JSL_ShoutingFinishedReal is the time elapsed since the game text finished being robo-ed. The real is getting increased in JSL Shouting Refresher trigger. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Less than 0.50
- Then - Actions
- -------- These actions below won't run unless the time elapsed from robo-ing message is lesser than 0.5. A point will be added to the last of the string. --------
- Set JSL_BoundFinishedText[JSL_PlayerTempInteger] = ((((JSL_PlayersColors[JSL_PlayerTempInteger] + (Name of (Picked player))) + |r) + ( Shouts + : )) + ((Load 200 of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) + .))
- Game - Display to (All players) for 0.30 seconds the text: JSL_BoundFinishedText[JSL_PlayerTempInteger]
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Greater than or equal to 0.50
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Less than 1.00
- Then - Actions
- -------- These actions below won't run unless the time elapsed from robo-ing message equals to 0.5 or more, and lesser than 1.0 second. The point added previously will be erased. --------
- Set JSL_BoundFinishedText[JSL_PlayerTempInteger] = ((((JSL_PlayersColors[JSL_PlayerTempInteger] + (Name of (Picked player))) + |r) + ( Shouts + : )) + ((Load 200 of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) + <Empty String>))
- Game - Display to (All players) for 0.30 seconds the text: JSL_BoundFinishedText[JSL_PlayerTempInteger]
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Greater than or equal to 1.00
- Then - Actions
- -------- These actions below won't run unless the time elapsed from robo-ing message equals to 1.0 secondor more.. The point will be added once again. --------
- -------- Resetting the time elapsed until the max resetting integer is reached. (Can be configured). --------
- Set JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] = 0.00
- -------- Saying that the first refreshing of the final message has gone far by one lap. --------
- Set JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] = (JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] + 1)
- -------- The condition below checks if the point that's added in the end of the string has been shown enough or not (It's shown repeatedly every 0.5 seconds of course). --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] Greater than or equal to JSL_ShoutingTextLength
- Then - Actions
- -------- Now the player no longer has a message, his message will be cleared. --------
- -------- First, we remove him from all shouting player groups --------
- Player Group - Remove (Picked player) from JSL_ShoutingFinishedPlayers
- -------- Second, we say that he no longer has a submitted-message that's being either robo-texted or point-added's xD. --------
- Set JSL_IsShouting[(Player number of (Picked player))] = False
- -------- Resetting the default counting real to 0. == NO CHANGE == --------
- Set JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] = 0
- -------- Destroying any floating text that might not be destroyed if the GAME MODE is off due to the operating series of scripting behavior. --------
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_PlayerTempInteger], do (Actions)
- Loop - Actions
- Floating Text - Destroy (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_HashtableIf the label is not found, this function returns NULL.)
- Else - Actions
- -------- This will run if the point can still be shown other times. --------
- Set JSL_BoundFinishedText[JSL_PlayerTempInteger] = ((((JSL_PlayersColors[JSL_PlayerTempInteger] + (Name of (Picked player))) + |r) + ( Shouts + : )) + ((Load 200 of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) + .))
- Game - Display to (All players) for 0.30 seconds the text: JSL_BoundFinishedText[JSL_PlayerTempInteger]
- Else - Actions
- Else - Actions
- -------- As you can see, there is only one condition, because floating texts can be shown while a quest is shown, they don't affect each other. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutFloatingTextMode Equal to True
- Then - Actions
- Player Group - Pick every player in JSL_ShoutingPlayers and do (Actions)
- Loop - Actions
- Set JSL_PlayerTempInteger = (Player number of (Picked player))
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_PlayerTempInteger], do (Actions)
- Loop - Actions
- Set JSL_Temp_U = (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable3)
- Floating Text - Destroy (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2If the label is not found, this function returns NULL.)
- Set JSL_PlayerTempPoint = (Position of JSL_Temp_U)
- Floating Text - Create floating text that reads ((JSL_PlayersColors[JSL_PlayerTempInteger] + JSL_BoundText[JSL_PlayerTempInteger]) + |r) at JSL_PlayerTempPoint with Z offset 160.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Hashtable - Save Handle Of(Last created floating text) as JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2
- Custom script: call RemoveLocation(udg_JSL_PlayerTempPoint)
- Player Group - Pick every player in JSL_ShoutingFinishedPlayers and do (Actions)
- Loop - Actions
- Set JSL_PlayerTempInteger = (Player number of (Picked player))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Less than 0.50
- Then - Actions
- Set JSL_BoundFinishedText[JSL_PlayerTempInteger] = ((Load 200 of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) + .)
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_PlayerTempInteger], do (Actions)
- Loop - Actions
- Set JSL_Temp_U = (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable3)
- Floating Text - Destroy (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2If the label is not found, this function returns NULL.)
- Set JSL_PlayerTempPoint = (Position of JSL_Temp_U)
- Floating Text - Create floating text that reads ((JSL_PlayersColors[JSL_PlayerTempInteger] + JSL_BoundFinishedText[JSL_PlayerTempInteger]) + |r) at JSL_PlayerTempPoint with Z offset 160.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Hashtable - Save Handle Of(Last created floating text) as JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2
- Custom script: call RemoveLocation(udg_JSL_PlayerTempPoint)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Greater than or equal to 0.50
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Less than 1.00
- Then - Actions
- Set JSL_BoundFinishedText[JSL_PlayerTempInteger] = ((Load 200 of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) + <Empty String>)
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_PlayerTempInteger], do (Actions)
- Loop - Actions
- Set JSL_Temp_U = (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable3)
- Floating Text - Destroy (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2If the label is not found, this function returns NULL.)
- Set JSL_PlayerTempPoint = (Position of JSL_Temp_U)
- Floating Text - Create floating text that reads ((JSL_PlayersColors[JSL_PlayerTempInteger] + JSL_BoundFinishedText[JSL_PlayerTempInteger]) + |r) at JSL_PlayerTempPoint with Z offset 160.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Hashtable - Save Handle Of(Last created floating text) as JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2
- Custom script: call RemoveLocation(udg_JSL_PlayerTempPoint)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] Greater than or equal to 1.00
- Then - Actions
- Set JSL_ShoutingFinishedReal[JSL_PlayerTempInteger] = 0.00
- Set JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] = (JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] + 1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] Greater than or equal to JSL_ShoutingTextLength
- Then - Actions
- Player Group - Remove (Picked player) from JSL_ShoutingFinishedPlayers
- Set JSL_IsShouting[(Player number of (Picked player))] = False
- Set JSL_ShoutingFinishedInteger[JSL_PlayerTempInteger] = 0
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_PlayerTempInteger], do (Actions)
- Loop - Actions
- Floating Text - Destroy (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2If the label is not found, this function returns NULL.)
- Else - Actions
- Set JSL_BoundFinishedText[JSL_PlayerTempInteger] = ((Load 200 of (JSL_PlayerTempInteger + 20) from JSL_Hashtable) + .)
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_PlayerTempInteger], do (Actions)
- Loop - Actions
- Set JSL_Temp_U = (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable3)
- Floating Text - Destroy (Load JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2If the label is not found, this function returns NULL.)
- Set JSL_PlayerTempPoint = (Position of JSL_Temp_U)
- Floating Text - Create floating text that reads ((JSL_PlayersColors[JSL_PlayerTempInteger] + JSL_BoundFinishedText[JSL_PlayerTempInteger]) + |r) at JSL_PlayerTempPoint with Z offset 160.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Hashtable - Save Handle Of(Last created floating text) as JSL_Temp_i of JSL_PlayerTempInteger in JSL_Hashtable2
- Custom script: call RemoveLocation(udg_JSL_PlayerTempPoint)
- Else - Actions
- Else - Actions
JSL Indexing Safety
- JSL Indexing Safety
- Events
- Unit - A unit Dies
- Conditions
- Actions
- -------- Storing temporarily the unit's handle, and the number of its owner into a variable. --------
- Set JSL_Temp_U2 = (Triggering unit)
- Set JSL_Temp_i2 = (Player number of (Owner of JSL_Temp_U2))
- -------- There is a certain number of units that have floating texts above them, we'll call their handles till the very last handle with the highest indexer. If the handle ID of the matching unit is higher than the dying's, it'll be decreased. --------
- For each (Integer JSL_Temp_i) from 1 to JSL_FT_Indexer[JSL_Temp_i2], do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_IndexingSafetyBoolean Equal to True
- Then - Actions
- -------- This will run if only the child keys integers of the units are higher than the child key handle of the dying unit. --------
- -------- Giving still-alive units a new handle in the JSL_Hashtable3 that saves floating text units handles. --------
- Hashtable - Save Handle Of(Load JSL_Temp_i of JSL_Temp_i2 in JSL_Hashtable3) as (JSL_Temp_i - 1) of JSL_Temp_i2 in JSL_Hashtable3
- Else - Actions
- -------- Searching for the dying unit's handle in the hashtable. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_Temp_U2 Equal to (Load JSL_Temp_i of JSL_Temp_i2 in JSL_Hashtable3)
- Then - Actions
- -------- Now we'll set the indexing boolean to true which means every unit with a higher child key integer will be re-indexed . --------
- Set JSL_IndexingSafetyBoolean = True
- Else - Actions
- -------- Clearing the very last handle that belongs to the last added unit. --------
- Hashtable - Save Handle OfNo unit as JSL_FT_Indexer[JSL_Temp_i2] of JSL_Temp_i2 in JSL_Hashtable3
- -------- Now we decrease the climax of the highest indexing integer available. --------
- Set JSL_FT_Indexer[JSL_Temp_i2] = (JSL_FT_Indexer[JSL_Temp_i2] - 1)
- -------- So yeah, the unit won't have a handle in the hashtable because its handle is now overwritten by the unit's handle that's added next after it. --------
- -------- Now we reset the indexing-boolean to false, since we are no longer detecting units with higher indexes. --------
- Set JSL_IndexingSafetyBoolean = False
JSL Detect a quest update
- JSL Detect a quest update
- Events
- Game - JSL_QuestDetector becomes Greater than 0.00
- Conditions
- JSL_ThereISaQuest Equal to False
- Actions
- -------- Setting that a new quest has been added. Having this as "FALSE" will not even display the quest message. --------
- Set JSL_ThereISaQuest = True
- -------- Setting that the quest text's letters are shown progressively. --------
- Set JSL_QuestingIsBeingRoboed = True
- -------- Resetting the Quest-Detector Real-Variable to 0.00 to use it later. --------
- Set JSL_QuestDetector = 0.00
JSL Quest Refresher
- JSL Questing Refresher
- Events
- Time - Every 0.01 seconds of game time
- Conditions
- JSL_ThereISaQuest Equal to True
- JSL_QuestingIsBeingRoboed Equal to True
- Actions
- -------- This real variable is a count-up variable. It's just to count the time passed since the last letter is shown. --------
- Set JSL_QuestingReal = (JSL_QuestingReal + 0.01)
- -------- Now randomizing a real variable between the Min and Max refreshing intervals. --------
- Set JSL_GeneralRandomer = (Random real number between JSL_GeneralMinInterval and JSL_GeneralMaxInterval)
- -------- The condition below is to : Detect if it's high time to show a new letter (In case the time reaches the randomized variable above) or just keeping the lastly-shown letter. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_QuestingReal Less than or equal to JSL_GeneralRandomer
- Then - Actions
- -------- The actions below will execute if only the time isn't yet to add a new letter. --------
- -------- =============== COLOUR SHOWING ALGORITHM =============== --------
- -------- Checking just for "RED" Colour (since it contains 3 letters, it's the only one) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 4)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 5), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- Four letters Colours (Blue, Pink, Teal, Cyan, Gray) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 5)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 6), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- Five Letter Colours(BROWN, GREEN, BLACK, WHITE) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 6)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 7), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- Six Letters Colours (Yellow, Orange, DRKGRN , Purple) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 7)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 8), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- =========== ----- Ending of Colour-Analyzing-Algorithmic Operation ------ ================= --------
- -------- Setting the final message to show. --------
- Set JSL_QuestRoboedText = (Substring(JSL_QuestFullText, 1, JSL_QM_RoboInteger))
- -------- Playing sound effects if "SoundEffectMode" is on. --------
- If (JSL_SoundEffectMode Equal to True) then do (Sound - Play JSL___Key_Stroke <gen>) else do (Do nothing)
- Else - Actions
- -------- The actions below will execute if only the time to show a new letter is up. (Which means QuestTimeVariable reached the randomized time variable). --------
- -------- Increasing the RoboInteger by 1, which means showing one additional letter. --------
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 1)
- -------- =============== COLOUR SHOWING ALGORITHM =============== --------
- -------- Checking just for "RED" Colour (since it contains 3 letters, it's the only one) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 4)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 5), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- Four letters Colours (Blue, Pink, Teal, Cyan, Gray) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 5)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 6), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- Five Letter Colours(BROWN, GREEN, BLACK, WHITE) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 6)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 7), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- Six Letters Colours (Yellow, Orange, DRKGRN , Purple) --------
- Set JSL_CAC_TempString = (Substring(JSL_QuestFullText, JSL_QM_RoboInteger, (JSL_QM_RoboInteger + 7)))
- For each (Integer JSL_Temp_i) from 0 to 13, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_CAC_TempString Equal to (# + (JSL_ColourEnglish[JSL_Temp_i] + #))
- Then - Actions
- Set JSL_QM_RoboFullInteger = (JSL_QM_RoboFullInteger + JSL_BugSafetyInteger)
- Set JSL_CAC_TempString2 = (Substring(JSL_QuestFullText, 1, (JSL_QM_RoboInteger - 1)))
- Set JSL_CAC_TempString3 = (Substring(JSL_QuestFullText, (JSL_QM_RoboInteger + 8), (JSL_QM_RoboFullInteger - 0)))
- Set JSL_CAC_TempStringFinal = (JSL_CAC_TempString2 + (JSL_ColourHexed[JSL_Temp_i] + (JSL_CAC_TempString3 + |r)))
- Set JSL_QuestFullText = (JSL_CAC_TempString2 + ((JSL_ColourHexed[JSL_Temp_i] + JSL_CAC_TempString3) + |r))
- Set JSL_QM_RoboInteger = (JSL_QM_RoboInteger + 10)
- Else - Actions
- -------- =========== ----- Ending of Colour-Analyzing-Algorithmic Operation ------ ================= --------
- -------- Resetting the refreshing time because a new letter has been shown. --------
- Set JSL_QuestingReal = 0.00
- -------- The condition below is to : detect if the robo-texter has reached the end of the chat string or not. --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- JSL_QM_RoboInteger Greater than JSL_QM_RoboFullInteger
- Then - Actions
- -------- These actions will only execute if only the last letter has been reached. --------
- -------- Setting that the quest message text is no longer shown progressively (robo-ed). == DO NOT, of course, CHANGE == --------
- Set JSL_QuestingIsBeingRoboed = False
- -------- Setting a timer that will automatically set the life and expiration time of the quest when it finished being robo-ed. --------
- -------- This means that you SHOULDNT CHANGE IT. --------
- Countdown Timer - Start JSL_QuestHiderTimer as a One-shot timer that will expire in ((Real((Length of JSL_QuestFullText))) / 24.00) seconds
- -------- Playing the Sound-Effect of 'RETURN BUTTON' which presents the end of a message. This will work if only the SFX MODE is on. --------
- If (JSL_SoundEffectMode Equal to True) then do (Sound - Play JSL___Return_SFX <gen>) else do (Do nothing)
- -------- Now since there is no Quest message to be robo-ed, then JSL_QuestRoboedText will no longer be used. Instead, JSL_QuestFullText will be used, since it's the original text. --------
- -------- This means that you SHOULDNT CHANGE IT. --------
- Set JSL_QuestFullText = JSL_QuestRoboedText
- Else - Actions
JSL Quest Displayer
- JSL Quest Displayer
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- JSL_ThereISaQuest Equal to True
- Actions
- -------- The quest message will be shown periodically (It's pretty refreshable). You can change how many times the quest message is refreshed, by changing the event's periodic value. --------
- -------- The actions below will only run if there is a quest. --------
- -------- Clearing the quest message, and replacing it with a new one that might have been changed by robo-texting. --------
- Cinematic - Clear the screen of text messages for (All players)
- -------- Now displaying a new one. --------
- Game - Display to (All players) for 0.30 seconds the text: JSL_QuestRoboedText
JSL Quest Hider
- JSL Quest Hider
- Events
- Time - JSL_QuestHiderTimer expires
- Conditions
- Actions
- -------- Now since the quest is auto-timed, a timer has been set before to check how long the quest message will last. This trigger will clear the quest message because it expired. --------
- Cinematic - Clear the screen of text messages for (All players)
- -------- Clearing the string variable. --------
- Set JSL_QuestFullText = <Empty String>
- -------- Resetting the boolean by default. (This booleans lets the Refresher of the quest work if it's set to TRUE). --------
- Set JSL_QuestingIsBeingRoboed = False
- -------- Resetting the first letter to start robo-ing from. == DONT CHANGE == --------
- Set JSL_QM_RoboInteger = 1
- -------- Of course, this real variable is important to detect if a quest is added, we have to set this to 0 , because later you'll set it to 1 if you add a new quest. --------
- -------- This is; in fact, reset earlier, but there are some bugs, which can be prevented by this small line. --------
- Set JSL_QuestDetector = 0.00
- -------- Setting that no quest is being shown. --------
- Set JSL_ThereISaQuest = False
TEST TRIGGER
- This map
- Events
- Time - Elapsed game time is 0.00 seconds
- Conditions
- Actions
- -------- Visibility and Camera view for optimal testing performance. --------
- Camera - Apply This maps camera <gen> for Player 1 (Red) over 0.00 seconds
- Camera - Apply This maps camera <gen> for Player 2 (Blue) over 0.00 seconds
- Visibility - Disable fog of war
- Visibility - Disable black mask
- -------- Indexing units according to their owner, this is the operation that should be done whenever we want an unit to be having a floating text above it. --------
- -------- For each integer trigger to call players from 1 to 12 --------
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- -------- Now we reset the indexer integer. --------
- Set JSL_FT_Indexer[(Integer A)] = 0
- -------- Leak removal for the next unit group picking. --------
- Custom script: set bj_wantDestroyGroup = true
- -------- Now picking the units owned by each player of type HERO , you can filter as much units as you want, in this case I filtered a hero. --------
- Unit Group - Pick every unit in (Units owned by (Player((Integer A))) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
- Loop - Actions
- -------- Increasing the player indexer. --------
- Set JSL_FT_Indexer[(Integer A)] = (JSL_FT_Indexer[(Integer A)] + 1)
- -------- Saving the unit's handle in the hashtable according to the indexer. --------
- Hashtable - Save Handle Of(Picked unit) as JSL_FT_Indexer[(Integer A)] of (Integer A) in JSL_Hashtable3
- -------- The leak of the group is removed previously. --------
- -------- Demo Quest messages. --------
- Set Quester = 0
- Set Quest[0] = Hello and welcome to #ORANGE#Jonhysone's Letter-Questing Messaging System, aka #RED#ROBOTEXTER. #WHITE#This is the best system for many and many and MANY of RPGs.
- Set Quest[1] = Commands : -bind (button) (text). [[EXAMPLE : -bind esc Hello there.]] When you press esc , "Hello there" will be displayed as a game-text and/or as a floating text above your hero/units.
- Set Quest[2] = Allowed buttons are : #RED#ECHAP (ESC) Key & #BLUE#Arrow keys.
- Set Quest[4] = Everything is actually configurable. And you can also add a color tag like this #COLORTAG#(TEXT). #ORANGE#There are 13 colours in total.
- Set Quest[5] = In fact, shouted messages CANNOT be displayed with a quest simulatineously, just to prevent players from spamming messages. However, floating texts will still be displayed.
- Set Quest[6] = This is the bitty truth : You can't make "Gradiently-Coloured" messages, which are most-likely unnecessary.
- Set Quest[7] = You actually can choose whether your text will appear progressively (robo-textedly) or not. You can just add -unrobo in the end of the message. For example "Hello world, -unrobo".
- Set Quest[8] = You can actually add colored schemas to your message. just add the color name before every message. For example "Hello #ReD# there!", eventually it'll be shown like this : Hello #RED#there!
- Set Quest[9] = The colour name must be MAJ not MIN (RED and not red). Otherwise it won't work (Red or ReD won't work too). There must be always the upper case in it.
- Set Quest[10] = As a final note, this system isn't best with every map currently. Since there already is a great chat system in Warcraft. However, if we consider a map like "The Thing" with hidden chat system, this is best for it.
- Set Quest[11] = Please if you find any bug or want an additional option in this system, please contact me on my HIVEWORKSHOP profile : Jonhysone.
- Wait 5.00 seconds
- For each (Integer A) from 0 to 11, do (Actions)
- Loop - Actions
- Set JSL_QuestFullText = Quest[(Integer A)]
- Set JSL_QM_RoboFullInteger = (Length of JSL_QuestFullText)
- Set JSL_QuestDetector = 1.00
- Set Quester = (Quester + 1)
- Wait until (JSL_ThereISaQuest Equal to False), checking every 0.10 seconds
- Wait 6.00 seconds
Preview
Preview2