!!Fixed!!
copy/paste into a new remote of ur bot
[size=15]for use within the US[/size]
trigger is @gas <number of results 1-10>
ex:
<~napa182> @gas 5 90210
<&Masonic> 76 427 N Crescent Dr Beverly Hills, CA, 90210 $4.499 N/A N/A $5.099
<&Masonic> 76 9988 Wilshire Blvd Beverly Hills, CA, 90210 $3.999 N/A $4.379 N/A
<&Masonic> 76 9460 W Olympic Blvd Beverly Hills, CA, 90212 $4.299 N/A N/A $4.999
<&Masonic> Chevron 1107 N La Cienega Blvd West Hollywood, CA, 90069 $4.159 $4.259 $4.459 $4.399 Lowest Price
<&Masonic> Shell 391 S Robertson Beverly Hills, CA, 90211 $3.959 Lowest Price $4.059 Lowest Price N/A N/A
on $*:text:/^@gas\s(\d+)\s(\d{5})$/iS:#:{
if (!$hget(gas,c) && $regml(1) isnum 1-10) {
if ($sock(gas)) sockclose gas
sockopen gas www.motortrend.com 80
sockmark gas $regml(1) $+(/gas_prices/34/,$regml(2),/) msg #
}
}
on *:load: {
echo 04 -a You Have Just Loaded Napa182's Gas Price Finder
echo 07 -a An irc.EzzyChat.com Production
}
on *:sockopen:gas: {
sockwrite -nt $sockname GET $gettok($sock(gas).mark,2,32) HTTP/1.1
sockwrite -nt $sockname Host: $+($sock(gas).addr,$str($crlf,2))
}
on *:sockread:gas: {
var %g | sockread %g
if (*We are currently* iswm %g) {
$gettok($sock(gas).mark,3-,32) %g
sockclose gas
}
if (*<td class="pad brdr1_b">* iswm %g) {
hinc -mu4 gas c 1
$gettok($sock(gas).mark,3-,32) $regsubex(%g,/<[^>]*>|\t/g,$chr(32))
}
if ($hget(gas,c) = $gettok($sock(gas).mark,1,32)) { sockclose gas }
}
I've taken the liberty of just changing it and adding it for you.
MSG NICK
on *:text:!gas*:#: { if (!$($+(%,gas,flood),2)) { if ($2 isnum 1-10 && $regex($3,/\b[0-9]{5}\b/)) { unset gas.* | set -u3 $+(%,gas,flood) on | if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $2 | set %gas.look $3 | sockopen gas www.motortrend.com 80 } | else { msg $nick Please Type !gas <1-10> <zip code> ex: !gas 3 90210 } } }
alias -l afree2 { var %b,%p | %p = $regsub($1-,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%b) | %b = $remove(%b, ,$chr(9)) | return %b }
alias gas { if ($1 isnum 1-10 && $regex($2,/\b[0-9]{5}\b/)) { if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $1 | set %gas.look $2 | sockopen gas www.motortrend.com 80 } | else { msg $nick Please Type /gas <1-10> <zip code> ex: /gas 3 90210 } }
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Gas Price Finder
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
on *:SOCKOPEN:gas: {
sockwrite -nt $sockname GET $+(/gas_prices/34/,%gas.look,/index.html) HTTP/1.1
sockwrite -nt $sockname Host: www.motortrend.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:gas: {
if ($sockerr) { msg %gas.nick Socket Error: }
else {
var %g
sockread %g
if (*We are currently* iswm %g) { msg %gas.nick %g | unset %gas.* | sockclose gas }
if (%gas.count == %gas.count2) { unset %gas.* | sockclose gas }
if (*<td class="pad brdr1_b">* iswm %g) { inc %gas.count | msg %gas.nick $afree2(%g) }
}
}
NOTICE NICK
on *:text:!gas*:#: { if (!$($+(%,gas,flood),2)) { if ($2 isnum 1-10 && $regex($3,/\b[0-9]{5}\b/)) { unset gas.* | set -u3 $+(%,gas,flood) on | if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $2 | set %gas.look $3 | sockopen gas www.motortrend.com 80 } | else { notice $nick Please Type !gas <1-10> <zip code> ex: !gas 3 90210 } } }
alias -l afree2 { var %b,%p | %p = $regsub($1-,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%b) | %b = $remove(%b, ,$chr(9)) | return %b }
alias gas { if ($1 isnum 1-10 && $regex($2,/\b[0-9]{5}\b/)) { if ($sock(gas)) .sockclose gas | set %gas.nick $nick | set %gas.count2 $1 | set %gas.look $2 | sockopen gas www.motortrend.com 80 } | else { notice $nick Please Type /gas <1-10> <zip code> ex: /gas 3 90210 } }
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Gas Price Finder
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
on *:SOCKOPEN:gas: {
sockwrite -nt $sockname GET $+(/gas_prices/34/,%gas.look,/index.html) HTTP/1.1
sockwrite -nt $sockname Host: www.motortrend.com
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:gas: {
if ($sockerr) { notice %gas.nick Socket Error: }
else {
var %g
sockread %g
if (*We are currently* iswm %g) { notice %gas.nick %g | unset %gas.* | sockclose gas }
if (%gas.count == %gas.count2) { unset %gas.* | sockclose gas }
if (*<td class="pad brdr1_b">* iswm %g) { inc %gas.count | notice %gas.nick $afree2(%g) }
}
}
[9:58:55 pm] [%Lightguy84] !gas 1
[9:58:55 pm] [@Boss_hog] Please Type !gas <1-10> ex: !gas 3 90210
[9:58:59 pm] [%Lightguy84] !gas 1 32640
[9:59:51 pm] [%Lightguy84] !gas 1 32640
[10:00:41 pm] [%Lightguy84] !gas 5 32640
thats what i get no reply from the bot
it used to work then it suddenly started showing 10 replys no matter what number you told it to
and now it don't do anything
<~napa182> !gas 3 99664
<&Sick0> Shell 1711 Old Seward Hwy Seward, AK, 99664 $3.199 N/A N/A N/A
<&Sick0> Unbranded 1801 Seward Hwy Seward, AK, 99664 $3.399 N/A N/A N/A
<&Sick0> Tesoro Mle48.5 Sterling Hwy Cooper Landing, AK, 99572 $3.149 Lowest Price N/A N/A N/A
well it only shows 3 places for that zip as well as motortrend