mIRC Home    About    Download    Register    News    Help

Print Thread
socket script for a bot #240143 29/12/12 02:08 PM
Joined: Dec 2012
Posts: 6
S
slowpace Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2012
Posts: 6
Hi, can some help me make a script for my bot to pull info from a website to channel on cmd.

heres the page ide like the bot to post info from http://muse.erpk.org/unit/2162

what i would like it to do is something like this

!summary
bot > summary for Tank Nation
bot> || Member 9 || Avg. strength - 9 241 ||Avg. experience - 47 457 || Average rank - World Class Force** || Damage today - 1 227 850 || Damage yesterday - 16 602 420 ||

If any 1 can help that would be great smile

Re: socket script for a bot [Re: slowpace] #240147 29/12/12 08:04 PM
Joined: Dec 2012
Posts: 6
S
slowpace Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2012
Posts: 6
I made a start but its returning anything,

on $*:text:/^!summary$/iS:#: {
if ($sock(summary)) sockclose summary
sockopen summary muse.erpk.org 80
sockmark summary msg #
msg # Tank Nation - http://muse.erpk.org/unit/2162
}
on *:sockopen:summary: {
sockwrite -nt summary GET /unit/2162 HTTP/1.1
sockwrite -nt summary Host: $+($sock(summary).addr,$str($crlf,2))
}
on *:sockread:summary: {
var %summary | sockread %summary
if ($regex(%summary,/\<div class="well bottom">9 253"<\/div>/)) {
$sock(summary).mark $remove($regml(1), )
sockclose summary
}
}

Re: socket script for a bot [Re: slowpace] #240174 31/12/12 07:48 PM
Joined: Dec 2012
Posts: 6
S
slowpace Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Dec 2012
Posts: 6
Never mind, got a workin code now!

Re: socket script for a bot [Re: slowpace] #240225 07/01/13 11:08 PM
Joined: Aug 2012
Posts: 56
Maelish Offline
Babel fish
Offline
Babel fish
Joined: Aug 2012
Posts: 56
Originally Posted By: slowpace
Never mind, got a workin code now!


Can you show us how you did it?


Find Gamers, my player finder for tabletop RPGers and Wargamers.