PHP Code:
function doMove() {
temp.array = {int(random(1,5)),int(random(1,5)),int(random(1,5))};
move(this.distX[temp.array[0]]*this.dispT[temp.array[2]],this.distY[temp.array[1]]*this.dispT[temp.array[2]],this.dispT[temp.array[2]],20);
if (this.distX[temp.array[0]]==this.distY[temp.array[1]]==0) {
dir = int(random(0,3));
if (this.ani != "idle") {
setcharani("idle",null);
}
sleep(this.dispT[temp.array[2]]);
}else{
if (this.ani != "walk") {
setcharani("walk",null);
}
}
}
for example ;o