Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Const
- RuneID = 3155
- MinHP = 100
- function GetAttackedCreature:TCreature;
- begin
- UpdateWorld;
- result := nil;
- for i := 0 to Creatures.Count -1 do
- begin
- if i >= Creatures.Count then break;
- if Creatures.Creature[i].ID = Self.Attacking then
- Begin
- result := Creatures.Creature[i];
- exit;
- end;
- end;
- end;
- while not terminated do
- begin
- UpdateWorld;
- Creature := GetAttackedCreature;
- if Creature <> nil then
- if Self.Health >= MinHP then
- Self.Containers.UseItemWithCreature(RuneID,Creature);
- sleep(100);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement