Sp0rky
2007-08-10 13:36:43
Sp0rk-eh - SRL Member Application Form
Sp0rk-eh
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Delphi, Html, a little php, a little java, a little c++
Other Communitys
KYAB (Although I know most of you don't support it)
How Long have You Played Runescape
5 Years (with a huge break inbetween of 3+ years)
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Well, My name is Edd. I live in England at the moment, and have just finished my 2 year 6th form course (on which I studied Business, English Langauge and Computing). On my computing course I programmed in Delphi a lot, this helped massively with Scar scripting.
I think most of you know me, I try to be as helpful as possible on the forums (where-ever I can help). I was very active on the forums until I went to cyprus to see my girlfriend for a few weeks.
I'd love to be an SRL member, mainly due to the extra knowledge I would gain. I think I would advance as a programmer considerably. Also, the SRL members seem extremely friendly, and it's a community I would love to be a member of.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Here's my Range Minigame Trainer. Finally fixed the never ending loop. (currently MakeCompass won't work due to Srl needing tweaking).
It doesn't support multi player because it's a members script. I'm sorry if my standards are a bit dodgey.
{---------------------------------------------}
// Sp0rk-eh's Range Minigame Trainer //
// ----------------------------- //
// //
// Does The Range Minigame in the //
// Range Guild (members only) //
// //
// Has Antiban and AntiRandoms //
// //
// Instructions: //
// ___________ //
// //
// Start next to the Competition Judge //
// - Have some money in your inventory //
// (200 gp a go) //
// Current Version - v0.1 //
// First Public Release of the Script //
// //
// Setup the declare player //
// and the number of goes //
{---------------------------------------------}
{---------------------------------------------}
{---------------------------------------------}
// Designed for SRL 3.81 and SCAR Divi (3.11 //
// //
// You must have 40+ range to enter the //
// Range Guild //
{---------------------------------------------}
{---------------------------------------------}
// Please Post Progress Reports //
// and suggestions/bugs //
{----------------------------------------------
Credits: |
------- |
Use of functions/Procedures: |
- WT-Fakawi |
- the scar noob |
- Doofy |
- Rambozin |
----------------------------------------------}
{---------------------------------------------}
{---------------------------------------------}
{----------------------------------------------
| -- Enjoy -- |
----------------------------------------------}
{----------------------------------------------
~ Sorry about the english spelling of ~
~ 'colour' sometimes ^_^ ~
----------------------------------------------}
program Sp0rkehsRangeMiniGameTrainer;
{.include SRL/Srl.scar}
const
//-------Setup--------
NumberOfGoes = 20;
//-----Only Edit Below if the script colours aren't accurate------
//----------------------------------------------------------------
//All the Colors Should Be Fine!!!
TheLampSkill = 'Range';
PlaySounds = True;
//Competiton Judge Colours
CompGuyColour1 = 9865866; //His Coif
CompGuyColour2 = 1145751; //His Bow
CompGuyColour3 = 1123368; //His Body
CompGuyColour4 = 3830655; //His Shoulder
//Arrow colour inventory
ArrowColorInventory = 3232619; //Should be fine for bronze
//Target Colours
YellowOfTarget = 6085607; //Yellow Center of the target
RedOfTarget = 5265326; //Red outer ring of the target
BlueOfTarget = 10513244; //Blue outer ring of the target
BrownSupports = 3954539; //Brown supports of the target
var
ClickedCompGuy : Boolean;
StartTime, NoTimesShotTarget, RandomColour, Goes, RespondAmount : Integer;
RandomPhrase, SaidSoFar : String;
TheRandoms : Integer;
//---------Player Setup---------
procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=''; //Name
Players[0].Pass :=''; //Password
Players[0].Nick :=''; //3-4 letter nickname //Where is your Player? CHOOSE FROM: Bank, Yew 1 or Yew 2 //Loads to do
Players[0].Active := True; //Is the Player used?
Players[0].String1 := '1'; // valid: 1 (acc), 2 (rapid) or 3 (long)
end;
//-----------------------Thank you the scar noob---------------------
//-------------------------------------------------------------------
{*******************************************************************************
function SetRangeMode(RangeModeD: Integer): Boolean;
By: the scar noob
Description: Sets range mode (1-3).
*******************************************************************************}
function SetRangeMode(RangeModeD: Integer): Boolean;
//SetFightMode, took from srl and made it only setting 3 styles (ranged)
begin
GameTab(1);
Wait(200 + Random(50));
case RangeModeD of
1: begin
if( not (GetColor(612, 276) = 1908609) )then
Mouse(607, 271, 30, 10, True);
wait(250);
if (GetColor(612, 276) = 1908609) then result := true;
GameTab(4);
end;
2: begin
if( not (GetColor(695, 278) = 1974408)) then
Mouse(690, 271, 30, 10, True);
wait(250);
if (GetColor(695, 278) = 1974408) then result := true;
GameTab(4);
end;
3: begin
if( not (GetColor(610, 334) = 1908609) )then
Mouse(606, 325, 30, 10, True);
wait(250);
if (GetColor(610, 334) = 1908609) then result := true;
GameTab(4);
end;
end;
end;
//-------------------------Generic Proggie---------------------------
//-------------------------------------------------------------------
Procedure ProgressReport;
begin
Writeln('<---------------------------------------->');
Writeln(' |----------------------------------|');
Writeln(' | Sp0rk-ehs Range Minigame Trainer |');
Writeln(' |__________________________________|');
Writeln(' | '+Players[CurrentPlayer].Name+' has said: '+SaidSoFar+' ');
Writeln(' | Games completed: '+IntToStr(Goes));
Writeln(' | Currently Responded: '+IntToStr(RespondAmount)+' times. ');
Writeln(' | Time Running: ' +(TimeRunning)+' ');
Writeln(' |----------------------------------|');
Writeln('<---------------------------------------->');
end;
//--------------------------Generic Setup----------------------------
//-------------------------------------------------------------------
Procedure SetUp;
Begin
SetupSRL;
Activateclient;
Disguise('~**//Sp0rkehs Range Mini-Game Trainer v0.1\\**~');
ClearDebug;
Benmouse := True;
MouseSpeed := 2;
DeclarePlayers;
LoginPlayer;
SetRangeMode(StrToInt(Players[CurrentPlayer].String1));
HighestAngle;
Writeln('----------------------------');
Writeln('----------------------------');
Writeln('----------------------------');
Writeln('----------------------------');
Writeln('Please post progress report!');
Writeln('----------------------------');
Writeln('----------------------------');
Writeln('----------------------------');
Writeln('----------------------------');
wait(1000);
ClearDebug;
ProgressReport;
end;
//----Thank you to WT-Fakawi for this function(edited slightly)-----
//-------------------------------------------------------------------
function WeAreInMinigame: Boolean;
begin
MakeCompass('S');
if FindSymbol(x, y, 'minigame') or FindSymbol(x, y, 'dungeon') then
begin
Status('At Minigame... Lets do this...');
Players[CurrentPlayer].Loc := 'minigame';
Result := True;
end
else
begin
Status('Might not be at minigame...');
end;
end;
//-----------Credit to doofy for this excellent responder------------
//-------------------------------------------------------------------
procedure DoofyRespond;
begin
begin
if (InChat('Hp lvl') or
InChat('Hp lvl?') or
InChat('Hitpoint lvl') or
InChat('Hitpoint lvl?') or
InChat('Hitpoints lvl') or
InChat('Hitpoints lvl?') or
InChat('Hitp lvl') or
InChat('Hitp lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Hitpoints')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Mining lvl') or
InChat('Mining lvl?') or
InChat('Mine lvl') or
InChat('Mine lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Mining')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Wc lvl') or
InChat('Wc lvl?') or
InChat('Woodcut lvl') or
InChat('Woodcut lvl?') or
InChat('Woodcutting lvl') or
InChat('Woodcutting lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Woodcutting')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Attack lvl') or
InChat('Attack lvl?') or
InChat('Atack lvl') or
InChat('Atack lvl?') or
InChat('Att lvl') or
InChat('Att lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Attack')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Defenc lvl') or
InChat('Defenc lvl?') or
InChat('Defence lvl') or
InChat('Defence lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Defence')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Magic lvl') or
InChat('Magic lvl?') or
InChat('Mage lvl') or
InChat('Mage lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Magic')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Cook lvl') or
InChat('Cook lvl?') or
InChat('Cookin lvl') or
Inchat('Cookin lvl?') or
InChat('Cooking lvl') or
InChat('Cooking lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Cooking')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Fletch lvl') or
InChat('Fletch lvl?') or
InChat('Fletching lvl') or
InChat('Fletching lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Fletching')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Firemaking lvl') or
InChat('FireMaking lvl?') or
Inchat('Fire making lvl') or
InChat('Fire making lvl')) then
begin
TypeSend(IntToStr(GetSkillLevel('Firemaking')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Craft lvl') or
InChat('Craftt lvl?') or
InChat('Craftin lvl') or
InChat('Crafting lvl?') or
InChat('Crafting lvl') or
InChat('Crafting lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Crafting')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Smelt lvl') or
InChat('Smelt lvl?') or
InChat('Smelting lvl') or
InChat('Smelting lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Smelting')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Rc lvl') or
InChat('Rc lvl?') or
InChat('Runecraft lvl') or
InChat('Runecraft lvl?') or
InChat('Runecrafting lvl') or
InChat('Runecrafting lvl?')) then
begin
TypeSend(IntToStr(GetSkillLevel('Runecraft')))
RespondAmount := RespondAmount + 1;
end;
if (InChat('Hi') or
InChat('Hey') or
InChat('Hello') or
InChat('Heya') or
InChat('Yo')) then
begin
case random(4) of
0: begin
Typesend('hola');
RespondAmount := RespondAmount + 1;
end;
1: begin
Typesend('sup');
RespondAmount := RespondAmount + 1;
end;
2: begin
Typesend('wassup');
RespondAmount := RespondAmount + 1;
end;
3: begin
Typesend('hows it goin');
RespondAmount := RespondAmount + 1;
end;
end;
end;
end;
if (InChat(Players[CurrentPlayer].Name)) then
begin
case random(4) of
0: begin
Typesend('im busy leave me alone lol');
RespondAmount := RespondAmount + 1;
end;
1: begin
Typesend('im not talking right now');
RespondAmount := RespondAmount + 1;
end;
2: begin
Typesend('talk to me some other time i dont want to talk now');
RespondAmount := RespondAmount + 1;
end;
3: begin
Typesend('leave me alone');
RespondAmount := RespondAmount + 1;
end;
end;
end;
if (InChat('Macroer') or
InChat('Macror') or
InChat('Macro') or
InChat('Macrore')) then
begin
case random(4) of
0: begin
Typesend('omg im not for the last time stop talking to me');
RespondAmount := RespondAmount + 1;
end;
1: begin
Typesend('everyone thinks i am but im not.. dont even talk');
RespondAmount := RespondAmount + 1;
end;
2: begin
Typesend('lol im not leave me alone');
RespondAmount := RespondAmount + 1;
end;
3: begin
Typesend('im not! im not talkin to you');
RespondAmount := RespondAmount + 1;
end;
end;
end;
if (InChat('Autoer') or
InChat('Auoter') or
InChat('Auto') or
InChat('Autor')) then
begin
case random(4) of
0: begin
Typesend('omg im not leave me alone');
RespondAmount := RespondAmount + 1;
end;
1: begin
Typesend('im not calm down dont talk to me');
RespondAmount := RespondAmount + 1;
end;
2: begin
Typesend('everyone thinks i am...leave me alone');
RespondAmount := RespondAmount + 1;
end;
3: begin
Typesend('im not! i hate them');
RespondAmount := RespondAmount + 1;
end;
end;
end;
end;
//-----------Lifted from SRLs but edited to North East---------------
//-------------------------------------------------------------------
function SetCompass(Side: char): Boolean;
var
Fx, Fy, dx, dy, StartPos, EndPos: Integer;
ComMark: Integer;
Left_Right: Boolean;
begin
StartPos := FindCompassAngle;
MarkTime(ComMark);
case LowerCase(Side) of
'a'://Is actaully northeast, but a char cant be 'ne' =P
begin
Fx := 563;
Fy := 16;
if StartPos > 225 then EndPos := 135 else EndPos := 135;
end;
else
begin
WriteLn('SetCompass - Value wasn''t f! Dont Change the script fool!');
Exit;
end;
end;
if FindColor(dx, dy, 723587, Fx - 2, Fy - 2, Fx + 2, Fy + 2) then
begin
Result := True;
Exit;
end
if StartPos > EndPos then Left_Right := True
else if StartPos < EndPos then Left_Right := False
else exit;
if Left_Right then KeyDown(VK_RIGHT)
else KeyDown(VK_Left);
repeat
Wait((10) + Random(10));
if (FindColor(dx, dy, 723587, Fx, Fy, Fx, Fy)) then
begin
Result := True;
Break;
end;
until (TimeFromMark(ComMark) > 7000);
if Left_Right then KeyUp(VK_Right)
else KeyUp(VK_Left);
end;
//------------------------Exactly what it says-----------------------
//-------------------------------------------------------------------
procedure RandomCompassDirection;
begin
case Random(3) of
0: begin
KeyDown(VK_Left);
Wait((100) + Random(500));
KeyUp(VK_Left);
Wait((100) + Random(500));
SetCompass('a');
end;
1: begin
KeyDown(VK_Right);
Wait((100) + Random(500));
KeyUp(VK_Right);
Wait((100) + Random(500));
SetCompass('a');
end;
2: begin
MakeCompass('S');
SetCompass('a');
end;
end;
end;
//--------------------Gets a random phrase to say--------------------
//-------------------------------------------------------------------
procedure GetRandomPhrase;
begin
if random(2) = 1 then
begin
case random(10) of
0: begin
RandomPhrase := ((IntToStr(GetSkillLevel('Range')))+' range...');
end;
1: begin
RandomPhrase := ('w00t');
end;
2: begin
RandomPhrase := ('bordem');
end;
3: begin
RandomPhrase := ('i owned that target');
end;
4: begin
RandomPhrase := ('take that target');
end;
5: begin
RandomPhrase := ('bullseye');
end;
6: begin
RandomPhrase := ('im too good at this');
end;
7: begin
RandomPhrase := ('feeling hot, hot, hot');
end;
8: begin
RandomPhrase := ('all alone inside...');
end;
9: begin
RandomPhrase := ('Ill be there for you, when the rain starts to pour');
end;
end;
end;
end;
//---------------------Inspriation from Doofys-----------------------
//-------------------------------------------------------------------
procedure AntiBan;
begin
begin
status('Performing antiban')
case Random(7) of
0: MMouse(Random(MSX2), Random(MSY2), 0, 0);
1: RandomRClick;
2: HoverSkill('range', False);
3: RandomCompassDirection;
4:
begin
GetRandomPhrase;
Typesend(RandomPhrase);
SaidSoFar := SaidSoFar + ' ' + + RandomPhrase;
end;
5: PickupMouse;
6: begin
DoEmote(1 + Random(20));
Wait(1500 + random(1000));
GameTab(4);
end;
end;
end;
end;
//-------------Finds Competition Judge Based on Colours--------------
//-------------------------------------------------------------------
Procedure FindCompGuy;
var
Tries : Integer;
begin
Status('Tried to find Comp Judge '+IntToStr(Tries)+' times.');
HighestAngle;
Tries := Tries +1;
ClickedCompGuy := False;
If FindColorSpiralTolerance(x, y, CompGuyColour1, MSX1, MSY1, MSX2, MSY2, 4)
Or FindColorSpiralTolerance(x, y, CompGuyColour2, MSX1, MSY1, MSX2, MSY2, 4)
Or FindColorSpiralTolerance(x, y, CompGuyColour3, MSX1, MSY1, MSX2, MSY2, 4)
Or FindColorSpiralTolerance(x, y, CompGuyColour4, MSX1, MSY1, MSX2, MSY2, 4)
Then
Begin
MMouse(x, y, 0, 0);
Wait(100);
If IsupTextMulti('Talk','ompe','alk-to') Then
Begin
Status('Comp Guy Found...Right Clicking now.');
Wait(100);
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, 'alk-t');
ClickedCompGuy := True;
LowestAngle;
end
else
if Tries > 3 then
begin
Writeln('Could not find Competition Judge')
TerminateScript;
end;
end;
end;
//------Bitmap from CloseBankWindow (they're exactly the same)-------
//-------------------------------------------------------------------
function CloseTargetWindow: Boolean;
var
CBBM, CBx, CBy: Integer;
begin
CBBM := BitmapFromString(4, 3, 'z78DA3330000243030CD2C' +
'CC4D4DC848008320900F6350DC1');
if FindBitmapToleranceIn(CBBM, CBx, CBy, 450, 30, 500, 50, 50) then
begin
Mouse(CBx, CBy, 4, 4, True);
Result := True;
end;
FreeBitmap(CBBM);
end;
//------Uses co-ords to click 'Sure ill give it a go' but with-------
//------Random co-ords added on. Will always click 'Sure ill---------
//--------give it a go' but a different place everytime.-------------
//-------------------------------------------------------------------
Procedure TalkToCompGuy;
var
iX,iY:Integer;
begin
iX:=186+random(142);
iY:=383+random(10);
wait(1000+random(200));
if FindNpcChatText('osts') then
begin
ClickToContinue;
wait(1000+random(200));
Mouse(iX, iY, 1, 1, True);
wait(1000+random(200))
ClickToContinue;
wait(1000+random(200));
ClickToContinue;
wait(500+random(200));
end
else
begin
Writeln('Cant find NpcChatText. So Im giving up.')
TerminateScript;
end;
end;
//Thank you to Rambozin (Posted This In The Utilities Section - edited slightly)
function RambozinsAntiRandoms : Boolean;
begin
for TheRandoms := 1 to 16 do
begin
case (TheRandoms) of
1: if(FindNormalRandoms)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
2: if(WeAreDead)then
begin
Writeln('Oh dear .. You are dead .. NextPlayer!')
Result := True
Players[CurrentPlayer].Loc := 'Dead';
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
NextPlayer(False);
end;
3: if(FindMod)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
4: if(FindScapeRune)then
begin
Result := True
Players[CurrentPlayer].Loc := 'ScapeRune';
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
NextPlayer(False);
end;
5: if(FindMime)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
6: if(FindMaze)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
7: if(FindNewBox)then
begin
Result := True
SolveBox;
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
8: if(FindQuiz)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
9: if(FindDemon)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
10: if(NoGameTab)then
begin
Result := True
Players[CurrentPlayer].Loc := 'NoGameTab';
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
NextPlayer(False);
end;
11:{ if(FreakyForester)then }
begin
{ Result := True
Players[CurrentPlayer].Loc := 'FreakyForester';
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
NextPlayer(False); }
end;
12: if(SolveGenie(TheLampSkill))then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
13: if(SolvePinball)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
14: if(FindTalk)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
15: if(InBlack)then
begin
Result := True
Players[CurrentPlayer].Loc := 'InBlack';
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
NextPlayer(False);
end;
16: if(FindFight)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
RunTo('W', True);
end;
17: if(FindPlant)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
18: if(InConvo)then
begin
Result := True
if(PlaySounds = True)then
begin
PlaySound('C:\WINDOWS\Media\Windows XP Shutdown.wav');
end;
end;
end;
end;
SRLRandomsReport;
end;
//------------So you're not always clicking the same colour----------
//-------------------------------------------------------------------
Procedure PickRandomColourTarget;
begin
case random(4) of
0:
begin
RandomColour := YellowOfTarget;
end;
1:
begin
RandomColour := BlueOfTarget;
end;
2:
begin
RandomColour := RedOfTarget;
end;
3:
begin
RandomColour := BrownSupports;
end;
end;
end;
//----Click target normally or right clicks and selects fire-at------
//------------------Did this for antiban purposes--------------------
//-------------------------------------------------------------------
Procedure FireAtTarget;
begin
PickRandomColourTarget;
If FindColorSpiralTolerance(x, y, RandomColour, MSX1, MSY1, MSX2, MSY2, 4) then
begin
case random(2) of
0: begin
MMouse(x, y, 2, 2);
Wait(100);
If IsupText('ire') Then
Begin
Wait(100);
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, 're-a');
if NoTimesShotTarget = 1 then Status('Shot Target: 1 Time.')
else
begin
if NoTimesShotTarget = 12 then Status('Completed a game.')
else
Status('Shot Target: '+IntToStr(NoTimesShotTarget)+' Times.');
end;
if NoTimesShotTarget = 12 then
NoTimesShotTarget := 0;
end;
end;
1:
begin
MMouse(x, y, 2, 2);
Wait(100+random(50));
If IsupText('ire') Then
Begin
Wait(100);
Mouse(x, y, 0, 0, True);
end;
if NoTimesShotTarget = 1 then Status('Shot Target: 1 Time.')
else
begin
if NoTimesShotTarget = 12 then Status('Completed a game.')
else
Status('Shot Target: '+IntToStr(NoTimesShotTarget)+' Times.');
end;
if NoTimesShotTarget = 12 then
NoTimesShotTarget := 0;
end;
end;
end;
end;
//-----Antiban, moves mouse while waiting for arrow to hit target----
//-------------------------------------------------------------------
Procedure RandomMouse;
var
iX, iY: Integer;
begin
if (Random(8) = 1) then
case random(3) of
1:
begin
Status('Random Mouse');
iX := (388 +random(127));
iY := (4 +random(148));
MMouse(iX, iY, 0, 0);
end;
2:
begin
Status('Random Mouse');
iX := (388 +random(127));
iY := (4 +random(148));
MMouse(iX, iY, 5, 5);
end;
3:
begin
Status('Random Mouse');
iX := (388 +random(127));
iY := (4 +random(148));
MMouse(iX, iY, 50, 50);
end;
end;
end;
//--------------------------Weilds the arrows...---------------------
//-------------------------------------------------------------------
Procedure WeildArrows;
begin
if not GameTab(4) then
begin
GameTab(4)
end;
begin
Status('Equipping Arrows');
if FindColorSpiralTolerance(x,y,ArrowColorInventory,569, 211,739, 306,4)then
Begin
x:= x+random(2)
y:= y-random(2)
MMouse(x,y,3,3)
if IsUpTextMulti('Wi','iel','eld')then
Begin
getmousepos(x,y)
Mouse(x,y,1,1,true)
Status('Arrows Equipped')
wait(500+random(200))
end;
end;
end;
end;
Function FindCompJudgeChat : Boolean;
begin
if SimilarColors(GetColor(44, 401),2638151,5) then
Result := True
else
Result := False;
end;
//--------------All that is required to fire at the target-----------
//-------------------------------------------------------------------
Procedure FiringStuff;
begin
LowestAngle;
SetCompass('a');
repeat
RambozinsAntiRandoms;
PickRandomColourTarget;
FireAtTarget;
RambozinsAntiRandoms;
RandomMouse;
Wait(2200+random(200));
if CloseTargetWindow then
begin
NoTimesShotTarget := NoTimesShotTarget+1;
wait(500+random(100));
end;
if FindCompJudgeChat then
begin
Status('Comp Chat Guy Found');
ClickToContinue;
NoTimesShotTarget := 0;
Break;
end;
RambozinsAntiRandoms;
if Random(15) = 1 then
AntiBan
if NoTimesShotTarget = 11 then Break;
until NoTimesShotTarget = 11;//Should break before it reaches here
wait(1000+random(400));
ClickToContinue;
end;
//------------------------------Main Loop-----------------------------
begin
SetUp;
WeAreInMinigame;
SetCompass('a');
repeat
RambozinsAntiRandoms;
LowestAngle;
repeat
FindCompGuy;
RambozinsAntiRandoms;
until ClickedCompGuy = True;
RambozinsAntiRandoms;
DoofyRespond;
TalkToCompGuy;
RandomMouse;
WeildArrows;
FiringStuff;
Goes := Goes +1;
ProgressReport;
until Goes = NumberOfGoes;
Logout;
end.
MasterKill (Rick 4 Srl) and I have been working closely on a PestController script for the past few days. It's really advanced in that time. Here's my version of it. Setup for my range and prayer at the moment. It's only one player because it's a members script.
{.include srl/srl.scar}
const
Ranging = False;
var
Looking, AttLvl, StrLvl, DefLvl, HpLvl, ComLvl, PestPoints, FTime : Integer;
WaitCount, Check, Wins, LoggedBackIn, loses, NotEnough, NoSt : Integer;
var FL: array[1..12] of Integer;
KMark, F, ArrowSearch: Integer;
////////////////////////////////////////////////////////////////////////////////
// //
// ______ __ _____ __ __ ___ __ ______ ______ __ //
// / __ //_// ___// // / / / / / ____// __ // / //
// / __// // /__ / / /__ / /___ // __// /__ //
// /_/\_\ /_//____//__/\_\ /__/ /_____//_/\_\ /____/ //
// //
// <--------------------------- PEST CONTROLL'er ---------------------------> //
// //
// //
// * ultimate 1 player pest controller! //
// //
// * Attack / Strengt / Defense Training! //
// //
// * ONLY for lvl 40+ boat! NOT for lvl 70/100+ boat //
// //
// * Only CenterFighting atm //
// //
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <--- SETUP --->
Procedure SetAllConst;
begin
Players[0].Name := ''; // UserName
Players[0].Pass := ''; // Password
Players[0].loc := ''; // Don't change
end;
// <--- SETUP --->
////////////////////////////////////////////////////////////////////////////////
//A temp dodgey fix for make compass
Procedure MakeCompassN;
begin
wait(10000+(random(1000)));
KeyDown(VK_Left);
Wait(1850);
KeyUp(VK_Left);
end;
procedure FKeys;
begin
FL[1] := 112;
FL[2] := 113;
FL[3] := 114;
FL[4] := 115;
FL[5] := 116;
FL[6] := 117;
FL[7] := 118;
FL[8] := 119;
FL[9] := 120;
FL[10] := 121;
FL[11] := 122;
FL[12] := 123;
end;
Procedure GameTab1;
begin
FKeys;
KeyDown(FL[1]);
Wait(100 + Random(50));
KeyUp(FL[1]);
Wait(50 + Random(20));
end;
procedure TakeThatArrow;
begin;
end;
Procedure GameTab2;
begin
FKeys;
KeyDown(FL[2]);
Wait(100 + Random(50));
KeyUp(FL[2]);
Wait(50 + Random(20));
end;
Procedure GameTab6;
begin
FKeys;
KeyDown(FL[6]);
Wait(100 + Random(50));
KeyUp(FL[6]);
Wait(50 + Random(20));
end;
procedure FightReport;
begin
ChangeReportWidth(280);
ClearReport;
AddToReport(' /^^^^^^^^^^^^^^^^^^^^^^^^^^^^\');
AddToReport('| <- RICK 4 SRL -> |');
AddToReport('| Pest Controller V2.0 |');
AddToReport('|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|');
if (Wins > 0) then
AddToReport('| game win[s] : ' + SRLReportInStyle(Wins));
if (loses > 0) then
AddToReport('| game lose[s] : ' + SRLReportInStyle(loses));
if (NotEnough > 0) then
AddToReport('| not enough points : ' + SRLReportInStyle(NotEnough));
if (NoSt > 0) then
AddToReport('| Game win status error : ' + SRLReportInStyle(NoSt));
AddToReport(' \~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
end;
procedure AntiBan;
begin
begin
status('Performing antiban')
case Random(7) of
0: MMouse(Random(MSX2), Random(MSY2), 0, 0);
1: RandomRClick;
2: HoverSkill('ranged', False);
3:
begin
HoverSkill('hitpoints', False);
end;
4:
begin
GameTab(13);
DoEmote(1 + Random(20));
Wait(1500 + random(1000));
GameTab(4);
end;
5: PickupMouse;
6: begin
DoEmote(1 + Random(20));
Wait(1500 + random(1000));
GameTab(4);
end;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
// <------------------- RICK 4 SRL - SCRIPT - RICK 4 SRL -------------------> //
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Function OutBoat:Boolean;
var
x,y:integer;
begin
Looking := 0;
repeat
x := 401;
y := 128;
if (FindColorTolerance(x, y, 10977904, 159, 7, 402, 83, 5)) then
begin
Result := True;
exit;
end
else
Result := False;
Looking := Looking + 1
until (Looking = 5)
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure Report;
begin
WriteLn('TimeRunning: ' + TimeRunning);
WriteLn('<---------------------------------------------------->');
WriteLn('--> ' + Players[CurrentPlayer].Name + ' = ' + Players[CurrentPlayer].loc);
WriteLn('Combat : ' + IntToStr(ComLvl));
WriteLn('Wins : ' + IntToStr(Wins)+'. Thats ' +IntToStr((2*Wins))+' pest points.');
WriteLn('<---------------------------------------------------->');
end;
////////////////////////////////////////////////////////////////////////////////
// <----- Sp0rk-eh ----->
Procedure Prayer;
begin
case random(5) of
0:
begin
GameTab(6);
Wait(random(500));
x := (566+random(10));
y := (330+random(20));
MMouse(x, y, 0, 0);
Wait(random(500));
if IsUpText('tiva') then
begin
Mouse(x, y, 1, 1, True);
Wait(random(500));
GameTab1;
Wait(random(500));
end
else
Wait(random(500));
GameTab1;
end;
1:
begin
GameTab(6);
Wait(random(500));
x := (677+random(10));
y := (293+random(20));
MMouse(x, y, 0, 0);
Wait(random(500));
if IsUpText('tiva') then
begin
Mouse(x, y, 1, 1, True);
Wait(random(500));
GameTab1;
Wait(random(500));
end
else
Wait(random(500));
GameTab1;
end;
2:
begin
GameTab(6);
Wait(random(500));
x := (709+random(10));
y := (333+random(20));
MMouse(x, y, 0, 0);
Wait(random(500));
if IsUpText('tiva') then
begin
Mouse(x, y, 1, 1, True);
Wait(random(500));
GameTab1;
Wait(random(500));
end
else
Wait(random(500));
GameTab(1);
end;
3:
begin
GameTab(6);
Wait(random(500));
x := (714+random(10));
y := (258+random(20));
MMouse(x, y, 0, 0);
Wait(random(500));
if IsUpText('tiva') then
begin
Mouse(x, y, 1, 1, True);
Wait(random(500));
GameTab1;
Wait(random(500));
end
else
Wait(random(500));
GameTab1;
end;
4:
begin
GameTab(6);
Wait(random(500));
x := (712+random(10));
y := (259+random(20));
MMouse(x, y, 0, 0);
Wait(random(500));
if IsUpText('tiva') then
begin
Mouse(x, y, 1, 1, True);
Wait(random(500));
GameTab1;
Wait(random(500));
end
else
Wait(random(500));
GameTab1;
end;
end;
end;
Procedure ReCalibrateToCenter;
begin
end;
// <----- Sp0rk-eh ----->
Procedure Spec;
begin
if SimilarColors(GetColor(639, 422),1048576,10) then
begin
if SimilarColors(GetColor(656, 423),4294463,10) then
begin
x := 572+random(130);
y := 416+random(10);
mouse(x,y,1,1,true);
wait(1000+random(200));
end;
end;
end;
// <----- Sp0rk-eh ----->
Function WeAreInBoat: Boolean;
var
iX, iY : integer;
begin
Check := 0;
wait(500+random(300))
wait(500+random(100))
if ((GetColor(493, 327) = 6724095) and (GetColor(476,326) = 6724095))
then
begin
Writeln('We are in the novice boat.')
Result := True
{iX := 176+(random(70));
iY := 150+(random(150));
mouse(iX, iY, 2, 2, True);}
end
else
begin
Result := False;
end;
end;
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL ----->
Function InGame:Boolean;
begin
if (not (FindColorTolerance (x, y, 1644827, 9, 30, 28, 50, 20))) then
begin
Result := False;
exit;
end;
if (FindColorTolerance (x, y, 1644827, 9, 30, 28, 50, 20)) then
begin
Check := Check +1;
if Check < 2 then
begin
Writeln('We are ingame.');
end;
Result := True;
end;
end;
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure GoInBoat;
begin
if WeAreInBoat or InGame then
begin
exit;
end;
If OutBoat then
begin
Looking := 0;
repeat
If FindObjMultiText(x, y, 'angpl', 'angplank', 'Gangplank', 2374991, 4) then
begin
Mouse(x, y, 0, 0, True);
WriteLn('- ' + Players[CurrentPlayer].Name + ' enter`s the boat');
WriteLn('');
exit;
end;
If (not (FindObjMultiText(x, y, 'angpl', 'angplank', 'Gangplank', 2967904, 4))) then
begin
Wait(500);
HighestAngle;
end;
Looking := Looking + 1
until (Looking = 5)
end;
Players[CurrentPlayer].loc := 'Not found the boat';
LogOut;
Report;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL ----->
Procedure GetAllLevelsAndStuff;
begin
{AttLvl := GetSkillLevel('attack')
StrLvl := GetSkillLevel('strength')
DefLvl := GetSkillLevel('defence')
HpLvl := GetSkillLevel('hitpoints')}
{ComLvl := GetCombatLevel }
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure WaitForGameStart;
begin
If Not LoggedIn then
begin
Players[CurrentPlayer].loc := 'logged out in boat';
Report;
LoginPlayer;
MakeCompassN;
end;
if random(2) = 2 then
begin
Spec;
end;
Wait(2000);
WaitCount := WaitCount + 1
If (WaitCount = 27) then
begin
Case random (5) of
0: TypeSend('ive been pcing too long');
1: TypeSend('i have full void');
2: TypeSend('i own');
3: TypeSend('good world');
4: TypeSend('ive been pcing all day');
end;
end;
If (WaitCount = 50) then
begin
Case random (5) of
0: TypeSend('im going for 94 mage');
1: TypeSend('i have ancients');
2: TypeSend('right said fred');
3: TypeSend('green eggs and ham');
4: TypeSend('im eating pizza');
end;
end;
If (WaitCount = 70) then
begin
Case random (5) of
0: TypeSend('dont you want me baby');
1: TypeSend('so much for my happy ending');
2: TypeSend('train station');
3: TypeSend('knows every word you said');
4: TypeSend('i turn away');
end;
If (WaitCount = 100) then
AntiBan;
If (WaitCount = 160) then
TerminateScript;
end;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL ----->
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure WalkToTheCenter2;
begin
Mouse(645, 17, 2, 2, True);
wait(random(500));
Spec;
Wait(2000+random(100));
end;
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure WalkToTheCenter;
begin
Mouse(645, 17, 2, 2, True);
wait(random(500));
Prayer;
Spec;
Wait(500+random(100));
end;
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure CheckNPC;
begin
Wait(2000);
Check := 0;
if SimilarColors(GetColor(81, 442),1189681,4) then
begin
Wins := Wins + 1;
WriteLn('- Game: WON!');
WriteLn('');
ClickToContinue;
exit;
end;
if FindNpcChatText('illed') then
begin
loses := loses + 1;
WriteLn('- Game: Lose =[');
WriteLn('');
ClickToContinue;
exit;
end;
if FindNpcChatText('ticed') then
begin
NotEnough := NotEnough + 1;
WriteLn('- Game: Won, but not enough points! so you lose!');
WriteLn('');
ClickToContinue;
exit;
end;
NoSt := NoSt + 1
WriteLn('- No game status found');
WriteLn('');
end;
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL ----->
Function KilledInGame : boolean;
begin
if (not (FindColorTolerance (x, y, 4487829, 208, 137, 310, 214, 5))) then
begin
Result := False;
exit;
end;
if (FindColorTolerance (x, y, 4487829, 208, 137, 310, 214, 5)) then
begin
if (not (FindColorTolerance (x, y, 1122195, 93, 74, 393, 265, 5))) then
begin
Result := False;
exit;
end;
if (FindColorTolerance (x, y, 1122195, 93, 74, 393, 265, 5)) then
begin
if (not (FindColorTolerance (x, y, 11316664, 93, 74, 393, 265, 5))) then
begin
Result := False;
exit;
end;
if (FindColorTolerance (x, y, 11316664, 93, 74, 393, 265, 5)) then
begin
If (not (InGame)) then
begin
Result := False;
exit;
end;
If (not (FindObjMultiText(x, y, 'Squire', 'quire', 'uire', 5929630, 5))) then
begin
Result := False;
exit;
end;
If FindObjMultiText(x, y, 'Squire', 'quire', 'uire', 5929630, 5) then
begin
WriteLn('- O dear you got killed!');
WriteLn('');
Result := True;
end;
end;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
Procedure FightSomeShifters;
begin
FTime := 0;
If FindObjMultiText(x, y, 'Shifter', 'ifter', 'ifte', 879711, 5) then
begin
Mouse(x,y,0,0,true);
Wait(1000+random(1000));
repeat
Wait(1000+random(500));
FTime := FTime + 1
If (not (FindColorTolerance (x, y, 65280, 190, 102, 307, 195, 5))) then
exit;
until (FTime = 3)
exit;
end;
If FindObjMultiText(x, y, 'Shifter', 'ifter', 'ifte', 5664922, 5) then
begin
Mouse(x,y,0,0,true);
Wait(1000+random(1000));
repeat
Wait(1000+random(500));
FTime := FTime + 1
If (not (FindColorTolerance (x, y, 65280, 190, 102, 307, 195, 5))) then
exit;
until (FTime = 3)
exit;
end;
Wait(1000+random(500));
end;
////////////////////////////////////////////////////////////////////////////////
// <----- Sp0rk-eh ----->
Procedure ChooseMouseClicks;
var
x1, y1, x2, y2, LeftCorner, RightCorner: Integer;
begin
case random(2) of
0:
begin
Mouse(x, y, 0, 0, True);
end;
1:
begin
Mouse(x, y, 0, 0, False);
Wait(100+random(50));
begin
LeftCorner := BitmapFromString(4, 4, 'z78DA33753135313137C5' +
'411A600064715CEA914500CACE13F0');
RightCorner := BitmapFromString(4, 4, 'z78DA33753135313137' +
'C5200D30002E35F8C501C9C013F0');
if (FindBitmap(LeftCorner, x1, y1)) and (FindBitmap(RightCorner, x2, y2)) then
begin
if (FindText(x, y, 'Take', upchars, x1, y1, x2, 502)) then
begin
ChooseOption(x, y, 'ake')
wait(100)
flag
wait((100)+random(200))
end
else
ChooseOption(x, y, 'ttack')
end;
FreeBitmap(LeftCorner);
FreeBitmap(RightCorner);
end;
end;
end;
end;
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure CenterFightzor;
begin
Spec;
If Not LoggedIn then
begin
Players[CurrentPlayer].loc := 'logging back into game';
LoggedBackIn := LoggedBackIn+1;
Report;
LoginPlayer;
MakeCompassN;
end;
FTime := 0;
If FindObjMultiText(x, y, 'Shifter', 'ifter', 'ifte', 879711, 5) then
begin
ChooseMouseClicks;
Wait(1000+random(1000));
repeat
Wait(1000+random(500));
FTime := FTime + 1
If (not (FindColorTolerance (x, y, 65280, 190, 102, 307, 195, 5))) then
exit;
until (FTime = 3)
exit;
end;
If FindObjMultiText(x, y, 'Shifter', 'ifter', 'ifte', 5664922, 5) then
begin
ChooseMouseClicks;
Wait(1000+random(1000));
repeat
Wait(1000+random(500));
FTime := FTime + 1
If (not (FindColorTolerance (x, y, 65280, 190, 102, 307, 195, 5))) then
exit;
until (FTime = 3)
exit;
end;
Wait(1000+random(500));
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure UsePlanB;
begin
WriteLn('- Time for plan B! Center fighter.');
WriteLn('');
Wait(100);
HighestAngle;
WalkToTheCenter2;
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----->
Procedure MainLoop;
begin
if not InGame then GoInBoat;
wait(2000+random(1000))
if WeAreInBoat then
begin
GetAllLevelsAndStuff;
Report;
WaitCount := 0;
repeat
WaitForGameStart;
until InGame
WalkToTheCenter;//
repeat
CenterFightzor;//
If KilledInGame then UsePlanB;
until (not (InGame))
if FindNpcChatText('oins') or FindNpcChatText('lease')
then
begin
Wins := Wins +1;
end;
ClickToContinue;
Wait(3000);
ClickToContinue;
end
else
if InGame then
begin
GetAllLevelsAndStuff;
Report;
WaitCount := 0;
repeat
WaitForGameStart;
until InGame
WalkToTheCenter;//
repeat
CenterFightzor;//
If KilledInGame then UsePlanB;
until (not (InGame))
wait(2000+random(500));
CheckNPC;
FightReport;
ClickToContinue;
Wait((1000)+random(500));
ClickToContinue;
end
{else
GoInBoat;}
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL ----->
Procedure Startup;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Active := True;
ClearDeBug;
WriteLn('__________ ___ _________ ____ __ _____ ___________________ ____ ');
WriteLn('\______ \| |\_ ___ \ | |/ _| / | | / _____/\______ \| | ');
WriteLn(' | _/| |/ \ \/ | < / | |_ \_____ \ | _/| | ');
WriteLn(' | | \| |\ \____| | \ / / / \ | | \| |___ ');
WriteLn(' |____|_ /|___| \______ /|____|__ \ \____ | /_______ / |____|_ /|_______ \ ');
WriteLn(' \/ \/ \/ |__| \/ \/ \/ ');
WriteLn('<--Pest Controll--> V1.0 ');
WriteLn(' ');
Wait(500);
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// <----- RICK 4 SRL + Sp0rk-eh ----- Main Loop ----->
begin
SetupSRL;
Startup;
SetAllConst;
Activateclient;
LoginPlayer;
HighestAngle;
Wait(300);
SetRun(True);
MakeCompassN;
repeat
MainLoop;
FightReport;
until (False)
end.
////////////////////////////////////////////////////////////////////////////////
Rick has also a check portals proc (based off mine) which we plan on including in the next version, with a points exchanging system and an 'anywhere fighter' feature to the script.
Here is the points exchanging system so far.
//Start next to the plank
//With compass facing North
program New;
{.include SRL/SRL.scar}
const
Skill = 'Attack'; //Valid = Attack, Defense, Magic, Prayer, Strength, Ranged and Hitpoints
var
VoidKnightFound : Boolean;
KnightAttempts : Integer;
Procedure Confirm;
begin
x:=229+(random(40))
y:=288+(random(6))
MMouse(x,y,0,0);
wait(500);
if IsUpText('onfirm') then
Mouse(x,y,0,0,True);
end;
Procedure PutPointsOn;
begin
if Skill = 'Attack' then
begin
wait(500+random(200));
x:=188+random(37);
y:=67+random(5);
mouse(x,y,0,0,true);
wait(500+random(200));
if IsUpText('hoose') then
Confirm;
end;
end;
function ExchangeWindow : Boolean;
begin
if (GetColor(238, 20) = 2070783) and (GetColor(305, 29) = 2070783)
and (GetColor(158, 31) = 2070783) then
begin
Result := True;
Writeln('Found Exchange Window')
end
else
Result := False;
end;
Procedure ExchangePoints;
begin
PutPointsOn;
Writeln('Points Exchanged. w00t.');
TerminateScript;
end;
Procedure FindVoidKnightAndExchange;
begin
If FindObjMultiText(x, y, 'oid Kn', 'oid', 'night', 1973793, 5) or
FindObjMultiText(x, y, 'Void Knight', 'oid', 'night', 8037587, 5)
then
begin
Mouse(x,y,1,1,False);
wait(500+random(200));
ChooseOption(x,y,'xchange');
flag;
wait(500+random(200));
if ExchangeWindow then
begin
VoidKnightFound := True
KnightAttempts := 0;
ExchangePoints
end
else
KnightAttempts := KnightAttempts+1;
Writeln('Trying to find void knight again. Current attempts: '
+IntToStr(KnightAttempts)+'.');
VoidKnightFound := False;
end;
end;
Procedure WalkFromSDockToFRuneShop;
begin
if FindSymbol(x, y, 'magic shop') then
begin
Writeln('Found Magic Shop. Walking.');
mouse(x,y,1,1,true)
wait(1000);
flag;
end
else
begin
Writeln('Didnt find shop symbol. co-ords time.');
Mouse(644, 17, 3, 3, true);
flag;
end;
end;
Procedure BackUpWalk3;
begin
Writeln('Fuckit, lets use co-ords!!!');
mouse(645, 60, 1, 1, true);
wait(1000);
flag;
end;
Procedure BackUpWalk2;
begin
if FindSymbol(x, y, 'shop') then
begin
mouse(x,y,1,1,true)
wait(1000);
flag
mouse(664, 97,1,1,true)
wait(1000);
flag
end
else
Writeln('Backup Failed too. No General Store Found.');
BackUpWalk3;
end;
procedure WalkFromFRuneShopToAnvil;
begin
if FindSymbol(x, y, 'anvil') then
begin
mouse(x,y,1,1,true)
wait(1000);
flag
mouse(664, 83,1,1,true)
wait(1000);
flag
end
else
begin
Writeln('Not Found Anvil');
BackUpWalk2;
end;
end;
Procedure LoginCheck;
begin
if (not (LoggedIn)) then
begin
Writeln('Youre not logged in, dummy');
TerminateScript
end;
end;
Procedure ExPoints;
begin
wait(2000);
LoginCheck;
wait(2000+random(500));
WalkFromSDockToFRuneShop;
wait(2000+random(500));
WalkFromFRuneShopToAnvil;
repeat
FindVoidKnightAndExchange;
until (VoidKnightFound = True) or (KnightAttempts = 10);
Writeln('Too many Knight attempts!');
end;
begin
SetupSRL;
ActivateClient
ExPoints;
end.
Finally, since both these scripts are single player. I thought I would demonstrate that I can use multiplayer by creating a simple HomeTeleport Script.
//HomeTeleporter
//InChat Doesn't seem to work. :-(
program PlayerSwitching;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Magic.Scar}
var
mylogout : Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].loc := 'active';
Players[0].String1 := 'Yes'; //Use Hometeleport on startup
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].loc := 'active';
Players[1].String1 := 'Yes'; //Use Hometeleport on startup
Players[1].Active := True;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].loc := 'active';
Players[2].String1 := 'Yes'; //Use Hometeleport on startup
Players[2].Active := True;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].loc := 'active';
Players[3].String1 := 'Yes'; //Use Hometeleport on startup
Players[3].Active := True;
end;
Procedure Setup;
begin
ClearDebug;
SetupSRL;
Activateclient;
DeclarePlayers;
LoginPlayer;
end;
Procedure DoHomeTeleport;
begin
if (Players[CurrentPlayer].String1 = 'Yes') then
begin
Cast('Home Teleport');
Players[CurrentPlayer].Integer1 := 1;
wait(random(2000) + (2000));
If InChat ('need to wait another') then
begin
Writeln('You used hometeleport within the last 30 mins.')
end
else wait (random(2000)+(19000));
end
else
Writeln('Whats the point in this script if you dont want to hometeleport?');
Players[CurrentPlayer].Integer1 := 1;
end;
Procedure MyCrazyLogout;
begin
mylogout := BitmapFromString2(False, 'aF45E878DA958E4B0AC5300' +
'800AF64B4FE963126F73F52630BDD041EBCCD2033280200246E80' +
'F50D9EB629AD0C77FC6611297255B4AB2A8FE27AFC7340B18CF22' +
'A93FACD3AB818B5D5C08B81935283528677A581ADA9DA25D45EBE' +
'3E7580DB590747BA440638FE5B7B7A2A75B229715643053607255' +
'E67FDFDF30D9B5');
if (FindBitmap(mylogout, x, y))
then
begin
Mouse(x,y,1,1,True)
x := 578+(Random(128));
y := 365+(Random(21));
MMouse(x,y,0,0);
wait(500)
if SimilarColors(GetColor(603, 377),255,4) then
Mouse(x,y,0,0,True)
else
begin
Writeln('My Crazy Logout Failed')
TerminateScript;
end;
end;
end;
Procedure CheckDoneHomeTele;
begin
If Players[CurrentPlayer].Integer1 = 1 then
begin
Players[CurrentPlayer].Active := False;
NextPlayer(True);
end;
end;
begin
Setup;
repeat
DoHomeTeleport;
MyCrazyLogout;
CheckDoneHomeTele;
until False;
end.
I can also walk in general (ie radialwalk), if you need evidence I can edit my post with a simple script. Sorry the points exchanging system isn't standardised yet, and some procedures.
——————————————————
<!– END TEMPLATE: formanswers –>