SRL Archive - RS3 Help

First timer - Need some basic help.


imthecactus

2015-02-27 22:28:55

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?

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

3Garrett3

2015-02-27 23:05:38

From: imthecactus
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?

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


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:


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?