View Full Version : Snippet for ToggleRunning
Keelijh
01-09-2016, 12:38 AM
Could be easy to integrate into TReflectLocalPlayer, no?
function TReflectLocalPlayer.toggleRunning(Enable: Boolean): Boolean;
begin
Result := False;
if not Self.isLoggedin then
Exit;
if Enable then
begin
if Self.isRunOn then
exit(true)
else
begin
Mouse.Move(545,130,590,150, MOUSE_LEFT);
exit(true);
end;
end else if not Enable then
if Self.isRunOn then
begin
Mouse.Move(545,130,590,150, MOUSE_LEFT);
Result := True;
end;
end;
Does this work?
AFools
01-09-2016, 12:58 AM
procedure
TReflectLocalPlayer.SetRun(Toggle: Boolean);
begin
if (Toggle) and (Self.IsRunOn) then
Exit;
if (not Toggle) and (not Self.IsRunOn) then
Exit;
Mouse.Move(IntToBox(545, 130, 590, 150));
Wait(250);
Mouse.Click(Mouse_Left);
end;
OR
LocPlayer.SetRun(True);
Sorry; my mistake the previous code was the aerolib include
Keelijh
01-09-2016, 01:04 AM
if not isUsingRun then begin
toggleRunning(true); end;
OR
if(getRunEnergy >= (40)) and not isUsingRun then begin
toggleRunning(true); end;
what is wrong with the current function? It is good that you are making your own functions though. =D
I wasn't aware of this function. Where is this located?
AFools
01-09-2016, 01:34 AM
Keelijh; read what i corrected. It is very similar. I pinched this straight out of Kyle; fight script
honeyhoney
01-09-2016, 01:35 AM
if not isUsingRun then begin
toggleRunning(true); end;
OR
if(getRunEnergy >= (40)) and not isUsingRun then begin
toggleRunning(true); end;
what is wrong with the current function? It is good that you are making your own functions though. =D
You are getting confused between the Reflection include and AeroLib.
I wasn't aware of this function. Where is this located?
It is located in AeroLib, not the Reflection include. AFools was mistaken :p
-----
Good suggestion. I know Kyle is keen to remove the dependencies between the two includes.
AFools
01-09-2016, 02:03 AM
.......
I had already corrected it.. but decided to correct the initial post rather make another post....
honeyhoney
01-09-2016, 02:11 AM
I had already corrected it.. but decided to correct the initial post rather make another post....
Must have posted just as you edited! :p
Things like these are prime examples of why the includes should be separated!
AFools
01-09-2016, 04:53 AM
Well the reflection include has been missing a few functions until now and as migrating from AL to reflection, it is part of progression to mix & match. Until one or the other include had entirely what is necessary. ( there are still some migration issues, so i am spending time to make my function a lot more concise.)
Done :) Thanks, and keep letting me know of missing functions that should be added!
ineedbot
01-15-2016, 12:25 AM
Rather than using fixed positions on the screen; Mouse.Move(545,130,590,150, MOUSE_LEFT); you can use widgets to locate the bounds of the run orb.
Widget_Orbs_Container = 160;
Orbs_RunToggle = 22;
W.GetWidget(Widget_Orbs_Container, Orbs_RunToggle);
It'd be super useful to use widgets, maybe, just possibly, have resizable mode work with reflection.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.