SCAR Code:
program SSFMageScript;
var
action,cancel,target,instage4,stage4,stage42,planescape,loops,okloop,intown,ok,points,levelup,leveltrue,i,x,y,randomnum,randomnum2,townready: integer;
Procedure PutShieldsOn;
begin //searches for the cancel button, if it finds it, it clicks it
repeat
if(findbitmaptolerancein(action,x,y,0,0,800,600,70))then
begin
if(findcolor(x,y,7879993,0,0,800,600))then
begin
townready:= 1
writeln('town rdy')
end else
begin
townready:= 0
wait(500);
writeln('town not rdy')
end;
end else
begin
writeln('did not find action')
end;
until(townready = 1)
wait(2000);
repeat
if(findbitmaptolerancein(levelup,x,y,0,0,400,600,40))then
begin
leveltrue:= 1
writeln('you have gained a level')
clickmouse(x,y,true);
wait(1000);
i:= 0
repeat
i:= i+1
clickmouse(196,325,true);
wait(300);
until(i >=6)
wait(2000);
Points:= Points + 6
end else
begin
writeln('No more lvls')
leveltrue:= 0
end;
until(leveltrue = 0)
if(FindBitmapToleranceIn(cancel, x, y, 0, 0, 800, 600, 70))then
begin
movemouse(x+10,y+10)
wait(200);
clickmouse(x+10,y+10,true)
wait(500);
end;
end;
Procedure FindStage;
begin
if(FindBitmapToleranceIn(cancel, x, y, 0, 0, 800, 600, 70))then //makes sure you're on first menu
begin
movemouse(x+10,y+10)
wait(200);
clickmouse(x+10,y+10,true)
wait(500);
end;
if(FindBitmapToleranceIn(action, x, y, 0, 0, 800, 600, 70))then //checks for action button, then clicks it and then clicks walk and walks a random distance
begin
clickmouse(x+10,y+10,true);
wait(300)
clickmouse(x+10,y+10,true)
wait(200)
randomnum:= random(100)+699
randomnum2:= random(100)
clickmouse(randomnum,randomnum2,true)
wait(2000) //EDIT from 500
end;
if(FindBitmapToleranceIn(stage4, x, y, 0, 0, 800, 600, 90))then //searches for red part of stage 4
begin
movemouse(x-50,y+50)
writeln('yup')
wait(1000)
writeln('found')
clickmouse(x-50,y+50,true)
i:=0
wait(500);
repeat
if(FindBitmapToleranceIn(action, x, y, 0, 0, 800, 600, 70))then
begin
i:= 1
end else
begin
i:=0
end;
until(i=1)
i:= 0
end else
begin
writeln('Could not find, searching again...If I dont find it this time I will wait 1 minute')
if(FindBitmapToleranceIn(stage42, x, y, 0, 0, 800, 600, 90))then //searches for text of stage 4
begin
wait(1000)
movemouse(x,y-100)
writeln('Found stage 4')
wait(200);
writeln('Clicking...')
clickmouse(x,y-100,true)
wait(500);
repeat
if(FindBitmapToleranceIn(action, x, y, 0, 0, 800, 600, 70))then
begin
i:= 1
end else
begin
i:=0
end;
until(i=1)
i:= 0
end else
begin
writeln('Waiting 1 minute..')
wait(600)
end;
end;
end;
begin
intown := BitmapFromString(28, 15, 'z78DA737373733330701B52' +
'247960B0B97FA884F3F07327316903BF99E4850CF1BA8877D540B' +
'9933C35F845C88BC75177929A6646DD3978DC49895DD42A9F6951' +
'7E0EC57A6438910082295407');
levelup := BitmapFromString(38, 5, 'z78DADD92418EC3200C45AF' +
'04C6D866695CFBFE471AD24C3A4DAA86A6CB61F145E0E9C55F222' +
'0A0734C538072BA2FCA02EF480B11D074BA28ABED9DDB891AB6E5' +
'1B9BDA559B0571A1BDFF9129524FF364A7CD3AF6EF487361E0850' +
'216369F99B5D3C3B9EE0B0937BE6E33A7F2DB7158F7B71E1EDAE6' +
'C9EDA9E309695EA3D4852B55A8E5F57C4C4B701720AA3EF3AA880' +
'B8B48238184CCBFB1FD91A3A31EA6BAF94D619E8C35CEDECC98A1' +
'4ADF786D988F040CC2ECD52C5DEAD6A376B3D7BF7F6233AB7DB5D' +
'4D1EA6030B7D6FF77FE000B660904');
ok := BitmapFromString(35, 4, 'z78DA9D8F510EC3300843AF54502' +
'0F009A1F7BFD2AA25D2DA2EED3AEC3FEB61A0594B5A8160790BA3' +
'A2AD33C6D68A189D2250F89E9DA7D78D0F8C398B977129360EAB5' +
'79C550E6C9D2C217E9EEED99CCAD9533260451B17B8D01D2B547C' +
'FC6EAC06C7AC38EBA7EB59E30F958CD59950C67E91E58E958D181' +
'F0993FA31DB77CCC8FFFD023BCAC352');
planescape := BitmapFromString(17, 2, 'z78DA333040003730703' +
'20143331084881B3B82205416491C022022105D1035960620880B' +
'40D4185980A01B06C0A58B185B000D1D2CD7');
stage42 := BitmapFromString(33, 2, 'z78DA8590417244210844AF' +
'D44AC3C7A58ADCFF48C1AA4C66924D7AA3853CBA110064CE7D467' +
'E6B8B3B28E1BE2C7FB49B190442DA1A1E2BFF55AC01D9C59401BB' +
'361BBBFDEDD9DD150B53025DD2F3ED78690D7AD1AD45E5D9F7AE7' +
'C28AB6A0AB250E49D2E5B0E3B6DDAD117BFACF2923174F3EDB7CC' +
'95042F65B63FDD426B963C5A79B9EA385485289DA71FA0373474E' +
'C7AED0C647D522CFFB52D2D1194D1567CD6E77952C6DD032AC109' +
'D3344AEAB14E7884BC3ABF0016D05D4B');
stage4 := BitmapFromString(14, 13, '3302002701001A000025070' + //red part of stage 4
'02A0301350401621B0C7921108E24138D1303970F009F0B00A608' +
'00AA05002903001D01001D0904140100190000360B0862241F6F2' +
'01993322BAD3B339012098F0801A011069406032D01001C00000B' +
'00001206031E08051E00003502015C1A1575231E963731C75D54A' +
'D3C30B33E319C2314440B072400001404000C03000E00001A0100' +
'3A120B511E1564251C71291E924336A85445BA6754A54F3C57130' +
'F390A081401001105001303001500002C0E034B25175226186635' +
'266D3A296F3A27814D388D59436A1E1D561710270301180300140' +
'0001B0000341305411D0E4E29195A352373503D35160A4D331C61' +
'49325D0807681712470F04350C032B06022F04004012094011053' +
'C1106441D0E52311F634A375C48353F301C73100F7B1F1A5D1009' +
'5E1B0F54130B500D064000004405014A1007521B1056271B411C0' +
'D482A1C462E1D6004046C08055E0503761910771B1383251D7417' +
'125D0704450100490402510A0452140B521C115C2C20821914640' +
'7047105008718126F00006D00008815129522218616148419167E' +
'1B156E100B5C05005503005A04017A150B6F05017D0500850A058' +
'D0E0A95131094100E8F0D0B91100E91130F8A110C840F0A83120C' +
'600702660A038C1C10780200820904890907870503960906A7171' +
'4A2100DA10E0A9D0D089A0C07990E095D09027518086E09066805' +
'02870F078E0E088C05008B01019D0805A30703A30502A50601A60' +
'900A80C03' +
'902009A0803A91C15D14942E5625AE2665CCF584ECC5B50');
action := BitmapFromString(12, 4, 'z78DA737343072E1620680' +
'606A69620E84616A0DC1C734B1034C3014C9C419018739C4D4110' +
'D3046337107402435C0000A46E4939');
cancel := BitmapFromString(16, 12, 'z78DA73731B2CC0090C4DC0' +
'D018073407436730241E388221C4645730A41680B804E2365A008' +
'8C9E4B9197F28592241F24C3604435C00125394988CDFFDA49A4F' +
'BCC910600186C4843CA92623EB82A44CEA9A8C99F2696132B5DC0' +
'C003C6535BB');
target := BitmapFromString(14, 2, 'z78DA7373330002B7414F020' +
'007642451');
townready:= 0
points:= 0
loops:=0
intown:=0
repeat
loops:= loops+1
writeln(inttostr(loops))
okloop:= 0
instage4:= 0
wait(100)
PutShieldsOn //calls my putshieldson procedure..
writeln('You have gained')
writeln(inttostr(points*1) + ' Magic Points')
wait(2500);
FindStage //You get it i think
repeat
if(findbitmaptolerancein(planescape,x,y,0,0,400,100,30))then //no use yet
begin
InStage4:= 1
end else
begin
instage4:= 0
Sendkeys('D')
wait(90);
sendkeys('z')
wait(90);
clickmouse(402,256,true);
wait(4000);
FindStage
end;
until(instage4 = 1)
if(InStage4 = 1)then
begin
repeat
repeat
if(findbitmaptolerancein(intown,x,y,0,0,800,600,30))then
begin
intown:= 1
end else
begin
intown:= 0
end;
if(not(findbitmaptolerancein(planescape,x,y,0,0,400,100,30)))then //no use yet
begin
InStage4:= 0
end;
if(findbitmaptolerancein(ok,x,y,281,210,602,384,70))then
begin
wait(2000);
clickmouse(x,y,true);
okloop:= 1
end else
begin
wait(100)
if(findbitmaptolerancein(action,x,y,0,0,800,600,70))then
begin
sendkeys('A')
wait(250);
sendkeys('A')
movemouse(400,400)
wait(100)
clickmouse(400,400,true)
wait(100)
sendkeys('c')
wait(50)
sendkeys('Q')
wait(50)
if(findbitmaptolerancein(ok,x,y,281,210,602,384,70))then
begin
wait(2000);
clickmouse(x,y,true);
okloop:= 1
end;
end;
end;
until(okloop = 1)
until(intown = 1)
end;
until(1>2)
end.