rendered paste bodyon *:text:!alch *: {
set %alchnick $nick
set %Alchitem $$3-
set %Alchtimer $2
$sock(alchscript) {
/sockclose alchscript
}
/sockopen alchscript kewlbot.uk.to 80
}
ON *:SOCKOPEN:alchscript: {
/sockwrite -nt $sockname GET /Alchprices.txt HTTP/1.1
/sockwrite -nt $sockname Host: kewlbot.uk.to $+ $crlf $+ $crlf
}
ON *:SOCKREAD:alchscript: {
if $sockerr {
msg $nick Sorry, There was a socket error while connecting
unset %%alchitem
unset %ALchnick
}
elseif (* $+ %variablename $+ * iswm %read) {
notice %alchnick Alch price for: $gettok(%read,1,64) is $gettok(%read,2,64) description of item is $gettok(%read,3,64)
sockclose alchscript
unset %%alchitem
unset %ALchnick
halt
}
}