Results 1 to 2 of 2

Thread: First timer - Need some basic help.

  1. #1
    Join Date
    Feb 2012
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default First timer - Need some basic help.

    Hello I'm pretty new to scripting and have a few questions...

    I'd like to learn how to do the following...
    Select an item from a list and after that item has been processed, to pick the next one in the list. Would the list be a var?

    Code:
    grandExchange.buyItem(Want to select from a list here, price, quantity);
    and then I'd like to have the script find out how much that costed and record it. Like OCR. I'm not too sure how to do this in all honesty. I know the chatbox has the "x coins have been added to your pouch" when selling and buying, although when buying that may be just the change and not the actual amount it bought for. So when selling the finished item I could run
    Code:
    chatBox.findTextOnLines(['have been added to your pouch'], [1..5]);
    although with that it would get confused when buying the item.

    I've managed to allow the script to do the middle part of making the item, its just automating the g.e buying and selling and tanking note of that

    I do apologies, im dyslexic and I have real hard troubles with both explaining, order and numeracy things.

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by imthecactus View Post
    Hello I'm pretty new to scripting and have a few questions...

    I'd like to learn how to do the following...
    Select an item from a list and after that item has been processed, to pick the next one in the list. Would the list be a var?

    Code:
    grandExchange.buyItem(Want to select from a list here, price, quantity);
    and then I'd like to have the script find out how much that costed and record it. Like OCR. I'm not too sure how to do this in all honesty. I know the chatbox has the "x coins have been added to your pouch" when selling and buying, although when buying that may be just the change and not the actual amount it bought for. So when selling the finished item I could run
    Code:
    chatBox.findTextOnLines(['have been added to your pouch'], [1..5]);
    although with that it would get confused when buying the item.

    I've managed to allow the script to do the middle part of making the item, its just automating the g.e buying and selling and tanking note of that

    I do apologies, im dyslexic and I have real hard troubles with both explaining, order and numeracy things.
    I'm actually working on something that involves grabbing prices and whatnot, and I went through a lot of pain trying to figure it out. I finally got some help from smart people and here's what I found out:

    At the top of your script (if you have other constants just put it there) put this:

    Simba Code:
    const
      MyFilter: TTesseractFilter = [6, 6, [False, 15, TM_Mean]];

    Then when you want to get the value of the item you're buying/selling you call this:

    Simba Code:
    price := strToInt(extractFromStr(tesseractGetText(intToBox(170, 309, 327, 327), MyFilter), Numbers)); // The box coordinates are the text "for a total of X gp" in the buy/sell window

    There is a trick though, you have to put this in before you collect the stuff from the GE. So if you want it in there, you'll have to work a little magic but it shouldn't be too hard if you're able to write the rest of the script. Just post here (quote me so I know) again if you need help with that.

    Edit: I'm not exactly sure what you mean by the first part though. What list are you picking from? A list of items you've written?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

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
  •