mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-06 16:49:07 +00:00
opt-in random events
This commit is contained in:
@@ -61,17 +61,20 @@ public class RandomEventHandler {
|
||||
}
|
||||
|
||||
public static void addRandom(Client player) {
|
||||
if (player.randomActions >= CALL_RANDOM) {
|
||||
callRandom(player);
|
||||
if (player.playerIsBusy() && !player.hasSandwhichLady) {
|
||||
player.getPlayerAssistant().closeAllWindows();
|
||||
if (player.randomToggle)
|
||||
{
|
||||
if (player.randomActions >= CALL_RANDOM) {
|
||||
callRandom(player);
|
||||
if (player.playerIsBusy() && !player.hasSandwhichLady) {
|
||||
player.getPlayerAssistant().closeAllWindows();
|
||||
}
|
||||
} else {
|
||||
int nextRandom = CALL_RANDOM - player.randomActions;
|
||||
if (player.playerRights == 3) {
|
||||
player.getActionSender().sendMessage("Next random will be in " + nextRandom + " more random actions.");
|
||||
}
|
||||
player.randomActions += 1;
|
||||
}
|
||||
} else {
|
||||
int nextRandom = CALL_RANDOM - player.randomActions;
|
||||
if (player.playerRights == 3) {
|
||||
player.getActionSender().sendMessage("Next random will be in " + nextRandom + " more random actions.");
|
||||
}
|
||||
player.randomActions += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user