CatchEvent OnLapperStart() ### Set initial coordinates for Christmas Light buttons GlobalVar $DRorigL; $DRorigL = 178; # Increase / Decrease to move lights left or right GlobalVar $DRorigT; $DRorigT = 28; # Increase / Decrease to move lights up or down GlobalVar $DRWidth; $DRWidth = 7; # Do NOT change (this sets width of the background and the lights) GlobalVar $DRHeight; $DRHeight = 8; # Do NOT change (this sets height of the background and the lights) GlobalVar $DRspacing; $DRspacing = 8; # Do NOT change (this sets spacing of the background and the lights) GlobalVar $DRtime; $DRtime = -1; # Do NOT change (this sets timing of the lights) GlobalVar $DragMode; $DragMode = "off"; #Drag option turned OFF, unless switched on EndCatchEvent CatchEvent OnMSO( $userName, $text ) $idxOfFirtsSpace = indexOf( $text, " "); IF ( $idxOfFirtsSpace == -1 ) THEN $command = $text; $argv = ""; ELSE $command = subStr( $text,0,$idxOfFirtsSpace ); $argv = trim( subStr( $text,$idxOfFirtsSpace ) ); ENDIF SWITCH ( $command) CASE "!drag": CASE "!Drag": CASE "!DRAG": IF ( UserIsAdmin( $userName ) == 1 ) # Use this part (IF-THEN-ELSE-ENDIF statement) if you only want Admin to switch Drag system on THEN SE_DragRace(); # Starts Drag system $DragMode = "drag"; ELSE openPrivButton( "hud_message",74,1,51,5,4,8,0,langEngine( "%{drag_notadmin}%" ) ); ENDIF BREAK; CASE "!dragoff": CASE "!Dragoff": CASE "!DragOff": CASE "!DRAGOFF": IF ( UserIsAdmin( $userName ) == 1 ) # Use this part (IF - ENDIF statement) if you only want Admin to switch Drag system off THEN SE_DragOff(); # Closes Drag system $DragMode = "off"; ELSE openPrivButton( "hud_message",74,1,51,5,4,8,0,langEngine( "%{drag_notadmin}%" ) ); ENDIF BREAK; ENDSWITCH EndCatchEvent Sub SE_DragRace() # A Sinanju Event (opens christmas light cluster) IF ( $DragMode == "drag" ) THEN closeButtonRegex (GetCurrentPlayerVar("UserName"), "drag_*"); # closes Drag system if running, then redraws lights as sometimes light disappear off screen once used openGlobalButton( "drag_backleft",$DRorigL+6,$DRorigT+1,$DRWidth,$DRHeight+50,$DRspacing,$DRtime,32,""); # Left back lightboard openGlobalButton( "drag_backright",$DRorigL+15,$DRorigT+1,$DRWidth,$DRHeight+50,$DRspacing,$DRtime,32,""); # Right back lightboard openGlobalButton( "drag_pslleft1",$DRorigL+1,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Pre-stage lights openGlobalButton( "drag_pslright1",$DRorigL+3,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_pslleft2",$DRorigL+10,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); openGlobalButton( "drag_pslright2",$DRorigL+12,$DRorigT,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_slleft1",$DRorigL+1,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); # Stage lights openGlobalButton( "drag_slright1",$DRorigL+3,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_slleft2",$DRorigL+10,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0•"); openGlobalButton( "drag_slright2",$DRorigL+12,$DRorigT+7,$DRWidth+7,$DRHeight+6,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_cdytleft",$DRorigL,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow top openGlobalButton( "drag_cdytright",$DRorigL+8,$DRorigT+14,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_cdymleft",$DRorigL,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow middle openGlobalButton( "drag_cdymright",$DRorigL+8,$DRorigT+21,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_cdybleft",$DRorigL,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0•"); # Count Down Yellow bottom openGlobalButton( "drag_cdybright",$DRorigL+8,$DRorigT+28,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^0 •"); openGlobalButton( "drag_stleft",$DRorigL,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^6•"); # Start Light openGlobalButton( "drag_stbright",$DRorigL+8,$DRorigT+35,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^6 •"); openGlobalButton( "drag_rpleft",$DRorigL,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^7•"); # Penalty Light openGlobalButton( "drag_rpbright",$DRorigL+8,$DRorigT+42,$DRWidth+12,$DRHeight+11,$DRspacing,$DRtime,0,"^7 •"); ELSE ENDIF EndSub Sub SE_DragOff () # A Sinanju Event (turns drag system off and removes xmas lights from screen) IF ( $DragMode == "Drag" ) THEN closeButtonRegex (GetCurrentPlayerVar("UserName"), "drag_*"); $DragMode = "off"; ELSE ENDIF EndSub Lang "EN" drag_notadmin = "You are not an Admin!"; EndLang