Log in

View Full Version : bot is right clicking every monster



Slither1
01-17-2012, 06:37 PM
my bot is right clicking all monsters in pest control before selecting attack from the list

any ideas on how to fix this?

Dynamite
01-17-2012, 06:41 PM
Umm, post the code ;)

-Boom

Slither1
01-17-2012, 06:45 PM
umm i'm not sure what part would be useful, would it be to do with the script because its only started happening since the update

PatDuffy
01-17-2012, 06:50 PM
Oh darns, your script is broken and there's not a free version available anymore.

Your choices are either fix it yourself or stop using it.

Slither1
01-17-2012, 06:55 PM
yeah i know, i've managed to get it working except for this constant right clicking

okokokok
01-17-2012, 06:57 PM
yeah i know, i've managed to get it working except for this constant right clicking

Post the whole script and ill edit it for you

PatDuffy
01-17-2012, 07:04 PM
Post the whole script and ill edit it for you

Awh, don't do that...leachers will never learn to script if we keep feeding them what they want.

I edited the pest control script last night to work, it took me 2 edits of lines.

footballjds
01-17-2012, 07:14 PM
my bot is right clicking all monsters in pest control before selecting attack from the list

any ideas on how to fix this?

aww, poor thing

Slither1
01-17-2012, 07:19 PM
i'm happy to learn if anyone wishes to give me a push in the right direction. I managed to get it working with SRL5 but I got stuck on this because im new to simba

footballjds
01-17-2012, 07:21 PM
i'm happy to learn if anyone wishes to give me a push in the right direction. I managed to get it working with SRL5 but I got stuck on this because im new to simba

since the script is not public anymore(AFAIK)
Not too many people will likely help you... :P

okokokok
01-17-2012, 07:22 PM
Awh, don't do that...leachers will never learn to script if we keep feeding them what they want.

I edited the pest control script last night to work, it took me 2 edits of lines.

He doesn't even know how to post the script

Slither1
01-17-2012, 07:23 PM
He doesn't even know how to post the script

i know how to post the script but i would prefer to attempt to fix it myself instead of getting it fixed for me and not gaining anything from it

okokokok
01-17-2012, 07:34 PM
i know how to post the script but i would prefer to attempt to fix it myself instead of getting it fixed for me and not gaining anything from it

You changed your mind fast

Slither1
01-17-2012, 07:40 PM
i've never asked for anyone to do it for me, i said from the start any ideas on how i could fix it.

i've currently managed to get it to stop right clicking but i know this would only be temporary by changing the MOUSE_RIGHT where it attacks the monsters to MOUSE_LEFT


begin
GetMousePos(StartX, StartY);
GMMouse(x, y, rx, ry);
GetMousePos(TargetX, TargetY);
if left then Button := MOUSE_LEFT
else Button := MOUSE_LEFT;
//else Button := MOUSE_RIGHT;
HoldMouse(TargetX, TargetY, Button);
Wait(25+Round(Gaussian(70, 2.3, True)));
if (Random(15) = 0) then
begin

anyone able to help me correct this?

Kasi
01-17-2012, 09:21 PM
just use Mouse(x, y, rx, ry, True) instead of hold mouse and change button to a boolean

wantonman
01-17-2012, 09:34 PM
post it ill help , that kid is being an asshole

PatDuffy
01-17-2012, 09:40 PM
post it ill help , that kid is being an asshole

I'm not being an asshole, I'm simply stating the fact that if he wishes to use a script that was removed due to leaching, he should have to fix it himself.

Helping him would be like telling him how to add summoning to Flight's Nat Crafter.... and in my personal opinion it would be leaking Member's scripts.

wantonman
01-17-2012, 09:45 PM
I was not talking about you PATDUFFY!

Harry
01-17-2012, 09:50 PM
Anyone who posts or shares the script that's now SRL Members will be considered leaking and will be banned from the forums for a very long time.

Learn to fix it yourself, or don't use it.

Kasi
01-17-2012, 10:39 PM
I was not talking about you PATDUFFY!

Quote people to avoid arguments :)

KeepBotting
01-17-2012, 11:07 PM
Find the procedure that tells the bot to click on the monster, it should look something like this:


Mouse(x, y, 0, 0, false);
ChooseOption('YourMonsterName');
end;

Change that one "false" to "true" and it will only right-click when necessary.

example:


Mouse(x, y, 0, 0, true); //the "false" has been changed to "true"
ChooseOption('YourMonsterName');
end;

Kyle Undefined
01-17-2012, 11:08 PM
Find the procedure that tells the bot to click on the monster, it should look something like this:


Mouse(x, y, 0, 0, false);
ChooseOption('YourMonsterName');
end;

Change that one "false" to "true" and it will only right-click when necessary.

example:


Mouse(x, y, 0, 0, true); //the "false" has been changed to "true"
ChooseOption('YourMonsterName');
end;

That's for SRL 4, not SRL 5. SRL 5 is mouse_Right ;)

grats
01-17-2012, 11:15 PM
i know how to post the script but i would prefer to attempt to fix it myself instead of getting it fixed for me and not gaining anything from it

I'm sure okokokok just wants the script

watch yohojo's tutorial videos, you'll get an idea of how to mess with things

KeepBotting
01-17-2012, 11:16 PM
That's for SRL 4, not SRL 5. SRL 5 is mouse_Right ;)Wow, I suck. So I just spent 3 hours learning how to script in SRL4?

Harry
01-17-2012, 11:17 PM
Wow, I suck. So I just spent 3 hours learning how to script in SRL4?
It's basically the same thing.

Kyle Undefined
01-17-2012, 11:18 PM
All the knowledge you learned is still relevant, except for small changes.

ClickNorth(True) -> SRL_ANGLE_HIGH/SRL_ANGLE_LOW/SRL_ANGLE_NONE
Same goes for SetAngle(True);

Mouse() now uses mouse_Left for left clicking and mouse_Right for right click.

grats
01-17-2012, 11:20 PM
Wow, I suck. So I just spent 3 hours learning how to script in SRL4?

stuff is named differently... does slightly different things

you'll be able to use srl5 functions just like you do srl4, they just do different things...

go through srl includes and read what different procedures and functions do

wantonman
01-17-2012, 11:33 PM
yeah if you learn how to script you learn how to script! yull be a mem in no time (*wink)

Harry
01-17-2012, 11:34 PM
yeah if you learn how to script you learn how to script! yull be a mem in no time (*wink)
Stop being so butthurt you were temp banned for spamming the forums. It had nothing to do with your application.

Slither1
01-18-2012, 12:24 AM
thanks for the help, ill give it a try now :)

so i've attempted these methods and still no luck, it right clicks then chooses attack and repeats on the monster after each hit


this is the section I think is causing the problem

procedure GMouse(x, y, rx, ry: Integer; left: Boolean);
var
StartX, StartY, TargetX, TargetY, Button: Integer;
DeltaX, DeltaY: Integer;
Neliojuuri, K: Extended;
begin
GetMousePos(StartX, StartY);
GMMouse(x, y, rx, ry);
GetMousePos(TargetX, TargetY);
if left then Button := MOUSE_LEFT
else Button := MOUSE_LEFT;
//else Button := MOUSE_RIGHT;
HoldMouse(TargetX, TargetY, Button);
Wait(25+Round(Gaussian(70, 2.3, True)));
if (Random(15) = 0) then
begin
DeltaX := TargetX-StartX;
DeltaY := TargetY-StartY;
Neliojuuri := Sqrt(DeltaY*DeltaY+DeltaX*DeltaX);
if (Neliojuuri = 0) then MoveMouse(TargetX-1+Random(3), TargetY-1+Random(3))
else begin
K := 1.5/Neliojuuri;
MoveMouse(TargetX+Round((K*DeltaX)), TargetY+Round((K*DeltaY)));
end;
end;
Wait(25+Round(Gaussian(70, 2.3, True)));
ReleaseMouse(TargetX, TargetY, Button);
end;

Press Play
01-18-2012, 04:57 AM
I edited the pest control script last night to work, it took me 2 edits of lines.
He's 100% right; it took me 2 lines to fix it too :) i would help, but I'd be leaking a member's script. I hope this gives some people out there the incentive to learn how to script :)

Slither1
01-18-2012, 09:18 PM
yeah that's cool, any chance you could give me any clues? just a pointer towards what is causing it