Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Const
  2. RuneID = 3155
  3. MinHP = 100
  4.  
  5. function GetAttackedCreature:TCreature;
  6. begin
  7. UpdateWorld;
  8. result := nil;
  9. for i := 0 to Creatures.Count -1 do
  10. begin
  11. if i >= Creatures.Count then break;
  12. if Creatures.Creature[i].ID = Self.Attacking then
  13. Begin
  14. result := Creatures.Creature[i];
  15. exit;
  16. end;
  17. end;
  18. end;
  19.  
  20. while not terminated do
  21. begin
  22. UpdateWorld;
  23. Creature := GetAttackedCreature;
  24. if Creature <> nil then
  25. if Self.Health >= MinHP then
  26. Self.Containers.UseItemWithCreature(RuneID,Creature);
  27. sleep(100);
  28. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement