I've been using my bot to sort various bits of data into a much more pleasing to look at format that is less of a pain for me to use.
I have most of the scripts written, but, I've hit a wall. The final script that is suppose to take all of the data and sort it before presenting it to me keeps making my bot freeze up.
This is my existing rough draft of the script that keeps breaking
on *:TEXT:!sort:#OuterHeaven: {
write -c RaidStats.txt
var %count 1
while ($lines(wardbreak.txt) != 0) {
if ($read(wardbreak.txt, w, $chr(32) $+ %count) != $null) {
write -il1 RaidStats.txt $read(wardbreak.txt, w, $chr(32) $+ %count)
write -dl $+ $readn wardbreak.txt
}
else {
inc %count
}
}
run C:\Program Files\MIRCTekBot\RaidStats.txt
}The data in the file wardbreak.txt as well as the other files I will be doing the same thing with are stored in a format like this:
[b][url=http://www.nexuswar.com/factions/view.do?factionID=1940]Clothed with Authority[/url][/b] 2
[b][url=http://www.nexuswar.com/factions/view.do?factionID=3260]The Grinning Souls[/url][/b] 1
[b][url=http://www.nexuswar.com/factions/view.do?factionID=30]Acta Sanctorum[/url][/b] 1
[b][url=http://www.nexuswar.com/factions/view.do?factionID=3032]John Brown's Raiding Party[/url][/b] 1
[b][url=http://www.nexuswar.com/factions/view.do?factionID=1604]Zpies[/url][/b] 2
[b][url=http://www.nexuswar.com/factions/view.do?factionID=11]Nordic Avengers[/url][/b] 1
[b][url=http://www.nexuswar.com/factions/view.do?factionID=1652]Forsaken[/url][/b] 4
[b][url=http://www.nexuswar.com/factions/view.do?factionID=36]Magi Anonymous[/url][/b] 1
What I'm trying to do is sort them by the number found at the end of each line - highest numbers at the top - when copying them into another file. My overall goal, as you can most likely guess, is to generate a sorted list I can copy/paste onto a forum.
Never had to go looking for help before, so, I apologize if I am lacking any information that I should have included.