SRL Archive - Research & Development Lounge

Reflection shop.scar


Seroko

2009-08-24 09:51:23

Just working on shop.scar…

I'm unable to test at the moment, would appreciate some feedback..


//------------------------------------------------------------------\\
//-- Scar Non-Standard Resource Library --||
//-- ยป Reflection Routines - Banking --||
//------------------------------------------------------------------//
// * function GetShopArray(Playerstock : Boolean): TBankSlotArray; // * by Seroko
// * function ShopCount(id : Integer; // * by Seroko
// Playerstock : Boolean): Integer; // *
// * procedure BuyItem(id, quantity : Integer; // * by Seroko
// Playerstock : Boolean); //
//------------------------------------------------------------------//

Gu3st...

2009-08-24 15:57:11

Nice, I'll use it and credit you in my script, ok? :)

EDIT: TShopArray? Where can I find it?
EDIT: I just replaced it with TBankSlotArray

EDIT: This line gave me an error: "r := TheShop.Index/10 + 1;"

marpis

2009-08-24 16:38:07

From: Zyt3x
Nice, I'll use it and credit you in my script, ok? :)

EDIT: TShopArray? Where can I find it?
EDIT: I just replaced it with TBankSlotArray


It's TBankSlotArray
EDIT: A second late…

Seroko

2009-08-24 20:11:46

From: Zyt3x
Nice, I'll use it and credit you in my script, ok? :)

EDIT: TShopArray? Where can I find it?
EDIT: I just replaced it with TBankSlotArray

EDIT: This line gave me an error: "r := TheShop.Index/10 + 1;"



Sorry, I was attempting to see if I could get values also and created TShopArray to hold the values, and it turned out to be impossible or beyond me, so I went back to just using BankSlots and obviously forgot to change it back, Like I said its really untested as I can't test it at the moment.

I believe if you're using the mainstock and the quantity is infinite it shows up as -1, And I don't know why that would of gave you an error unless you tried to buy something that didn't exist. I probably should add a Exit; if it doesn't exist.

Gu3st...

2009-08-24 20:22:36

From: Seroko
Sorry, I was attempting to see if I could get values also and created TShopArray to hold the values, and it turned out to be impossible or beyond me, so I went back to just using BankSlots and obviously forgot to change it back, Like I said its really untested as I can't test it at the moment.

I believe if you're using the mainstock and the quantity is infinite it shows up as -1, And I don't know why that would of gave you an error unless you tried to buy something that didn't exist. I probably should add a Exit; if it doesn't exist.
Is there any difference between shop-item-ids and inventory-item-ids?

Smarter Child

2009-08-25 06:11:03

Me likey, i would honestly use in my karamja fisher and seller. If only this had been around a few days ago :rolleyes:

Seroko

2009-08-25 16:26:36

From: Zyt3x
Is there any difference between shop-item-ids and inventory-item-ids?


Inventory item ids are +1 from the actual id (From the ge)

Shop items are the actual ids if thats what you're talking about. It was mostly built to view the player stock though, as I was having issues getting the amount with traditional ways..