SRL Archive - OSR Help

Mouse Clicking


Zackeri

2013-02-26 19:52:53

Mouse doesn't click on the goblin, anyone know why?


procedure kill;
begin
If P07_FindObjCustom(x, y, ['ttack', 'oblin'], [3511438, 2519700, 11908543, 5207393, 3760540, 1863248, 8097434,3357762], 5) then
Mouse(x, y, 0, 0, false);
ChooseOption('ake');
repeat
Wait(RandomRange(3500,2500));
Until not IsUpText('oblin')
end;
says successfully executed though

Aarondawg

2013-02-26 20:05:26

Under Procedure add your x and X Var integers.

juunhoad

2013-02-26 20:08:21

I am not sure but I think you must change Mouse to ClickMouse2

Zackeri

2013-02-26 20:09:29

That was added at the beginning of the script this is simply a snippet of the script that I assume is causing the problem

Aarondawg

2013-02-26 20:12:16

From: Zackeri
That was added at the beginning of the script this is simply a snippet of the script that I assume is causing the problem


procedure kill;

YOUR VAR'S ALSO GO HERE. It calls them from the top.

begin
If P07_FindObjCustom(x, y, ['ttack', 'oblin'], [3511438, 2519700, 11908543, 5207393, 3760540, 1863248, 8097434,3357762], 5) then
Mouse(x, y, 0, 0, false);
ChooseOption('ake');
repeat
Wait(RandomRange(3500,2500));
Until not IsUpText('oblin')
end;

juunhoad

2013-02-26 20:12:54

From: Aarondawg
Under Procedure add your x and X Var integers.


Ya I think that is a better answer :P

Element17

2013-02-26 20:13:18

Use mmouse or clickmouse2. Mouse is bad to use.

juunhoad

2013-02-26 20:19:01

From: Element17
Use mmouse or clickmouse2. Mouse is bad to use.


cool, I said the right thing :)!

Zackeri

2013-02-26 20:28:04

still doesn't work, changed my colors too :/

Zackeri

2013-02-27 10:18:17

Still looking for a solution

Ian

2013-02-27 10:25:34

I changed it a bit and commented what I changed.


procedure kill;
begin
if P07_FindObjCustom(x, y, ['ttack', 'oblin'], [3511438, 2519700, 11908543, 5207393, 3760540, 1863248, 8097434,3357762], 5) then
begin //You forgot to put a begin/end, so it only executed the next line
WriteLn('Found Goblin')//Will print this to debug if it finds the goblin
MMouse(x, y, 0, 0); //Changed to MMouse
ClickMouse2(False); //And ClickMouse2
ChooseOption('ake');
repeat
Wait(RandomRange(3500,2500));
Until not IsUpText('oblin')
end else //I added this to match the begin I added, you could also use end; if you don't want the debug message
WriteLn('Could not find Goblin'); //Will print this to debug if it doesn't find the goblin
end;