Heres a snippit of how I time everything
Code:if (A.User._roomID != 7 && A.User.roomUser.Y != 10 && A.User.roomUser.X != 8) { A.User._JailBreaking = false; } if (A.User._JailBreaking) { A.User.JBTime++; if (A.User.JBTime == 60) { sendSaying(A.User.roomUser, "*needs 3 more minutes to break down the jailcell wall*"); } if (A.User.JBTime == 120) { sendSaying(A.User.roomUser, "*needs 2 more minutes to break down the jailcell wall*"); } if (A.User.JBTime == 180) { sendSaying(A.User.roomUser, "*needs 1 more minutes to break down the jailcell wall*"); } if (A.User.JBTime == 240) { sendSaying(A.User.roomUser, "*successfully breaks down the jailcell wall freeing everyone inside*"); userManager.JailBreak(); A.User._JailBreaking = false; } }
Seems alright, I do it a tad similar, but I'll give you a tip on how I do it, I don't just manage the one timer, I manage turf, jailbreak and game flags together - since I put the timer into one. - You could do the same, it's much easier on yourself.
Little example:
Code:
User._gangclaim -= 1;
if (User._OnTrigger == "turf")
User.Room.sendSaying(User.roomUser, "*Needs " + User._gangclaim + " more minutes to claim this area*");
if (User._OnTrigger == "jailbreak")
User.Room.sendSaying(User.roomUser, "*Needs " + User._gangclaim + " more minutes to knock through the wall*");
if (User._OnTrigger == "Pinkflag" || User._OnTrigger == "Redflag" || User._OnTrigger == "Blueflag" || User._OnTrigger == "Greenflag")
User.Room.sendSaying(User.roomUser, "*Needs " + User._gangclaim + " more minutes to capture the flag*");
And you can probably guess the rest ;-P!