on *:text:!price*:#: {
if ($sock(bmwprice)) .sockclose bmwprice
set %chan $chan
set %nick $nick
set %item $replace($2-,$chr(32),+)
sockopen bmwprice www.slushpuppy.silverinterlocution.org 80
}
on *:SOCKOPEN:bmwprice: {
sockwrite -nt $sockname GET /parsers/price.php?searches=5&text=*itemname**itemprice*&price= $+ %item HTTP/1.1
sockwrite -nt $sockname Host: www.slushpuppy.silverinterlocution.org
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:bmwprice: {
if ($sockerr) {
msg %chan Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message.
halt
}
else {
var %sockreader
sockread %sockreader
if (*
* iswm %sockreader ) {
set %bmwprice $nohtml(%sockreader)
notice %nick You search results:
notice %nick %bmwprice
unset %chan
unset %nick
sockclose bmwprice
}
}
}
on *:text:!dcc*:#: {msg $chan 4(481):Permission Denied- You do not have IRC privileges 2(00:00:00)2 *Disconnected
on $*:TEXT:/^[!@]quest */Si:#: {
;set the variables;
inc %Q.ID
set $+(%,quest.real.,%Q.ID) " $+ $2- $+ "
;replace space with %20;
set $+(%,quest.target.,%Q.ID) $replace($2-,$chr(32),$chr(37) $+ 20)
;if its !quest it will notice, if its @quest it will /msg;
set $+(%,quest.return.,%Q.ID) $iif($left($1,1) == @,msg $chan,notice $nick)
;sockopen site at port 80 (http);
sockopen $+(questlook.,%Q.ID) www.tip.it 80
}
on *:SOCKOPEN:questlook.*:{
var %q.id = $gettok($sockname,2,46)
;get link;
sockwrite -nt $sockname GET /runescape/index.php?rs2quest=&orderby=0&keywords= $+ $($+(%,quest.target.,%Q.ID),2) $+ &difficulty=&members= HTTP/1.1
sockwrite -nt $sockname Host: www.tip.it $+ $crlf $+ $crlf
}
on *:SOCKREAD:questlook.*:{
if ($sockerr) {
echo -a Error.
halt
}
else {
;set source file to %read;
var %read
sockread %read
;here i find a line, then i sockread to get the next line, and so on;
if (*index.php?rs2quest_id=* iswm %read) {
set $+(%,quest.name.,%Q.ID) %read
set $+(%,quest.ex.,%Q.ID) $htmlfree($($+(%,quest.name.,%Q.ID),2))
var %&read | sockread %&read
set $+(%,quest.lvl.,%Q.ID) $htmlfree(%&read)
var %&&read | sockread %&&read
set $+(%,quest.members.,%Q.ID) $htmlfree(%&&read)
var %&&&read | sockread %&&&read
set $+(%,quest.points.,%Q.ID) $htmlfree(%&&&read)
}
;becuase of the fact that this is a multi socket, i want to go to another site witch is stated in the source, here is how i find it;
if (*index.php?rs2quest_id=* iswm $($+(%,quest.name.,%Q.ID),2)) {
set $+(%,quest.sock.,%Q.ID) $remove($($+(%,quest.name.,%Q.ID),2),