SRL Archive - Help and Support

Getting amount of item at a trade screen.


syberium

2007-03-22 23:02:08

Hey guys im currently working on something, and im wondering if there is a way to get the amount of an item at the trade screen, Cuz im gunna make script get the amount of the item and then multiply by it by a number set by me, then offer that number to the person. but im not sure how to get the amount of an item… help is appreciated thanks.

for the function 'Amount' how do i use it? i think its like Amount('trade',400) will that check if the item is the quanity of 400? what i want is it 2 get the amount and write it in the debug box. im not sure how to do that =[

this is what i have, and it will get work fine, lke typing the in price on the trade screen etc cept it if there is 1000 sharks ill say it will think there is 1 shark, and offer him what i ever i set for the price of one. well here is a snippet of it, if ne1 can help me.
 procedure getprice;
begin
ItemPrice := GetAmount(339,88);
Price:= ItemPrice * ItemPriceEa;
Writeln(IntToStr(Price));
end;

procedure buyit;
begin
Coin := BitmapFromString(15, 3, 'z78DA75CF490AC4400805D02BF' +
'92BD6E0D2A1BCFF9122090981A615FE42E4A14455A02BF73483EF' +
'EDA8140BB8A72E4C3B04E03437EC7B1E5313E22C89D9993BAD5B3' +
'8A855D3C7FC9573B994A046101319AF7CED44537DE4D97A507CE5' +
'3E38B8FD9587AF125803A2B1FC95CDA9E669FD91978C048DC6F95' +
'C5E5FE8612793193BC0');
wait(300);
if(FindBitMap(Coin,x,y)) then
begin
wait(1);
Mouse(x,y,3,3,false);
wait(200+random(2000));
ChooseOption(x,y,'Offer X');
wait(100+random(1000));
TypeSend(IntToStr(Price));
FreeBitMap(Coin);
end;
end;

syberium

2007-03-24 17:12:30

Help anyone..? add my msn if u can help. =]