this script uses scar 3.06 and srl 3.18
i need it to work with scar 3.12 and srl 4.0
please can some one help me convirt
This script is not mine i take no credit
made by DevilCheater
i repeat not mine![]()
![]()
![]()
this script uses scar 3.06 and srl 3.18
i need it to work with scar 3.12 and srl 4.0
please can some one help me convirt
This script is not mine i take no credit
made by DevilCheater
i repeat not mine![]()
![]()
![]()
I fixed up the script so it doesn't have any more errors, but I have no idea if it'll work or not since I don't have a RuneScape Members account.
SCAR Code:{.Script Info:
# ScriptName = DevilFlaxSpiner
# Author = DevilCheater
# Description = Spins Flax in lumby castle
# Version = 1.0
/Script Info}
// Start Logged out with full bag of flax in lumby bank .. Declear players in lines 27 +
// In case the outcolor is not working fillline 24 and 25
program DevilFlaxSpinner;
{.include srl/srl.scar }
var
Ix, Iy, TimeMarker, Stairs, Flax, FlaxColor: integer;
SymbolColor, BsMade, bs, DoorsOpened, XpGained: integer;
const
BsToMake = 31000; // how many bs to make before switching players ?
VersionNumber = '1.0'; // no need to change this
YourSRLSTATSID = ''; // Stats ID.
YourSRLSTATSPASS = ''; // Stats Pass.
StairColorHere = 0; // If script cant find stair color , add the color here , leave 0 for autocoloring (minimapColor)
SymbolColor2 = 0; // Add spinning wheel symbol color here , leave 0 for autocolor
StairColor2ndFloor = 6951; //colors of stair in main scree , change only if does not find this
StairColor3rdFloor = 6694; //colors of stair in main scree , change only if does not find this
ProblemsWithBank = False; // If you have problems with bank fill these 3 lines { add true here }
FlaxColors = 12698057;
BowStringColor = 3226673;
procedure DeclarePlayers;
begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;
end;
//------------------------------------
procedure ClearVars;
var
I: Integer;
begin
for I := 0 to 4 do
ReportVars[i] := 0;
end;
//------------------------------------
procedure LoadPics;
begin
Flax := BitmapFromString(5, 4, '000001003B08000001085008084' +
'B08000001003B08003500084B08084B08000001085F0D08630D08' +
'470808680D085A0D085F0D08470808470808680D');
bs := BitmapFromString(7, 6, 'z78DA758CC10DC0200C035722C109' +
'F449D5EEBF5229FE5842C4D23D9C4B0218F52EFF98A5F9CC62F3E' +
'C7895B1CC10FF74A526598BCFD0A7D3D1AE189178E0A4FE5487DC' +
'B74A354FFDCE0FEBA8350C');
end;
function UpgradeColor(color: integer): integer;
var
I: integer;
begin
for I := 1 to 150 do
if FindColorTolerance(Ix, Iy, Color, msx1, msy1, msx2, msy2, I) then
begin
Result := GetColor(Ix, Iy)
Break;
end;
end;
// ---------------------------------------------
function FindObjMultiText2(var cx, cy: Integer; Ut1, UT2, UT3: string; color,
tolerance: Integer; Upgrade: boolean): Boolean; // Did not work with scar Divi
var
x, y, a, c, i, x1, y1, x2, y2, Color2: Integer;
begin
if Upgrade then
Color2 := UpgradeColor(color)
else
Color2 := Color;
if (FindColorTolerance(x, y, color, msx1, msy1, msx2, msy2, tolerance)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (Loggedin)) then
Break;
a := a + 1;
if (a = 1) or (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end
else if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end
else if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end
else if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, Color2, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0)
cx := x;
cy := y;
if (IsUpTextMulti(UT1, UT2, UT3)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
//----------------------------------------------------------//
function OpenDoors: boolean;
begin
if not LoggedIn then
exit;
MarkTime(TimeMarker)
if not LoggedIn then
Exit;
MakeCompass('S')
repeat
if FindObjMultiText2(Ix, Iy, 'Do', 'or', 'oo', 2509163, 3, True) then
begin
Wait(100 + random(100));
if IsUpTextMulti('Op', 'pen', 'Open') then
begin
Mouse(Ix, Iy, 0, 0, True);
Result := True;
exit;
end;
if IsUpTextMulti('lose', 'Close', 'Cl') then
begin
Result := true
exit;
end;
end;
wait(1000 + random(1000));
until TimeFromMark(TimeMarker) > 10000
Writeln('Did not find door ');
end;
//----------------------------------------------
function StairColor: integer;
var
I: integer;
begin
for I := 1 to 100 do
if FindColorTolerance(Ix, Iy, 731993, mmx1, mmy1, mmx2, mmy2, I) then
break;
Result := GetColor(Ix, Iy);
Stairs := result;
end;
//-----------------------------------------------------------------
procedure ClimbDown;
begin
if not LoggedIn then
exit;
if (FindObjMultiText2(Ix, Iy, 'Cl', 'ca', 'Sta', StairColor3rdFloor, 7, True)) then
begin
Mouse(Ix, Iy, 0, 0, False);
ChooseOption('own');
end;
end;
// --------------------------------------------------------//
procedure ClimbUp;
begin
if not LoggedIn then
exit;
if (FindObjMultiText2(Ix, Iy, 'Cl', 'ca', 'Sta', StairColor2ndFloor, 5, False)) then
begin
Mouse(Ix, Iy, 0, 0, False);
ChooseOption('up');
end;
end;
// -------------------------------------------------------
function Floor2: boolean;
begin
if SymbolColor = 0 then
Result := (FindSymbol(Ix, Iy, 'quest'))
or (FindSymbol(Ix, Iy, 'spinning wheel'))
else
Result := FindColor(Ix, Iy, Symbolcolor, mmx1, mmy1, mmx2, mmy2)
end;
// -------------------------------------------------------
procedure GetSymbolColors;
begin
if SymbolColor = 0 then
SymbolColor := (GetSymbolColor(Ix, Iy, 'quest'))
if SymbolColor = 0 then
SymbolColor := (GetSymbolColor(Ix, Iy, 'spinning wheel'))
end;
//-------------------------------------------------
procedure MakeScreenPerfect;
begin
if not LoggedIn then
exit;
MarkTime(TimeMarker)
if GetColor(653, 117) = 0 then
KeyDown(37)
else
KeyDown(39);
repeat
wait(1);
until (GetColor(655, 106) = 0) and (GetColor(655, 135) = 0) and (GetColor(655,
145) = 0) and (GetColor(653, 117) <> 0)
or (TimeFromMark(TimeMarker) > 30000)
Keyup(37);
KeyUp(39);
if TimeFromMark(TimeMarker) > 30000 then
begin
writeln('MakeScreenPerfect did not work ! .. ');
MakeCompass('S');
end;
end;
// --------------------------------------------------
function ClickInRoom: boolean;
begin
if not LoggedIn then
exit;
Mouse(636 - 2, 111, 1, 1, True);
Wait(100 + random(50));
if FindColor(Ix, Iy, 255, mmx1, mmy1, mmx2, mmy2) then
begin
if Distance(637, 111, Ix + 1, Iy + 15) - 2 <= 3 then
Result := true
else
begin
writeln(' Doors are closed ... Walking to doors now');
Flag;
exit;
end;
end;
end;
// --------------------------------------------------
function ClickToStairs: boolean;
var
Ix2, Iy2: integer;
begin
if not LoggedIn then
exit;
if StairColorHere <> 0 then Stairs := StairColorHere
if findColor(Ix2, Iy2, Stairs, mmx1, mmy1, mmx2, mmy2) then
Mouse(Ix2, Iy2, 2, 2, True)
Wait(100 + random(50));
if FindColor(Ix, Iy, 255, mmx1, mmy1, mmx2, mmy2) then
begin
if Distance(Ix2, Iy2, Ix + 1, Iy + 15) - 2 <= 6 then
Result := true
else
begin
writeln(' Doors are closed ... Walking to doors now');
Flag;
exit;
end;
end;
end;
//--------------------------------------
function DetectSpinningWindow: boolean;
begin
if not LoggedIn then
exit;
MarkTime(TimeMarker);
repeat
if GetColor(44, 37) = 3358280 then
begin
Result := True;
Exit;
end;
Wait(100 + Random(100));
FindNormalRandoms;
until TimeFromMark(TimeMarker) > 5000;
Writeln('Window did not appear in 5 sec.');
end;
//--------------------------------------------------------
procedure ClickWheel;
begin
if not LoggedIn then
exit;
MarkTime(TimeMarker)
repeat
if GetColor(44, 37) = 3358280 then
exit;
if FindObjMultiText2(Ix, Iy, 'wh', 'el', 'Sp', 871280, 3, True) then
begin
Mouse(Ix, Iy, 0, 0, True);
if DetectSpinningWindow then
Exit;
end;
FindNormalRandoms;
Wait(100 + Random(100));
until TimeFromMark(TimeMarker) > 20000;
Writeln('Did not find wheel');
end;
//--------------------------------------------
function MyBankScreen: boolean; // made this becouse of the runescape bank screen bag
begin
Result := IsTextAtEx(184, 34, 'The Bank', 30, upchars, True, False, 0, 0,
-1);
end;
//----------------------------------------------
function MyOpenBank(Colors: integer): boolean;
var
I: integer;
begin
if not LoggedIn then
exit;
if MyBankScreen then
exit;
if (FindObjMultiText2(Ix, Iy, 'Us', 'Ba', 'Boo', Colors, 5, False)) then
begin
Mouse(Ix, Iy, 0, 0, false);
if (ChooseOption('qui')) or (ChooseOption('kly')) then
begin
Flag;
i := 0
repeat
Wait(100);
I := I + 1
until (BankScreen) or (I > 50)
if (BankScreen) then
begin
if not (Getcolor(475, 75) = 5531254) then
Mouse(475, 77, 2, 0, true);
Result := True
Exit;
end;
end;
end;
end;
//--------------------------------------------
Function LvlGained: boolean;
begin
Result := GetColor (175, 407) = 0
end;
//---------------
procedure TakeOutFlax;
var
I: integer;
begin
If not problemswithbank then
for I := 1 to 30 do
begin
if FindBitmapToleranceIn(Flax, Ix, Iy, 13, 18, 506, 331, I) then
begin
Mouse(Ix, Iy, 3, 3, False);
ChooseOption('All');
Exit;
end;
end
else
begin
If findColor (Ix, Iy, FlaxCOlors, 13, 18, 506, 331) then
begin
Mouse(Ix, Iy, 3, 3, False);
ChooseOption('All')
Exit;
end;
end;
Writeln('Did not find flax in bank ... logging out ')
CloseBank;
logout;
Players[CurrentPlayer].Active := false
end;
//---------
procedure ChooseX;
begin
if GetColor(44, 37) = 3358280 then
begin
Mouse(265, 112, 3, 3, False);
ChooseOption(' X');
MarkTime(TimeMarker);
FlaxColor := GetColor(583, 229);
repeat
wait(100 + random(10));
FindNormalRandoms;
until (GetColor(212, 392) = 0) or (TimeFromMark(TimeMarker) > 10000)
TypeSend('28' + Chr(13));
end;
end;
//---------------------------------------------------
procedure SpinningProcedures;
begin
ClickWheel;
ChooseX
MarkTime(TimeMarker);
repeat
wait(100 + random(100));
if (FindNormalRandoms) or (LvlGained) then
begin
ClickWheel;
ChooseX;
MarkTime(TimeMarker);
end;
wait(10);
if FindFight then
begin
writeln('Find fight ... running to bank ...')
break;
end;
wait(10);
until (TimeFromMark(TimeMarker) > 50000) or (not FindColor(Ix, Iy,
FlaxColor, mix1, miy1, mix2, miy2))
end;
//----------------------------------------------------
procedure ProgressReport;
begin
Writeln(' ');
writeln('--------PROGRESS REPORT---------------------------');
Writeln('Total time Running: ' + TimeRunning);
Writeln('Bow strings made: ' + inttostr(BsMade));
writeln('Xp gained: ' + inttostr(XpGained))
Writeln('------------------------------------------------');
Writeln(' ');
SRLRandomsReport;
end;
//--------------------------
procedure SetUpScript;
begin
SetUpsrl;
DeclarePlayers;
ActivateClient;
ScriptID := '172'
SRLID := YourSRLstatsID;
SRLPassword := YourSRLstatsPASS;
end;
//-------------------------------------------
procedure DepsitBowString;
var
I: integer;
begin
If not problemswithbank then
for I := 1 to 30 do
if FindBitmapSpiralTolerance(Bs, Ix, Iy, mix1, miy1, mix2, miy2, I) then
begin
Mouse(Ix, Iy, 2, 2, False)
ChooseOption('All')
Exit;
end;
If ProblemswithBank then
If FindColor (Ix, Iy, BowStringColor, mix1, miy1, mix2, miy2) then
begin
Mouse(Ix, Iy, 2, 2, False)
ChooseOption('All')
Exit;
end;
end;
//----------------------------------------------------
begin
SetUpScript;
if not LoggedIn then
LoginPlayer
LoadPics;
Wait(1000);
repeat
repeat
// To Spinning wheel
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
MakeCompass('S');
SetRun(true)
if StairColorHere <> 0 then
RadialWalk(StairColorHere, 320, 400, 70, 1, 1)
else RadialWalk(StairColor, 320, 400, 70, 1, 1);
Flag;
FindNormalRandoms
wait(500 + random(500));
MarkTime(TimeMarker);
repeat
ClimbDown;
Wait(3000 + random(500))
repeat
wait(100 + random(10));
until GetColor(200, 148) <> 16777215
until (Floor2) or (TimeFromMark(TimeMarker) > 30000)
if TimeFromMark(TimeMarker) > 30000 then
begin
writeln('Cant find stairs ');
Logout;
Players[CurrentPlayer].Active := false
end;
FindNormalRandoms
Wait(500 + random(100));
GetSymbolColors;
wait(100 + random(100));
MakeScreenPerfect;
if not ClickInRoom then
begin
OpenDoors;
DoorsOpened := DoorsOpened + 1;
ReportVars[1] := ReportVars[1] + 1;
end;
Flag;
GameTab(4);
FindNormalRandoms;
SpinningProcedures;
FindNormalRandoms
wait(100 + random(100))
MakeCompass('S')
if not ClickTostairs then
begin
OpenDoors;
DoorsOpened := DoorsOpened + 1;
//ReportVar[1] := ReportVar[1] + 1;
wait(500 + random(500));
if findColor(Ix, Iy, Stairs, mmx1, mmy1, mmx2, mmy2) then
Mouse(Ix, Iy, 2, 2, True)
end;
Flag;
wait(500 + random(500))
MarkTime(TimeMarker);
repeat
ClimbUp;
Wait(1000 + random(300))
repeat
wait(100 + random(10));
until GetColor(200, 148) <> 16777215
until (not Floor2) or (TimeFromMark(TimeMarker) > 30000)
if TimeFromMark(TimeMarker) > 30000 then
begin
writeln('Cant find stairs ');
Logout;
Players[CurrentPlayer].Active := false
end;
Mouse(634 - 2, 130, 3, 0, True);
flag;
wait(500 + random(500))
// Banking procedures
FindNormalRandoms;
ReportVars[0] := ReportVars[0] + CountItemBmpTol(Bs, 30);
BsMade := BsMade + CountItemBmpTol(Bs, 30);
ReportVars[3] := ReportVars[3] + +CountItemBmpTol(Bs, 30) * 15;
if not MyOpenBank(2970976) then
if not MyOpenBank(607067) then
if not MyOpenBank(4350580) then
begin
writeln('Did not find bank ')
Logout;
end;
DepsitBowString;
TakeOutFlax;
if GetColor(485, 40) = 65536 then
Mouse(485, 40, 2, 2, True)
// end of banking procedures
XpGained := BsMade * 15;
ProgressReport;
SendSRLReport;
ClearVars
until (not Loggedin) or (BsMade >= BsToMake)
Nextplayer(true);
until false;
end.
:-)
There are currently 1 users browsing this thread. (0 members and 1 guests)