Admittedly, I should probably rewrite this whole thing from scratch and upgrade it to more modern practices (such as hashtables). But this thing is old and I really don't have that kind of time any more. I just want to make a quick upgrade and change the way battle turns are calculated.
I should have been more specific in the op with what I'm wanting to do. I suppose the two options will probably work for me with adjustments, but here's exactly what I want to do.
Currently the RPG bot will start a battle. A player will !enter and it'll add his/her name to a list. When the battle starts, it'll go in the exact order that the people joined. I want to change that to be more based on the character's speeds and reorganize the list every round, adjusting for speed increases/decreases (using items or whatever to increase speed).
Player.pfile
[Battle]
HP=#
MP=#
.
.
.
speed=#
So when a player uses !enter I want it to add it to a list, as before, but then before the thing actually starts it will go through each name on the list, look at each person's speed stat, sort it by fastest to slowest, and generate who goes on which turn based on that.
The hashtable idea will probably work with some adjustments.. I'll try it out and see if I can't learn something new. As I said, it's been a very long time since I messed with mIRC scripting (2006 I think was the last time I touched it and I did even less than what I'm attempting now).
Thanks for the suggestions.
Last edited by Kisuke; 09/01/10 05:18 AM.