flamer
2010-02-27 14:57:19
I just wrote this up today because even though I've known that Superglass make is an awesome way to level up magic, crafting and make money at the same time, it's just too click intensive for me. So heres my first attempt:
There are a few things I would like to improve, but don't really have the expertise to do so:
Any help would be appreciated :)
program GlassMaker;
{.include SRL/SRL.scar}
const
SciptTime = 30; //In minutes
var
x, y, BeginningTime: integer;
Procedure BankWork;
var
Seaweed, Sand, Glass: integer;
begin
Seaweed := DTMFromString('78DA635CC0C8C07008889100979F01033F908' +
'689324E05B24EA3AA61606082C8C1D4AC00B2CE1050B316C8DA4B' +
'40CD3C20EB1C7E3500466F07C0');
Sand := DTMFromString('78DA639CC6C8C0A004C448A03ED59C4104488' +
'344FF0301630F902585AA868181094CC244197B812C45026AE603' +
'59C204D4CC03B214F0AB01007DF308C4');
Glass := DTMFromString('78DA639CC9C4C0C0CDC8800CEE352530C8016' +
'998286337500D33AA1A060626881CB21A1E026A1661DA85AE0600' +
'C5F3046F');
if(not (LoggedIn)) Then
Exit;
if(not BankScreen) then
OpenBankFast('veb');
MouseSpeed:=11;
if(FindDTM(Glass, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
case random(100) of
0..70:
begin
Mouse(x, y, 7, 7, false);
ChooseOption('All'); //Deposit Molten Glass
end;
71..99:
begin
Mouse(x, (y+36), 7, 7, false);
ChooseOption('All'); //Deposit Molten Glass, one row down for randomess
end;
end;
end;
MouseSpeed:=9;
if(FindDTM(Seaweed, x, y, MSX1, MSY1, MSX2, MSY2)) then //Withdraw Seaweed
begin
Mouse(x, y, 7, 7, false);
ChooseOption('13');
end else
begin
writeln('No Seaweed left, logging out');
LogOut;
TerminateScript;
end;
if(FindDTM(Sand, x, y, MSX1, MSY1, MSX2, MSY2)) then //Withdraw Seaweed
begin
Mouse(x, y, 7, 7, false);
ChooseOption('13');
end else
begin
writeln('No Sand left, logging out');
LogOut;
TerminateScript;
end;
CloseBank;
FreeDTM(Glass);
FreeDTM(Seaweed);
FreeDTM(Sand);
end;
Procedure Cast;
var
Spell: integer;
begin
Spell := BitmapFromString(8, 9, 'beNqzN3ZlY0hnAqEZTNxAdJZZ/' +
'01/NxABxeFSQHTDIwhZHC71qLISiICyQDZQ0AWMIOqBCGhaZUEm3B' +
'Cg+RDB+iOfGRgYgVJAEYg4XNDd3hhI1jcvWbzrwus3byCCTlYGrvZ' +
'GQBLIVsiaDReEiEO1HPkMVA8xwR0AiKhBXg==');
GameTab(Tab_Magic);
FindBitmapToleranceIn(Spell, x, y, MIX1, MIY1, MIX2, MIY2, 5); //Cast Superglass Make
Mouse(x, y, 3, 3, true);
FreeBitmap(Spell);
Wait(2998+Random(500));
end;
begin
SetupSRL;
MarkTime(BeginningTime);
repeat
BankWork;
Cast;
until(TimeFromMark(BeginningTime) > (ScriptTime*60000));
end.There are a few things I would like to improve, but don't really have the expertise to do so:
- Having the mouse move "pre-emptively" to the banking booth, right click and hover over the quick-bank option, to model human behavior istead of waiting around for a few seconds, then moving
Be able to place the sand and seaweed (near each other, of course) anywhere in the bank, and to be able to find themBe able to read the amount of sand, seaweed and runes left, and stop when supplies run outBe able to check if the magic tab is current active, and switch to the magic tab if its not
Any help would be appreciated :)