USAB help

Discussion in 'Code Snippets and Tutorials' started by Rockage, Aug 9, 2007.

  1. Rockage

    Rockage Newbie

    Joined:
    May 9, 2007
    Messages:
    29
    Likes Received:
    0
    could someone post there shopwiz autobuyer code, the one I made doesn't seem to work x.x. I won't rip, I just need to compare.
     
  2. xZel

    xZel Level I

    Joined:
    Jul 25, 2007
    Messages:
    85
    Likes Received:
    5
    Code (Visual Basic):
    1. <div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;strHTML = frmLogin.<span style="color: #66cc66;">Gluraks</span>.<span style="color: #66cc66;">PostWrapper</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"http://www.neopets.com/market.phtml"</span>, <span style="color: #ff0000;">"type=process_wizard&feedset=0&shopwizard="</span> & lstItem.<span style="color: #66cc66;">List</span><span style="color: #66cc66;">(</span>intItem<span style="color: #66cc66;">)</span> & <span style="color: #ff0000;">"&table=shop&criteria=exact&min_price=&max_price="</span>, <span style="color: #ff0000;">"http://www.neopets.com/market.phtml?type=wizard"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If wizard banned, waits the time and then keeps going</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"I am too busy"</span><span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> none <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; none = FindString<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"in about <b>"</span>, <span style="color: #ff0000;">"<"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lstLog.<span style="color: #66cc66;">AddItem</span> <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">" - Wizard Banned, waiting "</span> & none & <span style="color: #ff0000;">" minutes."</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Call</span> last</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SleepModule.<span style="color: #66cc66;">SecondsToWait</span> <span style="color: #66cc66;">(</span>none * <span style="color: #cc66cc;">60</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If it didn't work, redoes it</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"Please try again"</span><span style="color: #66cc66;">)</span> <> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x = x - <span style="color: #cc66cc;">1</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If the item is on the page, then it makes the var it</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"bgcolor='#ffffcc'>"</span> & lstItem.<span style="color: #66cc66;">List</span><span style="color: #66cc66;">(</span>intItem<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; intLowCost = FindString<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"bgcolor='#ffffcc'><b>"</span>, <span style="color: #ff0000;">" NP"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If something fucks up, ends program</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">On</span> <span style="color: #b1b100;">Error</span> <span style="color: #b1b100;">Resume</span> <span style="color: #b1b100;">Next</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"You are currently on a quest!"</span><span style="color: #66cc66;">)</span> <> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lstLog.<span style="color: #66cc66;">AddItem</span> <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">" - On a farie quest."</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; holt = <span style="color: #cc66cc;">1</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Exit</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Else</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lstLog.<span style="color: #66cc66;">AddItem</span> <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">" - Error."</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li></ol></div>
    Well here is code to search the wizard it has some extra stuff in it cause i used it for a pricer. My USAB source has been mysteriously been copied over with my sponsor/av grabber so i'll try and write up a buying code in the morning for you.
     
  3. Rockage

    Rockage Newbie

    Joined:
    May 9, 2007
    Messages:
    29
    Likes Received:
    0
    hah, thanks, I dont know why mine wont work x.x
     
  4. xZel

    xZel Level I

    Joined:
    Jul 25, 2007
    Messages:
    85
    Likes Received:
    5
    Code (Visual Basic):
    1. <div class="vb" id="{CB}" style="font-family: monospace;"><ol><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># strHTML = frmLogin.<span style="color: #66cc66;">Gluraks</span>.<span style="color: #66cc66;">PostWrapper</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"http://www.neopets.com/market.phtml"</span>, <span style="color: #ff0000;">"type=process_wizard&feedset=0&shopwizard="</span> & lstItem.<span style="color: #66cc66;">List</span><span style="color: #66cc66;">(</span>intItem<span style="color: #66cc66;">)</span> & <span style="color: #ff0000;">"&table=shop&criteria=exact&min_price=&max_price="</span>, <span style="color: #ff0000;">"http://www.neopets.com/market.phtml?type=wizard"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If wizard banned, waits the time and then keeps going</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">If</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"I am too busy"</span><span style="color: #66cc66;">)</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> none <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; none = FindString<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"in about <b>"</span>, <span style="color: #ff0000;">"<"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lstLog.<span style="color: #66cc66;">AddItem</span> <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">" - Wizard Banned, waiting "</span> & none & <span style="color: #ff0000;">" minutes."</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Call</span> last</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SleepModule.<span style="color: #66cc66;">SecondsToWait</span> <span style="color: #66cc66;">(</span>none * <span style="color: #cc66cc;">60</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If it didn't work, redoes it</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"Please try again"</span><span style="color: #66cc66;">)</span> <> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x = x - <span style="color: #cc66cc;">1</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If the item is on the page, then it makes the var it</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #808080;">'this part says whether or not the item is there</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"bgcolor='#ffffcc'>"</span> & lstItem.<span style="color: #66cc66;">List</span><span style="color: #66cc66;">(</span>intItem<span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span> <> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Call</span> buy</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">'If something fucks up, ends program</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">ElseIf</span> <span style="color: #b1b100;">InStr</span><span style="color: #66cc66;">(</span><span style="color: #cc66cc;">1</span>, strHTML, <span style="color: #ff0000;">"You are currently on a quest!"</span><span style="color: #66cc66;">)</span> <> <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lstLog.<span style="color: #66cc66;">AddItem</span> <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">" - On a farie quest."</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Else</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lstLog.<span style="color: #66cc66;">AddItem</span> <span style="color: #b1b100;">Time</span> & <span style="color: #ff0000;">" - Error."</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"># &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">Public</span> <span style="color: #b1b100;">Sub</span> Buy<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strHTML = W.<span style="color: #b1b100;">Get</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"http://www.neopets.com/browseshop.phtml?owner="</span> & FindString<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"<a href='browseshop.phtml?owner="</span>, <span style="color: #ff0000;">"'"</span><span style="color: #66cc66;">)</span>, <span style="color: #ff0000;">"http://neopets.com/market.phtml"</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">strHTML = w.<span style="color: #b1b100;">Get</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">"http://neopets.com/buy_item.phtml?"</span> & FindString<span style="color: #66cc66;">(</span>strHTML, <span style="color: #ff0000;">"<a href='buy_item.phtml?"</span>, <span style="color: #ff0000;">"'"</span><span style="color: #66cc66;">)</span>, lastpage <span style="color: #66cc66;">(</span>might <span style="color: #b1b100;">not</span> work, other wise u have <span style="color: #b1b100;">to</span> use the link in the first <span style="color: #b1b100;">get</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span></li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;"><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span></li><li style="padding: 0 5px; background-color: #fff; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li><li style="padding: 0 5px; background-color: #f9f9f9; line-height: 16px; border-bottom: 1px solid #efefef; border-left: 1px solid #999;">&nbsp;</li></ol></div>
    Ok there is probably a huge load of errors in this and you will probably want to look over it but that is the basic stuff you would need. If you really need help get me on msn mate and i'll write up a full USAB real quick.
     
  5. Rockage

    Rockage Newbie

    Joined:
    May 9, 2007
    Messages:
    29
    Likes Received:
    0
    Hey, can you post the 'findstring' function you used ?
     
  6. xZel

    xZel Level I

    Joined:
    Jul 25, 2007
    Messages:
    85
    Likes Received:
    5
    It's the same function as GetBetween or GetStringBetween (aka finds y in between xyz).
     
  7. Rockage

    Rockage Newbie

    Joined:
    May 9, 2007
    Messages:
    29
    Likes Received:
    0
    alright, I figured that, but wasn't sure :p