Does the NPC Contact only repair Giant pouches? because right now im using Large / medium / small and it never repairs or even attempts too. Am i doing something wrong do i need to input something in script because im not high enough RC for giant pouch atm.
help why do i get this error ....
Current player: ****
Going to Bank
Error: Exception: Access violation at line 89
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
and in the code whats highlighted is line 89-94 anyone please help!
cephaxz can i releasse ur script in here that work so other can use it if not then i keep it for my self only ask before i do anthing
[Error] (37:13): Unknown identifier 'RUNESCAPE_OTHER' at line 36
Compiling failed.
what?
okay i will post it
Last edited by hader dem2; 05-14-2012 at 05:33 PM.
PHP Code:program CepCosmic;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/paintsmart.simba}
{$i sps/sps.simba}
const
{Please fill in your pouches slot in inventory}
{Fill in 0 if not using}
GIANT_POUCH = 1;
LARGE_POUCH = 13;
MEDIUM_POUCH = 9;
SMALL_POUCH = 5;
var
giant, cosmic, decay, air, astral, pure, small, medium, large, monkfish: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;// declare players
Procedure getposition;
begin
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
repeat
wait(1000);
SPS_GetMyPos();
until (false);
end;
Procedure StartAllDTM;
begin
giant := DTMFromString('mrAAAAHic42BgYOADYikGCGACYgEglgNicSBmg/IlgZgfSssAsRBULQhEBDhDedixHAN+wEgAwwAA9+oCHg==');
cosmic := DTMFromString('mggAAAHicY2NgYOADYgkgZgJiXiCWYUAAHiDmAmIBKJ8RiG/flIOqRsWSDNgBIw4MAQDL+wJ6');
decay := DTMFromString('mwQAAAHic42RgYOADYl4gZgNiUSCWY4AAFiAWg8qLQMUYobQQEAsDsTQUywKxraUJkGTCi2Hm4AOMRGA4AAD+TQHq');
air := DTMFromString('mrAAAAHic42BgYEgE4nQgjgLifCjOgopHAnE2FGdBcQEQVwBxFZS+fekiHDMwMGFgOSAJw9gAIwEMAwCVzg6X');
astral := DTMFromString('m6wAAAHic42ZgYOgD4i4gngjEU6DsViCeDcXTgbgXiDuAOAuIi4A4B4hTgTgJiDOBOAOI84C4DIiroPjsxrNYMQMDEwaWA5LYMDbASAJGAgCRIhl9');
pure := DTMFromString('mlwAAAHicY2dgYJjOxMCwGIiXQOl+IJ4GxPOBmIORgYEJiDmBmA+IRYFYDIiFgTgrNRWomwkrFmHADRjxYCgAAOuOBhw=');
small := DTMFromString('mwQAAAHic42RgYHBiYmBwAGJLIPYAYi8o2wKIHYHYE4h5GBkY/gDVMjKCCAYGTigWAGJhIBYEYi9nS6AkE15sxEAYMBKB4QAA0FsEzA==');
medium := DTMFromString('m6wAAAHic42ZgYMhlYmBIBeJsIC6G4lIgLgTiTKhcMhCnAHEFIwNDDhCnQ+lSIK4C4gYgbgTiekaIGpC4p5M50HQmonAKA/GAkQSMBADeXQsj');
large := DTMFromString('mFQEAAHic42VgYJjKxMDQzwSh5wDxXCBeCMWzoOJdUDUw2oCRgUEJiBWBWBmItRkhYiZAbAnEVkBsBmXrA7EWEPu6WQNtYyIJpzCQDhjJwCgAACoEC4E=');
monkfish := DTMFromString('mwQAAAHic42RgYNgOxMeB+DAQn4SydwHxeiDeDMQ7gTgXiBOBOBOI84G4FIhLoHQqFHs7WgJJJrxYhIEwYCQCwwEA95cLcA==');
end;
Procedure FreeAllDTM;
begin
FreeDTM(decay);
FreeDTM(medium);
FreeDTM(large);
FreeDTM(giant);
FreeDTM(small);
FreeDTM(astral);
FreeDTM(air);
FreeDTM(pure);
FreeDTM(cosmic);
FreeDTM(monkfish);
end;
procedure Walktoagi;
var
myPath:TPointArray;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Walking to Altar');
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
myPath := [Point(117, 136), Point(122, 139), Point(127, 140), Point(131, 145), Point(137, 151), Point(141, 155), Point(146, 158), Point(151, 161), Point(157, 164), Point(163, 168), Point(170, 170), Point(175, 172), Point(184, 177), Point(190, 180), Point(193, 184), Point(198, 187), Point(201, 191), Point(207, 194), Point(217, 204), Point(222, 209), Point(228, 214), Point(235, 220), Point(240, 227), Point(243, 236), Point(246, 242), Point(250, 251), Point(253, 259), Point(255, 268), Point(256, 273), Point(256, 282), Point(255, 289), Point(262, 294), Point(262, 301), Point(262, 308), Point(261, 316), Point(258, 324), Point(254, 333), Point(249, 339), Point(245, 345), Point(243, 351), Point(242, 360), Point(244, 369)];
SPS_WalkPath(myPath);
FFlag(2);
end;
procedure PassWall1;
var
t: Integer;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Clicking shortcut');
MarkTime(t);
repeat
MouseBox(265, 192, 282, 217, mouse_move);
If TimeFromMark(t) > 4000 then
begin
Walktoagi;
end;
until WaitUptext('eeze', 2000);
writeln('Going through shortcut');
ClickMouse2(mouse_Left);
wait(3000);
end;
procedure PassWallSlowOne;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
repeat
MouseBox(265, 192, 282, 217, mouse_move);
until IsUpText('eeze');
ClickMouse2(mouse_Left);
repeat
wait(500);
until AveragePixelShift(PBox, 800, 800) < 1000;
writeln('Got through first obstacle');
end;
procedure NextAgi;
var
myPath:TPointArray;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Walking to next shortcut');
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
myPath := [Point(227,379), Point(215,399)];
SPS_WalkPath(myPath);
FFlag(2);
end;
procedure PassWall2;
var
t: Integer;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Clicking shortcut');
MarkTime(t);
repeat
MouseBox(265, 192, 282, 217, mouse_move);
If TimeFromMark(t) > 4000 then
begin
NextAgi;
end;
until WaitUptext('eeze', 2000);
writeln('Going through shortcut');
ClickMouse2(mouse_Left);
wait(3000);
end;
procedure PassWallSlowTwo;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
repeat
MouseBox(265, 192, 282, 217, mouse_move);
until IsUpText('eeze');
ClickMouse2(mouse_Left);
repeat
wait(500);
until AveragePixelShift(PBox, 800, 800) < 1000;
writeln('Got through second obstacle');
end;
procedure ToAltar;
var
myPath:TPointArray;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Reaching altar');
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
myPath := [Point(203, 423), Point(211, 465)];
SPS_WalkPath(myPath);
FFlag(0);
wait(1000);
end;
procedure EnterAltar;
var
x, y, t:Integer;
begin
FindNormalRandoms;
if not FindNormalRandoms then
MarkTime(t);
repeat
FindColorSpiralTolerance(x, y, 8936313, MSX1, MSY1, MSX2, MSY2, 15);
MMouse(x, y, 2, 2);
WaitUptext('ster', 2000);
ClickMouse2(mouse_Left);
if TimeFromMark(t) > 5000 then
begin
ToAltar;
end;
until DidRedClick;
writeln('Entering altar');
wait(5000);
end;
Procedure GoCenter;
var
x, y:Integer;
begin
FindNormalRandoms;
if not FindNormalRandoms then
repeat
writeln('Walking to the Center');
//north portal
if FindColorTolerance(x, y, 6183782, 605, 142, 649, 161, 13) then
Mouse(633, 159,1,2, mouse_Left)
else
//east portal
if FindColorTolerance(x, y, 6183782, 550, 61, 565, 107, 13) then
Mouse(561, 89,1,2, mouse_Left)
else
//west portal
if FindColorTolerance(x, y, 6183782, 687, 64, 703, 106, 13) then
Mouse(696, 84,1,2, mouse_Left)
else
//south portal
if FindColorTolerance(x, y, 6183782, 603, 9, 652, 27, 13) then
Mouse(629, 21,1,2, mouse_Left);
wait(RandomRange(1000,1500));
until FlagPresent;
repeat
wait(500);
until not FlagPresent;
writeln('Reached Center');
wait(1500);
end;
Procedure ClickAltar6;
var
a,t: Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
Box : TBox;
begin
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(9.51, 9.49);
{ if not FindColorsTolerance(TPA, 6841190, 0, 0, 231, 338, 2) then
begin
writeln('Trying to find area2');
if not FindColorsTolerance(TPA, 6841190, 0, 198, 515, 337, 2) then
begin
writeln('Trying to find area3');
if not FindColorsTolerance(TPA, 6841190, 274, 0, 515, 337, 2) then
begin
writeln('Trying to find area4');
if not FindColorsTolerance(TPA, 6841190, 0, 0, 515, 141, 2) then
begin
writeln('Cant find altar again omggggg');
writeln('Terminating Script');
TerminateScript;
end else
begin
writeln('Found in area4');
end;
end else
begin
writeln('Found in area3');
end;
end else
begin
writeln('Found in area2');
end;
end else
begin
writeln('Found in area1');
end; }
FindColorsTolerance(TPA, 6841190, MSX1, MSY1, MSX2, MSY2, 2);
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 15, 15);
SortATPAFromSize(ATPA, 100, true);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
{$IFDEF SMART}
SMART_DrawDotsEx(false, ATPA[a], clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 4, 4);
if WaitUptext('raft', 2000) then
begin
ClickMouse2(mouse_Left);
writeln('Crafting Runes');
MarkTime(t)
repeat
wait(500);
until WaitInvMaxCount(8, 2000) or (TimeFromMark(t) > 4000);
writeln('Crafted runes');
end else
begin
writeln('Y NO ALTAR?!?!');
TerminateScript;
end;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
Procedure ClickAltar5;
var
a,t,TotalInv, InvAft : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
MP : TPoint;
tmpCTS : Integer;
Box : TBox;
begin
if(not(LoggedIn))then Exit;
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(3.34, 1.00);
if not FindColorsTolerance(TPA, 6578017, 0, 0, 231, 338, 4) then
begin
writeln('Trying to find area2');
if not FindColorsTolerance(TPA, 6578017, 0, 198, 515, 337, 4) then
begin
writeln('Trying to find area3');
if not FindColorsTolerance(TPA, 6578017, 274, 0, 515, 337, 4) then
begin
writeln('Trying to find area4');
if not FindColorsTolerance(TPA, 6578017, 0, 0, 515, 141, 4) then
begin
writeln('Cant find altar again omggggg');
writeln('Terminating Script');
TerminateScript;
end else
begin
writeln('Found in area4');
end;
end else
begin
writeln('Found in area3');
end;
end else
begin
writeln('Found in area2');
end;
end else
begin
writeln('Found in area1');
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 15, 15);
for a := 0 to High(ATPA) do
begin
MP := MiddleTPA(ATPA[a]);
Box := IntToBox((MP.X - 20), (MP.Y - 20), (MP.X + 20), (MP.Y + 20));
{$IFDEF SMART}
SMART_DrawBoxEx(True, Box, clYellow);
{$ENDIF}
MMouse(MP.X, MP.Y, 4, 4);
if WaitUptext('raft', 2000) then
begin
TotalInv:= InvCount;
ClickMouse2(mouse_Left);
writeln('Crafting Runes');
MarkTime(t)
repeat
wait(500);
InvAft:= InvCount
until WaitInvMaxCount(8, 2000) or (TimeFromMark(t) > 4000);
writeln('Crafted runes');
end else
begin
writeln('Y NO ALTAR?!?!');
TerminateScript;
end;
{$IFDEF SMART}
SMART_ClearCanvas;
{$ENDIF}
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
Procedure ClickAltar4;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL, t: Integer;
P: TPoint;
begin
FindNormalRandoms;
if not FindNormalRandoms then
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
if not(FindColorsTolerance(arP, 6644067, MSX1, MSY1, MSX2, MSY2, 4)) then
begin
Writeln('Failed to find the color, no object found.');
ColorToleranceSpeed(tmpCTS);
Exit;
end;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
begin;
ClickMouse2(mouse_Left);
writeln('Crafting Runes');
MarkTime(t)
repeat
wait(500);
until (FindChatBoxText('bind', 8, clBlack)) or (TimeFromMark(t) > 4000);
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
end;
Procedure Altarpls;
var
x, y, t: Integer;
begin
repeat
wait(100);
until FindColorTolerance(x, y, 6644067, MSX1, MSY1, MSX2, MSY2, 3);
begin;
MMouse(x, y, 5, 5);
if WaitUptext('raft', 2000) then
begin
ClickMouse2(mouse_Left);
writeln('Crafting Runes');
MarkTime(t)
repeat
wait(500);
until (FindChatBoxText('bind', 8, clBlack)) or (TimeFromMark(t) > 4000);
wait(700);
end else
begin
writeln('Cant find altar again');
TerminateScript;
end;
end;
end;
Procedure ClickAltarTwo;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2, t, c: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(2.78, 0.54);
FindColorsTolerance(arP, 6709603, MSX1, MSY1, MSX2, MSY2, 3);
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 11.57) and (X <= 12.46) and (Y >= 11.76) and (Y <= 12.77) and (Z >= 13.95) and (Z <= 14.92) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
begin;
ClickMouse2(mouse_Left);
writeln('Crafting Runes');
MarkTime(t)
repeat
wait(500);
until (FindChatBoxText('bind', 8, clBlack)) or (TimeFromMark(t) > 4000);
wait(850);
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
c:= 0
repeat
Inc(c);
Writeln('Altar could not be found');
ClickAltarTwo;
wait(RandomRange(1000,1500));
until c > 5;
Exit;
end;
end;
Procedure ClickAltarOne;
var
x, y, t:Integer;
begin
if FindColorSpiralTolerance(x, y, 6643555, MSX1, MSY1, MSX2, MSY2, 4) then
begin
writeln('Crafting Rune');
Mouse(x, y, 5, 5, mouse_Left);
MarkTime(t);
repeat
wait(500);
until (FindChatBoxText('bind', 8, clBlack)) or (TimeFromMark(t) > 5000);
wait(1500);
end else
begin
ClickAltarTwo;
end;
end;
Procedure EmptyGiant;
var
x, y:Integer;
begin
//Empty Giant Pouch
if FindDTM(giant, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Emptying Giant Pouch');
Mouse(x, y, 3, 3, mouse_Left);
end else
begin
writeln('No giant pouch');
Exit;
end;
end;
Procedure EmptySmall;
var
x, y:Integer;
begin
//Empty Small Pouch
if FindDTM(small, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Emptying Small Pouch');
Mouse(x, y, 3, 3, mouse_Left);
end else
begin
writeln('No small pouch');
Exit;
end;
end;
Procedure EmptyMedium;
var
x, y:Integer;
begin
//Empty Medium Pouch
if FindDTM(medium, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Emptying Medium Pouch');
Mouse(x, y, 3, 3, mouse_Left);
end else
begin
writeln('No medium pouch');
Exit;
end;
end;
Procedure EmptyLarge;
var
x, y:Integer;
begin
//Empty Large Pouch
if FindDTM(large, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Emptying Large Pouch');
Mouse(x, y, 3, 3, mouse_Left);
end else
begin
writeln('No large pouch');
Exit;
end;
end;
Procedure CraftRune;
begin
ClickAltar6;
wait(700);
EmptyGiant;
ClickAltar6;
wait(700);
EmptySmall;
EmptyMedium;
EmptyLarge;
ClickAltar6;
wait(700);
writeln('Finished Crafting');
writeln(''+TimeRunning);
end;
Procedure GoBack;
var
x, y:Integer;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Walking to portal');
//north portal
repeat
if FindColorTolerance(x, y, 6183782, 605, 142, 649, 161, 13) then
Mouse(x, y, 0, 0, mouse_Left)
else
//east portal
if FindColorTolerance(x, y, 6183782, 550, 61, 565, 107, 13) then
Mouse(x, y, 0, 0, mouse_Left)
else
//west portal
if FindColorTolerance(x, y, 6183782, 687, 64, 703, 106, 13) then
Mouse(x, y, 0, 0, mouse_Left)
else
//south portal
if FindColorTolerance(x, y, 6183782, 603, 9, 652, 27, 13) then
Mouse(x, y, 0, 0, mouse_Left);
wait(RandomRange(1000,1500));
until IsMoving;
if FlagPresent then
writeln('FlagPresent');
repeat
wait(1500);
if FlagPresent then
begin
wait(800);
end;
until not FlagPresent;
wait(1500);
end;
Procedure GoOut2;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
FindNormalRandoms;
if not FindNormalRandoms then
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.84);
if not(FindColorsTolerance(arP, 8692391, MSX1, MSY1, MSX2, MSY2, 12)) then
begin
Writeln('Failed to find portal');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
TerminateScript;
Exit;
end;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
repeat
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
if WaitUptext('nter', 2000) then
ClickMouse2(mouse_Left);
until DidRedClick;
writeln('Clicked portal');
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
end;
Procedure GoOut;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 0.90);
FindColorsTolerance(arP, 8823462, MSX1, MSY1, MSX2, MSY2, 10);
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 132) and (R <= 195) and (G >= 130) and (G <= 193) and (B >= 116) and (B <= 156) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 20.98) and (X <= 47.03) and (Y >= 22.48) and (Y <= 51.56) and (Z >= 20.04) and (Z <= 38.49) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
repeat
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('nter')) then
ClickMouse2(mouse_Left);
until DidRedClick;
writeln('Clicked portal');
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not find portal');
Exit;
end;
end;
Procedure AltartoWall;
var
myPath:TPointArray;
begin
FindNormalRandoms;
if not FindNormalRandoms then
wait(2000);
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
myPath := [Point(203, 423), Point(215, 391)];
SPS_WalkPath(myPath);
FFlag(1);
end;
procedure BankAgi2;
var
myPath:TPointArray;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Walking to next shortcut');
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
myPath := [Point(227,379), Point(243,363)];
SPS_WalkPath(myPath);
FFlag(1);
end;
Procedure BankWall;
var
t: Integer;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Clicking shortcut');
MarkTime(t);
repeat
MouseBox(261, 121, 278, 150, mouse_move);
wait(RandomRange(400, 500));
if TimeFromMark(t) > 4000 then
begin
BankAgi2;
end;
until WaitUptext('eeze', 2000);
writeln('Going through shortcut');
ClickMouse2(mouse_Left);
wait(RandomRange(3000,3200));
end;
procedure WalktoBank;
var
myPath:TPointArray;
begin
FindNormalRandoms;
if not FindNormalRandoms then
writeln('Going to Bank');
SPS_Setup(RUNESCAPE_OTHER, ['zanaris']);
myPath := [Point(242, 359), Point(242, 352), Point(245, 343), Point(248, 340), Point(251, 334), Point(255, 329), Point(259, 320), Point(259, 314), Point(260, 307), Point(259, 300), Point(259, 293), Point(256, 286), Point(255, 277), Point(253, 269), Point(250, 261), Point(247, 253), Point(244, 247), Point(244, 241), Point(241, 231), Point(237, 226), Point(234, 220), Point(228, 213), Point(223, 209), Point(218, 205), Point(211, 198), Point(204, 193), Point(199, 190), Point(194, 187), Point(188, 183), Point(181, 179), Point(173, 175), Point(168, 171), Point(162, 167), Point(156, 163), Point(148, 158), Point(143, 154), Point(137, 151), Point(131, 145), Point(123, 141), Point(117, 138)];
SPS_WalkPath(myPath);
FFlag(15);
wait(1200);
end;
Procedure ClickBank;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2, t: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
FindNormalRandoms;
if not FindNormalRandoms then
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.01, 2.64);
if not(FindColorsTolerance(arP, 7328734, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
repeat
writeln('Cant find bank. Trying to find again...');
WalktoBank;
wait(RandomRange(2000,2500));
until FindColorsTolerance(arP, 7328734, MSX1, MSY1, MSX2, MSY2, 11);
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 34.97) and (X <= 74.97) and (Y >= 39.10) and (Y <= 83.94) and (Z >= 17.49) and (Z <= 36.69) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('ank')) then
begin;
writeln('Found Bank');
writeln(''+TimeRunning);
ClickMouse2(mouse_Left);
MarkTime(t);
repeat
wait(RandomRange(100,500));
until (BankScreen) or (TimeFromMark(t) > 5000);
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Writeln('FindObject could not find object.');
Exit;
end;
end;
Procedure RecoverHP;
var
x, y: Integer;
begin
if BankScreen then
if not FindColorTolerance(x, y, 131979, 692, 18, 720, 30, 9) then
begin
writeln('HP low!');
if FindDTM(monkfish, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
writeln('Eating Monkfish');
Mouse(x, y, 4, 4, mouse_Left);
wait(RandomRange(300,500));
ClickMouse2(mouse_Left);
repeat
FindDTM(monkfish, x, y, MIX1, MIY1, MIX2, MIY2);
Mouse(x, y, 3, 3, mouse_Right);
WaitOption('Eat', 1000);
wait(1000);
until not FindDTM(monkfish, x, y, MIX1, MIY1, MIX2, MIY2);
writeln('Done eating');
end else
begin
writeln('No Monkfish, buy some pl0x');
writeln('Terminating Script!');
writeln(''+TimeRunning);
TerminateScript;
end;
end else
begin
Exit;
end;
end;
Procedure BankFailsafe;
begin
if not BankScreen then
begin
repeat
writeln('Bank Screen not found');
wait(RandomRange(1500,2000));
ClickBank;
until BankScreen
end;
end;
Procedure DepositCos;
var
x, y:Integer;
begin
//Deposit Cosmics
if BankScreen then
begin
if FindColorTolerance(x, y, 2020052, MIX1, MIY1, MIX2, MIY2, 50) then
begin
writeln('Found Cosmic');
Mouse(x, y, 4, 4, mouse_Right);
WaitOptionMulti(['All', 'posit'], 300);
end else;
Exit;
end;
end;
Procedure WithdrawEss;
begin
//Withdraw Essence
if BankScreen then
begin
MouseBankSlot(1, mouse_move);
writeln('Withdrawing Pure Essence');
ClickMouse2(mouse_Right);
WaitOptionMulti(['Withdraw-All', 'w-A', 'll'], 1000);
end;
end;
Procedure FillGiant;
begin
//Fill Giant Pouch
if BankScreen then
begin
if not (GIANT_POUCH = 0) then
begin
writeln('Filling Giant Pouch');
InvMouse(GIANT_POUCH, mouse_Right);
WaitOption('ill',1000);
end else
begin
writeln('No giant pouch');
Exit;
end;
end;
end;
Procedure RepairDecay;
var
x, y:Integer;
begin
//Find Decayed Giant Pouch
if FindDTM(decay, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Found decayed pouch');
wait(RandomRange(1000,1500));
end else
begin
Exit;
end;
if InvFull then
begin
writeln('Cant withdraw NPC contact runes');
FindDTM(pure, x, y, MIX1, MIY1, MIX2, MIY2);
Mouse(x, y, 3, 3, mouse_Right);
WaitOption('-5 Pu', 500);
end;
if FindDTM(air, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
writeln('Withdrawing airs');
Mouse(x, y, 3, 3, mouse_Left);
wait(RandomRange(500,1000));
ClickMouse2(mouse_Left);
if FindDTM(cosmic, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
writeln('Withdrawing cosmic');
Mouse(x, y, 3, 3, mouse_Left);
if FindDTM(astral, x, y, MBX1, MBY1, MBX2, MBY2) then
begin
writeln('Withdrawing astral');
Mouse(x, y, 3, 3, mouse_Left);
CloseBank;
GameTab(tab_Magic);
wait(500);
writeln('Begin NPC contact');
MouseBox(689, 224, 702, 235, mouse_Left);
MouseBox(412, 314, 459, 319, mouse_move);
WaitUptext('peak', 1000);
ClickMouse2(mouse_Left);
repeat
wait(500);
until AreTalking;
repeat
ClickContinue(True, False);
until FindNPCChatText('repair', Clickleft);
repeat
DoConversation('', False);
until not AreTalking
writeln('Done repairing pouch');
GameTab(tab_Inv);
ClickBank;
BankFailsafe;
FillGiant;
end else
begin
writeln('No astrals');
TerminateScript;
end;
end else
begin
writeln('No cosmics');
TerminateScript;
end;
end else
begin
writeln('No airs');
TerminateScript;
end;
end;
Procedure FillSmall;
begin
//Fill Small Pouch
if BankScreen then
begin
if not (SMALL_POUCH = 0) then
begin
writeln('Filling Small Pouch');
InvMouse(SMALL_POUCH, mouse_Right);
WaitOption('ill',1000);
end else
begin
writeln('No small pouch');
Exit;
end;
end;
end;
Procedure FillMedium;
begin
//Fill Medium Pouch
if not (MEDIUM_POUCH = 0) then
begin
writeln('Filling Medium Pouch');
InvMouse(MEDIUM_POUCH, mouse_Right);
WaitOption('ill',1000);
end else
begin
writeln('No medium pouch');
Exit;
end;
end;
Procedure FillLarge;
begin
//Fill Large Pouch
if not (LARGE_POUCH = 0) then
begin
writeln('Filling Large Pouch');
InvMouse(LARGE_POUCH, mouse_Right);
WaitOption('ill',1000);
end else
begin
writeln('No large pouch');
Exit;
end;
end;
Procedure BankingProcedure;
begin
BankFailsafe;
DepositCos;
WithdrawEss;
FillGiant;
WithdrawEss;
FillSmall;
FillMedium;
FillLarge;
RecoverHP;
RepairDecay;
WithdrawEss;
end;
Procedure WaytoAltar;
begin
WalktoAgi;
PassWall1;
NextAgi;
Passwall2;
ToAltar;
EnterAltar;
end;
Procedure InsideAltar;
begin
GoCenter;
CraftRune;
GoBack;
GoOut2;
end;
Procedure OutofAltar;
begin
AltartoWall;
Bankwall;
Bankagi2;
Bankwall;
end;
Procedure MainLoop;
begin
WalktoBank;
clickbank;
BankingProcedure;
WaytoAltar;
InsideAltar;
OutofAltar;
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
end;
begin
SetupLogin;
DeclarePlayers;
LoginPlayer;
repeat
wait(500);
until LoggedIn;
if LoggedIn then
begin
ExitSquealOfFortune();
ClickNorth(SRL_ANGLE_HIGH);
end;
AddOnTerminate('FreeAllDTM');
StartAllDTM;
repeat
MainLoop;
until not LoggedIn;
end.
give feedback if it not work i have one more its working for so i hope it work for all
Last edited by hader dem2; 05-14-2012 at 05:37 PM.
Good news. I'm done with my other script, now I'm back to this script and fixing it right now. Just realize my scripting skills has gotten better. I looked into this script and saw how inefficiently I use the functions.
The script wont enter pin, also it gets stuck one it enters the altar it keeps clicking on the south east. and the debug says "reaching altar" anyone got a fix? thanks
Updated!
Please read the new instructions before using it.
Testing it out right now, Working like a charm.
Pin works and altar crafting works perfectly. Ill try to get a proggie.
Thanks for the update!
EDIT: Got it to run for an hour, but it got stuck talking to the zanaris choir for some reason.
Last edited by Adieux; 05-16-2012 at 01:23 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)