Page 1 of 4 123 ... LastLast
Results 1 to 25 of 77

Thread: MeanderingMonk's itemBuyer with World Hop

  1. #1
    Join Date
    Mar 2013
    Posts
    21
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default MeanderingMonk's itemBuyer with World Hop

    Hello all, this is my first script for old school.

    NOTE: Script uses SMART v8, Simba Rev 992, and the SLR-OSR include. Be sure to have each of these installed and up-to-date.
    Search forums for tutorials/guides/etc, if you need help installing or updating these...

    Code:
    0.4
    -major update!! intended for use with OSR include:
    --Implemented stock checking
    -->>stops buying stock after max_Buy has been reached. (see code)
    --Implemented random world switching and logging in/out
    --Will purchase total_BUY amount of items. (total_Buy = 15000 to buy 15000 items..)
    --Should be bug free, but report any errors!!
    
    0.4.5
    -- optimized buying routine in port sam for feathers
    -- fixed problem with buying too many items at custom shops
    -- (note: be sure to fill out custom shop params and to also change shop variable..)
    
    0.5
    -- added antirandom support and more antiban
    -- because of this it sometimes will bug out if it fails to solve a random
    -- failsafes implemented: if it can't find owner, fails to solve random, or otherwise can't buy items will logout and stay logged.
    -- cleaned up code and comments
    
    
    current bugs: None
    (Report any that are found...!)



    A few things regarding the script:

    1) This code searches for the owner and item using color finding methods:
    . 1a) this means you may have to use the color select tool to define ownercolor1,..,itemcolor2. (be very picky about the colors of the item you want, if the color is not unique there may . be unwanted results :P)
    . 1b) To use the Color Select Tool, refer to the Beginner's guide of the Tutorial forums.
    . 2) it will then use a static method once the color has been found to buy items

    2) ensure that character is inside of shop
    . 1a) Start the script while logged out, and let it do the rest!

    3) allows for custom shop creation: see script comments on how to do this
    . 3a) custom buying routine/speed (how many to buy/how fast to purchase items)
    . 3b) custom items: user-defined item location, within shop/trade window





    Feel free to report any other errors/bugs/solutions/ideas for expansion.

    happy scripting e'rbody!

    MM
    Attached Files Attached Files
    Last edited by meanderingmonk; 05-10-2013 at 11:09 PM.

  2. #2
    Join Date
    Mar 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    gonna try it now, will watch it for review..

    @edit.. it starts new rs.. but i had rs07 tutorial fixed before? how come it loads rs eoc?
    Last edited by geilecharlie; 03-24-2013 at 09:49 PM.

  3. #3
    Join Date
    Sep 2012
    Posts
    91
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default

    Quote Originally Posted by geilecharlie View Post
    gonna try it now, will watch it for review..

    @edit.. it starts new rs.. but i had rs07 tutorial fixed before? how come it loads rs eoc?
    you need to edit smartparams as your simba probably updated.

  4. #4
    Join Date
    Mar 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    could you please tell me how or what :$ im new to this all but im willing to learn fast and much

  5. #5
    Join Date
    Sep 2012
    Posts
    91
    Mentioned
    0 Post(s)
    Quoted
    41 Post(s)

    Default



    let it be like that

  6. #6
    Join Date
    Mar 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Filled out info, doesn't even login. Logged in manually, spins camera around.
    Filled out colors and shop info correct, does nothing.

  7. #7
    Join Date
    Mar 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    does this work? i need too get 100k bronze arrows >.< this would be the best thing in the world

  8. #8
    Join Date
    Mar 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by bodenz View Post
    does this work? i need too get 100k bronze arrows >.< this would be the best thing in the world
    Tried it for bronze arrows, keeps attempting to buy rune arrows
    Also doesn't notice when the shop is out of stock :/

  9. #9
    Join Date
    Mar 2013
    Posts
    21
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by xstrunitx View Post
    Tried it for bronze arrows, keeps attempting to buy rune arrows
    Also doesn't notice when the shop is out of stock :/
    I'm slowly working on implementing a stock-checker procedure so the later won't happen.

    I was having a similar problem when buying feathers. Occasionally trout would be bought. This was caused because the itemcolor weren't unique. So make sure that the itemcolor1 and itemcolor2 are unique (there can be no other case of the same itemcolor in the shop-menu, or else it may click there..) for the desired item.

  10. #10
    Join Date
    Mar 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Trying to get him to do Bronze Arrows in Lowes store..
    He just keeps buying Shortbows?
    I've picked my colours so many times, and the nicks set up properly, not sure whats going wrong :\

  11. #11
    Join Date
    Mar 2013
    Posts
    21
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by poopa View Post
    Trying to get him to do Bronze Arrows in Lowes store..
    He just keeps buying Shortbows?
    I've picked my colours so many times, and the nicks set up properly, not sure whats going wrong :\
    I found the problem that was causing this. I'll upload a fix shortly.

    EDIT: Uploaded fix.
    Last edited by meanderingmonk; 03-27-2013 at 10:28 PM.

  12. #12
    Join Date
    Sep 2008
    Posts
    754
    Mentioned
    8 Post(s)
    Quoted
    275 Post(s)

    Default

    Awesome Script i love it!!! just two things i wonder.. If its possible!:

    1)How do can we easily obtain Mouse Coordinates inside the smart client window? (I just type something like MouseBox(280, 80, 280,80, mouse_right);, find where that lands me then count the pixels from where the mouse needs to be!).

    2)Am horrible at math, how can i edit the value of say: i want to make it right click and buy 5-10 times then hop, not 10-30), what field should i edit?, what line?.

    Also is there a way to add something like 'the shop has run out of stock' identifier for hoping? would be really awesome if Simba could do that.

    Thanks again for the script man!!!

  13. #13
    Join Date
    Mar 2013
    Posts
    21
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Post

    How do can we easily obtain Mouse Coordinates inside the smart client window? (I just type something like MouseBox(280, 80, 280,80, mouse_right);, find where that lands me then count the pixels from where the mouse needs to be!).
    (have updated to the most recent version and loaded Simba and the SMARTv8.0 client)

    Along the bottom of the Simba client is an action bar. Somewhere on the bar has the (x,y) position of where the mouse is currently on the screen. But we want to know where mouse is relative to the SMART client. To do this:

    Use Simba's "Select a client" tool, found along the top action bar. Select the SMART window as the client (a large red box will highlight the SMART window).

    Now refer to the area you found on the Simba window for (x,y).

    I'm horrible at math, how can i edit the value of say: i want to make it right click and buy 5-10 times then hop, not 10-30), what field should i edit?, what line?.
    To buy 5-10 items, edit line 215 and 216 which looks like:
    Code:
    randAmnt := randomrange(180,300);           //change range to buy more or less
    --change to:
    Code:
    randAmnt := randomrange(50, 100);


    Give me like a week to implement the last part... xD

  14. #14
    Join Date
    Sep 2008
    Posts
    754
    Mentioned
    8 Post(s)
    Quoted
    275 Post(s)

    Default

    Quote Originally Posted by meanderingmonk View Post
    (have updated to the most recent version and loaded Simba and the SMARTv8.0 client)

    Along the bottom of the Simba client is an action bar. Somewhere on the bar has the (x,y) position of where the mouse is currently on the screen. But we want to know where mouse is relative to the SMART client. To do this:

    Use Simba's "Select a client" tool, found along the top action bar. Select the SMART window as the client (a large red box will highlight the SMART window).

    Now refer to the area you found on the Simba window for (x,y).



    To buy 5-10 items, edit line 215 and 216 which looks like:
    Code:
    randAmnt := randomrange(180,300);           //change range to buy more or less
    --change to:
    Code:
    randAmnt := randomrange(50, 100);


    Give me like a week to implement the last part... xD
    So brilliant i enjoyed reading this post so much, you have no idea how much this helped me (SPECIALLY with the smart mouse position! gosh i wasted so much time trying to get the correct coordinates!!) so lovely sir thank you thank thank you god bless you!

  15. #15
    Join Date
    Oct 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    How could you configure it to use coordinates instead of colors? It's trying to buy other things aswell no matter what colors I put because my item is like that.. there is many items same color in the shop

  16. #16
    Join Date
    Mar 2013
    Posts
    56
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    This is working great!
    Last edited by Anatomical; 03-30-2013 at 02:19 AM.

  17. #17
    Join Date
    Mar 2013
    Posts
    11
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Works amazing, how would I go about it only making it go through like 10 worlds, that I can set? I really need this.

  18. #18
    Join Date
    Mar 2013
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    kingo.. how did you set yours up?? i cant even buy my stuff =d

  19. #19
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Gratz on release, I would advise static coords and checking if the interface is open and of course off settings clicks

  20. #20
    Join Date
    Mar 2013
    Posts
    21
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by mtdewi View Post
    How could you configure it to use coordinates instead of colors? It's trying to buy other things aswell no matter what colors I put because my item is like that.. there is many items same color in the shop
    I will show you with an example. To fix the mouse to coordinates to position (125, 125):

    update the following line of code (line 103) from
    Code:
    MouseBox(xx, yy, xx+6,yy+6, mouse_right);
    to:

    Code:
    MouseBox(125,125,125+6,125+6, mouse_right);
    or for position (350,125):
    Code:
    MouseBox(350,125,350+6,125+6, mouse_right);
    If you want the code to be a little more random, trying changing 350+6 to 350+randomrange(1,7)..



    Works amazing, how would I go about it only making it go through like 10 worlds, that I can set? I really need this.
    For right now, I haven't implemented a way to selectively choose the worlds to visit. To limit the number of times to cycle through world switching/logging back in/buying items/etc, change GLOBAL_VISITS = 30 to GLOBAL_VISITS=10.

    Gratz on release, I would advise static coords and checking if the interface is open and of course off settings clicks
    What do you mean by checking if interface is open? Similar to checking if player is LoggedIn? I'll look at the srl library later tonight.
    Is there a way to offset clicks if using the mousebox(..) procedure?
    I've used mousebox for the majority of clicking and didn't see an offset modifier similar to the one in MMouse(..). How would I add an offset considering this?

    Thanks and hope this helps! Enjoy!!

  21. #21
    Join Date
    Mar 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Great script, runs smoothly! I was wondering if you could explain thoroughly each of the world switching constants, just for my understanding. Also, the script occasionally jumps worlds(instead of moving to the next world). Also, after buying from the last world in a column, it does not return to the top world, and just stops working. If you have any advice on how to fix this that would be awesome.

  22. #22
    Join Date
    Mar 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by dannynandez View Post
    Great script, runs smoothly! I was wondering if you could explain thoroughly each of the world switching constants, just for my understanding. Also, the script occasionally jumps worlds(instead of moving to the next world). Also, after buying from the last world in a column, it does not return to the top world, and just stops working. If you have any advice on how to fix this that would be awesome.
    nvm i figured it all out. Thank you for writing this!

  23. #23
    Join Date
    Mar 2013
    Posts
    21
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by dannynandez View Post
    nvm i figured it all out. Thank you for writing this!
    Certainly!

    Be sure to check out the newest revision. I made use of the WorldSwitching procedures that are apart of the new OSR include. It makes the code much easier to understand!

  24. #24
    Join Date
    Mar 2013
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    hey.. how do you buy just bronze arrow?? it keep clicking different arrow because they all look the same?/ is there a coordinate i can enter?

    i try the mouse coordinate post you put up there. still doesnt work =(

    Edit: i went to different place and it works cause there no arrow but how do you world hop? it doesnt detect that the store has ran out.. how do you change it? thanks
    Last edited by xdragon23; 04-03-2013 at 09:49 PM.

  25. #25
    Join Date
    Jan 2013
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Just made my own script to do this and came on here to find you've also made one! I'm surprised you released something like this though: the more people that have it the less effective it becomes! Script looks good though, but a little more complicated than mine.

Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •