Guest User

BZ Lua Destructive AI

a guest
Jul 3rd, 2013
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.75 KB | None | 0 0
  1. playerBuildingList = {}
  2.  
  3. function AddObject(h)
  4.     if GetTeamNumber(h) == 1 then
  5.         if IsOdf(h, "abbarr") or IsOdf(h, "abspow") or IsOdf(h, "ablpow") or IsOdf(h, "abwpow") or IsOdf(h, "ablpad") or IsOdf(h, "abmbld") or IsOdf(h, "abhang") or IsOdf(h, "abshld") or IsOdf(h, "abstor") or IsOdf(h, "absupp") or IsOdf(h, "abhqcp") or IsOdf(h, "abcomm") or IsOdf(h, "absilo") or then
  6.             table.insert(playerBuildingList, h)
  7.         end
  8.     end
  9. end
  10.  
  11. --accepts a handle object
  12. function setAttackers(h)
  13.     if IsAliveAndPilot(GetNearestEnemy(h)) then
  14.         if IsWithin(h, GetNearestEnemy(h), 200) then
  15.             Attack(GetNearestEnemy(h), h, 1)
  16.         end
  17.     end
  18. end
  19.  
  20. --accepts an integer value
  21. function removeEntry(i)
  22.     if not IsValid(t[i]) then
  23.         table.remove(playerBuildingList, i)
  24.     end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment