Commands with substring not working

D

DsD)Core(

Guest
The general message does appear, but the subchecks for specific commands don't. What am I doing wrong? Thanks..

Code:
Cmd Admin
    Events
        Player - Player 1 (Red) types a chat message containing -timer  as A substring
        Player - Player 1 (Red) types a chat message containing -gold  as A substring
        Player - Player 1 (Red) types a chat message containing -level  as A substring
    Conditions
        (Name of (Triggering player)) Equal to DsD)Core(
    Actions
        Game - Display to (All players) the text: WARNING: An admin c...
        Wait 2.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Entered chat string) Equal to (Substring(-timer , 1, 7))
                (Entered chat string) Equal to (Substring(lock, 8, (Length of (Entered chat string))))
            Then - Actions
                Set CountDown = 501
                Game - Display to (All players) the text: Timer has been lock...
                Countdown Timer - Destroy (Last created timer window)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Entered chat string) Equal to (Substring(-timer , 1, 7))
                        (Entered chat string) Equal to (Substring(unlock, 8, (Length of (Entered chat string))))
                    Then - Actions
                        Set CountDown = 120
                        Game - Display to (All players) the text: Timer has been unlo...
                        Countdown Timer - Start Countdown as a One-shot timer that will expire in 120.00 seconds
                        Countdown Timer - Create a timer window for Countdown with title |c00FCD116Next roun...
                        Countdown Timer - Show (Last created timer window)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (Entered chat string) Equal to (Substring(-gold , 1, 6))
                            Then - Actions
                                Player - Set Player 1 (Red) Current gold to (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
                                Game - Display to (All players) the text: (You have set your current gold to  + (Substring((Entered chat string), 7, (Length of (Entered chat string)))))
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Entered chat string) Equal to (Substring(-level , 1, 7))
                                    Then - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string)))))) Less than or equal to 25
                                            Then - Actions
                                                Hero - Set (Last created unit) Hero-level to (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string)))))), Show level-up graphics
                                                Game - Display to (All players) the text: (You have set your hero's level to  + (Substring((Entered chat string), 8, (Length of (Entered chat string)))))
                                            Else - Actions
                                                Hero - Set (Last created unit) Hero-level to 25, Show level-up graphics
                                    Else - Actions
                                        Do nothing
 

martix

There is no spoon
Reaction score
49
Generally its not (Entered chat string) Equal to (Substring(-timer , 1, 7)), more like (Substring((Entered chat string), 1, 7)) Equal to -timer.
And um, if I might add something - that trigger is just lame...
I mean what gives? You're making a map, just so you can beat everyone with your custom cheats...
 
D

DsD)Core(

Guest
No lol it's for testing but I wanna keep the command in for every patch to see if items and abilities are working properly so might aswell make a nicely working admin trigger instead of adding and removing a whole mess for every patch.

Thanks btw.
Working, just like you said.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top