You can: Use it in your server.
You can NOT: Steal it, say it's yours, edit without permission. I may change that last rule.
edited 15×, last 13.04.14 04:51:31 pm
Approved by Infinite Rain
Download
11 kb, 1,012 Downloads
--BUILD
function fai_build(id)
local money=player(id,"money")
--weapon should be checked here
ai_selectweapon(id, 74)
px=player(id,"tilex")
py=player(id,"tilex")
-- 20 Search Attempts
for i=1,20 do
-- Random Adjacend
x=px+math.random(-1,1)
y=py+math.random(-1,1)
-- Not the player tile itself
if (x~=px or y~=py) then
--Here the tile should be checked to see if there's a building on it, and if so, what team it belongs to.
if money==16000 then
local build=math.random(0,5)
if build==0 then ai_build(id,6,x,y) -- gate field
elseif build==1 then ai_build(id,7,x,y) -- dispenser
elseif build==2 then ai_build(id,8,x,y) -- turret
elseif build==3 then ai_build(id,9,x,y) -- supply
elseif build==4 then ai_build(id,13,x,y) -- teleporter entrance
elseif build==5 then ai_build(id,14,x,y) end -- teleporter exit
elseif money>=10000 then
local build=math.random(0,3)
if build==1 then ai_build(id,7,x,y) -- dispenser
elseif build==2 then ai_build(id,8,x,y) -- turret
elseif build==3 then ai_build(id,9,x,y) end -- supply
elseif money>=5000 then
local build=math.random(0,3)
if build==1 then ai_build(id,14,x,y) -- teleporter exit
elseif build==2 then ai_build(id,7,x,y) -- dispenser
elseif build==3 then ai_build(id,7,x,y) end -- dispenser
end
end
end
end