SRL Archive - Outdated / Broken

WT Experiments


WT-Fakawi

2010-03-30 12:29:38

WT Experiments

by

WT-Fakawi

0.24


This script will kill experiments. It will typically run smooth for a couple of hours when no legits are around. Use it on quiet worlds in downtime. Be sure you have an inventory filled with lobster. It eats when needed and logs you out safely when all food is eaten or when there has been no experiment around for 90 seconds. (This is needed because some randoms are hard to detect (Leo f.i.)


Features:
  • You must manually set the fightmode in runescape. Script will not touch this. (good for pures)
  • Kills Experiments level-25. It will also kill Experiments Level-51 if VeryLowDefence is set to False.
  • Autonavigates to the nearest NPC on screen..or the farthest if legits are around.
  • Autodetects Wallcolors. Turns cam at certain points. You can experiment with Camera tilt. I kept it cam up for better fight detection.

Known Issues:
  • Akward behaviour when legits are around. Whenever a Legit is less than 20 pixel from the minimap it will navigate as far as possible away from the legit to the farthest NPC. This works, but is rather peculiar from a legits pov.
  • Works best when noone is around.
  • Since the HP is changed, it sometimes reads crazy damage. I bypasses this to make sure it doesnt eat all lobbies.


Enjoy, and post some progress.

P.S. Please feel free to add/modify this script

Nose Smasher

2010-03-30 13:20:43

Nice! I'm actually working on a str pure ( currently F2P ) but as soon as I get him membs ( and do Priest in Peril and The Restless Ghost quests ) then I'll def be using this..

Does it support Bone Burying? If not I'd suggest adding it considering in order to get to these guys don't you HAVE to do Priest in Peril and The Restless Ghost and have Creature of Fenkenstrain started? [My point being you will have at least like 2k exp in prayer from quests alone, so no prayer lvl 1 pures…]

First post! :)

Dgby714

2010-03-30 13:41:28

Is this script a little old? Cleaned up standards and commented out the old stats and SMART procedure.

Script After Changes -
program WT_Experiment;
{$DEFINE SMART}
{.include SRL/SRL.scar}

const
TheFood = 'lobster'; // <- one choice for now: 'lobster'
VersionNumber = '0.24';
VeryLowDefence = False; // If set to true will not attack Experiment Level-51
Fawkidebug = False;
LegitLogOutTime = 4; // Timeout in minutes for logout (pauze) for legit
UseCamUpDown = False; // If set, moves cam down for wider range. I have this on by default


{ MySRLID = ' '; //<- Your SRLID. Leave blank if you dont have one.
MySRLPassword = ' '; //<- Your SRL Password here if you want to have yout stats logged}
//----------------------------------------------------------------------------//

procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
end;
end;

//----------------------------------------------------------------------------//

type
TWall = record
Point: TPoint;
Dist: integer;
end;

var
Food, FoodLeft, FoodHeals, Damage, Start, WallArrayIndex,
LegitTimeOut, LegitLogOut, Dist2Legit, WalkedAwayFromLegits,
WallColor, ExperimentsKilled: integer;
LegitFlag, FirstCheck, ForceEdgeCheck: boolean;
NPCColors: array[1..16] of integer;
CombatLevels: array[1..8] of integer;
WallArray: array of Integer;
Wall: array[0..3] of TWall;
P1, P2: Tpoint;

//----------------------------------------------------------------------------//

procedure Quit(reason: string);
begin
WriteLn('QUIT: ' + reason + ' QUIT');
Logout;
TerminateScript;
end;

//----------------------------------------------------------------------------//

procedure FTWait(time: integer);
var
x: integer;
begin
for x := 0 to time do
begin
Wait(100 + Random(100));
FindNormalRandoms;
end;
if (not (Loggedin)) then
Quit('Logged Out');
end;

//----------------------------------------------------------------------------//
// -- Performs FlagWait and FindTalk....
//----------------------------------------------------------------------------//

function FlagFTWait: boolean;
var
FlagMark: integer;
begin
MarkTime(FlagMark);
if (not (FlagPresent)) then
begin
Result := False;
Exit;
end else
begin
repeat
FTWait(1);
if (not (Loggedin)) then
Break;
until ((not (FlagPresent)) or (TimeFromMark(FlagMark) > 6000)); // waits until flag is gone or 6 seconds.
Result := True;
Wait(250);
end;
end;

//----------------------------------------------------------------------------//

procedure SetFood(WhatFood: string);
begin
case WhatFood of
'lobster': begin
Food := BitmapFromString(10, 13, 'beNpjYMAD/v//j5WNJ' +
'oIpBRGEADwm45HFJUW5LC41BL1DqizWEMAeLABkblmn');
FoodHeals := 12;
end;
'anyotherfood': begin
Food := BitmapFromString(10, 13, 'beNpjYMAD/v//j5WNJ' +
'oIpBRGEADwm45HFJUW5LC41BL1DqizWEMAeLABkblmn');
FoodHeals := 9;
end;
end;
end;

//----------------------------------------------------------------------------//

procedure SetupColors;
begin
NPCColors[1] := 10283742; // sheep
NPCColors[2] := 7642575; // spider
NPCColors[3] := 10217948;
NPCColors[4] := 2901605;
NPCColors[5] := 7251613;
NPCColors[6] := 6983870;
NPCColors[7] := 10086105;
NPCColors[8] := 1854556;
NPCColors[9] := 9888213;
NPCColors[10] := 2967655;
NPCColors[11] := 10283742;
NPCColors[12] := 2571608;
NPCColors[13] := 9492685;
NPCColors[14] := 7906263;
NPCColors[15] := 10547427;
NPCColors[16] := 7379401;
end;

//----------------------------------------------------------------------------//

procedure ProgressReport;
begin
ClearDebug;
WriteLn(' ');
WriteLn('<=== ========== - Progress Report V' + VersionNumber + '===============>');
WriteLn('Worked for ' + TimeRunning + '. ');
WriteLn('Killed ' + IntToStr(ExperimentsKilled) + ' Experiments');
WriteLn('XP Gained = ' + IntToStr(ExperimentsKilled * 400));
WriteLn('Walked away from Legits: ' + IntToStr(WalkedAwayFromLegits) + ' Times');
WriteLn('Logged out for Legits : ' + IntToStr(LegitLogOut) + ' Times');
WriteLn('WallColor = ' + IntToStr(WallColor));
WriteLn(' ');
WriteLn('Start Attack Level = ' + IntToStr(Combatlevels[1]));
WriteLn('Start Strength Level = ' + IntToStr(Combatlevels[2]));
WriteLn('Start Defence Level = ' + IntToStr(Combatlevels[3]));
WriteLn('Start Constitution Level = ' + IntToStr(Combatlevels[4]));
WriteLn('Current Attack Level = ' + IntToStr(Combatlevels[5]));
WriteLn('Current Strength Level = ' + IntToStr(Combatlevels[6]));
WriteLn('Current Defence Level = ' + IntToStr(Combatlevels[7]));
WriteLn('Current Constitution Level = ' + IntToStr(Combatlevels[8]));
WriteLn(' ');
end;

//----------------------------------------------------------------------------//
// Performss Arrow up/down/left/right : Time + Random(Time * 2)
//----------------------------------------------------------------------------//

procedure Arrow(Direction: string; Time: integer);
var
Dir: byte;
begin
if UseCamUpDown then // what a wonderful bypass
begin
case LowerCase(Direction) of
'down', 'd': Dir := VK_DOWN;
'up', 'u': Dir := VK_UP;
'left', 'l': Dir := VK_LEFT;
'right', 'r': Dir := VK_RIGHT;
end;
KeyDown(dir);
Wait(Time + Random(Time * 2));
KeyUp(dir);
end;
end;

//----------------------------------------------------------------------------//
// Search for color by drawing circle roung MM edges. Return last Color found.
//----------------------------------------------------------------------------//

function GetRoadEdge(RFrom, RTo: integer): Tpoint;
var
Mx, My, Cx, Cy, i: integer;
begin
if RFrom > RTo then
begin
for i := RFrom downto RTo do
begin
Cx := Round(76 * Sin(i * Pi / 180)) + 627;
Cy := Round(-76 * Cos(i * Pi / 180)) + 85;
FindColor(Mx, My, WallColor, Cx, Cy, Cx + 16, Cy + 16);
end;
end else
begin
for i := RFrom to RTo do
begin
Cx := Round(76 * Sin(i * Pi / 180)) + 627;
Cy := Round(-76 * Cos(i * Pi / 180)) + 85;
FindColor(Mx, My, WallColor, Cx - 16, Cy - 16 , Cx, Cy);
end;
end;
Result.x := Mx;
Result.y := My;
end;

//----------------------------------------------------------------------------//
// Returns True if the wallopening is on top of the screen.
//----------------------------------------------------------------------------//

function CloseEnough: boolean;
begin
if ForceEdgeCheck then
begin
P1 := GetRoadEdge(0, 180);
P2 := GetRoadEdge(360, 180);
end;
Status('P1 = '+ IntToStr(P1.x) + ' ' + IntToStr(P1.y));
Status('P2 = '+ IntToStr(P2.x) + ' ' + IntToStr(P2.y));
if (P1.y > P2.y - 30) and (P1.y < P2.y + 30) then // 30 pixels apart on the vertical axes
begin
Status('CLoseEnough Returned True');
Result := True;
Exit;
end else
Status('CLoseEnough Returned FALSE');
end;

//----------------------------------------------------------------------------//
// Turns Map until wallopening is on top of the screen.
//----------------------------------------------------------------------------//

function CallToMid: boolean;
var
TimeOut: integer;
begin
TimeOut := GetSystemTime;
while (not (CloseEnough)) do
begin
if (Random(2) = 1) then
Arrow('l', 100)
else
Arrow('r', 100);
FTWait(1);
if ((TimeOut + 1000) < GetSystemTime) then
Exit;
end;
Status('CalToMid Returned True');
Result := True;
end;

//----------------------------------------------------------------------------//
// Returns WallColor! Works always. Hasn't failed me once.
//----------------------------------------------------------------------------//

function GetWallColor: integer;
var
c, x, y, tol, TCCounter, TCColorIndex: integer;
RefWallColors: array[0..3] of integer;
TC: array[0..10] of array[0..1] of integer;
begin
RefWallColors[0] := 15461361;
RefWallColors[1] := 15988988;
RefWallColors[2] := 15332584;
RefWallColors[3] := 15070968;

for tol := 0 to 25 do
begin
for c := 0 to 3 do
begin
if FindColorCircleTolerance(x, y, RefWallColors[c], MMCx, MMCy, 76, tol) then
begin
SetArrayLength(WallArray, WallArrayIndex + 1);
WallArray[WallArrayIndex] := GetColor(x, y);
Inc(WallArrayIndex);
end
end;
end;

BubbleSort(WallArray);

for c := 1 to GetArrayLength(WallArray) - 1 do
begin
if (WallArray[c] = WallArray[c - 1]) then
begin
TC[TCColorIndex][0] := WallArray[c];
TC[TCColorIndex][1] := TCCounter;
Inc(TCCounter);
end else
Inc(TCColorIndex);
end;

for c := 0 to 9 do
begin
if (TC[c][1] > TC[c + 1][1]) then // replace result until highest count.
Result := TC[c][0]; // return highest count color.
end;
Status('WallColor := '+ IntToStr(Result));
end;

//----------------------------------------------------------------------------//
// Returns Distance to the four walls N-E-S-W.
//----------------------------------------------------------------------------//

procedure GetWalls;
var
x, y: integer; // fill clockwise 3[0]-6[1]-9[2]-12[3] hours
begin
for x := MMCx to MMx2 do
if FindColor(Wall[0].Point.x, Wall[0].Point.y, WallColor, x, MMCy - 2, x + 4, MMCy + 2) then
Break;
for y := MMCy to MMy2 do
if FindColor(Wall[1].Point.x, Wall[1].Point.y, WallColor, MMCx - 2, y, MMCx + 2, y + 4) then
Break;
for x := MMCx downto MMx1 do
if FindColor(Wall[2].Point.x, Wall[2].Point.y, WallColor, x, MMCy - 2, x + 4, MMCy + 2) then
Break;
for y := MMCy downto MMy1 do
if FindColor(Wall[3].Point.x, Wall[3].Point.y, WallColor, MMCx - 2, y, MMCx + 2, y + 4) then
Break;
end;

//----------------------------------------------------------------------------//
// Returns True if Wall South is closest i.e. we are with our back the wall and looking in the arena
//----------------------------------------------------------------------------//

function IsWallBehind: boolean;
var
c, SmallDist: integer;
begin
GetWalls;
for c := 0 to 3 do
begin
if ((Wall[c].Point.x <> 0) and (Wall[c].Point.y <> 0)) then
begin
Wall[c].Dist := Distance(MMCx, MMCy, Wall[c].Point.x, Wall[c].Point.y);
Status('ISWALLBEHIND: Wall ' + IntToStr(c + 1) + ' Distance = ' + IntToStr(Wall[c].Dist));
end;
end;
SmallDist := 100;
for c := 0 to 3 do
begin
if Wall[c].Dist <> 0 then
begin
if (SmallDist > Wall[c].Dist) then
SmallDist := Wall[c].Dist;
end;
end;
Status('ISWALLBEHIND: SmallDist = ' + IntToStr(SmallDist));
if (SmallDist = Wall[1].Dist) then // is wall below MMCentre?
begin
Result := True;
Status('SmallDist Returned TRUE');
end;
end;


//----------------------------------------------------------------------------//
// Returns distsance of Wall South.
//----------------------------------------------------------------------------//

function WallDist: integer;
var
c, SmallDist: integer; // fill clockwise 3[0]-6[1]-9[2]-12[3] hours
begin
GetWalls;
for c := 0 to 3 do
begin
if ((Wall[c].Point.x <> 0) and (Wall[c].Point.y <> 0)) then
begin
Wall[c].Dist := Distance(MMCx, MMCy, Wall[c].Point.x, Wall[c].Point.y);
Status('WALDIST: Wall ' + IntToStr(c + 1) + ' Distance = ' + IntToStr(Wall[c].Dist));
end;
end;
SmallDist := 100;
for c := 0 to 3 do
begin
if (Wall[c].Dist <> 0) then
begin
if (SmallDist > Wall[c].Dist) then
SmallDist := Wall[c].Dist;
end;
end;
Status('WALDIST: SmallDist = '+ IntToStr(SmallDist));
if (SmallDist = Wall[1].Dist) then // is wall below MMCentre?
begin
Result := SmallDist;
Status('SmallDist Returned TRUE');
end;
end;

//----------------------------------------------------------------------------//
// Rotates towards the arena
//----------------------------------------------------------------------------//

procedure TurnAwayFromWall;
var
TimeOut, LR: integer;
begin
TimeOut := GetSystemTime;
LR := Random(2);
if (LR = 0) then
KeyDown(VK_LEFT)
else
KeyDown(VK_RIGHT);
repeat
Wait(100);
if ((TimeOut + 5000) < GetSystemTime) then
begin
if (LR = 0) then
KeyUp(VK_LEFT)
else
KeyUp(VK_RIGHT);
Exit;
end;
until IsWallBehind;
if (LR = 0) then
KeyDown(VK_LEFT)
else
KeyDown(VK_RIGHT);
end;

//----------------------------------------------------------------------------//

function HaveFood(var Lx, Ly: integer): boolean;
var
Dx, Dy: integer;
begin
GameTab(Tab_Inv);
FoodLeft := CountItems('bitmap', Food, [20]);
if FindBitmapMaskTolerance(Food, Dx, Dy, MIX1, MIY1, MIX2, MIY2, 20, 20) then
begin
Lx := Dx;
Ly := Dy;
if FawkiDebug then
WriteLn('HaveFood returded True');
Result := True;
end else
begin
if FawkiDebug then
WriteLn('HaveFood returded False');
end;
end;

procedure CheckCBLevels;
begin
if FirstCheck then
begin
CombatLevels[1] := GetSkillLevel('attack');
CombatLevels[2] := GetSkillLevel('strength');
CombatLevels[3] := GetSkillLevel('defence');
CombatLevels[4] := GetSkillLevel('hitpoints');
CombatLevels[5] := CombatLevels[1];
CombatLevels[6] := CombatLevels[2];
CombatLevels[7] := CombatLevels[3];
CombatLevels[8] := CombatLevels[4];
FirstCheck := False
end else
begin
CombatLevels[5] := GetSkillLevel('attack');
CombatLevels[6] := GetSkillLevel('strength');
CombatLevels[7] := GetSkillLevel('defence');
CombatLevels[8] := GetSkillLevel('hitpoints');
end;
end;

//----------------------------------------------------------------------------//

function CheckAndRestoreHealth: boolean;
var
Lx, Ly, HPAmount: integer;
HPColor: string;
begin
HPAmount := GetMMlevels('hp', hpcolor);
Damage := (((Combatlevels[8] * 10) - HPAmount) / 10);
if FawkiDebug then
Writeln('Damage = ' + IntToStr(Damage));
Result := True;
if (Damage > 40) then
begin
if FawkiDebug then
Writeln('skipped because impossible damage');
Result := True;
Exit;
end;
if (Damage >= FoodHeals) then
begin
if HaveFood(Lx, Ly) then
begin
Mouse(Lx, Ly, 4, 4, True);
FTWait(4);
CheckAndRestoreHealth;
end else
Result := False;
end;
end;

//----------------------------------------------------------------------------//

procedure RunAway2;
begin
RunAway('N', True, 1, 8000);
if FawkiDebug then
Writeln('RunAway2');
Logout;
Terminatescript;
end;

function FindClosestNPC(how: string): TPoint;
var
i, Cx, Cy, Dist, Fx, Fy: integer;
begin
if (how = 'in') then
begin
for Dist := 5 to 62 do
begin
for i := 160 to 520 do
begin
Cx := Round(Dist * Sin(i * Pi / 180)) + MMCx;
Cy := Round(-Dist * Cos(i * Pi / 180)) + MMCy;
if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
begin
Result.x := Fx;
Result.y := Fy;
Exit;
end;
end;
end;
end;
if how = 'out' then
begin
for Dist := 62 downto 5 do
begin
for i := 160 to 520 do
begin
Cx := Round(Dist * Sin(i * Pi / 180)) + MMCx;
Cy := Round(-Dist * Cos(i * Pi / 180)) + MMCy;
if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
begin
Result.x := Fx;
Result.y := Fy;
Exit;
end;
end;
end;
end;
end;

//----------------------------------------------------------------------------//

procedure ClickMMNPC(how: string);
var
TheNPC: TPoint;
begin
TheNPC := FindClosestNPC(how);
Mouse(TheNPC.x, TheNPC.y, 4, 4, True);
FFlag(20);
end;

//----------------------------------------------------------------------------//

function FindLegit: boolean;
var
i, Cx, Cy, Fx, Fy, Dist: integer;
begin
if (not (FindColor(Fx, Fy, 16711422, MMx1, MMy1, MMx2, MMy2))) then
begin
Result := False;
Exit;
end;

for Dist := 5 to 62 do
begin
for i := 0 to 360 do
begin
i := i + 10;
Cx := Round(Dist * Sin(i * Pi / 180)) + MMCx;
Cy := Round(-Dist * Cos(i * Pi / 180)) + MMCy;
if FindColor(Fx, Fy, 16711422, Cx, Cy, Cx + 1, Cy + 1) then // legit dot color
begin
//Result := True;
Dist2Legit := Distance(MMCx, MMCy, Fx, Fy);
if (Dist2Legit < 20) then
begin
ClickMMNPC('out');
Result := True;
Exit;
end;
Status('Dist to Legit = ' + IntToStr(Dist2Legit));
if LegitFlag then
begin
if ((LegitTimeOut + (LegitLogOutTime * 60000)) < GetSystemTime) then
begin
Writeln(IntToStr(LegitLogOutTime) + ' minutes in neigbourhood with Legit. Logging out for 10 mins');
LogOut;
Wait(10 * 60000);
LoginPlayer;
WallColor := GetWallColor;
Inc(LegitLogOut);
LegitTimeOut := GetSystemTime;
Exit;
end;
end else
LegitTimeOut := GetSystemTime;
if (Dist2Legit < 60) then // Legit anywhere in MM.
begin
LegitFlag := True;
Respond;
end else
begin
LegitFlag := False;
Status('LEGITS around. Accpetable Distance');
end;
Exit;
end;
end;
end;
LegitFlag := False;
end;

//----------------------------------------------------------------------------//

function IsFullHit: boolean;
var
x, y, FullHit: integer;
begin
FullHit := BitmapFromString(2, 5, 'beNrjYLbhgKJKBgYgmYtEOgIAL/ADSg==');
Result := FindBitMapToleranceIn(FullHit, x, y, 100, 70, 410, 257, 20);
if FawkiDebug then
WriteLn('IsFullHit returned ' + BoolToStr(Result));
FreeBitmap(FullHit);
end;

//----------------------------------------------------------------------------//

function WTDamage: boolean;
var
hpcolor: string;
begin
if (Combatlevels[8] <> (GetMMlevels('hp', hpcolor))) then
Result := True;
end;

//----------------------------------------------------------------------------//

function FindExperimentOLD: boolean;
var
CBx, CBy, GCIndex, Dumx, Dumy, MSBx1, MSBy1, MSBx2, MSBy2, MSBox: integer;
SkipBox: Tbox;
begin
if (not (HaveFood(Dumx, Dumy))) then
begin
Quit('Out of Food');
end;

SkipBox.x1 := 213;
SkipBox.y1 := 95;
SkipBox.x2 := 276;
SkipBox.y2 := 202;

CBx := MSx2;
CBy := MSy2;

for MSBox := 0 to 9 do
begin
case MSBox of
0, 2, 4: begin
MSBx1 := 294;
MSBy1 := 130;
MSBx2 := MSx2 - 2;
MSBy2 := MSy2 - 2;
Status('Searching in Box 1');
end; // 3-6 hour
1, 3, 5: begin
MSBx1 := MSx1;
MSBy1 := 130;
MSBx2 := 220;
MSBy2 := MSy2 - 2;
Status('Searching in Box 2');
end; // 6 - 9 hour
6, 8: begin
MSBx1 := 294;
MSBy1 := MSy1;
MSBx2 := MSx2 - 2;
MSBy2 := 180;
Status('Searching in Box 3');
end; // 12 - 3 hour
7, 9: begin
MSBx1 := MSx1;
MSBy1 := MSy1;
MSBx2 := 250;
MSBy2 := 180;
Status('Searching in Box 4');
end; // 9 - 12 hour
end;

for GCIndex := 1 to 16 do
begin
Wait(50 + Random(50));
if FawkiDebug then
WriteLn('GC = ' + IntToStr(GCIndex));
if FindColorTolerance(CBx, CBy, NPCColors[GCIndex], MSBx1, MSBy1, MSBx2, MSBy2, 3) then
begin
MMouse(CBx, CBy, 0, 0);
Wait(10);
if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
begin
if VeryLowDefence then
begin
if IsUpText('25') then
begin
Mouse(CBx, CBy, 0, 0, False);
if ChooseOption('Experiment') then
begin
Result := True;
FlagFTWait;
Exit;
end;
end else
Result := False;
end else
begin
Mouse(CBx, CBy, 0, 0, False);
if ChooseOption('Experiment') then
begin
Result := True;
FlagFTWait;
Exit;
end else
Result := False;
end;
end;
end;
end;
end;
end;

//----------------------------------------------------------------------------//

function FindExperiment: boolean;
var
CBx, CBy, GCIndex, Dumx, Dumy: integer;
begin
if (not (HaveFood(Dumx, Dumy))) then
begin
Quit('Out of Food');
end;

for GCIndex := 1 to 16 do
begin
if FawkiDebug then
Writeln('GC = ' + IntToStr(GCIndex));
if FindColorTolerance(CBx, CBy, NPCColors[GCIndex], MSx1, MSy1, MSx2, MSy2, 3) then
begin
MMouse(CBx, CBy, 0, 0);
Wait(75 + Random(50));
if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
begin
if VeryLowDefence then
begin
if IsUpText('25') then
begin
Mouse(CBx, CBy, 0, 0, False);
if ChooseOption('Experiment') then
begin
Result := True;
FlagFTWait;
Exit;
end;
end else
Result := False;
end else
begin
Mouse(CBx, CBy, 0, 0, False);
if ChooseOption('Experiment') then
begin
Result := True;
FlagFTWait;
Exit;
end else
Result := False;
end;
end;
end;
end;
end;

//----------------------------------------------------------------------------//

function WaitExperiment: boolean;
var
TimeOut: integer;
begin
TimeOut := GetSystemTime;
repeat
if ((GetSystemTime - TimeOut) > 90000) then
begin
if FawkiDebug then
Writeln('Timeout 1 1/2 minute Break out from WaitExperiment');
Result := False;
Exit;
end;
FindNonInventoryRandoms;
if FindLegit then
begin
Inc(WalkedAwayFromLegits);
Break;
end;
if (not (CheckAndRestoreHealth)) then
begin
Quit('Out of Food');
end;
if ClickContinue(False, False) then
begin
CheckCBLevels;
end;
until IsFullHit;
Result := True;
Inc(ExperimentsKilled);
FTWait(8); // wait for yellow NPCpoint to go away;
end;

//----------------------------------------------------------------------------//

procedure Setup;
//var
// i: integer;
begin
ColorToleranceSpeed(1);
ClearDebug;
SetupSRL;
SetupColors;
DeclarePlayers;
//if MySRLID <> '' then
//begin
//SRLID := MySRLID;
//SRLPassword := MySRLPassword;
//end;
//for I := 0 to 19 do
//ReportVars[I] := 0;

//ReportVars[12] := 1;
//ScriptID := '264';
GraphicsSet := True;
LoginPlayer;
SetChat('Hide', 1);
SetRun(True);
SetAngle(True);
MouseSpeed := 40;
Start := GetSystemTime;
GameTab(Tab_Inv);
SetFood(TheFood);
FirstCheck := True;
CheckCBLevels;
WallColor := GetWallColor;
ProgressReport;
end;

//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//

begin
//SmartsetupEx(170, true, true, false);
//SetTargetDC(SmartGetDC);
Setup;
repeat
if FindExperiment then
begin
if WaitExperiment then
ProgressReport;
end else
begin
ClickMMNPC('in');
if FindExperiment then
begin
if WaitExperiment then
ProgressReport;
end else
begin
TurnAwayFromWall;
if FindExperiment then
begin
if WaitExperiment then
ProgressReport
end else
ClickMMNPC('out');
end
end;
if FindLegit then
ClickMMNPC('out');
until(False);
end.

Diff -
2c2
< {.include SRL/SRL/Misc/Smart.scar}
---
> {$DEFINE SMART}
5,23c5,11
< var
< Food, FoodLeft, FoodHeals, Damage: Integer;
< Start: Integer;
< LegitFlag, FirstCheck, ForceEdgeCheck: Boolean;
< LegitTimeOut, LegitLogOut, Dist2Legit, WalkedAwayFromLegits: Integer;
< WallColor: Integer;
< ExperimentsKilled: Integer;
< NPCColors: array[1..16] of integer;
< CombatLevels: array[1..8] of integer;
<
<
< Const TheFood = 'lobster'; // <- one choice for now: 'lobster'
< VersionNumber = '0.24';
< VeryLowDefence = False; // If set to true will not attack Experiment Level-51
< Fawkidebug = False;
< MySRLID = ' '; //<- Your SRLID. Leave blank if you dont have one.
< MySRLPassword = ' '; //<- Your SRL Password here if you want to have yout stats logged
< LegitLogOutTime = 4; // Timeout in minutes for logout (pauze) for legit
< UseCamUpDown = False; // If set, moves cam down for wider range. I have this on by default
---
> const
> TheFood = 'lobster'; // <- one choice for now: 'lobster'
> VersionNumber = '0.24';
> VeryLowDefence = False; // If set to true will not attack Experiment Level-51
> Fawkidebug = False;
> LegitLogOutTime = 4; // Timeout in minutes for logout (pauze) for legit
> UseCamUpDown = False; // If set, moves cam down for wider range. I have this on by default
25,39d12
< var
< WallArray: Array of Integer;
< WallArrayIndex: Integer;
<
< var
< P1, P2: Tpoint;
<
< type
< TWall = Record
< Point: TPoint;
< Dist: Integer;
< end;
<
< var
< Wall: array[0..3] of TWall;
40a14,15
> { MySRLID = ' '; //<- Your SRLID. Leave blank if you dont have one.
> MySRLPassword = ' '; //<- Your SRL Password here if you want to have yout stats logged}
43c18
< Procedure DeclarePlayers;
---
> procedure DeclarePlayers;
48,51c23,29
< Players[0].Name :='';
< Players[0].Pass :='';
< Players[0].Nick :='';
< Players[0].Active := True;
---
> with Players[0] do
> begin
> Name := '';
> Pass := '';
> Nick := '';
> Active := True;
> end;
56c34,53
< procedure Quit(reason:String);
---
> type
> TWall = record
> Point: TPoint;
> Dist: integer;
> end;
>
> var
> Food, FoodLeft, FoodHeals, Damage, Start, WallArrayIndex,
> LegitTimeOut, LegitLogOut, Dist2Legit, WalkedAwayFromLegits,
> WallColor, ExperimentsKilled: integer;
> LegitFlag, FirstCheck, ForceEdgeCheck: boolean;
> NPCColors: array[1..16] of integer;
> CombatLevels: array[1..8] of integer;
> WallArray: array of Integer;
> Wall: array[0..3] of TWall;
> P1, P2: Tpoint;
>
> //----------------------------------------------------------------------------//
>
> procedure Quit(reason: string);
58c55
< writeln('QUIT: '+ reason + ' QUIT');
---
> WriteLn('QUIT: ' + reason + ' QUIT');
65c62
< procedure FTWait(time:Integer);
---
> procedure FTWait(time: integer);
67c64
< x:integer;
---
> x: integer;
69,74c66,72
< for x := 0 to time do
< begin
< Wait(100 + Random(100));
< FindNormalRandoms;
< end;
< If Not Loggedin then Quit('Logged Out');
---
> for x := 0 to time do
> begin
> Wait(100 + Random(100));
> FindNormalRandoms;
> end;
> if (not (Loggedin)) then
> Quit('Logged Out');
81,82c79,81
< function FlagFTWait:Boolean;
< var FlagMark: Integer;
---
> function FlagFTWait: boolean;
> var
> FlagMark: integer;
85c84
< if not FlagPresent then
---
> if (not (FlagPresent)) then
87c86
< Result:=False;
---
> Result := False;
89,90c88
< end
< else
---
> end else
94,96c92,95
< if not(Loggedin) then break;
< until ( (not FlagPresent) or (TimeFromMark(FlagMark) > 6000) ); // waits until flag is gone or 6 seconds.
< Result:=True;
---
> if (not (Loggedin)) then
> Break;
> until ((not (FlagPresent)) or (TimeFromMark(FlagMark) > 6000)); // waits until flag is gone or 6 seconds.
> Result := True;
103c102
< procedure SetFood(WhatFood:String);
---
> procedure SetFood(WhatFood: string);
106,107c105
< 'lobster':
< Begin
---
> 'lobster': begin
109,113c107,110
< 'oIpBRGEADwm45HFJUW5LC41BL1DqizWEMAeLABkblmn');
< FoodHeals := 12;
< End;
< 'anyotherfood':
< Begin
---
> 'oIpBRGEADwm45HFJUW5LC41BL1DqizWEMAeLABkblmn');
> FoodHeals := 12;
> end;
> 'anyotherfood': begin
115,117c112,114
< 'oIpBRGEADwm45HFJUW5LC41BL1DqizWEMAeLABkblmn');
< FoodHeals := 9;
< End;
---
> 'oIpBRGEADwm45HFJUW5LC41BL1DqizWEMAeLABkblmn');
> FoodHeals := 9;
> end;
125d121
<
142c138,139
< end;
---
> end;
>
146c143
< Begin
---
> begin
149,167c146,163
< WriteLn('<=== ========== - Progress Report V' + VersionNumber+ '===============>');
< writeln('Worked for ' + TimeRunning + '. ');
< writeln('Killed '+ IntToStr(ExperimentsKilled) + ' Experiments');
< writeln('XP Gained = '+ IntToStr(ExperimentsKilled * 400));
< writeln('Walked away from Legits: '+ IntToStr(WalkedAwayFromLegits) + ' Times');
< writeln('Logged out for Legits : '+ IntToStr(LegitLogOut) + ' Times');
<
< writeln('WallColor = ' + IntToStr(WallColor));
< Writeln(' ');
< writeln('Start Attack Level = '+ IntToStr(Combatlevels[1]));
< writeln('Start Strength Level = '+ IntToStr(Combatlevels[2]));
< writeln('Start Defence Level = '+ IntToStr(Combatlevels[3]));
< writeln('Start Constitution Level = '+ IntToStr(Combatlevels[4]));
< writeln('Current Attack Level = '+ IntToStr(Combatlevels[5]));
< writeln('Current Strength Level = '+ IntToStr(Combatlevels[6]));
< writeln('Current Defence Level = '+ IntToStr(Combatlevels[7]));
< writeln('Current Constitution Level = '+ IntToStr(Combatlevels[8]));
< Writeln(' ');
< End;
---
> WriteLn('<=== ========== - Progress Report V' + VersionNumber + '===============>');
> WriteLn('Worked for ' + TimeRunning + '. ');
> WriteLn('Killed ' + IntToStr(ExperimentsKilled) + ' Experiments');
> WriteLn('XP Gained = ' + IntToStr(ExperimentsKilled * 400));
> WriteLn('Walked away from Legits: ' + IntToStr(WalkedAwayFromLegits) + ' Times');
> WriteLn('Logged out for Legits : ' + IntToStr(LegitLogOut) + ' Times');
> WriteLn('WallColor = ' + IntToStr(WallColor));
> WriteLn(' ');
> WriteLn('Start Attack Level = ' + IntToStr(Combatlevels[1]));
> WriteLn('Start Strength Level = ' + IntToStr(Combatlevels[2]));
> WriteLn('Start Defence Level = ' + IntToStr(Combatlevels[3]));
> WriteLn('Start Constitution Level = ' + IntToStr(Combatlevels[4]));
> WriteLn('Current Attack Level = ' + IntToStr(Combatlevels[5]));
> WriteLn('Current Strength Level = ' + IntToStr(Combatlevels[6]));
> WriteLn('Current Defence Level = ' + IntToStr(Combatlevels[7]));
> WriteLn('Current Constitution Level = ' + IntToStr(Combatlevels[8]));
> WriteLn(' ');
> end;
173c169
< Procedure Arrow(Direction:String; Time:Integer);
---
> procedure Arrow(Direction: string; Time: integer);
175c171
< Dir:Byte;
---
> Dir: byte;
177,188c173,184
< if UseCamUpDown then // what a wonderful bypass
< begin
< case LowerCase(Direction) of
< 'down','d' : Dir := VK_DOWN;
< 'up','u' : Dir := VK_UP;
< 'left','l' : Dir := VK_LEFT;
< 'right','r': Dir := VK_RIGHT;
< end;
< KeyDown(dir);
< Wait(Time + Random(Time * 2));
< KeyUp(dir);
< end;
---
> if UseCamUpDown then // what a wonderful bypass
> begin
> case LowerCase(Direction) of
> 'down', 'd': Dir := VK_DOWN;
> 'up', 'u': Dir := VK_UP;
> 'left', 'l': Dir := VK_LEFT;
> 'right', 'r': Dir := VK_RIGHT;
> end;
> KeyDown(dir);
> Wait(Time + Random(Time * 2));
> KeyUp(dir);
> end;
195,196c191
< Function GetRoadEdge(RFrom, RTo:Integer):Tpoint;
<
---
> function GetRoadEdge(RFrom, RTo: integer): Tpoint;
198,199c193
< Mx, My, Cx, Cy,i :Integer;
<
---
> Mx, My, Cx, Cy, i: integer;
201c195,197
< if RFrom > RTo then
---
> if RFrom > RTo then
> begin
> for i := RFrom downto RTo do
203,210c199,205
< for i := RFrom downto RTo do
< begin
< Cx := Round( 76 * Sin(i * Pi / 180)) + 627;
< Cy := Round(- 76 * Cos(i * Pi / 180)) + 85;
< FindColor(Mx, My, WallColor, Cx, Cy , Cx + 16, Cy + 16);
< end;
< end
< else
---
> Cx := Round(76 * Sin(i * Pi / 180)) + 627;
> Cy := Round(-76 * Cos(i * Pi / 180)) + 85;
> FindColor(Mx, My, WallColor, Cx, Cy, Cx + 16, Cy + 16);
> end;
> end else
> begin
> for i := RFrom to RTo do
212,217c207,209
< for i := RFrom to RTo do
< begin
< Cx := Round( 76 * Sin(i * Pi / 180)) + 627;
< Cy := Round(- 76 * Cos(i * Pi / 180)) + 85;
< FindColor(Mx, My, WallColor, Cx - 16 , Cy - 16 , Cx, Cy);
< end;
---
> Cx := Round(76 * Sin(i * Pi / 180)) + 627;
> Cy := Round(-76 * Cos(i * Pi / 180)) + 85;
> FindColor(Mx, My, WallColor, Cx - 16, Cy - 16 , Cx, Cy);
219,220c211,213
< Result.x := Mx;
< Result.y := My;
---
> end;
> Result.x := Mx;
> Result.y := My;
227c220
< Function CloseEnough:Boolean;
---
> function CloseEnough: boolean;
229,243c222,235
< if ForceEdgeCheck then
< begin
< P1 := GetRoadEdge(0,180);
< P2 := GetRoadEdge(360,180);
< end;
< Status('P1 = '+ IntToStr(P1.x) + ' ' + IntToStr(P1.y));
< Status('P2 = '+ IntToStr(P2.x) + ' ' + IntToStr(P2.y));
< if (P1.y > P2.y - 30) and (P1.y < P2.y + 30) then // 30 pixels apart on the vertical axes
< begin
< Status('CLoseEnough Returned True');
< Result := True;
< Exit;
< end
< else
< Status('CLoseEnough Returned FALSE');
---
> if ForceEdgeCheck then
> begin
> P1 := GetRoadEdge(0, 180);
> P2 := GetRoadEdge(360, 180);
> end;
> Status('P1 = '+ IntToStr(P1.x) + ' ' + IntToStr(P1.y));
> Status('P2 = '+ IntToStr(P2.x) + ' ' + IntToStr(P2.y));
> if (P1.y > P2.y - 30) and (P1.y < P2.y + 30) then // 30 pixels apart on the vertical axes
> begin
> Status('CLoseEnough Returned True');
> Result := True;
> Exit;
> end else
> Status('CLoseEnough Returned FALSE');
250c242
< Function CallToMid:Boolean;
---
> function CallToMid: boolean;
252,253c244
< TimeOut:Integer;
<
---
> TimeOut: integer;
255,263c246,258
< TimeOut := GetSystemTime;
< while not CloseEnough do
< begin
< If Random(2) = 1 then Arrow('l', 100) else Arrow('r', 100);
< FTWait(1);
< if TimeOut + 1000 < GetSystemTime then Exit;
< end;
< Status('CalToMid Returned True');
< Result := True;
---
> TimeOut := GetSystemTime;
> while (not (CloseEnough)) do
> begin
> if (Random(2) = 1) then
> Arrow('l', 100)
> else
> Arrow('r', 100);
> FTWait(1);
> if ((TimeOut + 1000) < GetSystemTime) then
> Exit;
> end;
> Status('CalToMid Returned True');
> Result := True;
270c265
< function GetWallColor: Integer;
---
> function GetWallColor: integer;
272,274c267,274
< c, x, y, tol, TCCounter, TCColorIndex: Integer;
< RefWallColors: array[0..3] of Integer;
< TC : array[0..10] of array[0..1] of Integer;
---
> c, x, y, tol, TCCounter, TCColorIndex: integer;
> RefWallColors: array[0..3] of integer;
> TC: array[0..10] of array[0..1] of integer;
> begin
> RefWallColors[0] := 15461361;
> RefWallColors[1] := 15988988;
> RefWallColors[2] := 15332584;
> RefWallColors[3] := 15070968;
276,297c276,278
< begin
< RefWallColors[0] := 15461361;
< RefWallColors[1] := 15988988;
< RefWallColors[2] := 15332584;
< RefWallColors[3] := 15070968;

<
< for tol := 0 to 25 do
< begin
< for c := 0 to 3 do
< begin
< if FindColorCircleTolerance(x, y, RefWallColors[c], MMCx, MMCy, 76, tol) then
< begin
< SetArrayLength(WallArray, WallArrayIndex + 1);
< WallArray[WallArrayIndex] := GetColor(x,y);
< Inc(WallArrayIndex);
< end
< end;
< end;
<
< BubbleSort(WallArray);
<
< for c := 1 to GetArrayLength(WallArray) - 1 do
---
> for tol := 0 to 25 do
> begin
> for c := 0 to 3 do
299,306c280,285
< if WallArray[c] = WallArray[c - 1] then
< begin
< TC[TCColorIndex][0] := WallArray[c];
< TC[TCColorIndex][1] := TCCounter;
< Inc(TCCounter);
< end
< else
< Inc(TCColorIndex);
---
> if FindColorCircleTolerance(x, y, RefWallColors[c], MMCx, MMCy, 76, tol) then
> begin
> SetArrayLength(WallArray, WallArrayIndex + 1);
> WallArray[WallArrayIndex] := GetColor(x, y);
> Inc(WallArrayIndex);
> end
307a287
> end;
308a289
> BubbleSort(WallArray);
310c291,293
< for c := 0 to 9 do
---
> for c := 1 to GetArrayLength(WallArray) - 1 do
> begin
> if (WallArray[c] = WallArray[c - 1]) then
312,315c295,307
< if TC[c][1] > TC[c + 1][1] then // replace result until highest count.
< Result := TC[c][0]; // return highest count color.
< end;
< Status('WallColor := '+ IntToStr(Result));
---
> TC[TCColorIndex][0] := WallArray[c];
> TC[TCColorIndex][1] := TCCounter;
> Inc(TCCounter);
> end else
> Inc(TCColorIndex);
> end;
>
> for c := 0 to 9 do
> begin
> if (TC[c][1] > TC[c + 1][1]) then // replace result until highest count.
> Result := TC[c][0]; // return highest count color.
> end;
> Status('WallColor := '+ IntToStr(Result));
322c314
< Procedure GetWalls;
---
> procedure GetWalls;

324,325c316
< x, y :Integer; // fill clockwise 3[0]-6[1]-9[2]-12[3] hours
<
---
> x, y: integer; // fill clockwise 3[0]-6[1]-9[2]-12[3] hours
327,339c318,329
<
< for x := MMCx to MMx2 do
< if FindColor(Wall[0].Point.x, Wall[0].Point.y, WallColor, x, MMCy - 2, x + 4, MMCy + 2) then
< Break;
< for y := MMCy to MMy2 do
< if FindColor(Wall[1].Point.x, Wall[1].Point.y, WallColor, MMCx - 2, y, MMCx + 2, y + 4) then
< Break;
< for x := MMCx downto MMx1 do
< if FindColor(Wall[2].Point.x, Wall[2].Point.y, WallColor, x, MMCy - 2, x + 4, MMCy + 2) then
< Break;
< for y := MMCy downto MMy1 do
< if FindColor(Wall[3].Point.x, Wall[3].Point.y, WallColor, MMCx - 2, y, MMCx + 2, y + 4) then
< Break;
---
> for x := MMCx to MMx2 do
> if FindColor(Wall[0].Point.x, Wall[0].Point.y, WallColor, x, MMCy - 2, x + 4, MMCy + 2) then
> Break;
> for y := MMCy to MMy2 do
> if FindColor(Wall[1].Point.x, Wall[1].Point.y, WallColor, MMCx - 2, y, MMCx + 2, y + 4) then
> Break;
> for x := MMCx downto MMx1 do
> if FindColor(Wall[2].Point.x, Wall[2].Point.y, WallColor, x, MMCy - 2, x + 4, MMCy + 2) then
> Break;
> for y := MMCy downto MMy1 do
> if FindColor(Wall[3].Point.x, Wall[3].Point.y, WallColor, MMCx - 2, y, MMCx + 2, y + 4) then
> Break;
346c336
< Function IsWallBehind:Boolean;
---
> function IsWallBehind: boolean;
348,349c338
< c, SmallDist:Integer;
<
---
> c, SmallDist: integer;
351,376c340,363
< GetWalls;
<
< for c:= 0 to 3 do
< begin
< if (Wall[c].Point.x <> 0) and (Wall[c].Point.y <> 0) then
< begin
< Wall[c].Dist := Distance(MMCx, MMCy, Wall[c].Point.x, Wall[c].Point.y);
< status('ISWALLBEHIND: Wall '+IntToStr(c + 1) +' Distance = ' + IntToStr(Wall[c].Dist));
< end;
< end;
<
< SmallDist := 100;
<
< for c := 0 to 3 do
< begin
< if Wall[c].Dist <> 0 then
< begin
< if SmallDist > Wall[c].Dist then SmallDist := Wall[c].Dist;
< end;
< end;
< status('ISWALLBEHIND: SmallDist = '+ IntToStr(SmallDist));
< if SmallDist = Wall[1].Dist then // is wall below MMCentre?
< begin
< Result := True;
< Status('SmallDist Returned TRUE');
< end;
---
> GetWalls;
> for c := 0 to 3 do
> begin
> if ((Wall[c].Point.x <> 0) and (Wall[c].Point.y <> 0)) then
> begin
> Wall[c].Dist := Distance(MMCx, MMCy, Wall[c].Point.x, Wall[c].Point.y);
> Status('ISWALLBEHIND: Wall ' + IntToStr(c + 1) + ' Distance = ' + IntToStr(Wall[c].Dist));
> end;
> end;
> SmallDist := 100;
> for c := 0 to 3 do
> begin
> if Wall[c].Dist <> 0 then
> begin
> if (SmallDist > Wall[c].Dist) then
> SmallDist := Wall[c].Dist;
> end;
> end;
> Status('ISWALLBEHIND: SmallDist = ' + IntToStr(SmallDist));
> if (SmallDist = Wall[1].Dist) then // is wall below MMCentre?
> begin
> Result := True;
> Status('SmallDist Returned TRUE');
> end;
384c371
< Function WallDist:Integer;
---
> function WallDist: integer;
386,387c373
< c, SmallDist:Integer; // fill clockwise 3[0]-6[1]-9[2]-12[3] hours
<
---
> c, SmallDist: integer; // fill clockwise 3[0]-6[1]-9[2]-12[3] hours
389,390c375,378
< GetWalls;
< for c:= 0 to 3 do
---
> GetWalls;
> for c := 0 to 3 do
> begin
> if ((Wall[c].Point.x <> 0) and (Wall[c].Point.y <> 0)) then
392,396c380,381
< if (Wall[c].Point.x <> 0) and (Wall[c].Point.y <> 0) then
< begin
< Wall[c].Dist := Distance(MMCx, MMCy, Wall[c].Point.x, Wall[c].Point.y);
< status('WALDIST: Wall '+IntToStr(c + 1) +' Distance = ' + IntToStr(Wall[c].Dist));
< end;
---
> Wall[c].Dist := Distance(MMCx, MMCy, Wall[c].Point.x, Wall[c].Point.y);
> Status('WALDIST: Wall ' + IntToStr(c + 1) + ' Distance = ' + IntToStr(Wall[c].Dist));
398,409c383,394
<
< SmallDist := 100;
<
< for c := 0 to 3 do
< begin
< if Wall[c].Dist <> 0 then
< begin
< if SmallDist > Wall[c].Dist then SmallDist := Wall[c].Dist;
< end;
< end;
< status('WALDIST: SmallDist = '+ IntToStr(SmallDist));
< if SmallDist = Wall[1].Dist then // is wall below MMCentre?
---
> end;
> SmallDist := 100;
> for c := 0 to 3 do
> begin
> if (Wall[c].Dist <> 0) then
> begin
> if (SmallDist > Wall[c].Dist) then
> SmallDist := Wall[c].Dist;
> end;
> end;
> Status('WALDIST: SmallDist = '+ IntToStr(SmallDist));
> if (SmallDist = Wall[1].Dist) then // is wall below MMCentre?
420c405
< Procedure TurnAwayFromWall;
---
> procedure TurnAwayFromWall;
422,424c407
< TimeOut:Integer;
< LR:Integer;
<
---
> TimeOut, LR: integer;
426,437c409,429
< TimeOut := GetSystemTime;
< LR := Random(2);
< if LR = 0 then KeyDown(VK_LEFT) else KeyDown(VK_RIGHT);
< repeat
< Wait(100);
< if TimeOut + 5000 < GetSystemTime then
< begin
< if LR = 0 then KeyUp(VK_LEFT) else KeyUp(VK_RIGHT);
< Exit;
< end;
< until IsWallBehind;
< if LR = 0 then KeyUp(VK_LEFT) else KeyUp(VK_RIGHT);
---
> TimeOut := GetSystemTime;
> LR := Random(2);
> if (LR = 0) then
> KeyDown(VK_LEFT)
> else
> KeyDown(VK_RIGHT);
> repeat
> Wait(100);
> if ((TimeOut + 5000) < GetSystemTime) then
> begin
> if (LR = 0) then
> KeyUp(VK_LEFT)
> else
> KeyUp(VK_RIGHT);
> Exit;
> end;
> until IsWallBehind;
> if (LR = 0) then
> KeyDown(VK_LEFT)
> else
> KeyDown(VK_RIGHT);
442,443c434,436
< Function HaveFood(var Lx, Ly:Integer): Boolean;
< var Dx, Dy:integer;
---
> function HaveFood(var Lx, Ly: integer): boolean;
> var
> Dx, Dy: integer;
451c444,445
< if FawkiDebug then writeln('HaveFood returded True');
---
> if FawkiDebug then
> WriteLn('HaveFood returded True');
453,454c447
< end
< else
---
> end else
456,457c449,451
< if FawkiDebug then writeln('HaveFood returded False');
< end
---
> if FawkiDebug then
> WriteLn('HaveFood returded False');
> end;
462,484c456,473
< if FirstCheck then
< begin
< // Players[CurrentPlayer].Level[Skill_Attack] := GetSkillLevel('attack');
< // Players[CurrentPlayer].Level[Skill_Strength] := GetSkillLevel('strength');
< // Players[CurrentPlayer].Level[Skill_Defense] := GetSkillLevel('defence');
< // Players[CurrentPlayer].Level[Skill_HP] := GetSkillLevel('hitpoints');
< CombatLevels[1] := GetSkillLevel('attack');
< CombatLevels[2] := GetSkillLevel('strength');
< CombatLevels[3] := GetSkillLevel('defence');
< CombatLevels[4] := GetSkillLevel('hitpoints');
< CombatLevels[5] := CombatLevels[1];
< CombatLevels[6] := CombatLevels[2];
< CombatLevels[7] := CombatLevels[3];
< CombatLevels[8] := CombatLevels[4];
< FirstCheck := False
< end
< else
< begin
< CombatLevels[5] := GetSkillLevel('attack');
< CombatLevels[6] := GetSkillLevel('strength');
< CombatLevels[7] := GetSkillLevel('defence');
< CombatLevels[8] := GetSkillLevel('hitpoints');
< end
---
> if FirstCheck then
> begin
> CombatLevels[1] := GetSkillLevel('attack');
> CombatLevels[2] := GetSkillLevel('strength');
> CombatLevels[3] := GetSkillLevel('defence');
> CombatLevels[4] := GetSkillLevel('hitpoints');
> CombatLevels[5] := CombatLevels[1];
> CombatLevels[6] := CombatLevels[2];
> CombatLevels[7] := CombatLevels[3];
> CombatLevels[8] := CombatLevels[4];
> FirstCheck := False
> end else
> begin
> CombatLevels[5] := GetSkillLevel('attack');
> CombatLevels[6] := GetSkillLevel('strength');
> CombatLevels[7] := GetSkillLevel('defence');
> CombatLevels[8] := GetSkillLevel('hitpoints');
> end;
489,499c478,497
< Function CheckAndRestoreHealth: Boolean;
< var Lx, Ly, HPAmount:Integer;
< var
< HPColor: String;
< begin
< HPAmount:= GetMMlevels( 'hp', hpcolor);
< Damage := ((Combatlevels[8] * 10) - HPAmount)/10;
< // Status('Damage = ' + IntToStr(Damage));
< If FawkiDebug then Writeln('Damage = ' + IntToStr(Damage));
< Result := True;
< if Damage > 40 then
---
> function CheckAndRestoreHealth: boolean;
> var
> Lx, Ly, HPAmount: integer;
> HPColor: string;
> begin
> HPAmount := GetMMlevels('hp', hpcolor);
> Damage := (((Combatlevels[8] * 10) - HPAmount) / 10);
> if FawkiDebug then
> Writeln('Damage = ' + IntToStr(Damage));
> Result := True;
> if (Damage > 40) then
> begin
> if FawkiDebug then
> Writeln('skipped because impossible damage');
> Result := True;
> Exit;
> end;
> if (Damage >= FoodHeals) then
> begin
> if HaveFood(Lx, Ly) then
501,513c499,502
< If FawkiDebug then Writeln('skipped because impossible damage');
< Result := True;
< Exit;
< End;
< if Damage >= FoodHeals then
< begin
< if HaveFood(Lx,Ly) then
< begin
< Mouse(Lx , Ly , 4, 4, True);
< FTWait(4);
< CheckAndRestoreHealth;
< end
< else
---
> Mouse(Lx, Ly, 4, 4, True);
> FTWait(4);
> CheckAndRestoreHealth;
> end else
515c504
< end;
---
> end;
522,523c511,513
< RunAway('N',True, 1, 8000);
< if FawkiDebug then writeln('RunAway2');
---
> RunAway('N', True, 1, 8000);
> if FawkiDebug then
> Writeln('RunAway2');
528c518
< function FindClosestNPC(how:string): TPoint;
---
> function FindClosestNPC(how: string): TPoint;
530c520
< i, Cx, Cy, Dist, Fx, Fy: Integer;
---
> i, Cx, Cy, Dist, Fx, Fy: integer;
532c522,524
< if how = 'in' then
---
> if (how = 'in') then
> begin
> for Dist := 5 to 62 do
534c526
< for Dist := 5 to 62 do
---
> for i := 160 to 520 do
536,545c528,534
< for i := 160 to 520 do
< begin
< Cx := Round( Dist * Sin(i * Pi / 180)) + MMCx;
< Cy := Round(- Dist * Cos(i * Pi / 180)) + MMCy;
< if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
< begin
< Result.x := Fx;
< Result.y := Fy;
< Exit;
< end;
---
> Cx := Round(Dist * Sin(i * Pi / 180)) + MMCx;
> Cy := Round(-Dist * Cos(i * Pi / 180)) + MMCy;
> if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
> begin
> Result.x := Fx;
> Result.y := Fy;
> Exit;
547c536
< end
---
> end;
549,550c538,541
<
< if how = 'out' then
---
> end;
> if how = 'out' then
> begin
> for Dist := 62 downto 5 do
552c543
< for Dist := 62 downto 5 do
---
> for i := 160 to 520 do
554,563c545,551
< for i := 160 to 520 do
< begin
< Cx := Round( Dist * Sin(i * Pi / 180)) + MMCx;
< Cy := Round(- Dist * Cos(i * Pi / 180)) + MMCy;
< if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
< begin
< Result.x := Fx;
< Result.y := Fy;
< Exit;
< end;
---
> Cx := Round(Dist * Sin(i * Pi / 180)) + MMCx;
> Cy := Round(-Dist * Cos(i * Pi / 180)) + MMCy;
> if FindColor(Fx, Fy, 195836, Cx, Cy, Cx + 1, Cy + 1) then
> begin
> Result.x := Fx;
> Result.y := Fy;
> Exit;
565c553
< end
---
> end;
567c555
<
---
> end;
569a558
> //----------------------------------------------------------------------------//
571c560
< Procedure ClickMMNPC(how:string);
---
> procedure ClickMMNPC(how: string);
577d565
< // MFNF(TheNPC.x, TheNPC.y, 4, 4);
579d566
< // FtWait(5);
584c571
< function FindLegit:Boolean;
---
> function FindLegit: boolean;
586,587c573
< i, Cx, Cy, Fx, Fy, Dist: Integer;
<
---
> i, Cx, Cy, Fx, Fy, Dist: integer;
589,594c575,583
< If not FindColor(Fx, Fy, 16711422, MMx1, MMy1, MMx2, MMy2) then
< begin
< Result := False;
< Exit;
< end;
< for Dist := 5 to 62 do
---
> if (not (FindColor(Fx, Fy, 16711422, MMx1, MMy1, MMx2, MMy2))) then
> begin
> Result := False;
> Exit;
> end;
>
> for Dist := 5 to 62 do
> begin
> for i := 0 to 360 do
596c585,599
< for i := 0 to 360 do
---
> i := i + 10;
> Cx := Round(Dist * Sin(i * Pi / 180)) + MMCx;
> Cy := Round(-Dist * Cos(i * Pi / 180)) + MMCy;
> if FindColor(Fx, Fy, 16711422, Cx, Cy, Cx + 1, Cy + 1) then // legit dot color
> begin
> //Result := True;
> Dist2Legit := Distance(MMCx, MMCy, Fx, Fy);
> if (Dist2Legit < 20) then
> begin
> ClickMMNPC('out');
> Result := True;
> Exit;
> end;
> Status('Dist to Legit = ' + IntToStr(Dist2Legit));
> if LegitFlag then
598,637c601,609
< i := i + 10;
< Cx := Round( Dist * Sin(i * Pi / 180)) + MMCx;
< Cy := Round(- Dist * Cos(i * Pi / 180)) + MMCy;
< if FindColor(Fx, Fy, 16711422, Cx, Cy, Cx + 1, Cy + 1) then // legit dot color
< begin
< // Result := True;
< Dist2Legit := Distance(MMCx, MMCy, Fx, Fy);
< if Dist2Legit < 20 then
< begin
< ClickMMNPC('out');
< Result := True;
< Exit;
< end;
< status('Dist to Legit = ' + IntToStr(Dist2Legit));
< if LegitFlag then
< begin
< if LegitTimeOut + (LegitLogOutTime * 60000) < GetSystemTime then
< begin
< Writeln( IntToStr(LegitLogOutTime ) + ' minutes in neigbourhood with Legit. Logging out for 10 mins');
< LogOut;
< Wait(10 * 60000);
< LoginPlayer;
< WallColor := GetWallColor;
< Inc(LegitLogOut);
< LegitTimeOut := GetSystemTime;
< Exit;
< end
< end
< else
< LegitTimeOut := GetSystemTime;
< if Dist2Legit < 60 then // Legit anywhere in MM.
< begin
< LegitFlag := True;
< Respond;
< end
< else
< begin
< LegitFlag := False;
< Status('LEGITS around. Accpetable Distance');
< end;
---
> if ((LegitTimeOut + (LegitLogOutTime * 60000)) < GetSystemTime) then
> begin
> Writeln(IntToStr(LegitLogOutTime) + ' minutes in neigbourhood with Legit. Logging out for 10 mins');
> LogOut;
> Wait(10 * 60000);
> LoginPlayer;
> WallColor := GetWallColor;
> Inc(LegitLogOut);
> LegitTimeOut := GetSystemTime;
638a611,621
> end;
> end else
> LegitTimeOut := GetSystemTime;
> if (Dist2Legit < 60) then // Legit anywhere in MM.
> begin
> LegitFlag := True;
> Respond;
> end else
> begin
> LegitFlag := False;
> Status('LEGITS around. Accpetable Distance');
639a623,624
> Exit;
> end;
644a630
> //----------------------------------------------------------------------------//
646c632
< Function IsFullHit:Boolean;
---
> function IsFullHit: boolean;
648c634
< x, y, FullHit:Integer;
---
> x, y, FullHit: integer;
650,651c636
< FullHit := BitmapFromString(2, 5, 'beNrjYLbhgKJKBgYgmYtEOgI' +
< 'AL/ADSg==');
---
> FullHit := BitmapFromString(2, 5, 'beNrjYLbhgKJKBgYgmYtEOgIAL/ADSg==');
653c638,639
< if FawkiDebug then writeln('IsFullHit returned ' + BoolToStr(Result));
---
> if FawkiDebug then
> WriteLn('IsFullHit returned ' + BoolToStr(Result));
659c645
< Function WTDamage:Boolean;
---
> function WTDamage: boolean;
661c647
< hpcolor:String;
---
> hpcolor: string;
663c649,650
< if Combatlevels[8] <> (GetMMlevels( 'hp', hpcolor)) then Result := True;
---
> if (Combatlevels[8] <> (GetMMlevels('hp', hpcolor))) then
> Result := True;
668,670c655,658
< Function FindExperimentOLD: Boolean;
< var CBx, CBy, GCIndex, Dumx, Dumy, MSBx1, MSBy1, MSBx2, MSBy2, MSBox: Integer;
< SkipBox:Tbox;
---
> function FindExperimentOLD: boolean;
> var
> CBx, CBy, GCIndex, Dumx, Dumy, MSBx1, MSBy1, MSBx2, MSBy2, MSBox: integer;
> SkipBox: Tbox;
672,680c660,663
< if not HaveFood(Dumx, Dumy) then
< begin
< Quit('Out of Food');
< end;
<
< SkipBox.x1 := 213;
< SkipBox.y1 := 95;
< SkipBox.x2 := 276;
< SkipBox.y2 := 202;
---
> if (not (HaveFood(Dumx, Dumy))) then
> begin
> Quit('Out of Food');
> end;
682,683c665,668
< CBx := MSx2;
< CBy := MSy2;
---
> SkipBox.x1 := 213;
> SkipBox.y1 := 95;
> SkipBox.x2 := 276;
> SkipBox.y2 := 202;
685,720c670,671
< for MSBox := 0 to 9 do
< begin
< Case MSBox of
< 0,2,4:
< begin
< MSBx1 := 294;
< MSBy1 := 130;
< MSBx2 := MSx2 - 2;
< MSBy2 := MSy2 - 2;
< Status('Searching in Box 1');
< end; // 3-6 hour
< 1,3,5:
< begin
< MSBx1 := MSx1;
< MSBy1 := 130;
< MSBx2 := 220 ;
< MSBy2 := MSy2 - 2;
< Status('Searching in Box 2');
< end; // 6 - 9 hour
< 6,8:
< begin
< MSBx1 := 294;
< MSBy1 := MSy1;
< MSBx2 := MSx2 - 2;
< MSBy2 := 180;
< Status('Searching in Box 3');
< end; // 12 - 3 hour
< 7,9:
< begin
< MSBx1 := MSx1;
< MSBy1 := MSy1;
< MSBx2 := 250 ;
< MSBy2 := 180;
< Status('Searching in Box 4');
< end; // 9 - 12 hour
< end;
---
> CBx := MSx2;
> CBy := MSy2;
722c673,715
< for GCIndex := 1 to 16 do
---
> for MSBox := 0 to 9 do
> begin
> case MSBox of
> 0, 2, 4: begin
> MSBx1 := 294;
> MSBy1 := 130;
> MSBx2 := MSx2 - 2;
> MSBy2 := MSy2 - 2;
> Status('Searching in Box 1');
> end; // 3-6 hour
> 1, 3, 5: begin
> MSBx1 := MSx1;
> MSBy1 := 130;
> MSBx2 := 220;
> MSBy2 := MSy2 - 2;
> Status('Searching in Box 2');
> end; // 6 - 9 hour
> 6, 8: begin
> MSBx1 := 294;
> MSBy1 := MSy1;
> MSBx2 := MSx2 - 2;
> MSBy2 := 180;
> Status('Searching in Box 3');
> end; // 12 - 3 hour
> 7, 9: begin
> MSBx1 := MSx1;
> MSBy1 := MSy1;
> MSBx2 := 250;
> MSBy2 := 180;
> Status('Searching in Box 4');
> end; // 9 - 12 hour
> end;
>
> for GCIndex := 1 to 16 do
> begin
> Wait(50 + Random(50));
> if FawkiDebug then
> WriteLn('GC = ' + IntToStr(GCIndex));
> if FindColorTolerance(CBx, CBy, NPCColors[GCIndex], MSBx1, MSBy1, MSBx2, MSBy2, 3) then
> begin
> MMouse(CBx, CBy, 0, 0);
> Wait(10);
> if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
724,726c717,719
< Wait(50 + Random(50));
< if FawkiDebug then Writeln('GC = ' + IntToStr(GCIndex));
< if FindColorTolerance(CBx, CBy, NPCColors[GCIndex], MSBx1, MSBy1, MSBx2, MSBy2, 3) then
---
> if VeryLowDefence then
> begin
> if IsUpText('25') then
728,730c721,722
< MMouse(CBx, CBy, 0, 0);
< Wait(10);
< if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
---
> Mouse(CBx, CBy, 0, 0, False);
> if ChooseOption('Experiment') then
732,760c724,740
< if VeryLowDefence then
< begin
< if IsUpText('25') then
< begin
< Mouse(CBx, CBy, 0, 0, False);
< if ChooseOption('Experiment') then
< begin
< Result := True;
< FlagFTWait;
< Exit;
< end
< end
< else
< Result := False;
< end
< else
< begin
< Mouse(CBx, CBy, 0, 0, False);
< if ChooseOption('Experiment') then
< begin
< Result := True;
< FlagFTWait;
< Exit;
< end
< else
< Result := False;
< end;
< end;
< end;
---
> Result := True;
> FlagFTWait;
> Exit;
> end;
> end else
> Result := False;
> end else
> begin
> Mouse(CBx, CBy, 0, 0, False);
> if ChooseOption('Experiment') then
> begin
> Result := True;
> FlagFTWait;
> Exit;
> end else
> Result := False;
> end;
761a742
> end;
762a744
> end;
767,774c749,756
< Function FindExperiment: Boolean;
< var CBx, CBy, GCIndex, Dumx, Dumy, MSBx1, MSBy1, MSBx2, MSBy2, MSBox: Integer;
< SkipBox:Tbox;
< begin
< if not HaveFood(Dumx, Dumy) then
< begin
< Quit('Out of Food');
< end;
---
> function FindExperiment: boolean;
> var
> CBx, CBy, GCIndex, Dumx, Dumy: integer;
> begin
> if (not (HaveFood(Dumx, Dumy))) then
> begin
> Quit('Out of Food');
> end;
776c758,766
< for GCIndex := 1 to 16 do
---
> for GCIndex := 1 to 16 do
> begin
> if FawkiDebug then
> Writeln('GC = ' + IntToStr(GCIndex));
> if FindColorTolerance(CBx, CBy, NPCColors[GCIndex], MSx1, MSy1, MSx2, MSy2, 3) then
> begin
> MMouse(CBx, CBy, 0, 0);
> Wait(75 + Random(50));
> if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
778,779c768,770
< if FawkiDebug then Writeln('GC = ' + IntToStr(GCIndex));
< if FindColorTolerance(CBx, CBy, NPCColors[GCIndex], MSx1, MSy1, MSx2, MSy2, 3) then
---
> if VeryLowDefence then
> begin
> if IsUpText('25') then
781,783c772,773
< MMouse(CBx, CBy, 0, 0);
< Wait(75 + Random(50));
< if FindColorTolerance(Dumx, Dumy, 318168, 42, 8, 120, 21, 50) then // Yellow
---
> Mouse(CBx, CBy, 0, 0, False);
> if ChooseOption('Experiment') then
785,813c775,791
< if VeryLowDefence then
< begin
< if IsUpText('25') then
< begin
< Mouse(CBx, CBy, 0, 0, False);
< if ChooseOption('Experiment') then
< begin
< Result := True;
< FlagFTWait;
< Exit;
< end
< end
< else
< Result := False;
< end
< else
< begin
< Mouse(CBx, CBy, 0, 0, False);
< if ChooseOption('Experiment') then
< begin
< Result := True;
< FlagFTWait;
< Exit;
< end
< else
< Result := False;
< end;
< end;
< end;
---
> Result := True;
> FlagFTWait;
> Exit;
> end;
> end else
> Result := False;
> end else
> begin
> Mouse(CBx, CBy, 0, 0, False);
> if ChooseOption('Experiment') then
> begin
> Result := True;
> FlagFTWait;
> Exit;
> end else
> Result := False;
> end;
814a793,794
> end;
> end;
819c799
< Function WaitExperiment: Boolean;
---
> function WaitExperiment: boolean;
821c801
< TimeOut:Integer;
---
> TimeOut: integer;
823,848c803,829
< TimeOut := GetSystemTime;
< repeat
< If GetSystemTime - TimeOut > 90000 then
< begin
< if FawkiDebug Then Writeln('Timeout 1 1/2 minute Break out from WaitExperiment');
< Result := False;
< Exit;
< end;
< FindNonInventoryRandoms;
< if FindLegit then
< begin
< Inc(WalkedAwayFromLegits);
< break;
< end;
< if not CheckAndRestoreHealth then
< begin
< Quit('Out of Food');
< end;
< if ClickContinue(False, False) then
< begin
< CheckCBLevels;
< end;
< until IsFullHit;
< Result := True;
< Inc(ExperimentsKilled);
< FTWait(8); // wait for yellow NPCpoint to go away;
---
> TimeOut := GetSystemTime;
> repeat
> if ((GetSystemTime - TimeOut) > 90000) then
> begin
> if FawkiDebug then
> Writeln('Timeout 1 1/2 minute Break out from WaitExperiment');
> Result := False;
> Exit;
> end;
> FindNonInventoryRandoms;
> if FindLegit then
> begin
> Inc(WalkedAwayFromLegits);
> Break;
> end;
> if (not (CheckAndRestoreHealth)) then
> begin
> Quit('Out of Food');
> end;
> if ClickContinue(False, False) then
> begin
> CheckCBLevels;
> end;
> until IsFullHit;
> Result := True;
> Inc(ExperimentsKilled);
> FTWait(8); // wait for yellow NPCpoint to go away;
854,855c835,836
< var
< i:Integer;
---
> //var
> // i: integer;
862,868c843,849
< if MySRLID <> '' then
< begin
< SRLID := MySRLID;
< SRLPassword := MySRLPassword;
< end;
< for I := 0 to 19 do
< ReportVars[I] := 0;
---
> //if MySRLID <> '' then
> //begin
> //SRLID := MySRLID;
> //SRLPassword := MySRLPassword;
> //end;
> //for I := 0 to 19 do
> //ReportVars[I] := 0;
870,871c851,852
< ReportVars[12] := 1;
< ScriptID := '264';
---
> //ReportVars[12] := 1;
> //ScriptID := '264';
873d853
<
875,876c855
< GraphicsSet := True;
< SetChat('Hide',1);
---
> SetChat('Hide', 1);
894,896c873,875
< SmartsetupEx(170, true, true, false);
< SetTargetDC(SmartGetDC);
< Setup;
---
> //SmartsetupEx(170, true, true, false);
> //SetTargetDC(SmartGetDC);
> Setup;
897a877,883
> if FindExperiment then
> begin
> if WaitExperiment then
> ProgressReport;
> end else
> begin
> ClickMMNPC('in');
901,903c887,888
< ProgressReport
< end
< else
---
> ProgressReport;
> end else
905c890
< ClickMMNPC('in');
---
> TurnAwayFromWall;
908,924c893,901
< if WaitExperiment then
< ProgressReport
< end
< else
< begin
< TurnAwayFromWall;
< if FindExperiment then
< begin
< if WaitExperiment then
< ProgressReport
< end
< else
< ClickMMNPC('out');
< end
< end;
< if FindLegit then ClickMMNPC('out');
< until false;
---
> if WaitExperiment then
> ProgressReport
> end else
> ClickMMNPC('out');
> end
> end;
> if FindLegit then
> ClickMMNPC('out');
> until(False);
926d902
<

WT-Fakawi

2010-03-30 13:47:58

From: Dgby714
Is this script a little old? Cleaned up standards and commented out the old stats and SMART procedure.

Old? No. I just wrote it a couple of days ago. But of course I use an bits and pieces from scripts here and there. Not placing myself outside the standards boundary, but I work goal-oriented. For me that all that matters. Besides, standards are not that bad are they? (Fawki hides in a corner…. He is an awful scripter anyways)

When I release a script you are sure I stared at it for hours and hours… tweaking here and there, until I get it right! It's my quality control.


From: nose_smasher
Does it support Bone Burying?
Nope.

Blumblebee

2010-03-30 14:13:03

looks really good fakawi :) I'll be sure to test in a few days once I buy membership again.

WT-Fakawi

2010-03-30 17:24:54

Better version coming tomorrow. Working on some ideas.

Nose Smasher

2010-03-30 20:41:36

Would it be worth it train on these things with 70 att, 93 str, 70 def? (trying to get 99 str) or would the exp/hr be greater on stronger monsters?

I'll give it a go for testing purposes, but I'll wait til I get membs on my 1 def pure to abuse it :p

WT-Fakawi

2010-03-31 01:47:29

New Version Uploaded. Better fighting, better legit handling, faster experiments finding….in short better.

<=== ========== - Progress Report V0.25===============>
Worked for 2 Hours, 8 Minutes and 37 Seconds.
Killed 166 Experiments
XP Gained = 66400
Walked away from Legits: 15 Times
Logged out for Legits : 0 Times


<=== ========== - Progress Report V0.25===============>
Worked for 1 Hours, 9 Minutes and 14 Seconds.
Killed 89 Experiments
XP Gained = 35600
Walked away from Legits: 0 Times
Logged out for Legits : 0 Times


Tim0suprem0

2010-03-31 10:06:52

Haha the first socially awkward script. Looks nice :)

Ejjman

2010-03-31 12:53:31

Kinda depressed, if you finished the Creature of Fenkenstrein, then you can't kill the level 51 anymore. That's too bad.

WT-Fakawi

2010-03-31 13:13:45

From: Ejjman1
Kinda depressed, if you finished the Creature of Fenkenstrein, then you can't kill the level 51 anymore. That's too bad.

Then have VeryLowDefence set to True and you wont attack the Level-51 anymore :)

The Claw

2010-04-02 05:54:56

Initial observations: If VeryLowDefence is True, and someone is fighting the closest other experiment, even if there are other experiments on the minimap that are free, it will run back and forth between the 51 and the taken one - I'm guessing because they are each the closest to each other. I see that you've made it skip it when theres a legit next to it already, but that didnt seem to work so I made the box 15 pixels instead, and added a bit of tolerance to the search…will watch how it goes. Edit - just worked :) The first time it must of been outside the search area.

Changed line 279 to "if FindColorSpiralTolerance(x, y, RefWallColors[c], MMCx - 75, MMCy - 75, MMCx + 75, MMCy + 75, tol) then" and line 288 to QuickSort instead of BubbleSort, and it works in Simba + Smart.

It occasionally misses an experiment after running to it, not sure if thats a logic error (not breaking out of a loop somewhere) or a result of me changing the above…

If a legit attacks one before you, after its in the process of clicking attack, it will sit there and wait until the legit kills it - as it thinks its us killing it. A check for "someone else is fighting that" to break out of the fighting loop would do work I think.

Reflection walking to bank for food and go back coming soon if I can get it working.

Simba also spams the debug box crazily when it runs so don't have a proggy, but is running nicely atm :p

Nose Smasher

2010-04-02 13:55:06


<=== ========== - Progress Report V0.25===============>
Worked for 1 Hours, 27 Minutes and 34 Seconds.
Killed 182 Experiments
XP Gained = 72800
Walked away from Legits: 10 Times
Logged out for Legits : 0 Times
WallColor = 15922161

// Logged out cuz it didn't find any after 2 mins, but i fell asleep watching it so idk what happened.. :p
Amazing…

From: The Claw
It occasionally misses an experiment after running to it

I had same problem, but changed the Tol from 1 to 5 when searching for Experiments and it works perfectly now.

2 things I noticed while running it:

First it sometimes clicks the closest NPC on then MM and it turns out to be an Experiment that's visible on the MS (doesn't happen often, but maybe an extra search on the MS before searching the MM would fix it?)

Second, it sometimes gets stuck in the northern and southern hallways where a lvl 51 spawns and it will go back and forth between the 51 and a 25 that spawns closest… Usually killing each one twice for some reason..This doesn't seem like it would be a problem but maybe a lil weird for someone to keep killing the same 2 NPC's?

All around this script is absolutely amazing… Can't wait to get membs on my pure :)

The Claw

2010-04-04 06:19:42

Added MarkTime(ExperimentsTimeOut) on line 632 to prevent the following -

<=== ========== - Progress Report V0.24===============>
Worked for 51 Minutes and 8 Seconds.
Killed 56 Experiments
XP Gained = 22400
Walked away from Legits: 0 Times
Logged out for Legits : 0 Times
WallColor = 16711422

Start Attack Level = 40
Start Strength Level = 82
Start Defence Level = 1
Start Constitution Level = 71
Current Attack Level = 40
Current Strength Level = 82
Current Defence Level = 1
Current Constitution Level = 71

4 minutes in neigbourhood with Legit. Logging out for 10 mins
Welcome to Runescape.
———-
QUIT: 2 minutes no experiment QUIT
Successfully executed

WT-Fakawi

2010-04-04 14:26:04

A, indeed! Good catch! Is the logic of the script making any sense to you?

The Claw

2010-04-05 02:13:10

Edit -


Shuttleu

2011-11-13 16:38:04

updated lobster bitmap and removed other errors

works in latest simba and srl now

~shut

EDIT:
<=== ========== - Progress Report V0.24===============>
Worked for 2 Hours, 18 Minutes and 3 Seconds.
Killed 145 Experiments
XP Gained = 175725
Walked away from Legits: 5 Times
Logged out for Legits : 0 Times
WallColor = 15921904

P1nky

2011-11-14 03:25:40

From: Shuttleu
updated lobster bitmap and removed other errors

works in latest simba and srl now

~shut

EDIT:
<=== ========== - Progress Report V0.24===============>
Worked for 2 Hours, 18 Minutes and 3 Seconds.
Killed 145 Experiments
XP Gained = 175725
Walked away from Legits: 5 Times
Logged out for Legits : 0 Times
WallColor = 15921904


ooo oooo oooooo ooOOO thank you! since no more sw bots les go back to the monster killing <3