turbobk
2008-09-04 20:49:05
Hey Guys,
This will find any NPC, with the name 'TheName' and save its location into x, y.
This was just a little something a made for my script that I'm working on, but it is very usefull so I decided to release it for everyone to use.
Example:
That is all,
Thanks,
TurboBk. :)
This will find any NPC, with the name 'TheName' and save its location into x, y.
This was just a little something a made for my script that I'm working on, but it is very usefull so I decided to release it for everyone to use.
Function FindNPCEx(Var x, y: Integer; TheName: String): Boolean;
Var
Name: Array Of TNPC;
i: Integer;
Begin
If Not LoggedIn Then Exit;
Name := SortNPCs(GetNPCsByName(TheName));
For i := 0 To High(Name) Do
If Name[i].MS.X <> 0 Then
Begin
x := Name[i].MS.X;
y := Name[i].MS.Y;
Result := True;
Exit;
End;
End;Example:
Procedure KillDaCowz;
Var
x, y: Integer;
Begin
If FindNPCEx(x, y, 'Cow') Then
Begin
Mouse(x, y, 4, 4, True);
Blah blah blah
End;
End;That is all,
Thanks,
TurboBk. :)