Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Here is a thought for detecting the maze random (Already shared this with Justin)
So the maze random is probably the only place in runescape where there are a series of perfectly collinear orthogonal angles. Basically that is saying all of the corners line up in a straight line. I'd say shooting to find 3 collinear corners would be enough to prove it is maze. Also wouldn't matter of the camera rotation or which line of corners you go for. As you rotate the camera the corners to morph slightly however, all of the corners in the same series morph in the same way, so they will still be detected as the same shape/angle.
Thoughts?
STOP PM'ING ME
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Well, you could start from the centre of the minimap and choose the first corner you come across as the start point, call it A. From A, extend out along a side of the same square to A' (doesn't have to be the corner, could be anywhere along that line). Then extend from A to B (The next corner out). From B extend along the side of that square the same direction as A' to B'. From B extend to C and extend from C along the side in the same direction as A' and B' to C'. We now have 3 lines AA' BB' and CC' which all intersect the green line (For now, dont assume it is a straight line, assume it has two segments AB and BC). So by Euclid's 9th property, the traversal of a straight line is 180°. Thus looking at the intersection of BB' and the green line, the purple angle and the blue angle must add up to 180°, if they do, the green line is straight, thus the points A,B,C are collinear, if it is not 180°, then it is not a straight line and points A,B,C are not collinear. Further way to double check this is by the theorem of parallel lines which says that parallel lines intersecting the same line will intersect it in the same angle. This is saying that the blue angles must be equal and the purple angles must be equal.
Last edited by Hobbit; 03-07-2013 at 04:14 AM.
STOP PM'ING ME
Interesting post, but wouldn't a simple TPA for the red colors and gray colors work out just as wel?
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
I guess for those 2 randoms, just detect if gametabs missing, map is black, check for song name?
Actually molly is missing one more tab. So count the number of missing tabs, if MM is black then etc
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Any updates? Anything where the detection still works?
STOP PM'ING ME
Im pretty sure srl4 detected every random perfectly, why dont we release that first and work on improving at a later date if needed.
Can someone start testing the SRL 4 detection at least and verify please.
STOP PM'ING ME
Justin's idea to bring this back. I created a new thread for SRL-OSR. Please put this in your sigs
PHP Code:
[img]http://villavu.com/forum/images/ranks/developer.gif[/img][img]http://villavu.com/forum/images/ranks/randomdeveloper.png[/img][SIZE="6"][URL="http://villavu.com/forum/showthread.php?t=98207"][COLOR="Sienna"][FONT="Impact"]DEVS NEED RANDOM ACCOUNTS![/FONT][/COLOR][/URL][/SIZE][img]http://villavu.com/forum/images/ranks/randomdeveloper.png[/img][img]http://villavu.com/forum/images/ranks/developer.gif[/img]
STOP PM'ING ME
I've only had a few randoms :/ and have taken pics of them all. Also I updated in the infight detection. This reminds me of an idea I had. So if the script is for combat, having it run away anytime it detects you are under attack wouldn't be smart. So what if we had FindNonCombatRandoms which only looked for randoms that don't attack you? Then just findnormalrandoms which searches for both? B/c with w/c I just had it run away anytime it detected we were in combat, but that would be dumb if you are training combat in the first place. Am I thinking straight?
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Might be more strainght forward to have one function with a param like "FindNormalRandoms('Combat');" and "FindNormalRandoms('Skill');" or a boolean or something.
STOP PM'ING ME
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Sending pull request. Failed frog detection: Detected and working.Code:Screenshot of: IP Log 1 Minutes and 16 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 37 [IN RANDOM] FROG_GREEN: 345 [IN RANDOM] FROG_RED: 73 [IN RANDOM] FROG_YELLOW: 14 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 2 Minutes and 1 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 35 [IN RANDOM] FROG_GREEN: 412 [IN RANDOM] FROG_RED: 71 [IN RANDOM] FROG_YELLOW: 17 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 2 Minutes and 45 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 42 [IN RANDOM] FROG_GREEN: 648 [IN RANDOM] FROG_RED: 73 [IN RANDOM] FROG_YELLOW: 10 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 3 Minutes and 29 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 39 [IN RANDOM] FROG_GREEN: 527 [IN RANDOM] FROG_RED: 229 [IN RANDOM] FROG_YELLOW: 62 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 4 Minutes and 14 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 37 [IN RANDOM] FROG_GREEN: 291 [IN RANDOM] FROG_RED: 96 [IN RANDOM] FROG_YELLOW: 20 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 4 Minutes and 59 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 42 [IN RANDOM] FROG_GREEN: 413 [IN RANDOM] FROG_RED: 132 [IN RANDOM] FROG_YELLOW: 9 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 5 Minutes and 16 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 37 [IN RANDOM] FROG_GREEN: 452 [IN RANDOM] FROG_RED: 143 [IN RANDOM] FROG_YELLOW: 25 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 6 Minutes and 0 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 38 [IN RANDOM] FROG_GREEN: 370 [IN RANDOM] FROG_RED: 135 [IN RANDOM] FROG_YELLOW: 26 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 6 Minutes and 44 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 39 [IN RANDOM] FROG_GREEN: 319 [IN RANDOM] FROG_RED: 176 [IN RANDOM] FROG_YELLOW: 41 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 7 Minutes and 30 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 38 [IN RANDOM] FROG_GREEN: 744 [IN RANDOM] FROG_RED: 182 [IN RANDOM] FROG_YELLOW: 47 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 8 Minutes and 15 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 37 [IN RANDOM] FROG_GREEN: 337 [IN RANDOM] FROG_RED: 142 [IN RANDOM] FROG_YELLOW: 33 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 9 Minutes and 0 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 44 [IN RANDOM] FROG_GREEN: 335 [IN RANDOM] FROG_RED: 80 [IN RANDOM] FROG_YELLOW: 22 World selected is full, sorry. Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 9 Minutes and 15 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 37 [IN RANDOM] FROG_GREEN: 348 [IN RANDOM] FROG_RED: 169 [IN RANDOM] FROG_YELLOW: 20 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 9 Minutes and 59 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 36 [IN RANDOM] FROG_GREEN: 439 [IN RANDOM] FROG_RED: 135 [IN RANDOM] FROG_YELLOW: 40 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 10 Minutes and 44 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 40 [IN RANDOM] FROG_GREEN: 458 [IN RANDOM] FROG_RED: 225 [IN RANDOM] FROG_YELLOW: 11 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 11 Minutes and 29 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 35 [IN RANDOM] FROG_GREEN: 269 [IN RANDOM] FROG_RED: 89 [IN RANDOM] FROG_YELLOW: 23 Welcome to Runescape. [retracted]@Hotmail.Com Screenshot of: IP Log 12 Minutes and 13 Seconds [RANDOM_DETECTION] Frog detection: True [IN RANDOM] PercentBlackMM: 39 [IN RANDOM] FROG_GREEN: 373 [IN RANDOM] FROG_RED: 262 [IN RANDOM] FROG_YELLOW: 30
All good; Added that in
PHP Code:
[CENTER][img]http://villavu.com/forum/images/ranks/developer.gif[/img][img]http://villavu.com/forum/images/ranks/randomdeveloper.png[/img][SIZE="6"][URL="http://villavu.com/forum/showthread.php?t=98207"][COLOR="Sienna"][FONT="Impact"]DEVS NEED RANDOM ACCOUNTS![/FONT][/COLOR][/URL][/SIZE][img]http://villavu.com/forum/images/ranks/randomdeveloper.png[/img][img]http://villavu.com/forum/images/ranks/developer.gif[/img][/CENTER]
Does anyone know if the findtalk (not sure of exact function name) that detects a players nickname being spoken on the MS still exists or if the one from SRL4 works? This is to handle all talking randoms. If not I will whip one up
Edit:
Found it. I'll take on solving and detecting all chat only randoms. I'm just gonna port the stuff over from srl4
Last edited by Ashaman88; 03-09-2013 at 03:07 PM.
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
I've got the findtalk working and can identify all the talking randoms. I still need to test out on all the ones that talk to you, but then we can start on solvers (the solver is just commented out right now)
Simba Code:VAR
NICKNAMEBMP: integer;
{*******************************************************************************
procedure SetScreenName(ScreenName: String);
by: WT-Fakawi edited by Ashaman88
Description: Sets screenname for use with FindTalk and one Player.
*******************************************************************************}
procedure SetScreenName(ScreenName: string);
begin
NickNameBMP := BitmapFromText(ScreenName, upchars07);
end;
{*******************************************************************************
function SolveTalkingRandom(RawMenuText: String): Boolean;
By: Ashaman88
Description: Talking Random Handler. Called by FindTalkingRandom. (FindTalk)
*******************************************************************************}
function SolveTalkingRandom(RawMenuText: string): Boolean;
var
IC, FI: Byte;
// A: Boolean;
begin
TakeScreen('Solving Talking Random - '+RawMenuText);
// Security Guard Handler
if (Pos('uard', RawMenuText) <> 0) or (Pos('ecur', RawMenuText) <> 0) then
begin
writeln('Found GUARD random');
for IC := 1 to 2 do
begin
Wait(1000 + Random(500));
ClickToContinue;
Wait(50 + Random(50));
end;
Result := True;
Exit;
end;
// Freaky Forrester Handler.
if (Pos('reak', RawMenuText) <> 0) or (Pos('orest', RawMenuText) <> 0) then
begin
writeln('Found FORRESTER random');
CloseWindow;
Logout;
Result := False;
Exit;
end;
// Sandwich Lady Handler.
if (Pos('ady', RawMenuText) <> 0) or (Pos('ich', RawMenuText) <> 0) then
begin
writeln('Found SANDWICH random');
//if (not (UseSandwichSolver)) then
begin
CloseWindow;
Logout;
Result := False;
Exit;
end;
ClickToContinue;
Wait(500 + Random(500));
// SetupSandWich;
// if SolveSandWich then
begin
Result := True;
CloseWindow;
Exit;
end
// else
begin
CloseWindow;
Result := False;
Logout;
Exit;
end;
end;
// Genie Handler.
if (Pos('Geni', RawMenuText) <> 0) or (Pos('enie', RawMenuText) <> 0) then
begin
writeln('Found geni random');
Wait(1000 + Random(500));
//if SolveGenie(LampSkill) then
begin
Exit;
end
//else
begin
Exit;
end;
end;
// Certer Handler
if (Pos('ile', RawMenuText) <> 0) or (Pos('iles', RawMenuText) <> 0) then
begin
writeln('Found certer random');
Wait(1000 + Random(500));
// ClickToContinue;
// if UseCerterSolver then
// A := SolveCerter
// else
// A := FindCerter;
// if A then
begin
Exit;
end
//else
begin
Logout;
Exit;
end;
end;
// Frog Handler
if (Pos('rog', RawMenuText) <> 0) or (Pos('Fro', RawMenuText) <> 0) then
begin
writeln('Found Frog random');
// if SolveFrog then
begin
Exit;
end
//else
begin
for FI := 0 to 3 do
ClickToContinue;
Wait(10000);
// if DetectFrogCave then if SolveFrogSwamp then
begin
// Frogs := Frogs + 1;
Exit;
end
// else
begin
// NOFrogs := NOFrogs + 1;
// WriteLn('Frogs Missed Twice');
Logout;
// SRLRandomsReport;
Exit;
end;
end
end;
// Rick Handler
if (Pos('ick', RawMenuText) <> 0) or (Pos('urpen', RawMenuText) <> 0) then
begin
writeln('Found RICK random');
Wait(1000 + Random(500));
ClickToContinue;
// Ricks := Ricks + 1;
//SRLRandomsReport;
Exit;
end;
// Dwarf Handler. (Might add: DwarfItem)
if (Pos('runk', RawMenuText) <> 0) or (Pos('warf', RawMenuText) <> 0) then
begin
writeln('Found DWARF random');
Wait(1000 + Random(500));
ClickToContinue;
//Dwarfs := Dwarfs + 1;
//SRLRandomsReport;
Exit;
end;
// Cap 'n Hand (ler).
if (Pos('Cap ', RawMenuText) <> 0) or (Pos('Hand', RawMenuText) <> 0) then
begin
writeln('Found CAP random');
Wait(1000 + Random(500));
ClickToContinue;
// Caps := Caps + 1;
//SRLRandomsReport;
Exit;
end;
// Mysterious Old Man Handler.
if (Pos('yste', RawMenuText) <> 0) or (Pos('rious', RawMenuText) <> 0) then
begin
writeln('Found OLD MAN random');
Wait(1000 + Random(500));
ClickToContinue;
// Oldmen := Oldmen + 1;
//SRLRandomsReport;
Exit;
end;
//Dr Jekyll Handler
if (Pos('eky', RawMenuText) <> 0) or (Pos('kyll', RawMenuText) <> 0) then
begin
writeln('Found JEKYLL random');
for IC := 1 to 4 do
begin
Wait(1000 + Random(500));
ClickToContinue;
end;
//Jekylls := Jekylls + 1;
end;
end;
{*******************************************************************************
function ChooseOptionGetMenuText(RawMenuText: String; Texts: TStringArray; Action: fnct_ActionOptions): Boolean;
By: Ashaman88.
Description: Gets the option of which random we have
*******************************************************************************}
function ChooseOptionGetMenuText(var RawMenuText: string; Texts: TStringArray; Action: fnct_ActionOptions): Boolean;
var
B: TBox;
i, H, x, R: Integer;
T: TPoint;
Options: array of TOptions;
begin
Result := False;
Options := GetChooseOptions();
if (Length(Options) < 1) then
Exit;
H := High(Options);
for i := 0 To H do
begin
if ArrInStr(Texts, Options[i].Str) then
begin
Result := True;
RawMenuText:= Options[i].Str;
B := Options[i].Bounds;
GetMousePos(T.x, T.y);
R:= Min(((B.X2 - B.X1) shr 1), 5); //Prevents x2 passed to MouseBoxEx being smaller than x1
case Action of
ClickLeft:
if PointInBox(T, B) then
ClickMouse2(true)
else
MouseBoxEx(B.x1 + R, B.Y1, B.x2 - R, B.Y1 + 5, R, mouse_Left);
Move:
if not PointInBox(T, B) then
MouseBoxEx(B.x1 + R, B.Y1, B.x2 - R, B.Y1 + 5, R, mouse_move);
Nothing:
begin
end;
else
srl_warn('ChooseOptionMultiEx', 'ClickRight not a valid click for RS menus!', warn_AllVersions);
end;
Exit;
end;
end;
B := Options[0].BigBox;//to mmouse away
if Action <> Nothing then
begin
x := Max(B.X1 - 52, 0);
if x = 0 then
x := B.X2+10;
MMouse(x, Max(B.Y1 - 50, 0), 40, B.Y2-B.Y1);
Wait(200 + Random(100));
end;
end;
{*******************************************************************************
function FindTalk: Boolean;
by: Ashaman88
Description: Searches screen for NickName and handles ALL Talking Randoms
*******************************************************************************}
const gTalkOldComputer = False;
const gTalkSaveBitmap = False;
var
gtalksBox, YelSkipBoxs: array of TBox;
gTalksCount: Integer;
function FindTalk: Boolean;
var
ax, ay, yCount, zCount, Count2, x1, y1, x2, y2, Count1, bmpScreen: Integer;
RawMenuText: string;
begin
Result := False;
if (GetArrayLength(Players) < 1) then Exit;
if FindColor(ax, ay, 65535, MSX1, MSY1, MSX2, MSY2) then
begin
SetArrayLength(gtalksBox, 0);
SetArrayLength(YelSkipBoxs, 0);
//while FindColor(ax, ay, 65535, MSX1, MSY1, MSX2, MSY2) do
begin
y1 := ay;
if ( ( ay + 5 ) > 334 ) then y2 := 334 else y2 := ay + 5;
x1 := ax; x2 := x1;
zCount := 0;
repeat
if FindColor(ax, ay, 65535, x2, y1 + 2, x2 + 3, y2 + 3) then
zCount := 0
else
zCount := zCount + 1;
if ( zCount = 4 ) then Break;
x2 := x2 + 3;
until ( x2 + 3 > 515 );
if ( x2 + 3 <= 515 ) then x2 := x2 - 12;
if (x2 - x1 >= length(Players[CurrentPlayer].Nick) * 4) then
begin
x1 := x1 - 8;
y1 := y1 - 8;
x2 := x2 + 8;
y2 := y2 + 8;
if ( x1 < 0 ) then x1 := 0;
if ( y1 < 0 ) then y1 := 0;
if ( x2 > 515 ) then x2 := 515;
if ( y2 > 334 ) then y2 := 334;
Count2 := Count2 + 1;
Count1 := Count1 + 1;
SetArrayLength(gtalksBox, Count2);
gtalksBox[Count2 - 1].x1 := x1;
gtalksBox[Count2 - 1].y1 := y1;
gtalksBox[Count2 - 1].x2 := x2;
gtalksBox[Count2 - 1].y2 := y2 + 6;
SetArrayLength(YelSkipBoxs, Count1);
YelSkipBoxs[Count1 - 1].x1 := x1;
YelSkipBoxs[Count1 - 1].y1 := y1;
YelSkipBoxs[Count1 - 1].x2 := x2;
YelSkipBoxs[Count1 - 1].y2 := y2;
end else
begin
y1 := y1 - 2;
y2 := y2 + 8;
x1 := x1 - 5;
x2 := x2 + 5;
if ( x1 < 0 ) then x1 := 0;
if ( y1 < 0 ) then y1 := 0;
if ( x2 > 515 ) then x2 := 515;
if ( y2 > 334 ) then y2 := 334;
Count1 := Count1 + 1;
SetArrayLength(YelSkipBoxs, Count1);
YelSkipBoxs[Count1 - 1].x1 := x1;
YelSkipBoxs[Count1 - 1].y1 := y1;
YelSkipBoxs[Count1 - 1].x2 := x2;
YelSkipBoxs[Count1 - 1].y2 := y2;
end;
end;
if ( GetArrayLength(gtalksBox) <> 0 ) then
begin
for yCount := 0 to GetArrayLength(gtalksBox) - 1 do
begin
if FindBitmapMaskTolerance(NickNameBMP, ax, ay, gtalksBox[yCount].x1, gtalksBox[yCount].y1, gtalksBox[yCount].x2, gtalksBox[yCount].y2, 0, 40) then
begin
WriteLn('Found NickName');
ax := (gtalksBox[yCount].x2 + gtalksBox[yCount].x1) shr 1;
ay := gtalksBox[yCount].y2 - 2;
if gTalkSaveBitmap then
begin
bmpScreen := BitmapFromString(515, 334, '');
CopyClientToBitmap(bmpScreen, 1, 1, 515, 334);
if ( gtalksBox[yCount].x1 = 0 ) then x1 := 1 else x1 := gtalksBox[yCount].x1;
if ( gtalksBox[yCount].y1 = 0 ) then y1 := 1 else y1 := gtalksBox[yCount].y1;
gTalksCount := gTalksCount + 1;
for Count1 := -1 to 1 do
for Count2 := -1 to 1 do
FastSetPixel(bmpScreen, Count1 + x1, Count2 + y1, 255);
if ( gtalksBox[yCount].x2 = 515 ) then x1 := 515 else x1 := gtalksBox[yCount].x2;
if ( gtalksBox[yCount].y2 = 334 ) then y1 := 334 else y1 := gtalksBox[yCount].y2;
for Count1 := -1 to 1 do
for Count2 := -1 to 1 do
FastSetPixel(bmpScreen, Count1 + x1, Count2 + y1, 255);
for Count1 := -1 to 1 do
for Count2 := -1 to 1 do
FastSetPixel(bmpScreen, Count1 + ax, Count2 + ay, 255);
SaveBitmap(bmpScreen, ScriptPath + 'FTalk' + IntToStr(gTalksCount) + '.bmp');
FreeBitmap(bmpScreen);
end;
MMouse(ax, ay, 0, 0);
Wait(100 + Random(50));
if WaitUpTextMulti(['Talk', 'lk-to', 'uard', 'ard'],RandomRange(300,400)) then
begin
Mouse(ax, ay, 0, 0, False);
Wait(300 + Random(100));
if (ChooseOptiongetMenuText(RawMenuText, ['Talk'], ClickLeft)) then
begin
WriteLn('******** FOUND TALKING RANDOM TEXT********: ' + RawMenuText);
Flag;
Wait(1000 + Random(500))
SolveTalkingRandom(RawMenuText);
Result := True;
Exit;
end;
end;
end;
end;
end;
end;
end;
You just need to put something in the declareplayers for the nick - for me i just put man88. Just call findtalk
Edit: I'll be updating these functions as I go
Last edited by Ashaman88; 03-09-2013 at 06:14 PM.
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Done sandwich lady solver, can someone check my logic and standards ? and how are random solvers going to be called etc? so we can make them compatible with detection call
Simba Code:program SandwichTestScript;
{$I SRL-OSR/SRL.simba}
var
SandwichTimeOutTimer: integer;
function StopSandwichSearch: boolean;
begin
Result := False;
if (CountColor(39423, 490, 10, 513, 32) < 5) then
Result := True;
if (TimeFromMark(SandwichTimeOutTimer) > 35000) then
Result := True;
end;
procedure SandwichMessage(Message: string);
begin
WriteLn('[Sandwich Random] ' + Message);
end;
procedure SelectSandwich(SandwichNumber: integer);
var
SPoint: tpoint;
begin
SPoint := Point(-1,-1);
case SandwichNumber of
0: SPoint := Point(155, 120);
1: SPoint := Point(260, 122);
2: SPoint := Point(365, 132);
3: SPoint := Point(110, 210);
4: SPoint := Point(205, 219);
5: SPoint := Point(315, 213);
6: SPoint := Point(395, 217);
end;
if (SPoint.X < 0) then
begin
SandwichMessage('[ERROR] Invalid sandwich number');
Exit;
end;
if (StopSandwichSearch) then Exit;
MMouse(RandomRange(SPoint.X-4,SPoint.X+4),
RandomRange(SPoint.Y-4,SPoint.Y+4), 0, 0);
ClickMouse2(mouse_left);
end;
function GetSandwichName: string;
var
FoundString, SWName: string;
begin
Result := ''; SWName := '';
FoundString := Trim(GetTextAtExWrap(80, 270, 400, 303,
0, 3, 1, 2070783, 0, 'UpChars07'));
SWName := Trim(Between('Have a', 'for free', FoundString));
if (not (SWName='')) then
Result := SWName;
end;
function SandwichSearchBox(BoxNumber: integer): tbox;
begin
case BoxNumber of
0: Result := IntToBox(100,80,205,155);
1: Result := IntToBox(215,80,305,160);
2: Result := IntToBox(320,80,410,163);
3: Result := IntToBox(71,170,160,255);
4: Result := IntToBox(165,175,255,260);
5: Result := IntToBox(260,175,355,265);
6: Result := IntToBox(360,175,435,270);
end;
end;
function FindSandwichBoxNumber: integer;
var
tmpCTS, i, SColor, STol, MinSSize: integer;
SHM, SSM: extended;
SName: string;
SB: tbox;
SWTPA: tpointarray;
begin
Result := -1;
SName := GetSandwichName;
tmpCTS := GetColorToleranceSpeed;
if (SName='') then
begin
SandwichMessage('[ERROR] Unable to get sandwich name');
Exit;
end;
SandwichMessage('Sandwich Name: ' + SName);
case Lowercase(SName) of
'baguette' : begin
SColor:=2910074;
STol:=10;
SHM:=0.03;
SSM:=0.08;
MinSSize:=35;
end;
'chocolate bar' : begin
SColor:=2375783;
STol:=7;
SHM:=0.03;
SSM:=0.24;
MinSSize:=110;
end;
'kebab' : begin
SColor:=1276942;
STol:=3;
SHM:=0.08;
SSM:=0.59;
MinSSize:=25;
end;
'meat pie' : begin
SColor:=5395289;
STol:=24;
SHM:=0.10;
SSM:=0.08;
MinSSize:=150;
end;
'bread roll' : begin
SColor:=1280167;
STol:=9;
SHM:=0.01;
SSM:=0.24;
MinSSize:=110;
end;
'triangle sandwich': begin
SColor:=2276602;
STol:=2;
SHM:=0.05;
SSM:=0.81;
MinSSize:=25;
end;
'square sandwich' : begin
SColor:=5143435;
STol:=6;
SHM:=0.01;
SSM:=0.05;
MinSSize:=110;
end;
else
begin SandwichMessage('[ERROR] Invalid sandwich name found'); Exit; end;
end;
SandwichMessage('Scanning for sandwich');
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(SHM, SSM);
repeat
for i:=0 to 6 do
begin
SB := SandwichSearchBox(i);
FindColorsTolerance(SWTPA, SColor, SB.X1, SB.Y1, SB.X2, SB.Y2, STol);
if (Length(SWTPA) < MinSSize) then Continue;
Result := i;
Break;
end;
until (Result > -1) or (StopSandwichSearch);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
end;
procedure SolveSandwichLadyRandom;
begin
Wait(RandomRange(2500,3500));
MarkTime(SandwichTimeOutTimer);
if (StopSandwichSearch) then
begin
SandwichMessage('[ERROR] SandwichLady select screen not up');
Exit;
end;
SelectSandwich(FindSandwichBoxNumber);
end;
begin
SetupSRL;
SolveSandwichLadyRandom;
end.
Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling
Check the solvechatrandoms function as sandwich lady is a chat detection one I think
Red & Green Salamander Hunter // Construction // Gilded Altar // Major help w/ Kyles Runespan // VWB Smither // PhoenixFeathers // GemCutter // Bonfire // LRC Miner // Spell Tab Maker // ApeAtollAgility // IvyWC // RoguesCooker // Herblore // AshamanButterfly // AshamanPowerMiner // Fletcher // LividFarm
Is anyone working on the Quiz Master? A user PM'd me account details with one stuck in quiz master. Ill forward you the info if you're working on it.
STOP PM'ING ME
There are currently 1 users browsing this thread. (0 members and 1 guests)