ian.
2009-04-20 05:54:45
How Long have You Played Runescape?
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
SCAR
Are you a member of any other communities?
Not anymore
Tell us about yourself…
Please give show us one of your scripts.
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
SCAR
Are you a member of any other communities?
Not anymore
Tell us about yourself…
From: 99_
I'm Ian, I guess a few people know me here. I absolutely love helping people and try to as much as I can. I love this community and the people so much :)
Please give show us one of your scripts.
program _99_FC_;
{.include srl/srl.scar}
var
Made, RingsUsed, XPGained, Charge, tx, ty: integer;
Fires: array of integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 3;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Fires[0] := 0;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;
Fires[1] := 0;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;
Fires[2] := 0;
end;
function LoadDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..6] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 623;
dtmMainPoint.y := 165;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 4676997;
dtmMainPoint.Tolerance := 300;
dtmSubPoints[0].x := 623;
dtmSubPoints[0].y := 165;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 4676997;
dtmSubPoints[0].Tolerance := 300;
dtmSubPoints[1].x := 645;
dtmSubPoints[1].y := 140;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 3422264;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 653;
dtmSubPoints[2].y := 207;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 5067603;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 699;
dtmSubPoints[3].y := 149;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 5155485;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 520;
dtmSubPoints[4].y := 202;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 6497093;
dtmSubPoints[4].Tolerance := 0;
dtmSubPoints[5].x := 584;
dtmSubPoints[5].y := 118;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 5155485;
dtmSubPoints[5].Tolerance := 0;
dtmSubPoints[6].x := 596;
dtmSubPoints[6].y := 303;
dtmSubPoints[6].AreaSize := 0;
dtmSubPoints[6].AreaShape := 0;
dtmSubPoints[6].Color := 7831937;
dtmSubPoints[6].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
function CheckRingInv: Boolean;
var
Charge, Ring, i, rx, ry: integer;
TIA: TIntegerArray;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');
GameTab(5);
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
MMouse(rx, ry, 2, 2);
FreeDTM(Ring);
Charge := StrToInt(GetNumbers(GetUpText));
TIA := [12, 22, 32, 42, 52, 62, 72, 82];
for i:= 0 to High(TIA) do
if(Charge = TIA[i])then
begin
Writeln(IntToStr(Trunc(TIA[i]/10))+' charge(s)');
if(Charge < 13)then
begin
Result := False;
Exit;
end else
Result := True;
Exit;
end;
end;
end;
function Bank: Boolean;
var
x, y, a, i, ii, l, m, curCTS, ClickColor: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
Colors: TIntegerArray;
begin
if(not(LoggedIn))then
Exit;
if(FindSymbol(x, y, 'bank'))then
Mouse(x, y, 2, 2, True);
curCTS := GetColorToleranceSpeed;
if(Length(Colors) = 0)then
begin
SetArrayLength(Colors, 2);
Colors := [4544615, 11119285];
end;
l := High(Colors);
for ii := 0 to 1 do
for i := 0 to l do
begin
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, ii * 7);
if(Length(TPA) > 0)then
begin
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 10, 10);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin
if(ii = 1)then
ClickColor := GetColor(x, y);
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('ank', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
if(ii = 0)or(InIntArrayEx(Colors, i, ClickColor))then
begin
if(i > 0)then
Swap(Colors[i], Colors[i - 1]);
Exit;
end;
SetArrayLength(Colors, l + 2);
Colors[l + 1] := ClickColor;
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;
function GetEss: Boolean;
var
ex, ey, Ess, BX1, BY1, BX2, BY2: integer;
begin
BX1 := 29;
BY1 := 85;
BX2 := 477;
BY2 := 291;
Ess := DTMFromString('78DA6374616660E8636440065121C10CFF813' +
'448F43F10300602D5F4A2AA81C8C248206D0D543383801A57A09A' +
'5904D49802D5741150E307543315BF1A00D2D40B2A');
if(FindDTM(Ess, ex, ey, BX1, BY1, BX2, BY2))then
Mouse(ex, ey, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('All');
Result := True;
end;
function CheckRingBank: Boolean;
var
BX1, BY1, BX2, BY2, rx, ry, Ring: integer;
begin
BX1 := 29;
BY1 := 85;
BX2 := 477;
BY2 := 291;
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');
if(Charge > 12)or(CheckRingInv)then
Exit;
if(FindDTM(Ring, rx, ry, BX1, BY1, BX2, BY2))and(IsUpText('duelling'))then
begin
Mouse(rx, ry, 2, 2, True);
Wait(RandomRange(50, 100));
Result := True;
CloseBank;
FreeDTM(Ring);
Exit;
end;
if(not(FindDTM(Ring, rx, ry, BX1, BY1, BX2, BY2))and(IsUpText('duelling')))then
NextPlayer(False);
end;
function Equip: Boolean;
var
rx, ry, Ring: integer;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');
if(CheckRingBank)then
begin
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, True);
Result := True;
FreeDTM(Ring);
end else
Result := False;
FreeDTM(Ring);
NextPlayer(False);
end;
end;
function Tele(Where: string): Boolean;
var
rx, ry, Ring, bx, by: integer;
begin
Ring := DTMFromString('78DA63DCCFC8C0708901051C5F27C1F01F480' +
'36518FE0301E31120EB00031A60442281F47120EB2801354730ED' +
'C250B31DC8BA4040CD2E20EB387E350045BE0FDF');
case Where of
'Duel Arena': begin
GameTab(5);
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('perate');
repeat
Wait(RandomRange(1, 100));
until(GetColor(137, 371) = 128);
MouseBox(183, 385, 334, 397, 1);
repeat
Wait(1);
until(not(FindSymbol(bx, by, 'bank')));
Result := True;
FreeDTM(Ring);
Exit;
end else
Result := False;
FreeDTM(Ring);
NextPlayer(False);
end;
'Castle Wars': begin
GameTab(5);
if(FindDTM(Ring, rx, ry, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(rx, ry, 2, 2, False);
Wait(RandomRange(25, 50));
ChooseOption('perate');
repeat
Wait(1);
until(GetColor(137, 371) = 128);
MouseBox(449, 572, 579, 584, 1);
repeat
Wait(1);
until(FindSymbol(bx, by, 'bank'));
Result := True;
FreeDTM(Ring);
Exit;
end;
Result := False;
FreeDTM(Ring);
NextPlayer(False);
end;
end;
end;
function WalkToAltar: Boolean;
var
x, y, ax, ay, DTM: integer;
begin
Result:=True;
DTM := LoadDDTM;
if(RadialWalk(6463919, 330, 390, 70, -1, -1))then
exit;
if(FindDTM(DTM, ax, ay, MSX1, MSY1, MSX2, MSY2))then
MouseFlag(x, y, 2, 2, 0)
else
Result:=False;
end;
function EnterAltar: Boolean;
var
x, y, a, i, ii, l, m, curCTS, ClickColor: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
Colors: TIntegerArray;
begin
if(not(LoggedIn))then
Exit;
curCTS := GetColorToleranceSpeed;
if(Length(Colors) = 0)then
begin
SetArrayLength(Colors, 3);
Colors := [4018034, 4675962, 5070720];
end;
l := High(Colors);
for ii := 0 to 1 do
for i := 0 to l do
begin
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[i], MSX1, MSY1, MSX2, MSY2, ii * 7);
if(Length(TPA) > 0)then
begin
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 25, 25);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin
if ii = 1 then
ClickColor := GetColor(X, Y);
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('nter', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
if(ii = 0)or(InIntArrayEx(Colors, i, ClickColor))then
begin
if i > 0 then
Swap(Colors[i], Colors[i - 1]);
Exit;
end;
SetArrayLength(Colors, l + 2);
Colors[l + 1] := ClickColor;
Exit;
end;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;
function WalkToFires: Boolean;
begin
RadialWalk(3557969, 90, 180, 70, -1, -1);
FFlag(0);
Result := True;
end;
function MakeFires1: Boolean;
var
Ess, ex, ey: integer;
begin
Ess := DTMFromString('78DA6374616660E8636440065121C10CFF813' +
'448F43F10300602D5F4A2AA81C8C248206D0D543383801A57A09A' +
'5904D49802D5741150E307543315BF1A00D2D40B2A');
if(FindDTM(Ess, ex, ey, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(ex, ey, 2, 2, True);
Result := True;
end;
end;
function MakeFires2: Boolean;
var
x, y, a, m, curCTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if(not(LoggedIn))or(not(MakeFires1))then
Exit;
curCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5590867, MSX1, MSY1, MSX2, MSY2, 7);
if(Length(TPA) = 0)then
begin
ColorToleranceSpeed(curCTS);
Exit;
end;
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 25, 25);
m := High(ATPA);
for a := 0 to m do
if(MiddleTPAEx(ATPA[a], x, y))then
begin
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if(Pos('raft', RS_GetUpText) > 0)then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
ColorToleranceSpeed(curCTS);
end;
function NeedRings: boolean;
var
LoadsLeft: integer;
begin
case 2 of
0: begin
if(Charge = 11)then
Result := True
else
end;
1: begin
if(Charge = 22)then
begin
LoadsLeft := 1;
Writeln('We need a ring next load');
end;
end;
2: begin
if(Charge > 22)then
begin
Result := False;
end;
end;
end;
end;
procedure Proggy;
begin
ClearDebug;
Writeln('99_');
Writeln('99_Made : '+IntToStr(Made)+' fire runes');
Writeln('99_Used : '+IntToStr(RingsUsed)+' rings');
Writeln('99_XP : '+IntToStr(XPGained)+' gained');
Writeln('99_Ran : '+TimeRunning);
Writeln('99_');
end;
procedure ScriptTerminate;
begin
Writeln('Script finished. Please post this? ;D');
Wait(RandomRange(1000, 5000));
Proggy;
end;
begin
SetupSRL;
ActivateClient;
repeat
if(InvFull)and(CheckRingInv)then
begin
repeat
if(NeedRings)then
Bank;
CheckRingBank;
Tele('Duel Arena');
WalkToAltar;
EnterAltar;
MakeFires1;
MakeFires2;
repeat
Wait(1);
until(InvCount = 1);
Tele('Castle Wars');
until(Fires[CurrentPlayer] >= Made);
NextPlayer(False);
end else
if(not(CheckRingInv))then
begin
Bank;
repeat
Wait(1);
until(GetColor(198, 34) = 4106994);
CheckRingBank;
Equip;
end else
Tele('Duel Arena');
WalkToAltar;
EnterAltar;
repeat
Wait(1);
until(FindSymbol(tx, ty, 'teleport'));
MakeFires1;
MakeFires2;
Tele('Castle Wars');
IncEx(Made, 28);
until(Fires[CurrentPlayer] >= Made);
end.