Last active
June 29, 2016 14:59
-
-
Save goosewoman/7309676 to your computer and use it in GitHub Desktop.
Potion effects display macro script for Macro and Keybinds mod for Minecraft. Usage: bind the script to a button and create a label with the name "effects" without the quotes in the GUI you want it in (ingame probably)
This file contains hidden or 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
$${ | |
UNSAFE(0); | |
DO; | |
&message = ""; | |
FOREACH(effects); | |
IF(EFFECTTIME < 60); | |
#minutes = 0; | |
#seconds = EFFECTTIME; | |
ELSEIF((EFFECTTIME >= 60) && (EFFECTTIME < 120)); | |
#seconds = EFFECTTIME - 60; | |
#minutes = 1; | |
ELSEIF((EFFECTTIME >= 120) && (EFFECTTIME < 180)); | |
#seconds = EFFECTTIME - 120; | |
#minutes = 2; | |
ELSEIF((EFFECTTIME >= 180) && (EFFECTTIME < 240)); | |
#seconds = EFFECTTIME - 180; | |
#minutes = 3; | |
ELSEIF((EFFECTTIME >= 240) && (EFFECTTIME < 300)); | |
#seconds = EFFECTTIME - 240; | |
#minutes = 4; | |
ELSEIF((EFFECTTIME >= 300) && (EFFECTTIME < 360)); | |
#seconds = EFFECTTIME - 300; | |
#minutes = 5; | |
ELSEIF((EFFECTTIME >= 360) && (EFFECTTIME < 420)); | |
#seconds = EFFECTTIME - 360; | |
#minutes = 6; | |
ELSEIF((EFFECTTIME >= 420) && (EFFECTTIME < 480)); | |
#seconds = EFFECTTIME - 420; | |
#minutes = 7; | |
ELSEIF(EFFECTTIME >= 480); | |
#seconds = EFFECTTIME - 480; | |
#minutes = 8; | |
ENDIF; | |
IF(#minutes < 10); | |
&minutes = 0%#minutes% | |
ELSE; | |
&minutes = %#minutes% | |
ENDIF; | |
IF(#seconds < 10); | |
&seconds = 0%#seconds% | |
ELSE; | |
&seconds = %#seconds% | |
ENDIF; | |
&time = %&minutes%:%&seconds%; | |
&message = "%&message% &6%EFFECTNAME% &c%&time%&r\n"; | |
NEXT; | |
SETLABEL("effects",%&message%); | |
WAIT(1); | |
LOOP; | |
ENDUNSAFE; | |
}$$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What does the "UNSAFE (0)" command? Thanks.