SCRIPT_NAME = "rounds"; SCRIPT_DESC = "Test trigs for next rounds."; SCRIPT_OFF = false; String actions; // EDIT HERE TO CHANGE THE ACTIONS // The actions performed every round, feel free to edit the insides of "" actions = "@scan all;party status short"; // Alternatively comment previous line out and define a macro inside the client: // /macro nextround=whateveryouwant // NOTE: You must have 'battle rounds' enabled for this trigger to work // The colour for the *****:s Color rounds = new Color(0,255,0); ///////////////////////////////////////////////////////////////////////////// // Actual code starts here, only touch if you really know what you're doing // Loads the trigs when starting the client. void bootup() { // The match for line with 53 *:s // Explanation: ^ is beginning of line, $ is the end, [*] is needed because // * is a special character in regexp, and finally {53} for that many *:s. triggerManager.newTrigger("roundtrig", "^[*]{53}", "$"+SCRIPT_NAME+".doRound", //nogag, lite-wholeline, not-a-partial-lite false, true, false, new Color[]{rounds}, Font.PLAIN); clientGUI.printText("general", "LOADED: "+SCRIPT_NAME+" ('$"+SCRIPT_NAME+".help' for more info.)\n"); } void help() { clientGUI.printText("general", "ROUND HELP!\n"); showActions(); clientGUI.printText("general", "Edit the file 'rounds.bcs' to change the actions, "); clientGUI.printText("general", "or clear the rounds with '$"); clientGUI.printText("general", SCRIPT_NAME+".clearActions'\n"); clientGUI.printText("general", "'$"+SCRIPT_NAME+".setActions [actions]' to set new round actions.\n"); } void showActions() { if (actions != null) clientGUI.printText("general", "ACTIONS: '"+actions+"'\n"); else clientGUI.printText("general", "ACTIONS: /nextround\n"); } // Edits the round actions and prints the result. public void setActions() { actions = argument; showActions(); } // Sends the defined commands every round. void doRound() { if (actions == null || "".equals(actions)) clientGUI.doCommand("/nextround"); else clientGUI.doCommand(actions); }