Originally Posted by
Rodelol
I made my first own simple script and im kinda stuck at failsafe now.
Going down ladder doesn't always work due to missclicking so my script fails.
At the moment it looks like this:
Code:
procedure GoDown;
Var x, y: integer;
begin
writeln('Goin doown!');
if (FindObjCustom(x, y, ['limb-down', 'adder'], [403770, 202786], 5)) then
begin
ClickMouse2(mouse_right);
wait(50+random(75));
WaitOptionEx('limb-down', 'adder', ClickLeft, 150);
sleep(3000);
Now what i was thinking about was some scanner to see if im in a cave and if i can see alot of black on the minimap.. Any suggestions
?
I imagine this is pretty simple but i couldn't find a way so far so decided to ask here
I guess i could just click the ladder again when down to see if theres an option to climb-up but i doubt thats the best way to do it..
You are on the right track with the black on the MM
Simba Code:
Function IsInDungeon: Boolean;
Var
B: Integer;
Begin
B:= CountColorTolerance(394752, MMX1, MMY1, MMX2, MMY2, 30) // Counts the black colour on the MM
WriteLn('CountColour: ' + IntToStr(B))
If B > 5000 Then // If the count is greater then 5000 then it results true
Begin
WriteLn('We are inside the dungeon');
Result:= True
End;
End;
So for example, you could:
Simba Code:
procedure Go Down;
Begin
Repeat
// ladder finding stuff
Until (IsInDungeon = True)
End;
Or even
Simba Code:
While Not IsInDungeon Do
Begin
//Find ladder stuff here
End;