Code:
Public Function getClosestTarget()
Dim X As Integer
Dim Dist As Single
For X = 0 To Creatures.Count
If (Creatures.Creature(X).Name <> Self.Name) And (Creatures.Creature(X).Visible = True) And (Creatures.Creature(X).NPC = False) And (Creatures.Creature(X).Health > 0) And (Creatures.Creature(X).Z = Self.Z) Then
Dist = (Abs(Self.X - Creatures.Creature(X).X) + Abs(Self.Y - Creatures.Creature(X).Y)) / 2
MsgBox Creatures.Creature(X).Name & " " & Dist
End If
Next X
End Function
Code:
Public Type TContainer
Capacity As Integer
Count As Integer
Name As String
ID As Integer
Item() As TItem
Subcontainer As Boolean
Open As Boolean
End Type
I won't release it but quite a funny thing todo if your bored. I actually got permission from LoW to use it when scripting e.g BotBase