Script Name: CheckInArea Function
Script Description: I saw all those "code snippets" and felt the urge to post one aswell. This function checks wether someone is within a certain area on the map and returns a boolean.
Original Author(s): Avarax
Core Version: 2.5.4
Code:
function CheckInArea(ID:integer;Xmin,Xmax,Ymin,Ymax:single):boolean;
var X,Y: single;
begin
GetPlayerXY(ID,X,Y);
If (Y >= Ymin) and (Y <= Ymax) and (X >= Xmin) and (X <= Xmax) then
Result:=true;
end;
Not much of work, eh? I'll make good use of it though in some upcoming epic scripts :>