SRL Archive - OSR Help

How to find+click "sell items" in shop interface?


l6bustank

2012-09-06 14:52:39

I'm making my very first script. Ever.
I have a functioning script, its supposed to sell stuff to stores, everything else is OK, but I ran into this problem:
After finding the shopkeeper, trading > opening shop interface, I need the script to click "sell items" once, so it can start right-click selling in the shop interface, 500 units at a time. How can I achieve this?

litoris

2012-09-06 14:58:13

Use a mousebox to right click, then use Waitoption to sell.

l6bustank

2012-09-06 15:21:58

From: litoris
Use a mousebox to right click, then use Waitoption to sell.

err… I meant the situation that I get right after opening the shop interface. When i select to trade with a shopkeeper, the interface opens up under "buy items" mode (if you can call it like this :p ).
I need the script to change it to "sell items" mode. It should happen by clicking the "sell items" button in the upper left part of the shop interface once.

litoris

2012-09-06 15:27:10

From: l6bustank
err… I meant the situation that I get right after opening the shop interface. When i select to trade with a shopkeeper, the interface opens up under "buy items" mode (if you can call it like this :p ).
I need the script to change it to "sell items" mode. It should happen by clicking the "sell items" button in the upper left part of the shop interface once.


Get the coordinates for the clickable area on that, then use mousebox.
    procedure MouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);

//Moves mouse into a random position in the box. Clicks if told to.

l6bustank

2012-09-06 15:31:41

hmm.. ok, thx

Le Jingle

2012-09-06 15:31:55

I recently edited the buysell include to functionally work with current RS ShopScreens, I'll work on requesting via Git (so Simba itself will update with the new code, potentially).

Edit: Submitted

l6bustank

2012-09-06 15:39:02

From: Le Jingle
I recently edited the buysell include to functionally work with current RS ShopScreens, I'll work on requesting via Git (so Simba itself will update with the new code, potentially).

cool, hope to hear from it soon then :)