SRL Archive - Research & Development Lounge

procedure SelectOption(Opt,Amount: Integer);


OwnedPl0x?!?!

2008-01-21 17:44:08

Used for my Auto-Fletcher! i got tired of using Mouse() lol; u may take if needed
Opt 1 = shortbow
Opt 2 = longbow
Opt 3 = crossbowstock


procedure SelectOption(Opt,Amount: Integer);
begin
if (Opt = 1) then
begin
Mouse(121,403,0,0,False);
Wait(900);
ChooseOption('ake X');
Wait(900);
TypeSend(InttoStr(Amount));
Wait(800);
end;
if (Opt = 2) then
begin
Mouse(268,408,0,0,False);
Wait(1000);
ChooseOption('ake X');
Wait(900);
TypeSend(InttoStr(Amount));
Wait(800);
end;
if (Opt = 3) then
begin
Mouse(415,413,0,0,False);
Wait(1000);
ChooseOption('ake X');
Wait(900);
TypeSend(InttoStr(Amount));
Wait(800);
end;
end;

HyperSecret

2008-01-21 18:31:57

mouse coords with no randomness is bad and leads to bans

stampede10343

2008-01-21 20:16:37

Looks good except for "perfect Coordinates"

You could also use strings for your options, just to me more simple and easy to remeber

OwnedPl0x?!?!

2008-01-21 20:34:00

From: HyperSecret
mouse coords with no randomness is bad and leads to bans


ill work on it :)


From: stampede10343
Looks good except for "perfect Coordinates"

You could also use strings for your options, just to me more simple and easy to remeber


Can ya give me an example?

BobboHobbo

2008-01-21 21:10:49

From: OwnedPl0x?!?!
ill work on it :)




Can ya give me an example?


For randomness do:
Mouse(POSITIONX,POSITIONY, 10,10,true);

10 = the random ness in the X position and same with the other 10 is random for the Y axsis.

You could use DTMS of the logs would be more reliable.

Also you need random timming.

Wait(800+random(800));

mickaliscious

2008-01-21 23:06:07

I did a different kind of thing like this:


function DoOption(cx,cy,rx,ry:Integer; Option:string): boolean;
begin
Mouse(cx,cy,rx,ry,False);
Result := ChooseOption(Option);
end;

begin
if FindDTM(Bow, x, y, MIX1, MIY1, MIX2, MIY2) then
if DoOption(x,y,5,5, 'ake X') then
begin
Wait(RandomRange(100,500));
TypeSend('15');
end;
end.

OwnedPl0x?!?!

2008-01-22 06:33:11

this is all great feed back guys thanks for the help

@Bobbo, ty i keep forgetting about the random times and ill work on DTMs

stampede10343

2008-01-22 06:56:13

For strings you could use this:
procedure SelectOption(Opt: String;Amount: Integer);
begin
if (Opt = 'shortbow') then
begin
Mouse(121,403,10,10,False);
Wait(900);
ChooseOption('ake X');
Wait(900);
TypeSend(InttoStr(Amount));
Wait(800);
end;
if (Opt = 'longbow') then
begin
Mouse(268,408,10,10,False);
Wait(1000);
ChooseOption('ake X');
Wait(900);
TypeSend(InttoStr(Amount));
Wait(800);
end;
if (Opt = 'crossbow') then
begin
Mouse(415,413,10,10,False);
Wait(1000);
ChooseOption('ake X');
Wait(900);
TypeSend(InttoStr(Amount));
Wait(800);
end;
end;
Something like that, with random waits

n3ss3s

2008-01-22 10:49:11

Okay, this is how you remove half of the length, look how much is the distance from the first one's middle to the second ones. Also get the Y, but no difference stuff needed.

Then, do

X := FirstOnesMiddle - TheXDistance + Opt * TheXDistance
Y := YOfTheFirst

Mouse(X, Y, 5, 5, False)…

OwnedPl0x?!?!

2008-01-22 17:53:03

From: n3ss3s
Okay, this is how you remove half of the length, look how much is the distance from the first one's middle to the second ones. Also get the Y, but no difference stuff needed.

Then, do

X := FirstOnesMiddle - TheXDistance + Opt * TheXDistance
Y := YOfTheFirst

Mouse(X, Y, 5, 5, False)…



what do u mean by length? u mean the random coordinates or something else?

n3ss3s

2008-01-23 05:46:09

-.- I meant that is how you remove half of the length of your procedure, that really needs like < 8 lines…