SRL Archive - Reflection Discussion

[R2] R_EvilBob / ScapeRune Solved.


Home

2011-08-02 07:11:43

Hello. I modded R1 version to work with R2 with some good changes. Solved 3/3 times.

- Added R_OpenDepositBox.
- More Wait times.
- Loads of tweaks :P

const
R_EVILBOB_PORTAL = 8987;
R_EVILBOB_COOKINGPOT = 8985;
R_EVILBOB_DEPOSITBOX = 32930;
R_EVILBOB_FISHINGSPOT = 8986;
R_EVILBOB_SMALLFISHINGNET = 6209;
R_EVILBOB_MIDDLE_X = 3422;
R_EVILBOB_MIDDLE_Y = 4777;
R_EVILBOB_NPC_HEIGHT = 448;
R_EVILBOB_SERVANTNAME = 'Servant';
R_EVILBOB_EVILBOBNAME = 'Evil Bob';
R_EVILBOB_DIRECTIONINTERFACE = 186;
R_EVILBOB_DIRECTIONCOMP = 0;
R_EVILBOB_DIRECTIONCOMPTEXT = 'Evil Bob wants fish from the Fishing spots beyond this statue.';
R_EVILBOB_CLICKCONT = 'Click here to continue';
R_EVILBOB_FISHID1 = 6202;
R_EVILBOB_FISHID2 = 6206;
R_EVILBOB_FISHIDUNCOOKED1 = 6200;
R_EVILBOB_FISHIDUNCOOKED2 = 6204;


function REvilBob_InRandom: Boolean;
var
REvilBobVars_Servant: TNPC;
begin
Result := R_FindNPC(2481, True, REvilBobVars_Servant);
end;



function R_OpenDepositBox: Boolean;
var
DepositBox: TRSObject;
Items: TInvItemArray;
TP: TPoint;
x, y: Integer;
RandDep :Integer;
begin
if not LoggedIn then Exit;
RandDep:=(Random(R_InvCount));
Result := False;
DepositBox := NULL_RSOBJECT;
DepositBox := R_GetObject(32930, OBJ_INTERACTABLE, 25);
If DepositBox = NULL_RSObject then Exit;
if not R_TileOnMS(DepositBox.Tile, 0) then
R_WalkToTile(DepositBox.Tile, 0, 0);
TP := R_TileToMS(DepositBox.Tile, 0);
MMouse(TP.x, TP.y - 16, 4, 4);
if R_WaitUpTextMulti(['Deposit', 'bank'], RandomRange(250, 350))
then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
If R_WaitOptionMulti(['Deposit', 'bank'], RandomRange(200, 350))then
R_Flag;
Result:=WaitFunc(@DepositScreen, 10 + Random(15), 3850);
Deposit(RandDep, RandDep, False);
end;
end;


procedure R_ScapeRuneDepositItems (ItemsToDeposit : Integer);
begin
if not LoggedIn then Exit;
R_Debug('Depositing '+inttostr(ItemsToDeposit)+' items to make space', 'ScapeRune');
R_OpenDepositBox;
end;


procedure R_ScapeRuneDestroyFish;
var
DestroyArray : TIntegerArray;
DropThis: TInvItem;
i, t : Integer;
begin
if not LoggedIn then Exit;
DestroyArray := [R_EVILBOB_FISHID1, R_EVILBOB_FISHID2, R_EVILBOB_FISHIDUNCOOKED1, R_EVILBOB_FISHIDUNCOOKED2];
for i:=0 to high(DestroyArray) do
begin
if R_ItemExists(DestroyArray[i], DropThis) then
begin
R_Debug('Destroying improper fish.', 'ScapeRune');
R_ClickItem(DropThis.slot, 'estroy');
wait(RandomRange(500, 1000));
// Wait for interface to pop up
MarkTime(t);
repeat
wait(RandomRange(40, 50));
until (R_ValidInterface(94)) or (TimeFromMark(t) > 6000)
// Click interface
Wait(RandomRange(50, 300));
MarkTime(t);
repeat
wait (50);
if (R_GetInterfaceText(94, 3) = 'Yes.') then
begin
Mouse (322,387, 3, 3, true);
wait (1000+random(500));
end;
until (not R_ValidInterface(94)) or (TimeFromMark(t) > 2000)
end
end;
end;


procedure R_ScapeRuneClickToContinue (Int, Comp : Integer);
var
t : Integer;
begin
if not LoggedIn then Exit;
MarkTime (t);
if (not R_ValidInterface(Int)) then Exit;
repeat
if (R_GetInterfaceText (Int, Comp) = R_EVILBOB_CLICKCONT) then
Mouse(303, 452, 72, 7, True);
until (not (R_GetInterfaceText (Int, Comp) = R_EVILBOB_CLICKCONT)) or (TimeFromMark(t) > 8000)
end;


procedure R_ScapeRuneWalkToCenter;
begin
if not LoggedIn then Exit;
if not R_WalkToTile (Point(R_EVILBOB_MIDDLE_X, R_EVILBOB_MIDDLE_Y), 2, 0) then
begin
if R_TileOnMM (Point(R_EVILBOB_MIDDLE_X+6, R_EVILBOB_MIDDLE_Y)) then
begin
R_WalkToTile (Point(R_EVILBOB_MIDDLE_X+6, R_EVILBOB_MIDDLE_Y), 2, 0);
R_Debug('Moving from east to center', 'ScapeRune');
end else
if R_TileOnMM (Point(R_EVILBOB_MIDDLE_X, R_EVILBOB_MIDDLE_Y+6)) then
begin
R_WalkToTile (Point(R_EVILBOB_MIDDLE_X, R_EVILBOB_MIDDLE_Y+6), 2, 0);
R_Debug('Moving from north to center', 'ScapeRune');
end else
if R_TileOnMM (Point(R_EVILBOB_MIDDLE_X-6, R_EVILBOB_MIDDLE_Y)) then
begin
R_WalkToTile (Point(R_EVILBOB_MIDDLE_X-6, R_EVILBOB_MIDDLE_Y), 2, 0);
R_Debug('Moving from west to center', 'ScapeRune');
end else
if R_TileOnMM (Point(R_EVILBOB_MIDDLE_X, R_EVILBOB_MIDDLE_Y-6)) then
begin
R_WalkToTile (Point(R_EVILBOB_MIDDLE_X, R_EVILBOB_MIDDLE_Y-6), 2, 0);
R_Debug('Moving from south to center', 'ScapeRune');
end;
R_WalkToTile (Point(R_EVILBOB_MIDDLE_X, R_EVILBOB_MIDDLE_Y), 2, 0);
end;
end;


procedure R_ScapeRuneClickContBobAll;
var
t : Integer;
begin
MarkTime (t);
repeat
R_ScapeRuneClickToContinue(64,5);
R_ScapeRuneClickToContinue(65,6);
R_ScapeRuneClickToContinue(66,7);
R_ScapeRuneClickToContinue(241,5);
R_ScapeRuneClickToContinue(242,6);
R_ScapeRuneClickToContinue(243,7);
until ((not (R_ValidInterface(64))) and (not (R_ValidInterface(65))) and (not (R_ValidInterface(66)))
and (not (R_ValidInterface(241))) and (not (R_ValidInterface(242))) and (not (R_ValidInterface(243)))
or (TimeFromMark(t) > 30000))
R_Debug('No more bob chat interfaces up', 'ScapeRune');
end;


function R_ScapeRuneTalkToServantStart: Boolean;
var
NPC : TNPC;
TP : TPoint;
t : Integer;
begin
if not LoggedIn then Exit;
Result := False;
if R_FindNPC(2481, True, NPC) then
begin
if not R_TileOnMS (NPC.Tile, 0) then R_ScapeRuneWalkToCenter;
if R_TileOnMS (NPC.Tile, 0) then
begin
TP := R_TileToMS (NPC.Tile, 0);
Mouse (TP.x, TP.y, 2, 3, false);
if R_WaitOptionMulti (['Talk','alk','-to'], RandomRange(250, 550)) then
begin
MarkTime(t);
// Wait until we start chatting with the Servant
repeat
If (R_ValidInterface(64))
or (R_ValidInterface(65))
or (R_ValidInterface(241))
or (R_ValidInterface(242))
or (R_ValidInterface(186)) then Break;
wait (50);
until (TimeFromMark(t) > 10000)
// If theres an error...
if (TimeFromMark(t) > 10000) then
begin
R_Debug('We clicked to talk with the Servant but its not happening...', 'ScapeRune');
Exit;
end;
// Failsafe in case we talked to the Servant already
if (R_ValidInterface(186)) then
begin
R_Debug('Servant skipped to the showing of the statue, skipping to finding fish location function', 'ScapeRune');
Result := True;
Exit;
end;
// If we haven't talked to the Servant, then shut her up:
MarkTime(t);
repeat
R_ScapeRuneClickToContinue (64, 5);
R_ScapeRuneClickToContinue (241, 5);
R_ScapeRuneClickToContinue (65, 6);
R_ScapeRuneClickToContinue (242, 6);
wait(RandomRange(250, 650));
until (R_ValidInterface(186)) or (TimeFromMark(t) > 20000)
Result := True;
end;
end;
end else
begin
R_Debug('Could not index Servant, walking to center', 'ScapeRune');
R_ScapeRuneWalkToCenter;
end;
end;


function R_ScapeRuneGetFishingNet: Boolean;
var
GroundItemArr : TGroundItemArray;
TileToGetItem : TTile;
i, t : Integer;
TP : TPoint;
begin
if not LoggedIn then Exit;
Result := False;

if (R_CountItem(R_EVILBOB_SMALLFISHINGNET) > 0) then
begin
R_Debug('Fishing net is in inventory', 'ScapeRune');
Result := True;
Exit;
end;

// Try 3x to get a fishing net
for i:=1 to 3 do
begin
R_Debug('Attempt #'+inttostr(i)+'/3 to get fishing net', 'ScapeRune');

// Pick a tile to pick it up from
case random(6) of
0: TileToGetItem := Point(3416, 4786);
1: TileToGetItem := Point(3412, 4784);
2: TileToGetItem := Point(3414, 4768);
3: TileToGetItem := Point(3429, 4784);
4: TileToGetItem := Point(3432, 4783);
5: TileToGetItem := Point(3431, 4772);
6: TileToGetItem := Point(3429, 4769);
end;

// Move to location
if R_TileOnMM (TileToGetItem) then R_WalkToTile (TileToGetItem, 2, 0)
else
begin
R_ScapeRuneWalkToCenter;
R_WalkToTile (TileToGetItem, 2, 0);
end;

// Pick up item
if R_TileOnMS (TileToGetItem, 0) then
begin
MarkTime (t);
repeat
GroundItemArr := R_GetGroundItemsAt (TileToGetItem);
if High (GroundItemArr) < 0 then Break;
TP := R_TileToMS (TileToGetItem, 0);
Mouse (TP.x, TP.y, 1, 1, true);
wait (RandomRange(2000, 3000));
until (TimeFromMark(t) > 20000) or (R_CountItem(R_EVILBOB_SMALLFISHINGNET) > 0)
end else
begin
R_Debug('Could not find fishing net at Tile('+inttostr(TileToGetItem.x)+','+inttostr(TileToGetItem.y)+')', 'ScapeRune');
end;

// If successful...
if (R_CountItem(R_EVILBOB_SMALLFISHINGNET) > 0) then
begin
Result := true;
R_Debug('Successfully obtained a fishing net to complete task with', 'ScapeRune');
Exit;
end;
end;
end;


function R_ScapeRuneDetermineDirectionOfFishAndWalkTo (var TileToFishAt : TTile) : Boolean;
var
FishObj : TRSObjectArray;
FishObjTile, TileToArrive : TTile;
i, j : Integer;
TP : TPoint;
Direction : String;
begin
if not LoggedIn then Exit;
Result := False;
Direction := 'none';
TileToFishAt := Point(0,0); // Failsafe
FishObjTile := Point(0,0); // Failsafe
if (R_GetInterfaceText (R_EVILBOB_DIRECTIONINTERFACE, R_EVILBOB_DIRECTIONCOMP)
= R_EVILBOB_DIRECTIONCOMPTEXT) then
begin
for j:=1 to 3 do
begin
R_Debug('Searching for proper fishing pool attempt #'+inttostr(j), 'ScapeRune');
wait (6500+random(3200)); // Let camera calibrate to pause
FishObj := R_GetObjectsEx([R_EVILBOB_FISHINGSPOT], OBJ_INTERACTABLE, 24);

// If we found more than 4 fish pools or none, we have a problem
if (high(FishObj) < 0) then
begin
R_Debug('Had trouble getting fish location ['+inttostr(high(FishObj))+']', 'ScapeRune');
Exit;
end else // Here we check tile on MS
begin
for i:=0 to high (FishObj) do
begin
if (R_TileOnMS (FishObj[i].Tile, 0)) then
begin
R_Debug('Found fish tile on screen, tile indexed', 'ScapeRune');
FishObjTile := FishObj[i].Tile;
Break;
end;
end;
end;
if FishObjTile.x > 0 then Break; // If we have found the tile, stop trying
end;

// N: Y should be -ve cause its higher, X shouldnt differ by abs dist of 7
if (iabs(R_EVILBOB_MIDDLE_X - FishObjTile.x) < 7) and
(R_EVILBOB_MIDDLE_Y - FishObjTile.y <= -7) then Direction := 'n';

// E: X should be -ve cause its more right, Y shouldnt differ by abs dist of 7
if (R_EVILBOB_MIDDLE_X - FishObjTile.x <= -7) and
(iAbs(R_EVILBOB_MIDDLE_Y - FishObjTile.y) < 7) then Direction := 'e';

// S: Y should be +ve cause its lower, X shouldnt differ by abs dist of 7
if (iabs(R_EVILBOB_MIDDLE_X - FishObjTile.x) < 7) and
(R_EVILBOB_MIDDLE_Y - FishObjTile.y >= 7) then Direction := 's';

// W: X should be +ve cause its more left, Y shouldnt differ by abs dist of 7
if (R_EVILBOB_MIDDLE_X - FishObjTile.x >= 7) and
(iAbs(R_EVILBOB_MIDDLE_Y - FishObjTile.y) < 7) then Direction := 'w';

// Walking part
if Direction = 'none' then
begin
R_Debug('Warning: Error occured, could not find direction to walk for Evil Bob ScapeRune!', 'ScapeRune');
Exit;
end else
begin
R_Debug('FishObjTile: ' + ToStr(FishObjTile) + ' Dir: ' + Direction, 'ScapeRune');
ClickContinue(True, True);
TileToArrive := Point (0,0); // Failsafe
case Direction of // Needs more randomness TBH
'n': begin
TileToArrive := Point(FishObjTile.x, FishObjTile.y - 2);
TileToFishAt := Point(FishObjTile.x, FishObjTile.y);
MakeCompass ('s');
end;
'e': begin
TileToArrive := Point(FishObjTile.x - 2, FishObjTile.y);
TileToFishAt := Point(FishObjTile.x, FishObjTile.y);
MakeCompass ('w');
end;
's': begin
TileToArrive := Point(FishObjTile.x, FishObjTile.y + 2);
TileToFishAt := Point(FishObjTile.x, FishObjTile.y);
MakeCompass ('n');
end;
'w': begin
TileToArrive := Point(FishObjTile.x + 2, FishObjTile.y);
TileToFishAt := Point(FishObjTile.x, FishObjTile.y);
MakeCompass ('e');
end;
end;
R_Debug('Direction and tiles set', 'ScapeRune');

for i := 0 to 2 do
begin
TP := R_TileToMM(TileToArrive);
if (TP.x > 0) and (TileToArrive.x > 0) then
begin
R_Debug('Walking attempt #' + ToStr(i), 'ScapeRune');
Mouse (TP.x, TP.y, 2, 2, true);
R_Flag;
if (R_DistanceFromTile(TileToArrive) < 4) then
begin
Result := True; // If we are near the spot then result = true
R_Debug('Made it to: ' + ToStr(TileToArrive), 'ScapeRune');
Exit;
end;
end else R_Debug('Error with walking to fishing spot', 'ScapeRune');
end;
end;
end else R_Debug('Not in proper interface to get direction', 'ScapeRune');
end;


function R_ScapeRuneFishAtTile (TileToFishAt : TTile) : Boolean;
var
NPCs : TNPCArray;
i, t, t2, t3, InviCount : Integer;
TP : TPoint;
begin
if not LoggedIn then Exit;
Result := False;
if (TileToFishAt.x < 1) then Exit;

// Find if the inputted tile is a viable fishing tile
MarkTime (t);
repeat

// Make sure were standing still
MarkTime (t3);
repeat
wait (300);
until (not R_Moving) or (TimeFromMark(t3) > 5000)
Wait(RandomRange(700, 900));

// Find tile
if R_TileOnMS (TileToFishAt, 0) then
begin
TP := R_TileToMS (TileToFishAt, 0);
wait (250+random(150));
case random(3) of
0..1: Mouse (TP.x, TP.y, 2, 2, true);
2..3: begin
Mouse (TP.x, TP.y, 2, 2, false);
R_WaitOptionMulti (['fish', 'ish', 'net', 'et'], RandomRange(300, 600)); // Crap!
end;
end;
end else
begin
NPCs := R_GetNPCsAt(TileToFishAt, True);
for i:=0 to high(NPCs) do
begin
if (iAbs(NPCs[i].Tile.x - TileToFishAt.x) > 6) and (iAbs(NPCs[i].Tile.y - TileToFishAt.y) > 6) then
begin
if R_TileOnMS (TileToFishAt, 0) then
begin
TP := R_TileToMS (TileToFishAt, 0);
case random(3) of
0..1: Mouse (TP.x, TP.y, 2, 2, true);
2..3: begin
Mouse (TP.x, TP.y, 2, 2, false);
R_WaitOptionMulti (['fish', 'ish', 'net', 'et'], RandomRange(300, 500)); // Crap!
end;
end;
Break;
end else R_Debug('Warning: Tile is not on the minimap!', 'ScapeRune');
end;
end;
end;

InviCount := R_InvCount; // Use this for detecting when we pickup fish

// Now that we are fishing, wait until we catch something
MarkTime (t2);
repeat
wait (50);
until (TimeFromMark(t2) > 22000) or (InviCount < R_InvCount)

if (InviCount < R_InvCount) then Result := True;
wait (1000+random(1000));

until (TimeFromMark(t) > 60000) or (InviCount < R_InvCount)
end;


function R_ScapeRuneCookFish : Boolean;
var
CookPots : TRSObjectArray;
TP : TPoint;
i, j, k : Integer;
begin
if not LoggedIn then Exit;
Result := False;
for k:=1 to 3 do
begin
R_Debug('Attempt '+ToStr(k)+'/3 of cooking fish', 'ScapeRune');
R_ScapeRuneWalkToCenter;
CookPots := R_GetObjectsEx ([R_EVILBOB_COOKINGPOT], OBJ_INTERACTABLE, 24);

// Failsafe
if high(CookPots) < 0 then
begin
R_Debug('Failed to find cooking pot to uncook', 'ScapeRune');
Exit;
end;

// Try and find both, you never know if one has an error...
for j:=1 to 2 do
begin
for i:=0 to high(CookPots) do
begin
R_ClickItemBy('Fish-like thing', 'Use');
wait (500+random(500));
if R_TileOnMS (CookPots[i].Tile, 0) then
begin;
TP := R_TileToMS (CookPots[i].Tile, 0);
Mouse (TP.x, TP.y, 2, 2, true);
if true then
begin
wait (4000+random(2200));
if (R_CountItem('Raw') > 0) then
begin
R_Debug('Successfully made proper uncooked fish!', 'ScapeRune');
Result := True;
Exit;
end else R_Debug('Was unable to cook ', 'ScapeRune');
end else R_Debug('Error: ChooseOption Use was not present', 'ScapeRune');
end else R_Debug('Pot #'+inttostr(i)+' not on MainScreen', 'ScapeRune');
end;
end;
end;
end;


function R_ScapeRuneFinishRandom : Boolean;
var
t, i, TX, TY, ebobsrch: Integer;
TP, TPPortal : TPoint;
Portal : TRSObject;
EvilThingArr: TNPCArray;
begin
if not LoggedIn then Exit;
Result := False;

R_ClickItemBy('Raw fish-like', 'Use');
wait(500+random(500));
MakeCompass('n');
wait(500+random(500))
SetLength(EvilThingArr, 0);
for ebobsrch := 1 to 4 do
begin
EvilThingArr := R_SortNPCs(R_GetNPCs('vil Bob', True));
try
TP := R_TileToMS(EvilThingArr[0].Tile, R_EVILBOB_NPC_HEIGHT);
except
R_Debug('Failed to find Evil Bob?!','ScapeRune');
Exit;
end;
Mouse(TP.X, TP.Y, 2, 2, False);
Wait(10+Random(42))
if R_ChooseOption('vil Bob') then
begin
Result := True;
if (R_FlagExists) then
R_Flag;
R_Debug('Bob clicked, proceed.','ScapeRune');
Break;
end else
begin
R_Debug('Failed to give fish time '+toStr(ebobsrch)+'/4','ScapeRune');
MMouse(MIX1, MIY1, MIX2, MIY2);
Wait(42+Random(300));
end;
end;

// Talk to bob
MarkTime(t);
repeat
wait(50);
until (R_ValidInterface(64)) or (TimeFromMark(t) > 10000)
R_ScapeRuneClickContBobAll;

// Enter portal here
wait (500+random(500));
for i:=1 to 3 do
begin
Portal := R_GetObject(R_EVILBOB_PORTAL, OBJ_INTERACTABLE, 20);
if R_TileOnMS(Portal.Tile, 0) then
begin
TPPortal := R_TileToMS (Portal.Tile, 0);
Mouse(TPPortal.x, TPPortal.y, 3, 3, false);
if R_WaitOption('Enter Portal', RandomRange(400, 600)) then
begin
R_Flag;

Wait(1300 + Random(1000));

if FindColor(TX, TY, 2070783, 234, 46, 254, 56) then
Mouse(172, 199, 100, 4, True);

R_Debug('Entering exit portal to finish random...', 'ScapeRune');
Result := True;
Exit;
end else R_Debug('Had trouble finding "Enter Portal" ChooseOption', 'ScapeRune');
end else R_ScapeRuneWalkToCenter;
wait (1000+random(500));
end;
end;


function REvilBob_Solve : Boolean;
var
i, t : Integer;
FishingTile : TTile;
begin
if not LoggedIn then Exit;
Result := False;
FishingTile := Point(0,0); // Failsafe

// Inventory failsafe
if (R_CountItem(R_EVILBOB_SMALLFISHINGNET) = 0) then R_ScapeRuneDepositItems(1);

R_ScapeRuneDestroyFish; // Cleans the plate

for i:= 1 to 3 do
begin
R_Debug('ScapeRune solving attempt '+inttostr(i)+'/3', 'ScapeRune');
if (R_ScapeRuneGetFishingNet) then
begin
if (R_ScapeRuneTalkToServantStart) then
begin
if (R_ScapeRuneDetermineDirectionOfFishAndWalkTo(FishingTile)) then
begin
if (R_ScapeRuneFishAtTile(FishingTile))then
begin
if (R_ScapeRuneCookFish) then
begin
if (R_ScapeRuneFinishRandom) then
begin
R_Debug('Evil Bobs ScapeRune solved!', 'ScapeRune');
Result := True;
Break;
end else R_Debug('Had trouble giving fish to bob and/or finishing random', 'ScapeRune');
end else R_Debug('Had trouble cooking the fish', 'ScapeRune');
end else R_Debug('Had trouble fishing at specified tile', 'ScapeRune');
end else R_Debug('Had trouble determining direction of fishing and walking to that spot', 'ScapeRune');
end else R_Debug('Had trouble talking to Servant', 'ScapeRune');
end else R_Debug('Had trouble getting fishing net', 'ScapeRune');
R_ScapeRuneDestroyFish; // Just incase
end; // End of 3 tries
if not Result then R_Debug('Failed 3x the ScapeRune random, returning false...', 'ScapeRune');
MarkTime(t);
while (REvilBob_InRandom and (TimeFromMark(t) < 8000)) do
Wait(1500);
R_Debug('Out of ScapeRune', 'ScapeRune');
Wait(2500);
ClickToContinue;
Wait(4000+Random(2000));
Result := not REvilBob_InRandom;
end;


Debug:
[Reflection] Trying to solve: Evil Bob's Island
[ScapeRune] Depositing 1 items to make space
[ScapeRune] ScapeRune solving attempt 1/3
[ScapeRune] Attempt #1/3 to get fishing net
[ScapeRune] Successfully obtained a fishing net to complete task with
[ScapeRune] Searching for proper fishing pool attempt #1
[ScapeRune] Found fish tile on screen, tile indexed
[ScapeRune] FishObjTile: (3422, 4791) Dir: n
[ScapeRune] Direction and tiles set
[ScapeRune] Walking attempt #0
[ScapeRune] Made it to: (3422, 4789)
[ScapeRune] Attempt 1/3 of cooking fish
[ScapeRune] Successfully made proper uncooked fish!
[ScapeRune] Failed to give fish time 1/4
[ScapeRune] Failed to give fish time 2/4
[ScapeRune] Bob clicked, proceed.
[ScapeRune] No more bob chat interfaces up
[ScapeRune] Entering exit portal to finish random...
[ScapeRune] Evil Bobs ScapeRune solved!
[ScapeRune] Out of ScapeRune
[Reflection] Evil Bob's Island solved
[Reflection] Out of random
[Reflection] Solving took: 130448 ms


~Home

Flight

2011-08-02 07:24:39

Nice job! Had I some accounts in that random I'd hand them over for testing. :)

I see it handles detecting a full inventory and depositing a random item, but I'm wondering if we should have a list of "KeepItems" that should always be ignored while randomly selecting an item to deposit. Like essential tools, stackable items, ect…

Home

2011-08-02 07:26:33

From: Flight
Nice job! Had I some accounts in that random I'd hand them over for testing. :)

I see it handles detecting a full inventory and depositing a random item, but I'm wondering if we should have a list of "KeepItems" that should always be ignored while randomly selecting an item to deposit. Like essential tools, stackable items, ect…


Yeah I was thinking of that.
But that was an Temp solution for testing.

Mabey a TIntegerArray of IDs?

~Home

BraK

2011-08-02 07:26:42

From: Flight
Nice job! Had I some accounts in that random I'd hand them over for testing. :)

I see it handles detecting a full inventory and depositing a random item, but I'm wondering if we should have a list of "KeepItems" that should always be ignored while randomly selecting an item to deposit. Like essential tools, stackable items, ect…


Might be possible doing it like Bowrewards for SRLrandoms :) using IDs or Slots or maybe even Item names.

Nice job Home

~BraK

Flight

2011-08-02 07:31:06

Yeah, just a quick loop that repeatedly determines 'RandDep', if the ID chosen does not fall into the 'KeepItems' array, break the loop and continue the script.

x[Warrior]x3500

2011-08-02 08:20:09

Nice job Home! yet another random thats crossed off from the list for ref2 :)

mormonman

2011-08-02 09:28:15

I hate to mention this after someone puts effort into a solver:
From: drags111
I don't want the old randoms from reflection 1 copied straight to ref2. Those randoms were very unreliable and unstable. Everything should be rewritten.

Wizzup?

2011-08-02 09:31:11

From: mormonman
I hate to mention this after someone puts effort into a solver:


Well, if it's stable, why rewrite it? Just copy it over; if it doesn't work right you can always remove it again. Sounds silly to me to just ``rewrite'' it all, regardless of the quality.

mormonman

2011-08-02 09:51:43

I think the first reason is we want to start with a solid, clean base and then build on it. If we are constantly having to rewrite things after the release it starts getting more and more messy. The bigger the mess, the easier it is for bugs and memory leaks to be created, making for a less stable or usuable include.

Home

2011-08-02 09:53:38

From: mormonman
I think the first reason is we want to start with a solid, clean base and then build on it. If we are constantly having to rewrite things after the release it starts getting more and more messy. The bigger the mess, the easier it is for bugs and memory leaks to be created, making for a less stable or usuable include.


Ok. I totally understand.
But this can be used as Temp Solution at least. :)


~Home

Wizzup?

2011-08-02 10:33:39

From: mormonman
I think the first reason is we want to start with a solid, clean base and then build on it. If we are constantly having to rewrite things after the release it starts getting more and more messy. The bigger the mess, the easier it is for bugs and memory leaks to be created, making for a less stable or usuable include.


Well, can't you just look at the code and verify it?

Nava2

2011-08-02 12:45:07

That code is ugly! But if it works, I'm OK with it being included for now. It does need to be rewritten to be nicer looking.. >.>

Home

2011-08-02 12:50:04

From: Nava2
That code is ugly! But if it works, I'm OK with it being included for now. It does need to be rewritten to be nicer looking.. >.>


Ugly? That's for sure :) But it works :P


~Home

Coh3n

2011-08-02 13:10:56

From: BraK
Might be possible doing it like Bowrewards for SRLrandoms :) using IDs or Slots or maybe even Item names.

Nice job Home

~BraK
Should do inventory slots. Not all scripts use Reflection for everything, so I think slots would be better. Or both if possible. Also, if using slots, the user wouldn't have to set it, the scripter could set it after the tool is found or whatever.

mormonman

2011-08-02 15:40:49

From: Wizzup?
Well, can't you just look at the code and verify it?


I already looked at the code. I think I was the last one to work on it. It is ugly, it doesn't adhere to our new naming conventions, it doesn't follow the same flow that we have been trying to do(solve from anywhere in the random, time-outs, etc). There is a reason we are re-writing them. They have been ghetto-rigged to work, and we should make them work with shorter, smarter coding.

Edit: Home if you at least made it so the naming of constants, variables, and functions/procedures were in line with the previous randoms I would temporarily commit it…I don't agree with these "temporary" solutions because all they do is put off the real work. It gives people a reason to procrastinate…and I'm mainly talking about myself here.