SRL Archive - Bugs

2 bugs in reflection since refletion 2


fre

2011-09-10 07:45:08

While the script i used was flawless with the old reflection.
In the new reflection i had some bugs that made my script not flawless anymore.

sometimes click to high and don't deposit at all
[php]
R_DepositAll(True);
[/php]

so i use this
[php]
While R_InvCount > 1 do
R_DepositAll(True);
[/php]

Don't walk the whole path
[php]
R_WalkPath(path);
[/php]

so i use this
[php]
while R_DistanceFromTile(endtile) > 3 do
R_WalkPath(path);
[/php]

~Fre

Flight

2011-09-10 09:57:34

Both invoke infinite loops. What happens if you get a random event while you're "R_InvCount > 1", or when you're "R_DistanceFromTile(endtile) > 3"?

Just something to consider. ;)

i luffs yeww

2011-09-10 16:33:58

From: Flight
Both invoke infinite loops. What happens if you get a random event while you're "R_InvCount > 1", or when you're "R_DistanceFromTile(endtile) > 3"?

Just something to consider. ;)


Well for the first one, you can't get random events while the bank is open. ;)

But the second one does need a failsafe.

Flight

2011-09-10 20:57:44

I've had a random event while I've had both a shop screen and Dungeoneering shop screen open. I can only assume it goes the same for all visible interfaces.

Brandon

2011-09-10 21:12:20

From: Flight
I've had a random event while I've had both a shop screen and Dungeoneering shop screen open. I can only assume it goes the same for all visible interfaces.



Nope there is a delay for the dungeoneering one.. if u dung for like 24hrs and then run to the shop, a couple seconds later, the random will come and take you away because you left the dung safe-zone. If you just went at the dung shop and a random snags u, its because jagex doesn't care if your buying shit or not..

For banks its different, No matter what, u can't get a random while banking.. Jagex put this for ppl who were poisoned and diseased so that they don't die n lose all their shit cuz of a random.

Failsafe?


while (R_DistanceFromTile(EndTile) > 3) do
begin
R_WalkPath(Whatever);
R_FindRandoms;
end;

The walk path used to do the same thing where it would walk half the path for me.. but then I updated reflection and simba and now it walks the entire path :S

masterBB

2011-09-11 08:11:55

var t:Integer;

...

t:= GetSystemTime + 90000;
while (R_DistanceFromTile(EndTile) > 3) do
begin
R_WalkPath(Whatever);
R_FindRandoms;
if(t > GetSystemTime) then
begin
writeln('It took more then 90 seconds to walk and you still aren`t were you are supposed to be... f**k you script! f*ck you!');
TerminateScript;
end;
end;

Flight

2011-09-11 08:16:56

From: masterBB
var t:Integer;

...

t:= GetSystemTime + 90000;
while (R_DistanceFromTile(EndTile) > 3) do
begin
R_WalkPath(Whatever);
R_FindRandoms;
if(t > GetSystemTime) then
begin
writeln('It took more then 90 seconds to walk and you still aren`t were you are supposed to be... f**k you script! f*ck you!');
TerminateScript;
end;
end;


I usually just use 'MarkTime' and 'TimeFromMark'.

Gu3st...

2011-09-11 09:07:55

From: Flight
I usually just use 'MarkTime' and 'TimeFromMark'.
If you take a look at MarkTime and TimeFromMark's source you'll see that what he did is the same as what he did ;)

Flight

2011-09-11 11:52:11

I figured it was, just less cluttered. The functions are there, why not use them?

Gu3st...

2011-09-11 12:21:57

From: Flight
I figured it was, just less cluttered. The functions are there, why not use them?
Does it matter?

MarkTime and TimeFromMark are both in SRL, so when doing timing without including SRL you'd have to do it this way. If you time stuff enough times, you'll get used to do it this way, and then later on you'll just get used to it (or something)..
It's just personal preference.

Doing t := GetSystemTime; is faster than doing MarkTime(t); too.

Smarter Child

2011-09-11 12:23:47

From: Flight
I figured it was, just less cluttered. The functions are there, why not use them?


It depends on preference really, I find MarkTime and TimeFromMark simpler to work in most scenarios. However, he might find that using GetSystemTime is better for him or he just likes it more. We're not obliged to use every available function ;)

Edit: aw i was ninja'd :(

Flight

2011-09-11 12:48:24

From: Zyt3x
Doing t := GetSystemTime; is faster than doing MarkTime(t); too.


Lol.

@Smarter Child:
You're right, it is about personal preference.

Drakan

2011-09-11 12:52:52

From: Flight
Lol.

@Smarter Child:
You're right, it is about personal preference.


He means its faster to not use the wrapper of MarkTime, but to call straight from simba. Wrappers will slow anything down in PS :)

Gu3st...

2011-09-11 13:28:38

From: Flight
Lol.
What's funny about that, Mr. Arrogant?

masterBB

2011-09-11 15:10:32

From: Zyt3x
What's funny about that, Mr. Arrogant?


Uhm, interesting question. I will try to figure it out. If we declare TimeFromMark as A and Getsystemtime method as B you will get B > A. And flights statement is {B > A} equals lol. I think I will have to consult Kayne West about it, he is pro on these kind of things.

E; Ontopic:
The speed increase is minimal. Just like using getters and setters versus public vars.

Flight

2011-09-11 20:31:57

Is a maximum of 50 MS what you'd consider a notable speed increase? It's the same concept of "Integer = Integer+1" or "Inc(Integer)", there's almost no difference in speed, and if you were to argue over those few milliseconds, then that tells me you're just looking for any excuse to cause an argument. No reason to get upset here Zyt3x, let's please just tone it down a notch. :(

Drakan

2011-09-11 20:36:08

From: Flight
Is a maximum of 50 MS what you'd consider a notable speed increase? It's the same concept of "Integer = Integer+1" or "Inc(Integer)", there's almost no difference in speed, and if you were to argue over those few milliseconds, then that tells me you're just looking for any excuse to cause an argument. No reason to get upset here Zyt3x, let's please just tone it down a notch. :(


Well to be fair you did laugh at his comment first. And yes when you are trying to measure the speed of small things (such as how long it takes for a SMART call) or something of that nature, it helps to have as accurate as a reading as possible. It's how we determine if a change we make will affect speed in the long run.