SRL Archive - SRL Archives

AngleDir


Boreas

2006-11-11 18:59:59

I posted in the free script section because I thought it would be useful for non member scripters too, but it got ignored with all the scripts and leechers using them. It's not uber useful, and all I did was put things together, but whatever.

I made this to change the angle and compass at the same time. It saves time plus it's what I do playing legit humanly. Probably could do with improving, but it does the job for now.



program new;
{.include srl\srl.scar}
{*******************************************************************************
function angledir(angle,direction: String);
By: Boreas. Base on makecompass by Wizzup? and highest angle by StarBlaster 100
Description: Aligns RS to specified direction and angle at the same time
direction: set to: North='n', South='s', East='e', West='w'
angle: set to highest='h', lowest='l'
*******************************************************************************}
Function angledir(angle,Side:String): Boolean;
Var
Fx, Fy, Dx, Dy : Integer;
ComMark: Integer;
Left_Right : Boolean;
Begin
MarkTime(ComMark);
Case LowerCase(Side) Of
'n' : Begin Fx := 566; Fy := 13; End;
'e' : Begin Fx := 560; Fy := 19; End;
's' : Begin Fx := 566; Fy := 27; End;
'w' : Begin Fx := 573; Fy := 20; End;
end;
If FindColor(Dx,Dy,723587,Fx,Fy,Fx,Fy) Then
begin
Result:=True;
case angle of
'h':
begin
if (Loggedin) then
begin
keydown(38);
sleep(1000 + random(100) + random(200));
keyup(38);
wait(1000 + random(100));
end;
end;
'l':
begin
if (Loggedin) then
begin
keydown(40);
sleep(1000 + random(100) + random(200));
keyup(40);
wait(1000 + random(100));
end;
end;
end;
Exit;
end
If Random(2) = 1 Then Left_Right := True
Else Left_Right := False;
If Left_Right Then
begin
case angle of
'h':keydown(38);
'l':keydown(40);
end;
KeyDown(VK_RIGHT)
end
Else
begin
case angle of
'h':keydown(38);
'l':keydown(40);
end;
KeyDown(VK_Left);
end;
Repeat
Wait((10)+ Random(10));
If(FindColor(Dx,Dy,723587,Fx,Fy,Fx,Fy))then
begin
Result := True;
break;
end;
Until(TimeFromMark(ComMark) > 7000);
If Left_Right Then
begin
case angle of
'h':keyup(38);
'l':keyup(40);
end;
KeyUp(VK_Right);
end
Else
begin
case angle of
'h':keyup(38);
'l':keyup(40);
end;
KeyUp(VK_Left);
end;
End;


begin
activateclient;
setupsrl;
angledir('l','n');
end.



I thought of it while working on moving the mouse and looking at the screen at the same time. I think we should do more stuff like that because humans multitask. For example, while waiting when mining/cutting/fighting, be looking for the next rock/tree/monster.

lardmaster

2006-11-11 19:27:20

good job, i think the top proirity of srl should be being more humanlike right now.

weibs

2006-11-12 00:25:51

Nice procedure, and I also think humanness is a priority, one of the bigest differences I've noticed between legit and macro is rotation, humans do a ton of rotating.

Wizzup?

2006-11-12 02:09:26

Nice function, though I don't macro'ers are supposed to change the camera alot, because surely with minimap walking, we always want to be faced north.
And moving alot with the camera will result in unstable scripts. :)

Boreas

2006-11-12 02:13:42

True, however I do use rotation and angle changing for door and bank finding, and then do angledir('h','n'); for walking. It's like that when I play legit too, most of the time its highest and north, and when I need to I change it, then change it back.

And besides, it's mostly yours :tongue:

Liquid

2006-12-13 17:18:45

From: Wizzup?
Nice function, though I don't macro'ers are supposed to change the camera alot, because surely with minimap walking, we always want to be faced north.
And moving alot with the camera will result in unstable scripts. :)


true but if you calculate how much you have turned the camera you can compensate that into your map walking correct?

Lorax

2006-12-14 09:25:12

From: Liquid
true but if you calculate how much you have turned the camera you can compensate that into your map walking correct?


At the moment we are working on stable angledetecting functions in the develope team, and soon this could become a reality - like anglewalk..

Boreas

2006-12-14 12:18:57

Well in terms of my function, you can just set it to whatever when you are you finding something, and do 'h','n' right after finding or right before walking. That's what I've always done, even with makecompass and highestangle.