Basically, I've read up a LOT on how to make SCAR scripts, read up on DTMS and Bitmaps, even looked at some includes...
Now what I want to do is make an herbalist script that sits in the bank, withdraws the vials, herbs, and ingredients, closes bank, makes the potions, and deposits them.
I think I have the open bank and bank failsafe ok.
Now, how do I make it withdraw the 3 ingredients, and what procedures would I use for it to make the potions?
Please please PLEASE someone help me out here! I really want this script made!
So far I have this:
SCAR Code:
program GlovesHerbalist;
begin
procedure OpenBank;
var
time: Integer;
begin
MarkTime(time);
repeat;
if (not(Loggedin)) then break;
OpenBankQuiet('lb');
until(BankScreen or (TimeFromMark(time) > 120000));
end;
procedure Bank;
var
Potions, time: Integer;
begin
Guamleaf := BitmapFromString2(False, 'a64B7178DA8D8D510A0421' + /
'0C43AF5493D6EAA7237AFF236DEBECC7C0C0B2080F79265144647' +
'9404609708C602D089AAEE46A41B53495334DAB4134CDBB1DB3D3' +
'D48C883A836E3B8DE7A6E36498C6FBD9B92C17CE2FB29B5D3A982' +
'D9142811C1DF732E31013B3AC2F3B7AE9CFA46D9DB4DF5D8280DC' +
'7C2E54E8A6BFBB11643CBEBA741AECF6D50C6C7F754FEBC90FFC2' +
'');
MarkTime(time);
repeat
if (not(Loggedin)) then break;
OpenBankQuiet('lb')
until(BankScreen or (TimeFromMark(time) > 120000));
if Bankscreen then
end;
FreeBitMap(Guamleaf);
end;
begin
procedure Withdraw(1, 1, 9: Integer);
var
rx, ry: Integer;
begin
rx := 35 + (col * 49);
ry := 27 + (row * 38);
if (BankScreen) then
begin
if (Amount = 1) then
Mouse(rx, ry, 0, 0, True)
else
begin
Mouse(rx, ry, 0, 0, False);
if (Amount = 5) or (Amount = 10) then
ChooseOption('Withdraw ' +IntToStr(Amount))
else if (Amount = 0) then
ChooseOption('Withdraw All')
else
begin
ChooseOption('Withdraw X');
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount) + Chr(13));
end;
end;
end;
end;
begin
SetupSRL;
Openbank;
Bank
Withdraw
until false
end.