Try multi-dimensional arrays instead.
PHP Code:
temp.myArray = null;
myArray.add({"1", "2", "3"});
myArray.add({"4", "5", "6"});
echo(myArray[0][0]); // echoes 1
echo(myArray[0][2]); // echoes 3
echo(myArray[1][0]); // echoes 4
Then when adding a buff you can do something like
PHP Code:
public function addBuff(skill, time, option) {
player.clientr.buff.add({skill, option, time});
}
and when decreasing the timer
PHP Code:
for (temp.i = player.clientr.buff.size() - 1; i >= 0; i --) {
player.clientr.buff[i][2] -= 1;
if (player.clientr.buff[i][2] <= 0) {
player.client.buff.delete(i); // remove the buff, ≤ 0 time
}
}