SRL Archive - General Botting Help

[OGL] .isFinished() Bug?


Clutch

2015-04-24 19:35:31

Okay so I have been going through hell and back with my timers. After countless hours making changes to my script and comparing other WORKING scripts with countdowns I realized a difference.
If you have actionBar.getXXX AND isFinished() it will not start the setTime(?) or something and will continuously spam click. An example..

Here's my summon procedure - I altered the times for testing purposes again this happens with other wait times as well not just this one procedure/setTime..
procedure Summon;
begin
pouch := ogl.getTextures(133365);
mouse.click(pouch[0].toPoint().randomizePointEllipse(5), 1);
canSummon.setTime(Random(16500,18000));
end;

else if {actionBar.getSummoningPoints() > 10 and} length(ogl.getTextures(133365)) and canSummon.isFinished() then
Reaction:=@Summon

As you can see I have getSummoningPoints quoted out and it runs as expected, my setTime in my Summon procedure works correctly. BUT if I do the following…

else if actionBar.getSummoningPoints() > 10 and length(ogl.getTextures(133365)) and canSummon.isFinished() then
Reaction:=@Summon


or even this…

else if actionBar.getSummoningPoints() > 10 and canSummon.isFinished() then
Reaction:=@Summon


It will just start spam clicking the pouch to summon until of course the Summoning Points are under the threshold set. I have been able to reproduce this with all actionBar.gets that I have tried so far. Anyone else able to confirm this/ experienced this?

Ross

2015-04-24 19:42:48

From: Obscurity
Parentheses.


They'll getcha!

without them:

else if actionBar.getSummoningPoints() > 10 and length(ogl.getTextures(133365)) and canSummon.isFinished() then
Reaction:=@Summon

basically turns into:

else if actionBar.getSummoningPoints() then
Reaction:=@Summon

Clutch

2015-04-24 20:36:58

From: Ross
They'll getcha!

without them:

else if actionBar.getSummoningPoints() > 10 and length(ogl.getTextures(133365)) and canSummon.isFinished() then
Reaction:=@Summon


basically turns into:

else if actionBar.getSummoningPoints() then
Reaction:=@Summon


Just an example, occurs for eating food where you have to know your HP. Can just set a a wait time on those, but I see what your saying for summoning technically doesn't need a threshold yet it does need a timer or for me to add in for it to detect the familiar opposed to a timer. Might be my workaround for the summoning portion.

Ross

2015-04-24 21:00:10

From: Clutch
Just an example, occurs for eating food where you have to know your HP. Can just set a a wait time on those, but I see what your saying for summoning technically doesn't need a threshold yet it does need a timer or for me to add in for it to detect the familiar opposed to a timer. Might be my workaround for the summoning portion.



I think you may have missed the point, basically what I'm saying is that your function needs to be this:

else if (actionBar.getSummoningPoints() > 10) and (length(ogl.getTextures(133365) > 0) and (canSummon.isFinished()) then
Reaction:=@Summon

in other words:

else if (condition) and (condition) and (condition) then
Reaction:=@Summon

Clutch

2015-04-25 00:13:07

From: Ross
I think you may have missed the point, basically what I'm saying is that your function needs to be this:

else if (actionBar.getSummoningPoints() > 10) and (length(ogl.getTextures(133365) > 0) and (canSummon.isFinished()) then
Reaction:=@Summon

in other words:

else if (condition) and (condition) and (condition) then
Reaction:=@Summon


Huh…that works. This goes back to what we were talking about the other day… gonna re-read what we went over because that just doesn't make sense to me. Only thing I'm getting is thats just the way it is. I just want all of this to start making sense haha :(

Ross

2015-04-25 00:40:07

From: Clutch
Huh…that works. This goes back to what we were talking about the other day… gonna re-read what we went over because that just doesn't make sense to me. Only thing I'm getting is thats just the way it is. I just want all of this to start making sense haha :(


They're just parentheses, it's just like in math.

1 + (2 * 3) = 7

(1 + 2) * 3 = 9

You need to have parentheses around the conditions in the if statement, or everything's going to be wonky.

Clutch

2015-04-25 02:24:11

Thank you, very useful way of looking at it.