Last active
April 26, 2022 00:09
-
-
Save FatsackFails/4ca2b87384468da79f4538255ef3a319 to your computer and use it in GitHub Desktop.
Toggle System for Kruiz Control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Sets toggle01 to off when KC starts up | |
OnInit | |
Variable Set toggle01 false | |
#Send Message to switch toggle01 | |
OnCommand b 0 !toggle | |
Message Send switchToggle | |
#Switches toggle01 on and off | |
OnMessage switchToggle | |
Variable Load toggle01 | |
Function "var toggle = {toggle01};toggle = !toggle;return {result: toggle};" | |
Variable Set toggle01 {result} | |
#Checks to see if toggle01 is on or off | |
OnCommand b 0 !checktoggle | |
Variable Load toggle01 | |
If 2 {toggle01} = false | |
Chat Send "This toggle is off!" | |
exit | |
Chat Send "This toggle is on!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This uses new Actions brought into v1.5.3
The original still works, this just uses newer built in ways to achieve the same thing.