• Log in or sign up for an account here: https://www.sythe.org/login

Need help with SCAR script.

Joined
Aug 20, 2008
Sythe Gold
0
Messages
21
I really need help with a SCAR script as it is not working for me for some strange reason. I am running SCAR 2.03. By the way, I am also new to this SCAR scripting things. If you know how to fix this script or can teach me how to use it, please email me on:
[email protected]


This is the script I am having problems with: >_<

program PowerMinerByRaattis;
{
RRRRRRRRRRRR AAAAAAAA AAAAAAAA TTTTTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTTTTT IIIIII SSSSSSSSSSS
RRRRRRRRRRRRRR AAAAAAAAAA AAAAAAAAAA TTTTTTTTTTTTTTTTTTT TTTTTTTTTTTTTTTTTTT IIII SSSSSSSSSSSSSSS
RRRR RRR AAA AAA AAA AAA TT TTTT TT TT TTTT TT IIII SSS SSSS
RRRR RRR AAA AAA AAA AAA TTTT TTTT IIII SSSSSS
RRRRRRRRRRRRR AAAAAAAAAAAAAA AAAAAAAAAAAAAA TTTT TTTT IIII SSSSSSSSSSSS
RRRRRRRRRRR AAAAAAAAAAAAAA AAAAAAAAAAAAAA TTTT TTTT IIII SSSSSS
RRRR RRRR AAA AAA AAA AAA TTTT TTTT IIII SSSS SSS
RRRR RRRR AAA AAA AAA AAA TTTT TTTT IIII SSSSSSSSSSSSSSS
RRRR RRRR AAA AAA AAA AAA TTTTTT TTTTTT IIIIII SSSSSSSSSSS


////////////////////////////////////
// I made this script to test //
// Library, but somehow I managed //
// to notice that it causes lagg. //
// Then I "converted" it for OSi. //
////////////////////////////////////
// Thanks to: //
//Odie5533-For giving good advices//
// and OSi. //
// //
//Kaitnieks-For makeing SCAR :D //
// //
// And thanks to everyone else //
// whose scripts I used to study //
// Pascal. //
////////////////////////////////////

v1.0: Script released!
v1.1: Left- and left&right mouse click added!
v1.2: Few important improves.
}

{.include OSi.txt}
{.include BoxBreaker.txt}

var
randvar1,randvar2,Mine,MineYe,Drop,DropY,Take,TakeYe,Attack,
AttackYe,Talk,TalkYe,PicsHandleColor,PicsHeadColor1,
PicsHeadColor2,PicsHeadColor3,LampPicture,Ran,Gasers,Fight,
DropCounter,TalkingNPC,OresMined,h,o,PlusH,WaitCounter,Tries,
DidntFindRock:integer;
Found:boolean;

const

//------Setup---------------
Username='missmolly187';
Password='westy';
RightClick= 3; //1 to right click, 2 to left click, 3 to left click and if doesn't work after two tries rightclick.
WaitSeconds= 15; //How many seconds to wait before new try.
PicInInvetory= true; //If pickaxe in invetory true, if pick weared false. If more than one pickaxes true.
SearchForPicsHead= True; //False to not search and true to search pickaxe's head.
//------Set-colors---------
RockColor= 2371663; //Color of rock to mine.
OreColor= 1910851; //Color of ore in inventory.
roadcolor=6250343;
banklogo= 3653588;
minecolor=1657457;

//------End-of-setup-------
procedure wt;
begin
wait(100+random(100));
end;

Procedure ProgressReport;
begin
ClearReport;
AddToReport(inttostr(OresMined)+' ore(s) mined.')
AddToReport('Ran '+inttostr(Ran)+' Time(s).')
AddToReport('Found '+inttostr(Gasers)+' gaser(s)')
AddToReport('Dropped '+inttostr(DropCounter)+' inventorie(s).')
AddToReport('Fought '+inttostr(Ran)+' Time(s).')
AddToReport('Talked to '+inttostr(TalkingNPC)+' NPC(s).')
end;

Procedure OpenWearings; {Created by Odie5533 Modified by Raattis}
begin
if(not (GetColor(683,174)=2434414))then
begin
wait(400+random(100));
Mouse(674,175,15,15,true);
wait(400+random(100));
end;
end;

Function ClickImage(sX,sY,eX,eY,Image,plapla:integer; left:boolean):boolean;
var ks,yy:integer;
begin
if(findbitmapin(Image,ks,yy,sX,sY,eX,eY))then
begin
mouse(ks,yy,1,1,left);
result:=true;
end;
end;

Procedure walktomine;
begin
if(FindColortolerance(x,y,roadcolor,650,15,41,662,5))Then
begin
Mouse(x,y,5,5,true)
wait(500+random(300))
mapflag;
end;
if(FindColortolerance(x,y,minecolor,650,15,41,662,5))Then
begin
Mouse(x,y,5,5,true)
wait(500+random(300))
mapflag;
end;
end;

Procedure walktobank;
begin
if(FindColortolerance(x,y,roadcolor,690,54,62,704,5))Then
begin
Mouse(x,y,5,5,true)
wait(500+random(300))
mapflag;
if(FindColortolerance(x,y,banklogo,690,54,62,704,5))Then
begin
Mouse(x,y,5,5,true)
wait(500+random(300))
mapflag;
end;
end;
end;

Procedure LoginIfNeeded;
var haba,huba:integer;
begin
if(getcolor(430,481)=8291967)and(getcolor(293,255)=16777215)then
mouse(397,308,120,25,true);
if(getcolor(430,481)=8291967)and(getcolor(423,295)=16777215)then
begin
mouse(396,276,120,25,true);
wt;
mouse(378,256,10,3,true);
wt;
sendkeyssilentsmooth(Username,50);
wt;
mouse(365,269,10,3,true);
wt;
sendkeyssilentsmooth(Password,50);
wt;
mouse(236,306,120,25,true);
repeat
wait(1000);
until(findcolor(haba,huba,8421504,341,5,513,218))
wt;wt;wt;
mouse(haba+7,huba,0,0,true)
end;
end;

procedure search(thing:string; StartX,StartY,StopX,StopY,Jump:integer);
var counter,PlusX,PlusY,x,y:integer;
begin
repeat
setmousemode(false);
movemouse(StartX+PlusX,StartY+Plusy)
wait(50)
if(IsTextAt2(9,9,thing,100))then
begin
getmousepos(x,y)
wait(100)
clickmouse(x,y,true);
Writeln('Found pickaxe´s head')
Break;
end;
if(not(IsTextAt2(9,9,thing,100)))then
begin
PlusX:=PlusX+jump;
getmousepos(x,y)
if(x>StopX)and(y<StopY)then
begin
PlusY:=PlusY+Jump;
PlusX:=1;
end;
if(Y>StopY)then
begin
PlusY:=0;
PlusX:=0;
end;
Counter:=Counter+1;
end;
until(Counter>42624);
end;

Procedure DropColor2(ObjColor:integer);
begin
repeat
if(FindColor(x,y,ObjColor,558,204,739,466))then
begin
Mouse(x,y,5,5,false);
wt;
if(not ClickImage(547,189,749,484,Drop,1,true))and(not ClickImage(547,189,749,484,DropYe,1,true))then
mmouse(517,130,30,30);
if(ClickImage(547,189,749,484,Drop,1,true))or(ClickImage(547,189,749,484,Drop,1,true))then
wt;
wait(600+random(100));
end;
until(not FindColor(x,y,ObjColor,554,202,734,464))
end;

Procedure GetPicColors;
begin
if(PicInInvetory)then
begin
OpenBag;
PicsHeadColor1:=GetColor(585,216);
PicsHeadColor2:=GetColor(580,218);
PicsHeadColor3:=GetColor(587,216);
PicsHandleColor:=GetColor(580,228);
wt;
writeln('Pickaxe´s colors took');
end;
if(not PicInInvetory)then
begin
OpenWearings;
PicsHeadColor1:=GetColor(586,294);
PicsHeadColor2:=GetColor(595,294);
PicsHeadColor3:=GetColor(598,297);
PicsHandleColor:=GetColor(589,305);
wt;
OpenBag;
writeln('Pickaxe´s colors took');
end;
end;

Procedure CheckInv;
begin
if(InvinCount>27)then
begin
//writeln('Inventory full, dropping ores!')
//DropColor2(OreColor);
//DropCounter:=DropCounter+1;
//ProgressReport;
walktobank;
end;
end;

Procedure RunAway;
begin
writeln('Ran away')
LoginIfNeeded;
SetRun(true)
Mouse(645,13,0,0,true)
wait(25000+random(1000))
LoginIfNeeded;
Mouse(645,158,0,0,true);
Wait(10000+random(1000));
LoginIfNeeded;
SetRun(false)
Ran:=Ran+1;
end;

procedure GasFinder;
begin
if//(FindColor(x,y,12370886,7,6,512,334))or //If you want, you can remove those "//" in the begin of line, to make gas finding easier. Notice: This will cause a MASSIVE lagg!!
(FindColor(x,y,7771043,7,6,512,334))or
//(FindColor(x,y,6850712,7,6,512,334))or
//(FindColor(x,y,6915991,7,6,512,334))or
//(FindColor(x,y,6127504,7,6,512,334))or
//(FindColor(x,y,6850712,7,6,512,334))or
//(FindColor(x,y,4155518,7,6,512,334))or
//(FindColor(x,y,6719384,7,6,512,334))or
//(FindColor(x,y,6718611,7,6,512,334))or
//(FindColor(x,y,6719384,7,6,512,334))or
//(FindColor(x,y,4812158,7,6,512,334))or
//(FindColor(x,y,10399412,7,6,512,334))or
//(FindColor(x,y,13028558,7,6,512,334))or
//(FindColor(x,y,11188414,7,6,512,334))or
//(FindColor(x,y,8821679,7,6,512,334))or
(FindColor(x,y,9084582,7,6,512,334))then
begin
mouse(648,88,0,0,true);
writeln('Gas found')
Gasers:=Gasers+1;
wait(30000);
LoginIfNeeded;
end;
end;

Procedure TextFinder;
begin
if(findcolor(h,o,65535,3,20,512,332))then
begin
Writeln('Yellow text found')
Waitcounter:=0;
PlusH:=0;
repeat
movemouse(h+PlusH,o+7)
PlusH:=PlusH+5;
Waitcounter:=Waitcounter+1;
wait(100)
until((IsTextAt2(9,9,'Talk',100))or(IsTextAt2(9,9,'Attack',100))or(Waitcounter>50));
GetMousePos(x,y)
if(IsTextAt2(9,9,'Talk',100))then
begin
mouse(x,y,1,1,false);
wt;
if(ClickImage(6,20,512,332,Talk,2,true))or(ClickImage(6,20,512,332,TalkYe,2,true))then
begin
wait(2000+random(200));
mouse(192,439,50,5,true);
wait(1000+random(200));
mouse(192,439,50,5,true);
wait(1000+random(200));
mouse(192,439,50,5,true);
writeln('Talked to NPC');
TalkingNPC:=TalkingNPC+1;
end;
end;
if(IsTextAt2(9,9,'Attack',100))then
begin
writeln('Found Golem')
RunAway;
Fight:=Fight+1;
end;
end;
end;

Procedure FindFight;
begin
if(findcolor(x,y,65280,211,109,326,221))then
begin
writeln('Fight found');
RunAway;
Fight:=Fight+1;
end;
end;

Procedure FindLamp;
begin
if(findbitmap(LampPicture,x,y))then
begin
writeln('Lamp found');
wait(2000+random(100));
mouse(x,y,13,5,true);
wait(5000+random(500));
mouse(154,219,5,5,true);
wait(2000+random(100));
mouse(246,254,3,3,true);
end;
end;

Procedure AttachPic;
var waiting:integer;
begin
repeat
waiting:=waiting+1;
if(findcolor(x,y,PicsHeadColor1,558,204,739,466))or
(findcolor(x,y,PicsHeadColor2,558,204,739,466))or
(findcolor(x,y,PicsHeadColor3,558,204,739,466))then
begin
mouse(x,y,2,2,true);
wt;
if(findcolor(x,y,PicsHandleColor,558,204,739,466))then
begin
mouse(x,y,2,2,true);
wt;
end;
end;
until(not IsTextAt2(9,9,'Use',100))or(waiting>9)
if(waiting>9)then
logout('Pickaxe´s head attaching was not successful')

writeln('Pickaxe´s head attached');
end;

Procedure SearchForPic;
var Found:boolean; Tries:integer;
begin
repeat
Tries:=Tries+1;
x:=random(512);
y:=random(332);

if(not FindColorSpiral(x,y,PicsHeadColor1,3,3,512,332))or
(not FindColorSpiral(x,y,PicsHeadColor2,3,3,512,332))or
(not FindColorSpiral(x,y,PicsHeadColor3,3,3,512,332))then
begin
if(findcolor(x,y,2105598,541,4,760,168))then
begin mouse(x+3,y+3,1,1,true); end;

if(FindColorSpiral(x,y,PicsHeadColor1,3,3,512,332))or
(FindColorSpiral(x,y,PicsHeadColor2,3,3,512,332))or
(FindColorSpiral(x,y,PicsHeadColor3,3,3,512,332))then
begin
MMouse(x,y,0,0)
if(IsTextAt2(9,9,'Take Pic',100))then
begin
mouse(x,y,0,0,false);
wt;
If(ClickImage(3,3,512,332,Take,2,true))or(ClickImage(3,3,512,332,TakeYe,2,true))then
begin
Found:=true;
writeln('Found pickaxe´s head')
end;
end;
end;
end;
until((Found)or(Tries>9));
if(tries>9)then
Search('Take Pic',1,1,512,333,2);
end;

Procedure PickaxeCheck;
begin
if(getcolor(486,413)=0)and(GetColor(387,381)=0)and(GetColor(131,383)=0)then
begin
if(not PicInInvetory)then
begin
DropColor2(OreColor);
OpenWearings;
wt;
MMouse(580,293,20,20);
if(IsTextAt2(9,9,'Remove Pickaxe handle',100))then
begin
writeln('Pickaxes´s head is missing')
wt;
Mouse(580,293,20,20,true);
wait(1000+random(300));
wt;
OpenBag;
end;
if(IsTextAt2(9,9,'Remove Broken pickaxe',100))then
begin
wt;
logout('Pickaxe is broken');
Repeat
wait(25000);
Until(false)
end;
end;
if(findcolor(x,y,picshandlecolor,560,204,736,461))then
mmouse(y,x,5,5);
if(IsTextAt2(9,9,'Use Broken pickaxe',100))then
begin
logout('Pickaxe is broken');
repeat
wait(25000)
until(false)
end;
if(IsTextAt2(9,9,'Use Pickaxe handle',100))then
begin
SearchForPic;
end;
end;
end;

procedure DeadFinder;
begin
if(GetColor(119,420)=0)and(GetColor(30,418)=0)and(GetColor(72,429)=0)and(GetColor(143,426)=0)then
Logout('Oh dear you are dead!');
end;

Procedure RandomProtection;
begin
LoginIfNeeded;
TextFinder;
GasFinder;
FindFight;
if(SearchForPicsHead)then
begin
PickaxeCheck;
end;
randvar1:=50-random(50);
randvar2:=50-randvar1;
wait(75+randvar1)
FindStrangeBox;
wait(75+randvar2)
ProgressReport;
DeadFinder;
end;

Procedure RandomProtectWait;
begin
RandomProtection;
wait(800)
WaitCounter:=WaitCounter+1;
status('Waited ' +inttostr(WaitCounter) + ' second(s)');
end;

Procedure loadbmps;
begin
LampPicture := BitmapFromString(17, 6,
'000001000001000001000001BAB815B2B015AEAD15ABAA159C9A12' +
'9291128C8A1275740E000001000001000001000001000001D0CE18' +
'CBC918C8C618C5C418C5C418C0BE18BAB815B5B315ABAA15A3A112' +
'99971292911284820E79780E6968095C5A09A6A415CECC18C5C418' +
'C2C118C0BE18BDBB18BAB815B8B615B5B315B2B015A8A715A3A112' +
'9C9A129594128E8D1281800E999712AEAD15CECC18CBC918C0BE18' +
'BDBB18BAB815B5B315B2B015AEAD15A8A715A3A1129F9E12999712' +
'88860E84820E8C8A129291129C9A12000001CBC918CBC918BAB815' +
'B8B615B5B315B2B015AEAD15A8A715A3A1129C9A1295941281800E' +
'79780E84820E000001000001000001CBC918CBC918C0BE18B8B615' +
'B2B015AEAD15ABAA15A6A4159F9E129997128C8A1279780E75740E' +
'000001000001C2C118');
Attack := BitmapFromString(19, 5,
'5D54475D5447FFFFFFFFFFFFFFFFFF5D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFFFFFFFFFF000000FFFFFFFFFFFF5D54475D5447' +
'5D5447FFFFFFFFFFFF5D54475D54475D54475D5447FFFFFFFFFFFF' +
'5D54475D5447FFFFFFFFFFFF0000000000005D5447FFFFFFFFFFFF' +
'5D54475D5447FFFFFFFFFFFF0000005D54475D54475D5447FFFFFF' +
'FFFFFF0000005D5447FFFFFFFFFFFF0000005D54475D5447FFFFFF' +
'FFFFFF0000005D5447FFFFFFFFFFFF0000005D54475D54475D5447' +
'FFFFFFFFFFFF0000005D5447FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' +
'FFFFFFFFFFFF0000005D5447FFFFFFFFFFFFFFFFFFFFFFFF5D5447' +
'5D5447FFFFFFFFFFFFFFFFFFFFFFFF');
AttackYe := BitmapFromString(19, 5,
'5D54475D5447FFFF00FFFF00FFFF005D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFF00FFFF00000000FFFF00FFFF005D54475D5447' +
'5D5447FFFF00FFFF005D54475D54475D54475D5447FFFF00FFFF00' +

'5D54475D5447FFFF00FFFF000000000000005D5447FFFF00FFFF00' +
'5D54475D5447FFFF00FFFF000000005D54475D54475D5447FFFF00' +
'FFFF000000005D5447FFFF00FFFF000000005D54475D5447FFFF00' +
'FFFF000000005D5447FFFF00FFFF000000005D54475D54475D5447' +
'FFFF00FFFF000000005D5447FFFF00FFFF00FFFF00FFFF00FFFF00' +
'FFFF00FFFF000000005D5447FFFF00FFFF00FFFF00FFFF005D5447' +
'5D5447FFFF00FFFF00FFFF00FFFF00');
Drop := BitmapFromString(20, 6,
'FFFFFFFFFFFFFFFFFFFFFFFF5D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFFFFFFFFFF000000FFFFFFFFFFFF5D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D5447FFFFFFFFFFFF0000005D5447FFFFFF' +
'FFFFFF5D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D5447FFFFFFFFFFFF000000' +
'5D5447FFFFFFFFFFFF0000005D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D5447FFFFFF' +
'FFFFFF0000005D5447FFFFFFFFFFFF0000005D5447FFFFFFFFFFFF' +
'FFFFFFFFFFFF5D54475D54475D5447FFFFFFFFFFFFFFFFFFFFFFFF' +
'5D5447FFFFFFFFFFFF0000005D5447FFFFFFFFFFFF0000005D5447' +
'FFFFFFFFFFFFFFFFFF0000000000005D5447FFFFFFFFFFFF000000' +
'000000FFFFFFFFFFFF');
DropY := BitmapFromString(20, 6,
'FFFF00FFFF00FFFF00FFFF005D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFF00FFFF00000000FFFF00FFFF005D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D5447FFFF00FFFF000000005D5447FFFF00' +
'FFFF005D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D5447FFFF00FFFF00000000' +
'5D5447FFFF00FFFF000000005D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D5447FFFF00' +
'FFFF000000005D5447FFFF00FFFF000000005D5447FFFF00FFFF00' +
'FFFF00FFFF005D54475D54475D5447FFFF00FFFF00FFFF00FFFF00' +
'5D5447FFFF00FFFF000000005D5447FFFF00FFFF000000005D5447' +
'FFFF00FFFF00FFFF000000000000005D5447FFFF00FFFF00000000' +
'000000FFFF00FFFF00');
Mine := BitmapFromString(21, 6,
'FFFFFFFFFFFF5D54475D54475D54475D5447FFFFFFFFFFFF5D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D5447FFFFFFFFFFFF0000005D54475D54475D5447' +
'FFFFFFFFFFFF0000005D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D5447FFFFFFFFFFFFFFFFFF' +
'5D54475D5447FFFFFFFFFFFFFFFFFF0000005D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000' +
'5D5447FFFFFFFFFFFF5D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D5447FFFFFFFFFFFF000000FFFFFFFFFFFF000000' +
'FFFFFFFFFFFF0000005D54475D54470000000000005D5447FFFFFF' +
'FFFFFFFFFFFFFFFFFFFFFFFF5D54475D5447FFFFFFFFFFFF000000' +
'5D5447000000000000FFFFFFFFFFFF0000005D5447FFFFFFFFFFFF' +
'5D54475D5447FFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFF5D5447' +
'');
MineYe := BitmapFromString(20, 6,
'FFFF00FFFF005D54475D54475D54475D5447FFFF00FFFF005D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFF00FFFF000000005D54475D54475D5447FFFF00' +
'FFFF000000005D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D5447FFFF00FFFF00FFFF005D54475D5447' +
'FFFF00FFFF00FFFF000000005D54475D54475D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D5447FFFF00FFFF00FFFF00' +
'FFFF00FFFF00FFFF00FFFF00FFFF000000005D5447FFFF00FFFF00' +
'5D54475D54475D54475D54475D54475D54475D54475D5447FFFF00' +
'FFFF00000000FFFF00FFFF00000000FFFF00FFFF000000005D5447' +
'5D54470000000000005D5447FFFF00FFFF00FFFF00FFFF00FFFF00' +
'5D5447FFFF00FFFF000000005D5447000000000000FFFF00FFFF00' +
'0000005D5447FFFF00FFFF005D54475D5447FFFF00FFFF00FFFF00' +
'000000FFFF00FFFF00');
Talk := BitmapFromString(16, 6,
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D5447FFFFFF5D5447000000' +
'FFFFFFFFFFFF0000000000000000005D54475D54475D54475D5447' +
'5D54475D54475D54475D5447FFFFFF5D54475D5447FFFFFFFFFFFF' +
'0000005D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFFFF5D54475D5447FFFFFFFFFFFF0000005D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'FFFFFF5D54475D5447FFFFFFFFFFFF0000005D54475D54475D5447' +
'FFFFFFFFFFFFFFFFFFFFFFFF5D54475D54475D5447FFFFFF5D5447' +
'5D5447FFFFFFFFFFFF0000005D54475D5447FFFFFFFFFFFF000000' +
'000000FFFFFFFFFFFF5D54475D5447FFFFFF');
TalkYe := BitmapFromString(16, 6,
'FFFF00FFFF00FFFF00FFFF00FFFF00FFFF005D54475D54475D5447' +
'5D54475D54475D54475D54475D54475D5447FFFF005D5447000000' +
'FFFF00FFFF000000000000000000005D54475D54475D54475D5447' +
'5D54475D54475D54475D5447FFFF005D54475D5447FFFF00FFFF00' +
'0000005D54475D54475D54475D54475D54475D54475D54475D5447' +
'5D54475D5447FFFF005D54475D5447FFFF00FFFF000000005D5447' +
'5D54475D54475D54475D54475D54475D54475D54475D54475D5447' +
'FFFF005D54475D5447FFFF00FFFF000000005D54475D54475D5447' +
'FFFF00FFFF00FFFF00FFFF005D54475D54475D5447FFFF005D5447' +
'5D5447FFFF00FFFF000000005D54475D5447FFFF00FFFF00000000' +
'000000FFFF00FFFF005D54475D5447FFFF00');
end;



begin
setupOSI;
BoxOpenerSetup;
LoadBmps
SetMouseMode(false);
ClearReport;
LoginIfNeeded;
SendArrowSilentWait(0,2000)
ChatFixer;
GetPicColors;
repeat
LoginIfNeeded;

while(findcolor(x,y,8421504,341,5,513,218))do
mouse(x+7,y,0,0,true);
CheckInv;
if(not getcolor(487,417)=2436403)then
mouse(488,415,2,2,true);



status('Searching rock.');

WaitCounter:=0;
if(not findcolor(x,y,RockColor,3,3,512,332))then
begin
DidntFindRock:=DidntFindRock+1;
wait(500);
end;

x:=249;
y:=191;
if(findcolorspiral(x,y,RockColor,3,3,512,332))then

begin

if(RightClick=2)then
begin
mmouse(x,y,3,3);
if(not istextat2(9,9,'Mine',100))then
begin
DidntFindRock:=DidntFindRock+1;
wait(500);
end;
if(istextat2(9,9,'Mine',100))then
begin
wait(10+random(70));
HoldMouse(x,y,true);
Wait(10+random(70));
ReleaseMouse(x,y,true);
RandomProtectWait;
RandomProtectWait;
RandomProtectWait;
end;
end;

if(RightClick=1)then
begin
mouse(x,y,3,3,false)
wt;
if(not FindBitmapIn(Mine,x,y,3,3,512,332))and
(not FindBitmapIn(MineYe,x,y,3,3,512,332))then
begin
mmouse(517,130,30,30);
DidntFindRock:=DidntFindRock+1;
wait(500);
end;
if(FindBitmapIn(Mine,x,y,3,3,512,332))or
(FindBitmapIn(MineYe,x,y,3,3,512,332))then
begin
Mouse(x,y,10,3,true);
RandomProtectWait;
RandomProtectWait;
RandomProtectWait;
end;
end;

if(RightClick=3)then
begin
repeat
if(Tries<2)and(findcolorspiral(x,y,RockColor,3,3,512,332))then
begin
mmouse(x,y,3,3);
if(istextat2(9,9,'Mine',100))then
begin
wait(10+random(70));
HoldMouse(x,y,true);
Wait(10+random(70));
ReleaseMouse(x,y,true);
RandomProtectWait;
RandomProtectWait;
RandomProtectWait;
Break;
end;
end;
Tries:=Tries+1;
if(Tries>1)and(findcolorspiral(x,y,RockColor,3,3,512,332))then
begin
mouse(x,y,3,3,false)
wt;
if(not FindBitmapIn(Mine,x,y,3,3,512,332))and
(not FindBitmapIn(MineYe,x,y,3,3,512,332))then
begin mmouse(517,130,30,30); Tries:=Tries+1; end;
if(FindBitmapIn(Mine,x,y,3,3,512,332))or
(FindBitmapIn(MineYe,x,y,3,3,512,332))then
begin
Mouse(x,y,10,3,true);
RandomProtectWait;
RandomProtectWait;
RandomProtectWait;
Break;
end;
end;

until(Tries>14)
if(Tries>14)then
begin
DidntFindRock:=DidntFindRock+1;
wait(500);
end;
Found:=False;
Tries:=0;
end;

repeat
RandomProtectWait;
until((GetColor(155,430)=0)or(GetColor(78,430)=0)or(WaitCounter>WaitSeconds))
status('Searching rock.');
wait(random(300));
if(GetColor(78,430)=0)then
begin
DidntFindRock:=0;
OresMined:=OresMined+1;
ProgressReport;
end;
end;
until(DidntFindRock>30);
LogOut('Couldn´t find the rock!')
end.




If the script if totally unusable or does work, can someone please help me with this. If nothing could be done about it can someone please send me another Powerminer SCAR script that also does random events.
 
There is a dedicated scar scripting forum for you to post queries like this in, have a look further into the various forum sections available. :)
 
Runescape Gamblingrunescape gambling
Back
Top