-
-
Save ffaen/f025276ff9d65f7599dc to your computer and use it in GitHub Desktop.
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
acceptsign: | |
Script: | |
#workaround - cleared at end | |
- '@SETINT $uhc.arrayintwa @uhc.teamready' | |
#if theres nobody in queue or signs disabled, cancel script | |
- '@IF i $uhc.arrayintwa = 0' | |
- '@OR i $uhc.acceptrejectdisable = 1' | |
- '@PLAYER &cCannot do this. Stop spamming the signs or wait for a team to ready.' | |
- '@DELVAR i $uhc.arrayintwa' | |
- '@EXIT' | |
- '@ENDIF' | |
#else, create team and loop through array list, adding each member to unique team id | |
- '@SETINT $uhc.acceptrejectdisable 1' | |
- '@CMDCON createteam' | |
- '@SETINT $uhc.teamaccept @uhc.teamready[0]' | |
- '@SETINT $uhc.teamacceptloop 0' | |
- '@LOOP @<var:$uhc.teamaccept>.playerlist' | |
#below works successfully | |
- '@CMDCON jointeam UHC<var:$uhc.teamcount> @<var:$uhc.teamaccept>.playerlist[<var:$uhc.teamacceptloop>]' | |
#below does NOT works successully | |
- '@TELL @<var:$uhc.teamaccept>.playerlist[<var:$uhc.teamacceptloop>] &bYour unique team ID is &dUHC$uhc.teamcount . &6You are ready to play! GLHF!' | |
#below works successfully | |
- '@CMDCON tp @<var:$uhc.teamaccept>.playerlist[<var:$uhc.teamacceptloop>] -29 204 0' | |
- '@ADDINT $uhc.teamacceptloop 1' | |
- '@ENDLOOP' | |
- '@ADDINT $uhc.teamcount 1' | |
- '@SETINT $<var:$uhc.teamaccept>.state 0' | |
- '@REMLIST @uhc.teamready @uhc.teamready[0]' | |
- '@CMDOP /schem load mce uhc/<var:$uhc.teamaccept>rd' | |
- '@CMDOP /paste -o' | |
- '@PAUSE 5' | |
- '@SETBLOCK 0 $<var:$uhc.teamaccept>.lockloc' | |
- '@CMDOP /schem load mce uhc/<var:$uhc.teamaccept>ur' | |
- '@CMDOP /paste -o' | |
- '@CALL uhc:updatesign' | |
- '@DELVAR i $uhc.acceptrejectdisable' | |
- '@DELVAR i $uhc.arrayintwa' | |
- '@DELVAR i $uhc.teamready' | |
- '@DELVAR i $uhc.teamreadyloop' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment