SRL Archive - Help

My standards


rj

2012-12-29 10:19:54

Are terrible, can somebody point me in the direction of a thread that fucos's only on standards?

Here is an example:

Program PotionMaker;
{$i srl/srl.simba}
var
BankTry,CleanHerb,PotionUse,BankSoulSplit,WithDrawClean:Integer;
PotionComplete,StoreAll,WithDrawPotion,UseBank,PotsMade:Integer;
HowManyMake,Status:string;
Procedure WithDrawPotions;
var
X, Y: Integer;
begin
if FindDTM(PotionUse, x, y, 17, 28, 499, 325) then
begin
ClearDebug;
status := ('Withdrawing potion');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(WithDrawPotion, X, Y,13, 27, 498, 325, 145) then
begin
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(1400 + Random(350));
end;
end;
end;
Procedure CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,9416136,549,207,724,356,1) then
begin
ClearDebug;
status := ('Recovering from mistake');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(250 + Random(150));
CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
end;
WithDrawPotions;
end;
Procedure StorePotions;
var
X, Y: Integer;
begin
ClearDebug;
status := ('Storing finished potions');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
if FindDTM(PotionComplete, x, y, 552, 207, 731, 460) then
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(StoreAll, X, Y,493, 155, 754, 497, 155) then
begin
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(650 + Random(150));
CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
end;
end;
Procedure WithDrawHerbs;
var
X, Y: Integer;
begin
if FindDTM(CleanHerb, x, y, 15, 24, 500, 324) then
begin
ClearDebug;
status := ('Withdrawing clean herbs');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(WithDrawClean, X, Y,106, 10, 482, 366, 145) then
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(550 + Random(150));
StorePotions;
end;
end;
Procedure BankPotions;
var
tmpCTS, l, r,X,Y:Integer;
BankTPA:TPointArray;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.15, 0.31);
if FindColorsTolerance(BankTPA, 5517118, 224, 172, 292, 255, 3) then
begin
ClearDebug;
status := ('Banking');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BankTPA)
wait(randomrange(60, 100));
mmouse((BankTPA[r].x), (BankTPA[r].y)-35, 2, 2);
wait(randomrange(200, 350));
clickmouse2(mouse_Right);
wait(randomrange(400, 550));
if FindBitmapToleranceIn(UseBank, X, Y,106, 10, 482, 366, 145) then
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(500 + Random(150));
repeat
if BankTry >= 7 then
begin
BankPotions;
end;
IncEx(BankTry, 1);
wait(randomrange(500, 750));
until
(FindBitmapToleranceIn(BankSoulSplit, X, Y,181, 27, 359, 52, 145)=true)
BankTry := 0;
WithDrawHerbs;
end;
end;
Procedure MakePotions;
var
X, Y: Integer;
begin
if FindDTM(PotionUse, x, y, 562, 210, 723, 458) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')

// slot 1 of 4
if FindDTM(CleanHerb, x, y, 561, 210, 594, 454) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 562, 210, 594, 454) then
begin
mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
// slot 2 of 4
if FindDTM(CleanHerb, x, y, 605, 213, 636, 459) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')

mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 605, 213, 636, 459) then
begin
mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
// slot 3 of 4
if FindDTM(CleanHerb, x, y, 645, 211, 678, 456) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')

mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 645, 211, 678, 456) then
begin
mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
// slot 4 of 4
if FindDTM(CleanHerb, x, y, 690, 211, 728, 459) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')

mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 690, 211, 728, 459) then
begin
mmouse(x, y,1,1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
end;
end;
end;
end;
MakePotions;
end;
BankPotions;
end;
Procedure CloseBankHerb;
var
X, Y: Integer;
begin
ClearDebug;
status := ('Closing bank');
Writeln('********************************')
Writeln('RJJ95 Potion Maker Version 2.6')
Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|'
+ IntToStr(StrToInt(HowManyMake)-PotsMade) + ' Left to make| ['
+ IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake)*100)) + '%]');
Writeln('********************************')
if FindColorTolerance(X,Y,8421504,427,32,500,51,15) then
begin
Wait(200 + Random(150));
MouseSpeed:=20;
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(700 + Random(150));
MakePotions;
end;
end;
Procedure AskOptions;
begin

If (InputQuery('How many potions do you want to make?', 'Amount:' , HowManyMake)) Then
IncEx(PotsMade, 1);
Wait(750);
CloseBankHerb;
end;
Begin
CleanHerb := DTMFromString('mlwAAAHicY2dgYJjJxMAwlwlCTwXiSUA8DYjnAHEQIwNDABD7ArEPI4QfBsQhQCwarM4g5K8KpkUjNMFYIlWfQTRWm4ETaC4uzIgHQwEAd2MK2w==');
PotionUse := DTMFromString('mlwAAAHicY2dgYMhmYmAoBOJcIM4A4lQgzgLiPCCOZGRgCAPiECiOAOIYII4GYh//ywyq6pMZjC3OMLh7XwbzQdjI7BgDJ9BcXJgRD4YCAFxlDqo=');
PotionComplete := DTMFromString('mggAAAHicY2NgYHBiYmBwA2JnILYHYlsgdgHil0C5d0D8HojfMkD4z4B44vadDIVLloPp2Xv2MswC4pp1Gxg4gHLYMCMODAEA0WcTFQ==');
BankSoulSplit := BitmapFromString(172, 17, 'meJztmFFSwzAMRHMT7kD7C9MvB' +
'm7IbSEznnqWlbSWnCbtAB1/OIktS6snx83p9f0UtOeXN2z46Hz5mG' +
'vCPi2h27QD2qW/qcORsevA78XAvw6tPX1+UVvtt85c4NaaFjaKPZp' +
'+88AFCRoAnF4FDBW+OwOrtWVZmkvL9dcvJ9ZFU5RHN/uagTkf8k72' +
'PObFJwZWI1UG1nj7XNIhIn9XBpqfJLirf1VeslMCQDBQ3Y40petl7' +
'1QLcI4BzDUxoKPeGwPBwBZTEe2Z3W8LA7bM3QH5xLmLTjBA9d6Uwd' +
'p/BAbw0i2l6L47oJcbBk6Hjej8QHkUu3HkJJV5BgMyiJ7YWUPRcDo' +
'dAKg6mpM0WJRGH5DRYZgyHQ6VEqY1s9Ni4O59DIrSbUGKNgrrTKZC' +
'LQaRQbQ27OPPdTK5DwxDFkuQ224qkwzQ+VAo4Jqy7wJiMgqBKsJVA' +
'ye6jg2x13Vd7bvrkgLD/vBd4D4dumc7JQaEvD07kakoUjfXtFZ+Vx' +
'TpcN0TgW9k4Hx973QMfjEDuBcJU9Wooz0kwiDDgK59QqWUd3IgsxO' +
'WFOg7yaMxYI9wkanemsLRu6Cktj4gIZM6WHSSSNYG8b4rfjTGqiFY' +
'Im0pdrSmdagy0PexfupGBXq/PV1+/tCIOwD/Cbpzo7XQJexjI2u2N' +
'HS8dkwUGt6n1VExGoN5ITXsXNc3G7vwhHTol7ZDrbmBwka6uS8pO0' +
'B8DegfBER2zua7uruuaBkGjtEB9//jdSjZT04U48nbLQC41iYAyDA' +
'wJ2Beh4iBA3TIYHDb2PHp8HtgNfBq+EkA9mCAdLAMHKnDzRlIjncx' +
'yAeuYy9JsRMDVR3wGPBoOnwD+YiGAg==');
UseBank := BitmapFromString(95, 10, 'meJztlkEOxCAIRT1I97OY83qXnq' +
'DXaichIQzw0ULqqoYFotXvE0z7fvT92D5fsv7fTdt5NmnFdSoTKls' +
'TjdaahMPd4qGoVfTzOukJ6VtYAKeofzEcuc4LpwKHumz8oRu0e7FR' +
's0NovtWMajN42dDQUMAMHPZlU3HEB705cdxyQISH9HIC5DFvZY5KG' +
'wUqyFKVsTapXM0yjsi4G8UCZvzJsvqZzRBVa/GFIt+FgHxUU0UIQz' +
'ib+LeR51Ua4nJboDl+c56D4yZDnCHooVaa3aKIy2ro5za6FefuBTx' +
'PZUQ=');
WithDrawClean := BitmapFromString(175, 8, 'meJzNl8ENwjAMRTtI7xxYoiNyyS' +
'6doGsBUiTL8vd3nWAKyIfEJLHr/5xC24+2H8uyrLd7twYe5mcr412' +
'FJof38/sU47IctsfzbbJdBuL/Rs4X2HT+scSsvHmhr4GBZZ6EoaqY' +
'f2KfwyC6m9KZvkM8jNOcjKKYxYGTTd29bqwSGPq0Gy4zfu0065N7c' +
'TwaK+80fgODHqzkZkA8NEsuY7jeyGROCFreJVmfUAuDfpWgWMzfv2' +
'I8nJ45lAPG0uuHniIDAyspSskkRj/rbrPSvawwAZyWwxDfGIFw7nX' +
't7jV+XaihWBg380RVMEyMMzi5nPwEBhQoI8Tp+QhMQEg+1igMYm7l' +
'5ZEvg8Edazi/AYNUQw9Y6eQz1GtDNw9KPxdr4mbQ4VwSWLVb4u9bf' +
'PmjoKi4YVJnVQiD7g7seuzWjf9+y8PA9qJw07HibJG0bi/tWint');
StoreAll := BitmapFromString(175, 8, 'meJztVkESwyAI9CHee+gn+sRe8p' +
'e8IN9qnXHqEBZWYhJPzXAgCIiwWbOsW0ppWbci+fEsIvWbpG6h9pV' +
'2pUt5vT9F0v7xNqrOt55lQLCqk3W2nkR8yoN69WnNbIo3hauk5Zfb' +
'qSVSRuTgY87TBKs6WWc3XE4/7+cuY5EEpoEBX/9guCph3EGBQeGhW' +
'kwCHzZ6+ZscBYPiVfmKOrd4RmXnq3wK3e2Gq1ID9Yrx4IeM4V3ceH' +
'GYfxfI+eiJYGj5h5lB/S2Yp0Nn7kM67K1GRkBieZ3dWHUoNVkChvy' +
'7KbB47+JGi6l3Od8EQzB55FzYKP5FeD6mjgqJIsxA/M0MwVgT4QNN' +
'64776LyQ/KeBgTAtbzv2PA6G4PdIgBQBbRwMJkEdAoNH9cNgUCQ2H' +
'wwRZjDbbjIGZwZy0jiTcEsQDCn8zyDd5NIXjmOGvA==');
WithDrawPotion := BitmapFromString(180, 7, 'meJy1VsENwzAI9CD599ElOmI/2a' +
'UTdK3WSiQL3R0Y23LFA1+AEDifejyex2Xn51utlNJ8xj2ELRMzbVC' +
'cO2cf7PX+VdvR27TdLdluGVksGNeER9VvNIBJluvXcGYLgLA43hEE' +
'B6B3lLnyXV1uSHpYBJ7eRy8lGTyaNVTcS6+fL0GZ2JZuuVGRrm4wW' +
'1oWbE1Wa0WgZqBR3nKhpTlueAS446XvzVniMGp+S1CN35vvBIKhE6' +
'kbXLDLDW/CvFlv44x7dx8ipZRxA3wc4obUioAbo34sWXZxwY2GIsl' +
'cj6IyUj5a5MaEn2GXpM1WbqxwIHk3A93IcyOfC+3FfIu54Wn+bm5I' +
'33J1BzfauIKdjupD8m4mK3e50c21oKeNdhQxN+zXyeGf6l+BF9ndk' +
'ScOQFGpzOu6IfUW7hpwJpBouJ4xN2RBwDkynyvbYDzzyX/tNMNq');
AskOptions;
repeat
CloseBankHerb;
until (StrToInt(HowManyMake)) <= PotsMade;
Freedtm(CleanHerb);
Freedtm(PotionUse);
Freedtm(PotionComplete);
FreeBitmap(WithDrawClean);
FreeBitmap(BankSoulSplit);
FreeBitmap(UseBank);
FreeBitmap(StoreAll);
FreeBitmap(WithDrawPotion);
end.
end.

masterBB

2012-12-29 10:43:30

http://www.kaitnieks.com/scar/scriptingsta/

edit:
better: http://www.econos.de/delphi/cs.html

Ian

2012-12-29 11:01:12

Routines that retrieve a value shall be prefixed with the word get


Didn't know about this, thanks :)

The Killer

2012-12-29 11:06:31

I'v always used this thread.

masterBB

2012-12-29 11:06:56

It is not a big deal when your standards are a bit off. As long as it is consistent. Writing a+b without spaces? Then at least do it every where.

J J

2012-12-29 11:09:34

Or as a last resort (not advised, but good to check)

program PotionMaker;
{$i srl/srl.simba}

var
BankTry, CleanHerb, PotionUse, BankSoulSplit, WithDrawClean: Integer;
PotionComplete, StoreAll, WithDrawPotion, UseBank, PotsMade: Integer;
HowManyMake, Status: string;

procedure WithDrawPotions;
var
X, Y: Integer;
begin
if FindDTM(PotionUse, x, y, 17, 28, 499, 325) then
begin
ClearDebug;
status := ('Withdrawing potion');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(WithDrawPotion, X, Y, 13, 27, 498, 325, 145) then
begin
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(1400 + Random(350));
end;
end;
end;

procedure CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
var
X, Y: Integer;
begin
if FindColorTolerance(X, Y, 9416136, 549, 207, 724, 356, 1) then
begin
ClearDebug;
status := ('Recovering from mistake');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(250 + Random(150));
CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
end;
WithDrawPotions;
end;

procedure StorePotions;
var
X, Y: Integer;
begin
ClearDebug;
status := ('Storing finished potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') if FindDTM(PotionComplete, x, y, 552, 207, 731, 460) then
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(StoreAll, X, Y, 493, 155, 754, 497, 155) then
begin
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(650 + Random(150));
CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
end;
end;

procedure WithDrawHerbs;
var
X, Y: Integer;
begin
if FindDTM(CleanHerb, x, y, 15, 24, 500, 324) then
begin
ClearDebug;
status := ('Withdrawing clean herbs');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(WithDrawClean, X, Y, 106, 10, 482, 366, 145) then
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(550 + Random(150));
StorePotions;
end;
end;

procedure BankPotions;
var
tmpCTS, l, r, X, Y: Integer;
BankTPA: TPointArray;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.15, 0.31);
if FindColorsTolerance(BankTPA, 5517118, 224, 172, 292, 255, 3) then
begin
ClearDebug;
status := ('Banking');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BankTPA) wait(randomrange(60, 100));
mmouse((BankTPA[r].x), (BankTPA[r].y) - 35, 2, 2);
wait(randomrange(200, 350));
clickmouse2(mouse_Right);
wait(randomrange(400, 550));
if FindBitmapToleranceIn(UseBank, X, Y, 106, 10, 482, 366, 145) then
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(500 + Random(150));
repeat
if BankTry >= 7 then
begin
BankPotions;
end;
IncEx(BankTry, 1);
wait(randomrange(500, 750));
until (FindBitmapToleranceIn(BankSoulSplit, X, Y, 181, 27, 359, 52, 145) = true) BankTry := 0;
WithDrawHerbs;
end;
end;

procedure MakePotions;
var
X, Y: Integer;
begin
if FindDTM(PotionUse, x, y, 562, 210, 723, 458) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') if FindDTM(CleanHerb, x, y, 561, 210, 594, 454) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 562, 210, 594, 454) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
if FindDTM(CleanHerb, x, y, 605, 213, 636, 459) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 605, 213, 636, 459) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
if FindDTM(CleanHerb, x, y, 645, 211, 678, 456) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 645, 211, 678, 456) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
if FindDTM(CleanHerb, x, y, 690, 211, 728, 459) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 690, 211, 728, 459) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
end;
end;
end;
end;
MakePotions;
end;
BankPotions;
end;

procedure CloseBankHerb;
var
X, Y: Integer;
begin
ClearDebug;
status := ('Closing bank');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') if FindColorTolerance(X, Y, 8421504, 427, 32, 500, 51, 15) then
begin
Wait(200 + Random(150));
MouseSpeed := 20;
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(700 + Random(150));
MakePotions;
end;
end;

procedure AskOptions;
begin
if (InputQuery('How many potions do you want to make?', 'Amount:', HowManyMake)) then
IncEx(PotsMade, 1);
Wait(750);
CloseBankHerb;
end;

begin
CleanHerb := DTMFromString('mlwAAAHicY2dgYJjJxMAwlwlCTwXiSUA8DYjnAHEQIwNDABD7ArEPI4QfBsQhQCwarM4g5K8KpkUjNMFYIlWfQTRWm4ETaC4uzIgHQwEAd2MK2w==');
PotionUse := DTMFromString('mlwAAAHicY2dgYMhmYmAoBOJcIM4A4lQgzgLiPCCOZGRgCAPiECiOAOIYII4GYh//ywyq6pMZjC3OMLh7XwbzQdjI7BgDJ9BcXJgRD4YCAFxlDqo=');
PotionComplete := DTMFromString('mggAAAHicY2NgYHBiYmBwA2JnILYHYlsgdgHil0C5d0D8HojfMkD4z4B44vadDIVLloPp2Xv2MswC4pp1Gxg4gHLYMCMODAEA0WcTFQ==');
BankSoulSplit := BitmapFromString(172, 17, 'meJztmFFSwzAMRHMT7kD7C9MvB' + 'm7IbSEznnqWlbSWnCbtAB1/OIktS6snx83p9f0UtOeXN2z46Hz5mG' + 'vCPi2h27QD2qW/qcORsevA78XAvw6tPX1+UVvtt85c4NaaFjaKPZp' + '+88AFCRoAnF4FDBW+OwOrtWVZmkvL9dcvJ9ZFU5RHN/uagTkf8k72' + 'PObFJwZWI1UG1nj7XNIhIn9XBpqfJLirf1VeslMCQDBQ3Y40petl7' + '1QLcI4BzDUxoKPeGwPBwBZTEe2Z3W8LA7bM3QH5xLmLTjBA9d6Uwd' + 'p/BAbw0i2l6L47oJcbBk6Hjej8QHkUu3HkJJV5BgMyiJ7YWUPRcDo' + 'dAKg6mpM0WJRGH5DRYZgyHQ6VEqY1s9Ni4O59DIrSbUGKNgrrTKZC' + 'LQaRQbQ27OPPdTK5DwxDFkuQ224qkwzQ+VAo4Jqy7wJiMgqBKsJVA' + 'ye6jg2x13Vd7bvrkgLD/vBd4D4dumc7JQaEvD07kakoUjfXtFZ+Vx' + 'TpcN0TgW9k4Hx973QMfjEDuBcJU9Wooz0kwiDDgK59QqWUd3IgsxO' + 'WFOg7yaMxYI9wkanemsLRu6Cktj4gIZM6WHSSSNYG8b4rfjTGqiFY' + 'Im0pdrSmdagy0PexfupGBXq/PV1+/tCIOwD/Cbpzo7XQJexjI2u2N' + 'HS8dkwUGt6n1VExGoN5ITXsXNc3G7vwhHTol7ZDrbmBwka6uS8pO0' + 'B8DegfBER2zua7uruuaBkGjtEB9//jdSjZT04U48nbLQC41iYAyDA' + 'wJ2Beh4iBA3TIYHDb2PHp8HtgNfBq+EkA9mCAdLAMHKnDzRlIjncx' + 'yAeuYy9JsRMDVR3wGPBoOnwD+YiGAg==');
UseBank := BitmapFromString(95, 10, 'meJztlkEOxCAIRT1I97OY83qXnq' + 'DXaichIQzw0ULqqoYFotXvE0z7fvT92D5fsv7fTdt5NmnFdSoTKls' + 'TjdaahMPd4qGoVfTzOukJ6VtYAKeofzEcuc4LpwKHumz8oRu0e7FR' + 's0NovtWMajN42dDQUMAMHPZlU3HEB705cdxyQISH9HIC5DFvZY5KG' + 'wUqyFKVsTapXM0yjsi4G8UCZvzJsvqZzRBVa/GFIt+FgHxUU0UIQz' + 'ib+LeR51Ua4nJboDl+c56D4yZDnCHooVaa3aKIy2ro5za6FefuBTx' + 'PZUQ=');
WithDrawClean := BitmapFromString(175, 8, 'meJzNl8ENwjAMRTtI7xxYoiNyyS' + '6doGsBUiTL8vd3nWAKyIfEJLHr/5xC24+2H8uyrLd7twYe5mcr412' + 'FJof38/sU47IctsfzbbJdBuL/Rs4X2HT+scSsvHmhr4GBZZ6EoaqY' + 'f2KfwyC6m9KZvkM8jNOcjKKYxYGTTd29bqwSGPq0Gy4zfu0065N7c' + 'TwaK+80fgODHqzkZkA8NEsuY7jeyGROCFreJVmfUAuDfpWgWMzfv2' + 'I8nJ45lAPG0uuHniIDAyspSskkRj/rbrPSvawwAZyWwxDfGIFw7nX' + 't7jV+XaihWBg380RVMEyMMzi5nPwEBhQoI8Tp+QhMQEg+1igMYm7l' + '5ZEvg8Edazi/AYNUQw9Y6eQz1GtDNw9KPxdr4mbQ4VwSWLVb4u9bf' + 'PmjoKi4YVJnVQiD7g7seuzWjf9+y8PA9qJw07HibJG0bi/tWint');
StoreAll := BitmapFromString(175, 8, 'meJztVkESwyAI9CHee+gn+sRe8p' + 'e8IN9qnXHqEBZWYhJPzXAgCIiwWbOsW0ppWbci+fEsIvWbpG6h9pV' + '2pUt5vT9F0v7xNqrOt55lQLCqk3W2nkR8yoN69WnNbIo3hauk5Zfb' + 'qSVSRuTgY87TBKs6WWc3XE4/7+cuY5EEpoEBX/9guCph3EGBQeGhW' + 'kwCHzZ6+ZscBYPiVfmKOrd4RmXnq3wK3e2Gq1ID9Yrx4IeM4V3ceH' + 'GYfxfI+eiJYGj5h5lB/S2Yp0Nn7kM67K1GRkBieZ3dWHUoNVkChvy' + '7KbB47+JGi6l3Od8EQzB55FzYKP5FeD6mjgqJIsxA/M0MwVgT4QNN' + '64776LyQ/KeBgTAtbzv2PA6G4PdIgBQBbRwMJkEdAoNH9cNgUCQ2H' + 'wwRZjDbbjIGZwZy0jiTcEsQDCn8zyDd5NIXjmOGvA==');
WithDrawPotion := BitmapFromString(180, 7, 'meJy1VsENwzAI9CD599ElOmI/2a' + 'UTdK3WSiQL3R0Y23LFA1+AEDifejyex2Xn51utlNJ8xj2ELRMzbVC' + 'cO2cf7PX+VdvR27TdLdluGVksGNeER9VvNIBJluvXcGYLgLA43hEE' + 'B6B3lLnyXV1uSHpYBJ7eRy8lGTyaNVTcS6+fL0GZ2JZuuVGRrm4wW' + '1oWbE1Wa0WgZqBR3nKhpTlueAS446XvzVniMGp+S1CN35vvBIKhE6' + 'kbXLDLDW/CvFlv44x7dx8ipZRxA3wc4obUioAbo34sWXZxwY2GIsl' + 'cj6IyUj5a5MaEn2GXpM1WbqxwIHk3A93IcyOfC+3FfIu54Wn+bm5I' + '33J1BzfauIKdjupD8m4mK3e50c21oKeNdhQxN+zXyeGf6l+BF9ndk' + 'ScOQFGpzOu6IfUW7hpwJpBouJ4xN2RBwDkynyvbYDzzyX/tNMNq');
AskOptions;
repeat
CloseBankHerb;
until (StrToInt(HowManyMake)) <= PotsMade;
Freedtm(CleanHerb);
Freedtm(PotionUse);
Freedtm(PotionComplete);
FreeBitmap(WithDrawClean);
FreeBitmap(BankSoulSplit);
FreeBitmap(UseBank);
FreeBitmap(StoreAll);
FreeBitmap(WithDrawPotion);
end.
end.

rj

2012-12-29 11:40:54

From: J J
Or as a last resort (not advised, but good to check)

program PotionMaker;
{$i srl/srl.simba}

var
BankTry, CleanHerb, PotionUse, BankSoulSplit, WithDrawClean: Integer;
PotionComplete, StoreAll, WithDrawPotion, UseBank, PotsMade: Integer;
HowManyMake, Status: string;

procedure WithDrawPotions;
var
X, Y: Integer;
begin
if FindDTM(PotionUse, x, y, 17, 28, 499, 325) then
begin
ClearDebug;
status := ('Withdrawing potion');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(WithDrawPotion, X, Y, 13, 27, 498, 325, 145) then
begin
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(1400 + Random(350));
end;
end;
end;

procedure CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
var
X, Y: Integer;
begin
if FindColorTolerance(X, Y, 9416136, 549, 207, 724, 356, 1) then
begin
ClearDebug;
status := ('Recovering from mistake');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(250 + Random(150));
CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
end;
WithDrawPotions;
end;

procedure StorePotions;
var
X, Y: Integer;
begin
ClearDebug;
status := ('Storing finished potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') if FindDTM(PotionComplete, x, y, 552, 207, 731, 460) then
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(StoreAll, X, Y, 493, 155, 754, 497, 155) then
begin
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(650 + Random(150));
CheckLowerDoseMistakeToAvoidMistakeToGetBetterXpPerHourForALotOfXpbecauseofareallysmallglitchedthatpissedmeoffsoihavetomakeawholenewprocedurethatislongashellandnonormalhumanbeingcanreaditbutsinceitsacomputeritdoesnotmatterhowlongitis;
end;
end;

procedure WithDrawHerbs;
var
X, Y: Integer;
begin
if FindDTM(CleanHerb, x, y, 15, 24, 500, 324) then
begin
ClearDebug;
status := ('Withdrawing clean herbs');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(550 + Random(150));
if FindBitmapToleranceIn(WithDrawClean, X, Y, 106, 10, 482, 366, 145) then
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(550 + Random(150));
StorePotions;
end;
end;

procedure BankPotions;
var
tmpCTS, l, r, X, Y: Integer;
BankTPA: TPointArray;
begin
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.15, 0.31);
if FindColorsTolerance(BankTPA, 5517118, 224, 172, 292, 255, 3) then
begin
ClearDebug;
status := ('Banking');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(BankTPA) wait(randomrange(60, 100));
mmouse((BankTPA[r].x), (BankTPA[r].y) - 35, 2, 2);
wait(randomrange(200, 350));
clickmouse2(mouse_Right);
wait(randomrange(400, 550));
if FindBitmapToleranceIn(UseBank, X, Y, 106, 10, 482, 366, 145) then
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(500 + Random(150));
repeat
if BankTry >= 7 then
begin
BankPotions;
end;
IncEx(BankTry, 1);
wait(randomrange(500, 750));
until (FindBitmapToleranceIn(BankSoulSplit, X, Y, 181, 27, 359, 52, 145) = true) BankTry := 0;
WithDrawHerbs;
end;
end;

procedure MakePotions;
var
X, Y: Integer;
begin
if FindDTM(PotionUse, x, y, 562, 210, 723, 458) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') if FindDTM(CleanHerb, x, y, 561, 210, 594, 454) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 562, 210, 594, 454) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
if FindDTM(CleanHerb, x, y, 605, 213, 636, 459) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 605, 213, 636, 459) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
if FindDTM(CleanHerb, x, y, 645, 211, 678, 456) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 645, 211, 678, 456) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
if FindDTM(CleanHerb, x, y, 690, 211, 728, 459) then
begin
ClearDebug;
status := ('Making Potions');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
Wait(320 + Random(100));
if FindDTM(PotionUse, x, y, 690, 211, 728, 459) then
begin
mmouse(x, y, 1, 1);
Wait(100 + Random(100));
ClickMouse(x, y, mouse_Left);
IncEx(PotsMade, 1);
Wait(320 + Random(100));
end;
end;
end;
end;
end;
MakePotions;
end;
BankPotions;
end;

procedure CloseBankHerb;
var
X, Y: Integer;
begin
ClearDebug;
status := ('Closing bank');
Writeln('********************************') Writeln('RJJ95 Potion Maker Version 2.6') Writeln('Status:' + status + '');
Writeln('Potions Made:' + IntToStr(PotsMade) + '');
WriteLn('Goal:' + '[' + HowManyMake + ']' + '|' + IntToStr(StrToInt(HowManyMake) - PotsMade) + ' Left to make| [' + IntToStr(Round(PotsMade * 1.0 / StrToInt(HowManyMake) * 100)) + '%]');
Writeln('********************************') if FindColorTolerance(X, Y, 8421504, 427, 32, 500, 51, 15) then
begin
Wait(200 + Random(150));
MouseSpeed := 20;
mmouse(x, y, 1, 1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(700 + Random(150));
MakePotions;
end;
end;

procedure AskOptions;
begin
if (InputQuery('How many potions do you want to make?', 'Amount:', HowManyMake)) then
IncEx(PotsMade, 1);
Wait(750);
CloseBankHerb;
end;

begin
CleanHerb := DTMFromString('mlwAAAHicY2dgYJjJxMAwlwlCTwXiSUA8DYjnAHEQIwNDABD7ArEPI4QfBsQhQCwarM4g5K8KpkUjNMFYIlWfQTRWm4ETaC4uzIgHQwEAd2MK2w==');
PotionUse := DTMFromString('mlwAAAHicY2dgYMhmYmAoBOJcIM4A4lQgzgLiPCCOZGRgCAPiECiOAOIYII4GYh//ywyq6pMZjC3OMLh7XwbzQdjI7BgDJ9BcXJgRD4YCAFxlDqo=');
PotionComplete := DTMFromString('mggAAAHicY2NgYHBiYmBwA2JnILYHYlsgdgHil0C5d0D8HojfMkD4z4B44vadDIVLloPp2Xv2MswC4pp1Gxg4gHLYMCMODAEA0WcTFQ==');
BankSoulSplit := BitmapFromString(172, 17, 'meJztmFFSwzAMRHMT7kD7C9MvB' + 'm7IbSEznnqWlbSWnCbtAB1/OIktS6snx83p9f0UtOeXN2z46Hz5mG' + 'vCPi2h27QD2qW/qcORsevA78XAvw6tPX1+UVvtt85c4NaaFjaKPZp' + '+88AFCRoAnF4FDBW+OwOrtWVZmkvL9dcvJ9ZFU5RHN/uagTkf8k72' + 'PObFJwZWI1UG1nj7XNIhIn9XBpqfJLirf1VeslMCQDBQ3Y40petl7' + '1QLcI4BzDUxoKPeGwPBwBZTEe2Z3W8LA7bM3QH5xLmLTjBA9d6Uwd' + 'p/BAbw0i2l6L47oJcbBk6Hjej8QHkUu3HkJJV5BgMyiJ7YWUPRcDo' + 'dAKg6mpM0WJRGH5DRYZgyHQ6VEqY1s9Ni4O59DIrSbUGKNgrrTKZC' + 'LQaRQbQ27OPPdTK5DwxDFkuQ224qkwzQ+VAo4Jqy7wJiMgqBKsJVA' + 'ye6jg2x13Vd7bvrkgLD/vBd4D4dumc7JQaEvD07kakoUjfXtFZ+Vx' + 'TpcN0TgW9k4Hx973QMfjEDuBcJU9Wooz0kwiDDgK59QqWUd3IgsxO' + 'WFOg7yaMxYI9wkanemsLRu6Cktj4gIZM6WHSSSNYG8b4rfjTGqiFY' + 'Im0pdrSmdagy0PexfupGBXq/PV1+/tCIOwD/Cbpzo7XQJexjI2u2N' + 'HS8dkwUGt6n1VExGoN5ITXsXNc3G7vwhHTol7ZDrbmBwka6uS8pO0' + 'B8DegfBER2zua7uruuaBkGjtEB9//jdSjZT04U48nbLQC41iYAyDA' + 'wJ2Beh4iBA3TIYHDb2PHp8HtgNfBq+EkA9mCAdLAMHKnDzRlIjncx' + 'yAeuYy9JsRMDVR3wGPBoOnwD+YiGAg==');
UseBank := BitmapFromString(95, 10, 'meJztlkEOxCAIRT1I97OY83qXnq' + 'DXaichIQzw0ULqqoYFotXvE0z7fvT92D5fsv7fTdt5NmnFdSoTKls' + 'TjdaahMPd4qGoVfTzOukJ6VtYAKeofzEcuc4LpwKHumz8oRu0e7FR' + 's0NovtWMajN42dDQUMAMHPZlU3HEB705cdxyQISH9HIC5DFvZY5KG' + 'wUqyFKVsTapXM0yjsi4G8UCZvzJsvqZzRBVa/GFIt+FgHxUU0UIQz' + 'ib+LeR51Ua4nJboDl+c56D4yZDnCHooVaa3aKIy2ro5za6FefuBTx' + 'PZUQ=');
WithDrawClean := BitmapFromString(175, 8, 'meJzNl8ENwjAMRTtI7xxYoiNyyS' + '6doGsBUiTL8vd3nWAKyIfEJLHr/5xC24+2H8uyrLd7twYe5mcr412' + 'FJof38/sU47IctsfzbbJdBuL/Rs4X2HT+scSsvHmhr4GBZZ6EoaqY' + 'f2KfwyC6m9KZvkM8jNOcjKKYxYGTTd29bqwSGPq0Gy4zfu0065N7c' + 'TwaK+80fgODHqzkZkA8NEsuY7jeyGROCFreJVmfUAuDfpWgWMzfv2' + 'I8nJ45lAPG0uuHniIDAyspSskkRj/rbrPSvawwAZyWwxDfGIFw7nX' + 't7jV+XaihWBg380RVMEyMMzi5nPwEBhQoI8Tp+QhMQEg+1igMYm7l' + '5ZEvg8Edazi/AYNUQw9Y6eQz1GtDNw9KPxdr4mbQ4VwSWLVb4u9bf' + 'PmjoKi4YVJnVQiD7g7seuzWjf9+y8PA9qJw07HibJG0bi/tWint');
StoreAll := BitmapFromString(175, 8, 'meJztVkESwyAI9CHee+gn+sRe8p' + 'e8IN9qnXHqEBZWYhJPzXAgCIiwWbOsW0ppWbci+fEsIvWbpG6h9pV' + '2pUt5vT9F0v7xNqrOt55lQLCqk3W2nkR8yoN69WnNbIo3hauk5Zfb' + 'qSVSRuTgY87TBKs6WWc3XE4/7+cuY5EEpoEBX/9guCph3EGBQeGhW' + 'kwCHzZ6+ZscBYPiVfmKOrd4RmXnq3wK3e2Gq1ID9Yrx4IeM4V3ceH' + 'GYfxfI+eiJYGj5h5lB/S2Yp0Nn7kM67K1GRkBieZ3dWHUoNVkChvy' + '7KbB47+JGi6l3Od8EQzB55FzYKP5FeD6mjgqJIsxA/M0MwVgT4QNN' + '64776LyQ/KeBgTAtbzv2PA6G4PdIgBQBbRwMJkEdAoNH9cNgUCQ2H' + 'wwRZjDbbjIGZwZy0jiTcEsQDCn8zyDd5NIXjmOGvA==');
WithDrawPotion := BitmapFromString(180, 7, 'meJy1VsENwzAI9CD599ElOmI/2a' + 'UTdK3WSiQL3R0Y23LFA1+AEDifejyex2Xn51utlNJ8xj2ELRMzbVC' + 'cO2cf7PX+VdvR27TdLdluGVksGNeER9VvNIBJluvXcGYLgLA43hEE' + 'B6B3lLnyXV1uSHpYBJ7eRy8lGTyaNVTcS6+fL0GZ2JZuuVGRrm4wW' + '1oWbE1Wa0WgZqBR3nKhpTlueAS446XvzVniMGp+S1CN35vvBIKhE6' + 'kbXLDLDW/CvFlv44x7dx8ipZRxA3wc4obUioAbo34sWXZxwY2GIsl' + 'cj6IyUj5a5MaEn2GXpM1WbqxwIHk3A93IcyOfC+3FfIu54Wn+bm5I' + '33J1BzfauIKdjupD8m4mK3e50c21oKeNdhQxN+zXyeGf6l+BF9ndk' + 'ScOQFGpzOu6IfUW7hpwJpBouJ4xN2RBwDkynyvbYDzzyX/tNMNq');
AskOptions;
repeat
CloseBankHerb;
until (StrToInt(HowManyMake)) <= PotsMade;
Freedtm(CleanHerb);
Freedtm(PotionUse);
Freedtm(PotionComplete);
FreeBitmap(WithDrawClean);
FreeBitmap(BankSoulSplit);
FreeBitmap(UseBank);
FreeBitmap(StoreAll);
FreeBitmap(WithDrawPotion);
end.
end.


How did you get that tab lol

The Killer

2012-12-29 11:42:34

From: rjj95
How did you get that tab lol


enable the formatter extension :P

Gucci

2012-12-29 11:59:26

Wow didn't know Simba had a formatter ;)

CRASH_OVERRIDE

2012-12-29 21:11:02

WOW,

Wish i realised this earlier.. kinda feel stupid for spending a few days manually re-spacing stuff all the time XD