Gas Price finder

By napa182 on Oct 27, 2008

!!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 }
}

Comments

Sign in to comment.
Frenetic   -  Sep 18, 2011

It would yea.

 Respond  
Jethro   -  Sep 18, 2011

It'd be awesome to have an international gas price finder script.

 Respond  
Jethro   -  Sep 18, 2011

Gas prices go sky-high these days in the US. I have to stop driving my guzzlers and ride my motorcycles to cut down the expense in gasoline.

 Respond  
Frenetic   -  Sep 18, 2011

Oh right, sorry didn't see. Heh.

 Respond  
napa182   -  Sep 18, 2011

yes it is only for the US as i stated in the description.

 Respond  
Frenetic   -  Sep 18, 2011

Isn't this only for the United states of America?

 Respond  
napa182   -  Sep 18, 2011

updated an works again. ;x
Thanks to ronreb2 for letting me know it no longer worked.

 Respond  
napa182   -  Jan 18, 2011

glad you liked it startmeup.

 Respond  
startmeup   -  Jan 17, 2011

nice one napa...worked fine for me..i may change the trigger though. I am just used to !

thanks again! I give it a 10..clean neat simple affective

 Respond  
TheProdigY   -  Sep 12, 2010

Useless? I disagree, Neptune. You can spend 30 minutes to an hour driving around local gas stations to see who has the cheapest and waste time, money and gas doing that. Or you could just use this snippet and find out the cheapest in 10 seconds. Your opinion is rendered useless.

 Respond  
napa182   -  May 16, 2009

^Neptune Said:

well as an opinion on the script itself... It's Useless

and?

but yeah i agree with you it is useless. cuz you can always drive down to find out the price or go to motortrend.com

 Respond  
Kirbeh_Pr0nz   -  May 16, 2009

^Neptune, that is completely out of line!! ;p

 Respond  
^Neptune   -  May 16, 2009

well as an opinion on the script itself... It's Useless

 Respond  
chadbdurham   -  May 14, 2009

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,&nbsp;,$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,&nbsp;,$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) }
  }
}
 Respond  
RevJohn Straub   -  May 14, 2009

Napa isnt there a way something like /notice $nick so its not showing people where you live or even /msg $nick

 Respond  
chadbdurham   -  May 14, 2009

damn, pwned

 Respond  
napa182   -  May 14, 2009

if you buy gas you would know what the other prices are but for thoes who dont-> Regular Plus Premium Diesel

 Respond  
baseballer790   -  May 14, 2009

What do the other prices mean?

Why are there more than one

 Respond  
lg84   -  Dec 01, 2008

thanks

 Respond  
napa182   -  Dec 01, 2008

the site is down it says
Dealers Gas Data Coming Soon
We are currently still collecting latest 32640 dealer gas detail. Please check back soon for updated data

ok i added that line into the code so next time it updates it will let you know.

 Respond  
lg84   -  Dec 01, 2008

[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

 Respond  
fire_wizard1   -  Nov 30, 2008

ok thanks napa182

 Respond  
napa182   -  Nov 30, 2008

<~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

http://www.motortrend.com/gas_prices/34/99664/index.html

 Respond  
fire_wizard1   -  Nov 30, 2008

when i loaded it into the bot, then did !gas 3 99664, it did nothing, and also tried
!gas 99664, and it showed the example.

 Respond  
napa182   -  Nov 30, 2008

fire_wizard1 can you be more in depth then it wont work.

 Respond  
fire_wizard1   -  Nov 29, 2008

ok this one i tried to use, and it wont work

 Respond  
Kirby   -  Nov 24, 2008

There's always a snippet for everything! :P

 Respond  
napa182   -  Nov 07, 2008

Fuzion the code is not bad nore is it ripped, and if you would have read the intro you would have seen it's for use within the US.

 Respond  
AdrianF   -  Nov 06, 2008

Shit over here we got $2.05

 Respond  
Fuzion   -  Nov 06, 2008

1/10

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.