| View previous topic :: View next topic |
| Author |
Message |
Pizza_Guy Voice
Joined: 08 Jun 2008 Posts: 12
|
Posted: Fri Nov 11, 2016 8:29 am Post subject: json/rss web reader |
|
|
I am currently trying to read and out put the following
http://www.lastknights.com/functions/citybattles.php
I need it to go out about every 10-15 sec and read for anything new and post it to the channel oldest to newest
I would like to have it out put something like this, sadly its not formatted very well
| Quote: | 9 Nov 2016 - 10:41
Chalukya Baron Vodka_battery terrain: +5% lost to Khmer Empire City of Adana terrain: +3.5%
Soldiers Tot Inj Dead Capt Soldiers Tot Inj Dead Capt
Commanders 1 -- -- -- Commanders 0 -- -- --
Heroes 3 -- -- -- Heroes 0 -- -- --
Artillery 0 -- -- -- Artillery 33 13 1 --
Cavalry 0 -- -- -- Cavalry 40 23 -- --
Infantry 43 30 -- 1 Infantry 52 17 -- -- |
Edit: Updated link. |
|
| Back to top |
|
 |
Pizza_Guy Voice
Joined: 08 Jun 2008 Posts: 12
|
Posted: Sun Nov 13, 2016 11:46 am Post subject: |
|
|
| I can offer 10-20$ via paypal. |
|
| Back to top |
|
 |
Pizza_Guy Voice
Joined: 08 Jun 2008 Posts: 12
|
Posted: Tue Nov 22, 2016 4:58 pm Post subject: |
|
|
http://paste.tclhelp.net/?id=6bva
With the help of another I was able to get this far
I am trying to make it so that the first one the !battle works automaticly, and goes out to the feed about every 8-10 secs and reports back anything new, the url will accept a limited, which is last_battle=####
If you use that then it will show you anything newer, which if stored could help
I can't seem to figure out how to get it to read from the bottom up and give me the results in order. I also can't seem to find a way to store the last battle reported.
The 2nd one I just need it to be able to look up the battle ID given, but the url gives all results that are newer and doesn't return the one that matches. So I was thinking if you give it an ID say 1234 it will use 1233 to search the results and then use the reported number to return what I am after.
Offer still stands for payment over paypal |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Nov 23, 2016 7:12 am Post subject: |
|
|
I've updated the link from the tclhelp page you mentioned in your first post as the old one was returning an empty page. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
Pizza_Guy Voice
Joined: 08 Jun 2008 Posts: 12
|
Posted: Thu Nov 24, 2016 9:57 pm Post subject: |
|
|
| caesar wrote: | | I've updated the link from the tclhelp page you mentioned in your first post as the old one was returning an empty page. |
Ah sorry, the game finally went live with the feed.
I have made some more progress
http://paste.tclhelp.net/?id=6bvo
I am now needing to figure out how to get it to "read" bottom up
I need a way to set what the last battle was, and then to ouput the newer ones, form oldest to newest. I know battle ID goes up the newer it is.
Once I have that working I will need to find a way to setup a !start/!stop and use timers to go out every XX secs to read.
Paypal is still being offered. |
|
| Back to top |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Fri Nov 25, 2016 4:46 am Post subject: |
|
|
You can sort IDs and using that you can know after which is the newest/oldest _________________ https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL |
|
| Back to top |
|
 |
|