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.

Script request !

Old posts that have not been replied to for several years.
Locked
E
ElZeRo
Voice
Posts: 24
Joined: Mon Apr 11, 2005 12:04 pm
Contact:

Script request !

Post by ElZeRo »

I'm looking for some kind of TLC-script that can turn HTML into an Egg-drop output, like the "rssnew.tcl" --

What the script should do is :

From the "http://www.elzero.dk/query/" site, my Egg-drop should be able to post in #channel with a trigger like "!utserver"

Map name : DM-Rankin
Game mode : Death Match
Number of players : 0
Maximum number of players : 2
Server IP : 62.199.232.42:7777

Could some one be at help ?

Regards
ElZeRo
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

would you be happy with only the regular expression phrasing the html code?
meaning can you create the egghttp/http request proc by yourself?
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
E
ElZeRo
Voice
Posts: 24
Joined: Mon Apr 11, 2005 12:04 pm
Contact:

Post by ElZeRo »

If you can give me An html file ... and an tcl script ... so that i can see how it works .. i think that would work !

Like test.html
test.tcl ...

Where test.tcl is parsing the test.html ... and "taking" 2 linen from then test.html to be postet in IRC !...

Then I think i can do it my self !
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

a based example is a google script like this one: http://forum.egghelp.org/viewtopic.php? ... ght=google

Code: Select all

if { [regexp {(?i)Map name[^\n]*\n[^\n]*: ([^\n]*)<.*Game mode[^\n]*\n[^\n]*: ([^\n]*)<.*Number of players[^\n]*\n[^\n]*: ([^\n]*)<.*Maximum number of players[^\n]*\n[^\n]*: ([^\n]*)<.*Server IP[^\n]*\n[^\n]*: ([^\n]*)<} $body {} mapname gamemode numplayers maxplayers sevrerip] } {
   success
} else {
   failure
}
within "success" you can access the 5 variables with its normal content and formate it to an output.
If "failure" the site is most likely broken or has changed its style.
you can refer the TCL manual to understand more about regexp and re_syntax.
PS: [^\n] stands for all characters except line break. Plus I hope I didnt break the expression, when editing it :D.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
arcane
Master
Posts: 280
Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:

Post by arcane »

hm.. am i the only one noticing? i clicked on "new entries since last visit" and i saw about 4 posts called "script request!" in the requests forum...
guys, of course it is a request if you're posting in the _requests_ forum :roll:
wasn't there a rule about "meaningful topic names"? :roll:
aVote page back online!
Check out the most popular voting script for eggdrop bots.

Join the metal tavern!
Locked