SRL Archive - OSR Help

Deposit box problem


shebee

2013-02-20 15:17:27

I'm doing some brainstorming for a script I'm writing but I'm having a slight issue with depositing my items to a deposit box, since I don't want to deposit all of them (everything except the first slot to be exact).
First I figured I might try using the SRL banking stuff but the screen isn't identical, however I found something interesting that might help me out a little.

http://docs.villavu.com/srl-5/bank.html?highlight=deposit#id16
[PHP]function DepositItemBox(Item: Integer): TBox;

// Returns a TBox surround Item (1 to 28) in the Deposit Box screen.[/PHP]

I'm not a 100% sure what TBox is though, and I can't find any documentation on it.
Got any suggestions or other information on this?
Or am I going about this completely retardedly?

Cheers,
shebee

Runehack123

2013-02-20 15:45:16

TBox is a box created by two TPoints (TPoint is made up of an x and a y co-ordinate) -
One being the top left of the box and the other being the bottom right.
e.g. the constants MSX1, MSY1, MSX2, MSX2 are co-ordinates that could make up a TBox.
So there you have it. A box defined by 2 points.

Ian

2013-02-20 15:53:21

A TBox is a collection of coordinates that form a box.

It is made from two points like this:

A————?
?———- ?
?———- ?
?———- ?
————–B

Except points have coordinates, so a TBox is four coordinates: X1, Y1, X2, Y2

The X1 and Y1 are the top-left corner, and the X2 and Y2 are the botton-right corner.

Hopefully that helps and isn't too confusing :)

shebee

2013-02-20 16:03:20

So it returns 2 points, alright.
I guess there's no way I can use this for "searching" an item in the deposit box, since I want to deposit all except a certain slot.
Think I'll take a look at the SRL included deposit thing that excludes slots, but meanwhile any ideas?

Element17

2013-02-20 16:08:08

If it is all the the same item you can make a DTM of the item and search for it in the inventory and the if you find the DTM just use clickmouse2(false) which i believe right clicks and select the option deposit all.

shebee

2013-02-20 17:10:55

I thought of DTMs, but I'd have to include a big list of possible items…
Maybe I could just check the deposit box for items that aren't of the DTM I want to deposit (so the opposite of checking what items to deposit, check what items it doesn't recognize and deposit them).
But how do I confine the DTM search to the deposit box?
I can't help but think that there's a way simpler way to do this.

Sjoe

2013-02-20 17:11:51

From: shebee
I thought of DTMs, but I'd have to include a big list of possible items…
Maybe I could just check the deposit box for items that aren't of the DTM I want to deposit (so the opposite of checking what items to deposit, check what items it doesn't recognize and deposit them).
But how do I confine the DTM search to the deposit box?
I can't help but think that there's a way simpler way to do this.


Use Deposit( 2, 28, True) It works for depositscreen and bankscreen

shebee

2013-02-20 17:39:28

From: Sjoekeloe
Use Deposit( 2, 28, True) It works for depositscreen and bankscreen


Thanks!
I should've checked the actual code before posting… :/
Maybe update the documentation on this?

Sjoe

2013-02-20 17:43:17

From: shebee
Thanks!
I should've checked the actual code before posting… :/
Maybe update the documentation on this?


I saw it by reading the function (doubleclick on it @ functionlist) :
if (not(BScreen)) then
DScreen := DepositScreen;