DevilCheater
2007-06-01 06:06:35
<!– BEGIN TEMPLATE: formanswers –>
DevilCheater - SRL Member Application Form
DevilCheater
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Pascal only
Other Communitys
None
How Long have You Played Runescape
maybe like 6 mounths
Are you affilated in anyway with Jagex LTD?
No Comment
—————————————————–
Please write down a paragraph about Yourself.
Hmm , i have learned a bit from pascal before so it was not so hard to understand the scar and its functions
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
DevilCheater - SRL Member Application Form
DevilCheater
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Pascal only
Other Communitys
None
How Long have You Played Runescape
maybe like 6 mounths
Are you affilated in anyway with Jagex LTD?
No Comment
—————————————————–
Please write down a paragraph about Yourself.
Hmm , i have learned a bit from pascal before so it was not so hard to understand the scar and its functions
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{.Script Info:
# ScriptName = DevilFlaxSpiner
# Author = DevilCheater
# Description = Spins Flax in lumby castle
# Version = 1.0
/Script Info}
// Start logged out with ful bag of flax in lumby bank !!
// Fill line 18 and declare players in 20 +
Program DevilFlaxSpinner;
{.include srl/srl.scar }
Var Ix, Iy, TimeMarker, Stairs, Flax, FlaxColor: integer;
SymbolColor, BsMade, bs, DoorsOpened, XpGained: integer;
Const
BsToMake = 150; // how many bs to make before switching players ?
VersionNumber = '1.0';
Procedure DeclarePlayers;
Begin
HowManyPlayers:= 2;
NumberOfPlayers( HowManyPlayers );
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='Bank';
Players[0].Active:=True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='Bank';
Players[1].Active:=True;
End;
//------------------------------------
Procedure LoadPics;
begin
Flax := BitmapFromString(5, 4, '000001003B08000001085008084' +
'B08000001003B08003500084B08084B08000001085F0D08630D08' +
'470808680D085A0D085F0D08470808470808680D');
bs := BitmapFromString(7, 6, 'z78DA758CC10DC0200C035722C109' +
'F449D5EEBF5229FE5842C4D23D9C4B0218F52EFF98A5F9CC62F3E' +
'C7895B1CC10FF74A526598BCFD0A7D3D1AE189178E0A4FE5487DC' +
'B74A354FFDCE0FEBA8350C');
end;
//-----------------------------------------
Function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for i:=1 to 9 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
8 : If RC Then Result := True;
9: If FindTalk Then Result := True;
End;
Wait(1);
end;
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
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 (FindObjMultiText2(Ix, Iy, 'Cl', 'ca', 'Sta', 602441, 5, True)) then
begin
Mouse(Ix, Iy, 0, 0, False);
ChooseOption(Ix, Ix, 'own');
end;
end;
// --------------------------------------------------------//
Procedure ClimbUp;
Begin
If (FindObjMultiText2(Ix, Iy, 'Cl', 'ca', 'Sta', 6951, 5, False)) then
begin
Mouse(Ix, Iy, 0, 0, False);
ChooseOption(Ix, Ix, '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
Mouse (636-2, 111, 1, 1, True);
Wait(100+random(50));
If FindColor (Ix, Iy, 255, mmx1, mmy1, mmx2, mmy2) then
begin
Writeln (Inttostr (Distance (637, 111, Ix+1, Iy+15)))
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 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
Writeln (Inttostr (Distance (Ix2, Iy2, Ix+1, Iy+15)-2))
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
MarkTime (TimeMarker);
Repeat
If GetColor (44, 37) = 3358280 then
Begin
Result := True;
Exit;
End;
Wait (100+Random(100));
Until TimeFromMark (TimeMarker) > 5000;
Writeln ('Window did not appear in 5 sec.' );
End;
//--------------------------------------------------------
Procedure ClickWheel ;
Begin
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;
Wait(1000+Random(1000));
Until TimeFromMark (TimeMarker) > 20000;
Writeln ('Did not find wheel' );
end;
//----------------------------------------------
Function MyOpenBank (Colors: integer): boolean;
Var
I: integer;
Begin
If not LoggedIn then exit;
If BankScreen then exit;
If (FindObjMultiText2(Ix, Iy, 'Us', 'Ba', 'Boo', Colors, 5, False)) then
begin
Mouse(Ix, Iy, 0, 0, false);
if (ChooseOption(x, y, 'qui')) or (ChooseOption(x, y, '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;
//--------------------------------------------
Procedure TakeOutFlax;
Var
I: integer;
begin
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 (Ix, Iy, 'All')
exit;
end;
end;
Writeln ( 'Did not find flax in bank ... logging out ' )
CloseBank;
logout;
// player active := false;
end;
//-------------------------------------------------------------
Procedure DepositAndCount;
begin
BsMade := BsMade + CountItemBmpTol(Bs, 15);
ClickAllItemsBmpTolWait('All', Bs, 15, 1500);
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'
end;
begin
SetUpScript;
If not LoggedIn then LoginPlayer
LoadPics;
Wait(1000);
Repeat
Repeat
// To Spinning wheel
MakeCompass ('S');
SetRun (true)
RadialWalk(StairColor, 320, 400, 70, 1, 1);
Flag;
FindNormalRandoms
wait(500+random(500));
MarkTime (TimeMarker);
Repeat
ClimbDown;
Wait(1000+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;
// player inactive
end;
FindNormalRandoms
Wait(500+random(100));
GetSymbolColors;
wait(100+random(100));
MakeScreenPerfect;
If not ClickInRoom then
begin
OpenDoors;
DoorsOpened := DoorsOpened +1;
end;
Flag;
GameTab (4);
FindNormalRandoms;
ClickWheel;
If GetColor (44, 37) = 3358280 then
begin //Spinning procedures starts here
Mouse (265, 112, 3, 3, False);
ChooseOption (Ix, Iy, ' X' );
MarkTime (TimeMarker);
FlaxColor := GetColor (583, 229);
Repeat
wait(100+random(10));
Until (GetColor (212, 392) = 0) or (TimeFromMark (TimeMarker) > 10000)
TypeSend ( '28' + Chr ( 13 ) );
MarkTime (TimeMarker);
Repeat
wait (500+random(500));
If FindFastRandoms then break;
If FindFight then
begin
writeln ('Find fight ... running to bank ...')
break;
end;
Until (TimeFromMark (TimeMarker) > 50000) or (not FindColor (Ix, Iy, FlaxColor, mix1, miy1, mix2, miy2))
end; // end of spinning procedures !!!
// To bank
FindNormalRandoms
wait(100+random(100))
MakeCompass ('S')
If not ClickTostairs Then
begin
OpenDoors;
DoorsOpened := DoorsOpened +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(700+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;
// player inactive
end;
Mouse (634-2, 130, 3, 0, True);
flag;
wait(500+random(500))
// Banking procedures
FindNormalRandoms
If not MyOpenBank (2970976) then
If not MyOpenBank (541274) then
Begin
writeln ('Did not find bank ' )
Logout;
end;
DepositAndCount;
TakeOutFlax;
CloseBank;
If GetColor (485, 40) = 65536 then Mouse (485, 40, 2, 2, True)
// end of banking procedures
XpGained := BsMade*15;
ProgressReport;
Until (not Loggedin) or (BsMade >= BsToMake)
Nextplayer (true);
Until false;
end.
——————————————————
<!– END TEMPLATE: formanswers –>
