I was wondering how hard it would be to grab info from a website that list game news as a .txt file, but the info in the text file changes names at random times.

I would also like to be able to do a trigger like !who #### to display the info in mirc.

example of the txt file:

106 Toast (#106) 100 4717 Clan M 0

## Name ### land Networth Clan Government 0=N 1=Y

The government would change letters and there would be 8 in total, each one has a different letter representing them. The clan would also be different.

Would it also be possible to save the file, then the next time it polls the .txt file be able to compare any differences in them. Like say the land changed, could I trigger with !cpwho ####?Then show what had changed and by what amount?

!who 76 so it looks up by the number not the name, I guess it would be nice if it could do it either way

same for the !cpwho, I would like to be able to compare everything, but if that is to much, I guess Networth and land are the important ones.I guess every hour, but I suppose I would be able to change it if needed?

No I don't need both numbers, That is just the way the game does country names, it adds the number after the name.

You'll need to change 3 #yourchannel things to your channel name or to # for all channels.

Also, you may want to change the formatting of how the text is output to the channel. To change how the pieces of data are output to the channel, look for the line that starts with "hadd". You can adjust the 03§ parts to change the character/color between each piece of data. Right now, only that character is colored, but you can also color the other text if you want to. I'd recommend having it a different color than the dividing character so you can easily see what is what. To change the beginning text on the line, just look for the lines that start with "msg $chan".

At the top, you'll find a timer. Change the 3600 to the number of seconds you want between getting new data. 3600 == 1 hour. I didn't bother making some setup screen for just that one thing.

It is also set up to handle !who and !cpwho from other users and also from the bot (only in the specified channel(s) ). I didn't put a way to look it up by the name instead of the number. If you really think that would be used, let me know and I can throw in that part for you using $hfind.

Any questions, just ask. You'll want to restart mIRC after loading the script to get the timer started.

If you don't want to restart, you can just type the timer line (with a / in front of it) into your edit box and hit enter and then type /gamedata and hit enter to load in the data. (That /gamedata part is not needed if you restart mIRC).

You can try those with !cpwho as well. All except the third will result in the data being displayed. You don't need to enter the entire name, but you need to enter enough of it so that only one name matches. That's why "C" won't work, but "Cirrus" will. Note that it searches in the form of $2* (not *$2*). So you can't search for "!who Minor". This was done purposely to allow you to search with the fewest letters possible. In this case, you can use "!who Cir" and you'll get your results.

someone had a thought though, would it be possible to make the triggers, trigger the timer to download the txt file and say something like, Getting current info, then spit out the result.I guess it would also need a way to keep it from getting the txt file if someone had just searched in say the last 5-10 minutes.

As for having it download based on the triggers, that will affect your !cpwho command. If people are using it regularly, then that will make the data be the same for both old and new almost all of the time unless the data is changing every few minutes on the site. Also, you can make it download more often than once and hour if you think that's an issue. Personally, I wouldn't make the triggers cause it to download something. If I were you, I'd find out how often the data on the site changes (if it's a regular interval) or else find out the average amount of time between changes (if it's not a regular interval). Then I would have it download data a little bit after that change.

For example, if the site updated every 30 minutes (every time the minute hand is on the 6 and the 12), then I'd have your script update every 30 minutes (every time the minute hand is on the 7 and 1). That would keep it updated regularly with the site for you. To do that would mean starting the timer at the right time and setting it to the right interval, of course.