SRL Archive - Help and Support

How to get amounts of an item in inv / trade?


realrune

2006-06-19 13:46:46

I've been going thru amount.scar and what i've been trying hasn't been working right, so what would I use to get the amount of an item an opponent offers in a trade and the amount of an item in ur inventory?

Spky

2006-06-19 14:26:11

For the inventory count try Freddy's
CountInvSlot(var items: Integer; row, col: Integer): Boolean;
For the trade try
checkitem(them: Boolean; name: String): Integer;
Set the "them" parameter to true to count there offer, false to chek yours. I think :p .

realrune

2006-06-19 14:35:29

Aight cool, does the check item work for both trade screens though? If not what could I use?

Spky

2006-06-19 14:44:29

By both you mean yours and the other players? If so, use:
CheckItem(False, 'Item Name');
to check yours and
CheckItem(True, 'Item Name');
to check the other players.

realrune

2006-06-19 14:53:57

No, I mean like the first trade screen and the confirmation trade screen. The only offer I'll need to check is the opponents offer.