I've got this code I've just put togaether and a friend of mine who plays this game with me needs it to pull up some infomation for it with color tags for example:
[Player Name] 555:677 999:677
and since this is a war game those up there would be the cords to that player's (cities) so I made him a bot to allow him to pull up the players cords to their city but he wants it to have color like red for the cords he hasn't attacked yet and green for the ones he has and I've tried to use replace but I'm really rusty at this coding stuff I haven't coded since the msn days.
So;
if (%cc == !cords) && (%c == -a) {
.privmsg $chan Pulling up all the names in my data base...
var %x = 1, %l = $ini($cf,Lords,0),
while (%x <= %l) {
var %n = $ini($cf,Lords,%x), %c = $readini($cf,Lords,%n), %h = $readini($cf,Hits,%n), %c = $replace(%c,%h,9 %h 4)
.timer 1 $calc(%x + 2) /privmsg $chan %n $+ 's Cords are: %c
inc %x
}
.timer 1 $calc(%x + 3) /privmsg $chan All the cords in my data base $nick <img src='http://www.tg007.net/forum/public/style_emoticons/<#EMO_DIR#>/smile.gif' class='bbc_emoticon' alt=':)' />
}
I dono where I went wrong only that its not working. $cf is the dir for the ini file. and I need it to replace the ones on the hit list to be color green while the other cords arent effected. So it would pull up in the list as:
Mark's cords are: 888:999 977:225 799:5667
The reason I use var for !cords and the sub-command is cuz the server I'm on has webchat and I have to strip away all the html coding.