egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

json/rss web reader

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Pizza_Guy
Voice


Joined: 08 Jun 2008
Posts: 12

PostPosted: Fri Nov 11, 2016 8:29 am    Post subject: json/rss web reader Reply with quote

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
View user's profile Send private message
Pizza_Guy
Voice


Joined: 08 Jun 2008
Posts: 12

PostPosted: Sun Nov 13, 2016 11:46 am    Post subject: Reply with quote

I can offer 10-20$ via paypal.
Back to top
View user's profile Send private message
Pizza_Guy
Voice


Joined: 08 Jun 2008
Posts: 12

PostPosted: Tue Nov 22, 2016 4:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Wed Nov 23, 2016 7:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Pizza_Guy
Voice


Joined: 08 Jun 2008
Posts: 12

PostPosted: Thu Nov 24, 2016 9:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Fri Nov 25, 2016 4:46 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber