This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

json/rss web reader

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
P
Pizza_Guy
Voice
Posts: 12
Joined: Sun Jun 08, 2008 1:52 am

json/rss web reader

Post by Pizza_Guy »

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
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.
P
Pizza_Guy
Voice
Posts: 12
Joined: Sun Jun 08, 2008 1:52 am

Post by Pizza_Guy »

I can offer 10-20$ via paypal.
P
Pizza_Guy
Voice
Posts: 12
Joined: Sun Jun 08, 2008 1:52 am

Post by Pizza_Guy »

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
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
P
Pizza_Guy
Voice
Posts: 12
Joined: Sun Jun 08, 2008 1:52 am

Post by Pizza_Guy »

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.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

You can sort IDs and using that you can know after which is the newest/oldest
Post Reply