Advertisement
Guest User

Untitled

a guest
May 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Const
  2. NumberOfMonsters = 1
  3. MinHealth = 600
  4. MinMana = 2000
  5.  
  6. function CountMonstersBesideYou:Integer;
  7. begin
  8. Result := 0;
  9. UpdateWorld;
  10. for i := 0 to creatures.Count -1 do
  11. begin
  12. if i >= Creatures.Count then break
  13. for x := -1 to 1 do
  14. begin
  15. if x >= 2 then break
  16. for y := -1 to 1 do
  17. begin
  18. if y > 1 then break;
  19. if Creatures.Creature[i].NPC then
  20. if (Creatures.Creature[i].x = Self.X +x) and (Creatures.Creature[i].y = Self.y + y) and (Creatures.Creature[i].Z = Self.Z) then
  21. Result := Result + 1;
  22. end;
  23. end;
  24. end;
  25. end;
  26.  
  27. while not terminated do
  28. begin
  29. UpdateWorld;
  30. if CountMonstersBesideYou >= NumberOfMonsters then
  31. if Self.Mana >= MinMana then
  32. if Self.Health > MinHealth then
  33. Self.Say('exevo gran mas vis');
  34. sleep(500);
  35. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement