SRL Archive - OSR Help

Are my SRL files corrupt?


trojan

2011-01-29 06:40:52

I am currently learning to script and it's sending me insane with all the errors that I'm getting, but I got this message in the Simba debug box.

Warning! You passed a wrong xe to a finder function: 515. The client has a width of -4260208, thus the xe is out of bounds. Setting the value to -4260209 (w-1) for now.

Exception: Range check error at line 110 (This is the players SRL file)

function LoggedIn: Boolean;
var
cx, cy: Integer;
begin
Result := FindColor(cx, cy, 16777215, 439, 491, 440, 492);
end;

Why is Simba telling me the width of the runescape client is -4260208?

Also, when I use the function FindColorSpiralTolerance the mouse just stayed in the top left corner and unless there was a tree there nothing would happen. It seemed to work the same as


MMouse(x,y,0,0);
if UpText('ree') then
Mouse(x, y, 0, 0);

Troll

2011-01-29 08:23:24

Are you calling SetupSRL; at the start ?

cycrosism

2011-01-29 08:26:25

Did you focus simba on the runescape client?

trojan

2011-01-29 09:49:54

Okay, now I feel like such an idiot :P, I didn't realise you had to keep selecting runescape as the client every time you changed some code, one more thing. What is the best way to tell if your character is still chopping the tree these days?
Thanks :)

Rich

2011-01-29 10:36:56

Reflection animations. I think there's a tutorial in the Reflection section somewhere.

cycrosism

2011-01-29 18:59:04

Yeah you could use reflection to do something like


While (CharacterAnimating or CharacterMoving) do
Begin
Wait(1000);
R_FindRandoms;
If InvFull Then break;
End;

Thats something similar I use in my power chopper. In colour you could use a TPA then get the length from the TPA (bit more advanced) or have a timer set to say 5 seconds and if it doesnt get a log in 5 seconds then it finds a tree, and when it gets a log make it reset the timer.

Just some suggestions

trojan

2011-01-30 15:32:20

Thanks alot people you have been a great help :D I shall credit you, I am making a draynor oak banker for my first script, at the moment it uses DDTM to walk to the oaks then chops until not(characteranimating), chops using TPA's, then when inventory is full it walks back to the bank :) it should be a few more days until it is finished.
rep for you both