SRL Archive - News and General

RandomRClick after EoC may cause problems


Laimonas171

2012-11-29 13:34:36

Hey Just noticed that with new skill interface we can have some problems.
(*
RandomRClick
~~~~~~~~~~~~

.. code-block:: pascal

procedure RandomRClick

Performs random right click to stay active.

.. note::

Author: phantombmx/EvilChicken!, idea by Naum
Last Modified: Unknown

Example:

.. code-block:: pascal

RandomRClick;
*)
procedure RandomRClick;
var
I: TBooleanArray;
II, M, R: Byte;
Inv: Boolean;
begin
if (not LoggedIn) then exit;
M := MouseSpeed;
MouseSpeed := 7 + Random(25);
Inv := (GetCurrentTab = tab_Inv);
if (Inv) then Inv := ((not InvEmpty) and (Random(3) > 0));
if (not Inv) then
MouseBox(MSX1, MSY1, MIX2, MIY2, mouse_right)
else
begin
SetLength(I, 28);
for II := 0 to 27 do
I[II] := ExistsItem(II + 1);

R := RandomRange(1, 28);
while (not I[R - 1]) do
R := RandomRange(1, 28);
InvMouse(R, mouse_right);
end;
Inv := False;
if (Random(3) > 0) then
Inv := ChooseOption('xamine');
if (not Inv) then ChooseOption('ancel');
MouseSpeed := M;
end;
Since if here is no option = 'xamine', he chooses 'ancel'. :D
yeah so my point is if he "random" click at center of screen on skilling interface cancel button. he will get 2 cancel options.
  1. Cancel - Cancel current process (smithing gold ores as in image)
  2. Cancel - to cancel right click interface


screen shoot.

The Killer

2012-11-29 13:48:29

lol! "cancel
cancel"? nice thinking jagex,way to confuse legits :P

Laimonas171

2012-11-29 13:58:17

From: The Killer
lol! "cancel
cancel"? nice thinking jagex,way to confuse legits :P


yeah, I had to check out, even it's obviously what is what.. :D

Sirenia

2012-11-29 14:17:04

If they wont hotfix that then could that little area be excluded?

Le Jingle

2012-11-29 14:20:13

I'm submitting a fix in a second, testing before I do.

Sent Pull Req : https://github.com/Fratello/SRL-5/commit/2dea1d6f2ce3d0b3f66d97dee6bc0f92b990e6f5

Justin

2012-11-29 15:53:56

From: Le Jingle
I'm submitting a fix in a second, testing before I do.

Sent Pull Req : https://github.com/Fratello/SRL-5/commit/2dea1d6f2ce3d0b3f66d97dee6bc0f92b990e6f5


Your pull will break scripts that use RandomRClick since you renamed the function

Le Jingle

2012-11-29 18:31:50

From: [J]ustin
Your pull will break scripts that use RandomRClick since you renamed the function


Oh, thanks for the catch. I forgot to revert back to original name after testing. :p Also noted that I forgot to change the Random(9) back to Random(25). Also added in credit to GetChooseOptions.