SRL Archive - RS3 Help

SPS problem after a break


Renzanity

2015-05-15 19:05:13

Hey guys,

I've been getting this on my debug box after logging back in from a break:
[SPOILER=preview]

Taking a break..
Logging you back in..
-- TPlayer.login()
---- TRSLobby.getCurrentTab(): Current tab is 0
---- TRSLobby.quickSelectWorld(): Found worlds [41, 96, 124]
---- TRSLobby.quickSelectWorld(): Clicked world 41. [Index 0]
-- TPlayer.login(): True
-- sps.init()
---- Path exists (C:\Simba\Includes\SPS\img\runescape_other\VWM_SPS_00.png)
---- Setup area "VWM_SPS_00" in 47ms
-- sps.init()
-- TRSGrandExchange.getPrice(): 766
-- TRSGrandExchange.getPrice(): 1358
-- TRSGrandExchange.getPrice(): 2322
---- minimap.mouseOffCompass(): Succesfully moved mouse off of compass
---- TRSMinimap.clickCompass(): Clicked compass
-- exitTreasure()
-- exitTreasure(): result = False
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 187 ms
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 172 ms
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 188 ms
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 172 ms
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 172 ms
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 172 ms
-- WARNING: sps.getPlayerPos(): Didn't find enough matches accurately calc your postion
-- sps.getPlayerPos(): result = {X = -1, Y = -1}, took 172 ms
[/SPOILER]
I've no idea why this happens when I'm standing within the bounds of my path. This only happens after taking a break, if I stopped the script and ran it again on the same spot, it runs perfectly fine.

I'm not sure if it has something to do with my break procedure or logIn procedure so I'll be posting them here:
[SPOILER=break procedure]

{*To take a break*}
procedure break();
begin
ScriptTimer.pause();
if (random(100) >= 50) then
mouseOffClient(OFF_CLIENT_RANDOM)
else smallRandomMouse(5 + random(50));
writeLn('Taking a break..');
wait(randomRange(310000, 360000));
wait((breakL + randomRange(-3, 4)) * 60000);
inc(BreaksTaken);
BreakTimer.reset();
writeLn('Logging you back in..');
logIn();
ScriptTimer.start();
BreakTimer.start();
end;
[/SPOILER]
[SPOILER=logIn procedure]

{*To login*}
procedure logIn();
begin
if not isLoggedIn() then
players[currentPlayer].login();
wait(randomRange(3000, 5000)); //To wait for the lag to subside
loadResources(); //To load necessary stuff for the script
minimap.clickCompass(); //So you're always facing north
mainScreen.setAngle(MS_ANGLE_HIGH); //Sets your angle to the highest possible angle
mainScreen.setZoom(true); //Fixes your zoom
findNormalRandoms(); //Closes all screen interferences
end;
[/SPOILER]

Thanks in advance, everyone.

Have a good one.

EDIT:
I even tried wrapping the path around the bank, but with the same result every time.

Clarity

2015-05-15 19:14:55

What occurs during loadResources()?

Renzanity

2015-05-15 19:17:26

From: Clarity
What occurs during loadResources()?


This is what I got now after trying to re-arrange the procedure:
[SPOILER=loadResources()]

{*Resource compilation*}
procedure loadResources();
begin
SPS.setup('VWM_SPS_00', RUNESCAPE_OTHER);
path[0] := [Point(188, 116), Point(148, 150), Point(133, 208), Point(133, 242), Point(157, 296), Point(161, 329), Point(177, 354)]; //Path to mine
path[1] := [Point(167, 382), Point(162, 320), Point(136, 274), Point(133, 213), Point(134, 164), Point(187, 138), Point(184, 114)]; //Path to bank
sapphireDTM := DTMFromString('mggAAAHicY2NgYOhkYmCoAuIKIK4H4nYg7gXiJYwMDNOAeAEQr4SyFwIxL38cUBcTFowdMOLAEAAA60MHaw==');
emeraldDTM := DTMFromString('mggAAAHicY2NgYIhnYmAIA2I/IA4G4iQgTgbiN4wMDHeB+AkQfwTiR1CaJ5IPqIsJA0syYAeMODAEAAAeCAhB');
rubyDTM := DTMFromString('mggAAAHicY2NgYIhlYmCIAmI/KJ0MxElAHMnIwODLCKGTgDgWiIOA2JOfC6iLCQNLMmAHjDgwBAAA5n4E2A==');
sapphirePrice := grandExchange.getPrice(1623);
emeraldPrice := grandExchange.getPrice(1621);
rubyPrice := grandExchange.getPrice(1619);
end;
[/SPOILER]

KeepBotting

2015-05-15 19:43:19

From: Renzanity
This is what I got now after trying to re-arrange the procedure:
[SPOILER=loadResources()]

{*Resource compilation*}
procedure loadResources();
begin
SPS.setup('VWM_SPS_00', RUNESCAPE_OTHER);
path[0] := [Point(188, 116), Point(148, 150), Point(133, 208), Point(133, 242), Point(157, 296), Point(161, 329), Point(177, 354)]; //Path to mine
path[1] := [Point(167, 382), Point(162, 320), Point(136, 274), Point(133, 213), Point(134, 164), Point(187, 138), Point(184, 114)]; //Path to bank
sapphireDTM := DTMFromString('mggAAAHicY2NgYOhkYmCoAuIKIK4H4nYg7gXiJYwMDNOAeAEQr4SyFwIxL38cUBcTFowdMOLAEAAA60MHaw==');
emeraldDTM := DTMFromString('mggAAAHicY2NgYIhnYmAIA2I/IA4G4iQgTgbiN4wMDHeB+AkQfwTiR1CaJ5IPqIsJA0syYAeMODAEAAAeCAhB');
rubyDTM := DTMFromString('mggAAAHicY2NgYIhlYmCIAmI/KJ0MxElAHMnIwODLCKGTgDgWiIOA2JOfC6iLCQNLMmAHjDgwBAAA5n4E2A==');
sapphirePrice := grandExchange.getPrice(1623);
emeraldPrice := grandExchange.getPrice(1621);
rubyPrice := grandExchange.getPrice(1619);
end;
[/SPOILER]

Generally I only declare my map and paths once during runtime. I assume yours gets called every time you logIn(), try
changing that and see if it helps

Renzanity

2015-05-15 19:59:58

From: KeepBotting
Generally I only declare my map and paths once during runtime. I assume yours gets called every time you logIn(), try
changing that and see if it helps


Ohh, that's right. I should have thought of that before, thanks man. I'll do that now.