SRL Archive - RS3 Help

uptext gone at own script?


sipfer3

2014-08-27 21:17:24

hey guys,
i started to script wiht simba yesterday, so i can get to a productive member in this communnity ;).

so i read the all ine one rs3 guide from the major and the "simpler" guide from coh3n.

i tested it, and it run about 5hours then i closed it to improve some stuff. After working on it for about 1-2 hours it wouldnt work anymore, becouse the "uptext"(i think its called uptext)
is just gone. like hovering over a rock or smth and there is no "mine clay".
In the normal client with same settings, everything is normal. i already tried to reinstall simba and all plugins but still not working.

I would be happy if u guys could help me find the error, or give me an advice in where to check for the mistake :)


program clayMining;

{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}

const
loops = 2;
loop = 1;

var
LoadsDone: integer;

procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := '';
password := '';
isActive := true;
world := 61;
isMember := false;
end
currentPlayer := 0;
end;

procedure toMine();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() Then
exit;
pathToBank := [Point(369, 134), Point(354, 133), Point(321, 132), Point(292, 133), Point(289, 110), Point(267, 108), Point(247, 107), Point(220, 104), Point(192, 102), Point(164, 97), Point(130, 95), Point(98, 100), Point(81, 108)];
if SPS.walkPath(pathToBank) Then
minimap.waitPlayerMoving()
else
writeLn('aww failed to walk to bank');
end;

procedure toBank();
var
pathToBank: TPointArray;
begin
if not isLoggedIn() Then
exit;
pathToBank := [Point(81, 108), Point(98, 100), Point(130, 95), Point(164, 97), Point(192, 102), Point(220, 104), Point(247, 107), Point(267, 108), Point(289, 110), Point(292, 133), Point(321, 132), Point(354, 133), Point(369, 134)];
if SPS.walkPath(pathToBank) Then
minimap.waitPlayerMoving()
else
writeLn('aww failed to walk to bank');
end;

procedure Bank();
var
bankTimer: TTimeMarker;
begin
if not isLoggedIn() then
exit;
if depositBox.isOpen(5000)then
begin
bankTimer.start();
repeat
if (depositBox.count > 0) then
begin
depositBox.quickDeposit(QUICK_DEPOSITBOX_INVENTORY);
wait(gaussRangeInt(500, 750));
end;
until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 10000);
inc(LoadsDone);
end;
depositBox.close();
WriteLn('Finished banking..');
end;

procedure mining2();
var
x, y, i: integer;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
if not isLoggedIn() then
exit;


findColorsSpiralTolerance(x, y, TPA, 10011596, mainScreen.getBounds(), 6, colorSetting(2, 0.57, 1.44));

if (Length(TPA) < 1) then
exit;

ATPA := TPA.toATPA(30, 30);
ATPA.filterBetween(0, 10); //I added this line
ATPA.sortFromMidPoint(mainscreen.playerPoint);
smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Clay', 'lay'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear;
break;
end;
end;

tabBackpack.waitForShift(5000); // and I added this line

end;

procedure Mining();
var
x, y: integer;
begin
if (mainscreen.findObject(x, y, 10011596, 6, colorSetting(2, 0.57, 1.44), mainscreen.getCenterPoint(), 20, 20, 5, ['ine'])) then
writeln('Clicked object!');
tabBackPack.waitForShift(5000);

end;

procedure findBank();
var
x, y: integer;
begin
if (mainscreen.findObject(x, y, 4413545, 10, colorSetting(2, 0.05, 0.09), mainscreen.getCenterPoint(), 20, 20, 5, ['eposit'])) then
writeln('Clicked object!');
wait(5000);
end;

Function antiBan: Boolean;
var
I: integer;
begin
I:= random(500);
Case I of
1..10:
begin
wait(100 + random(500));
end;
20..60:
begin
pickUpMouse;
end;
80..100:
begin
wait(2000+random(1500));
end;
130..150:
begin
mouseMovingObject();
end;
end;
end;

procedure progressReport();
var
clayMined, profit, profitPerHour: integer;
begin
clayMined := (LoadsDone * 28);
profit := (clayMined * 406);
profitPerHour := round((profit * 60) / (getTimeRunning() /60000));

writeLn('Time Running: ' + timeRunning);
writeLn('Clay mined: ' + intToStr(clayMined));
writeLn('Profit made: ' + intToStr(profit));
writeLn('Profit/h: ' + intToStr(profitPerHour));
end;

procedure start();
var
pathToDepositBox: TPointArray;
p: TPoint;
begin
if not isLoggedin() then
exit
begin
lodestoneScreen.teleportTo(LOCATION_PORT_SARIM);
wait(randomRange(17000, 18500));

pathToDepositBox := [Point(212, 204), Point(229, 205), Point(249, 207), Point(268, 206), Point(285, 202), Point(282, 181), Point(283, 166), Point(285, 149), Point(286, 132), Point(299, 132), Point(319, 133), Point(337, 133), Point(354, 134), Point(368, 131)];

if SPS.walkPath(pathToDepositBox) then
minimap.waitPlayerMoving()
else
writeLn('failed the start.. lol');
end;
end;

begin
clearDebug();
disableSRLDebug := true;
setupSRL;
declarePlayers();
writeLn('declaredplayers...');

SPS.setup('claytest', RUNESCAPE_OTHER);
if not isLoggedIn() then
begin
players[currentPlayer].login();
exitSquealOfFortune();
minimap.setAngle(MM_DIRECTION_NORTH);
mainScreen.setAngle(MS_ANGLE_HIGH);
end;

SPS.setup('claytest', RUNESCAPE_OTHER);
mainScreen.setAngle(MS_ANGLE_HIGH);
// start();
// findBank();
// Bank();
// toMine();
repeat
repeat
Mining();
until tabBackPack.isFull();
toBank();
repeat
findBank();
until depositBox.isOpen();
Bank();
Antiban();
progressReport();
toMine();
until(loop >= loops);
end.


EDIT: all game settings are correctly, redone it twice :)

Incurable

2014-08-27 22:08:41


for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Clay', 'lay'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear;
break; // Try removing this
end;
end;

Unless I'm misunderstanding your code, the break is unnecessary because the if statement is going to be completed once it does fastClick() and clears SMART. I'd test it for you but I have no idea where to run it.

sipfer3

2014-08-27 22:21:37

thanks for the fast help but that wasnt the problem. (i took out that part of the script cuz it isnt ready yet)
deleting the caches worked for me. dunno what happened lol :)

Turpinator

2014-08-27 23:11:15

From: Incurable

for i := 0 to high(ATPA) do
begin
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(['Clay', 'lay'], 500) then
begin
fastClick(MOUSE_LEFT);
smartImage.clear;
break; // Try removing this
end;
end;

Unless I'm misunderstanding your code, the break is unnecessary because the if statement is going to be completed once it does fastClick() and clears SMART. I'd test it for you but I have no idea where to run it.


The break is required or it will still continue doing the mouseover.]

just go to your runescape graphics settings and make sure mouseover text is enabled.
but the mouseover text seems like its proper (not the full text, portions of it, etc)

perhaps a little more of the simba debug messages would be useful?

Incurable

2014-08-27 23:24:25

From: Turpinator
The break is required or it will still continue doing the mouseover.]

just go to your runescape graphics settings and make sure mouseover text is enabled.
but the mouseover text seems like its proper (not the full text, portions of it, etc)

perhaps a little more of the simba debug messages would be useful?


I'm confused, would break end the for loop?

Turpinator

2014-08-28 08:15:03

From: Incurable
I'm confused, would break end the for loop?


for, while, repeat, etc.

Incurable

2014-08-28 08:34:20

From: Turpinator
for, while, repeat, etc.


I see, I thought it would just exit the loop/selection that it was in. Thanks for clarifying.