Curar Party com UH / Potion


Const

MinSelf = 600;// so vai curar os outros se vc tiver X de vida
MinHPPercent = 30; // porcentagem de vida da party
ItemUHID = 266; // ID da uh ou potion

var
Creature: TCreature;

while not Terminated do
begin
UpdateWorld;
for x := 0 to Creatures.Count - 1 do
begin
if (Creatures.Creature[x].PartyMember) and (Creatures.Creature[x].Name<>Self.Name) then
begin
if (Creatures.Creature[x].Health <= MinHPPercent) and (Self.Health>MinSelf) then
begin
Self.Containers.UseItemWithCreature(ItemUHID, Creatures.Creature[x]);
Sleep(2000);
end;
end;
end;
Sleep(100);
end;