fixed the style and syntax errors. Here is the timeout
PHP Code:
function onTimeout() {
this.oldplx = player.x;
this.oldply = player.y;
onWalkCheck();
if (player.account == "DrakilorP2P") {
showtext(200, 16, 100, "", "", "Classes: " @ player.joinedclasses);
changeimgvis(200, 4);
}
if (!player.isinclass("player_combat") || !player.isinclass("methods_health")) {
if (player.account == "DrakilorP2P") {
changeimgcolors(200, 1, 0, 0, 1);
}
setTimer(0.05);
return;
}
if (player.account == "DrakilorP2P") {
changeimgcolors(200, 0, 1, 0, 1);
}
if (canAttack()) {
if (keydown(5)) { //S
//if (keydown(6)) { //A
attack();
}
}
if (this.dashFramesLeft > 0) {
if (!onwall2(player.x + vecx(player.dir) * 0.5, player.y + vecy(player.dir) * 0.5, 3, 3)) {
player.x += vecx(player.dir) * 0.5;
player.y += vecy(player.dir) * 0.5;
}
this.dashFramesLeft--;
}
if (this.shakeFramesLeft > 0) {
this.shakeFramesLeft--;
if (this.shakeFramesLeft > 0) {
temp.a = random(0, pi * 2);
temp.r = random(0, 0.25);
setfocus(player.x + cos(temp.a) * temp.r, player.y - sin(temp.a) * temp.r);
} else {
resetfocus();
}
}
setTimer(0.05);
}