Hey man0rx :_)
I want a void to start off the castlewars game, but I am unsure about how to do it effectively. Because I only want to loop trough the players that stand in the waiting spots, waiting to battle. I dont want to loop trhough all players in the server - how can this be done?
This is what i currently have:
Code:
public void startGame() {
EventManager.getSingleton().addEvent(
new Event() {
public void execute(EventContainer c) {
if (isInZamorakRoomCW && zamorakFigtherCW == 1) {
//Start castlewars game, for the Zamorakian team.
}
else if (isInSaradominRoomCW && saradominFigtherCW == 1) {
//Start castlewars game, for the Saradomin team.
}
// c.stop(); Not needed as we want to keep it running, and repeating.
}
}, 300000); // executes every 300,000 ms = 5 minuttes.
}
but I dont know if this will loop through all players
Any better ideas than this?
I also need a way of counting the players within an area :_)
Will rep !