📄 orc.ai
字号:
call v71()
set v6b[0]=v6b[0]-0
set v6b[1]=v6b[1]-0
set v6b[2]=v6b[2]-0
set v6b[0]=v6b[0]+0
set v6b[1]=v6b[1]+0
set v6b[2]=v6b[2]+0
call v72()
endfunction
function v73 takes nothing returns nothing
local integer v74=0
set v74=v75(55)
if v74>=v76 then
set v4b=v4c
else
call v77(v76,55,90)
endif
endfunction
function v78 takes nothing returns nothing
local integer v79=0
set v79=v75(55)
if v79>=v7a then
set v4b=v4c
else
call v77(v7a,55,90)
endif
endfunction
function v7b takes nothing returns nothing
local integer v7c=0
set v7c=v75(49)
if v7c>=v7d then
set v4b=v4c
else
call v77(v7d,49,90)
endif
endfunction
function v7e takes nothing returns nothing
local integer v7f=0
set v7f=v75(48)
if v7f>=v80 then
set v4b=v4c
else
call v77(v80,48,90)
endif
endfunction
function v81 takes nothing returns nothing
local integer v82=0
set v82=v75(64)
if v82>=v83 then
set v4b=v4c
else
call v77(v83,64,90)
endif
endfunction
function v84 takes nothing returns nothing
local integer v85=0
set v85=v75(66)
if v85>=v86 then
set v4b=v4c
else
call v77(v86,66,90)
endif
endfunction
function v87 takes nothing returns nothing
if v4b==50 then
call v73()
elseif v4b==51 then
call v78()
elseif v4b==52 then
call v7b()
elseif v4b==53 then
call v7e()
elseif v4b==54 then
call v81()
elseif v4b==55 then
call v84()
endif
endfunction
function v88 takes nothing returns nothing
if hero[1]==4 then
call v89(1,1,1)
elseif hero[2]==4 then
call v89(2,1,2)
elseif hero[3]==4 then
call v89(3,1,3)
endif
if hero[1]==5 then
call v89(1,2,1)
elseif hero[2]==5 then
call v89(2,2,2)
elseif hero[3]==5 then
call v89(3,2,3)
endif
if hero[1]==6 then
call v89(1,3,1)
elseif hero[2]==6 then
call v89(2,3,2)
elseif hero[3]==6 then
call v89(3,3,3)
endif
endfunction
function v8a takes boolean inj returns nothing
set wave=wave+1
call v8b()
if inj then
call RemoveInjuries()
endif
call v8c(hero[1])
call v8c(hero[2])
call v8c(hero[3])
call v8c(46)
call v8c(47)
call v8c(48)
call v8c(49)
call v8c(50)
call v8c(52)
call v8c(53)
call v8c(54)
call v8c(55)
call v8d()
endfunction
function v8e takes nothing returns nothing
local integer gn=v8f(v90)
local integer wood=v91()
if wood>v92 then
set vc=true
elseif wood<v92 then
set vc=false
endif
if vc then
set v93=gn-1
elseif wave==1 then
set v93=v94(4,gn-2)
elseif wave==2 then
set v93=v94(5,gn-2)
elseif wood<v95 then
set v93=gn-v94(4-(4*v8f(v96)),0)
elseif wood>v95 and wood<v92/2 then
set v93=gn-v94(3-(4*v8f(v96)),0)
else
set v93=gn-v94(2-(4*v8f(v96)),0)
endif
set v93=v97(v94(v93,0),gn-1)
if not v98 and wood<v95 then
set v99=1
else
set v99=1
endif
endfunction
function v9a takes nothing returns nothing
call va6(8,56,true,0,64,2)
call v9b(1,1,48)
call v9b(2,5,48)
set va2=2
endfunction
function v9c takes nothing returns nothing
call v134(1,64,80)
call v134(3,66,70)
if v8f(48)>5 and tier>1 then
call v9d(1,69,80)
endif
call v77(2,v9e,70)
if GetPlayerRace(v9f)!=RACE_UNDEAD and v8f(48)>4 then
call va0(1,0,true,4,0.75,0,true,40,80)
endif
endfunction
function v14b takes nothing returns nothing
endfunction
function v14c takes nothing returns nothing
if tier==3 then
if v5b>7 then
call v77(2,46,70)
endif
call v77(12,48,60)
call v77(4,53,62)
call v77(4,47,62)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,hero[3],40)
call v9d(2,155,64)
call v9d(2,154,64)
call v9d(1,69,70)
call v9d(1,68,50)
call v9d(1,73,20)
call v9d(3,150,51)
call v9d(3,152,50)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
if v5b>7 then
call v77(1,46,70)
endif
call v77(9,48,60)
call v77(2,53,60)
call v77(2,47,60)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,50)
call v9d(1,155,48)
call v9d(1,154,48)
call v9d(1,68,25)
call v9d(1,73,20)
call v9d(2,150,31)
call v9d(2,152,30)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(4,48,60)
call v77(8,48,20)
call v77(1,hero[1],80)
call v77(1,63,50)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v14e takes nothing returns nothing
endfunction
function v14f takes nothing returns nothing
if tier==3 then
call v77(10,54,45)
call v77(4,53,55)
call v77(4,47,51)
call v77(1,hero[1],90)
call v77(1,hero[2],70)
call v9d(2,155,60)
call v9d(2,154,60)
call v9d(1,70,65)
call v9d(3,150,63)
call v9d(3,152,62)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(2,54,40)
call v77(1,53,25)
call v77(1,60,60)
call v77(1,hero[1],80)
call v9d(2,150,31)
call v9d(2,152,30)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(1,63,80)
call v77(1,hero[1],80)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v150 takes nothing returns nothing
endfunction
function v151 takes nothing returns nothing
if tier==3 then
call v77(8,55,50)
call v77(6,53,37)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v9d(2,155,45)
call v9d(2,154,45)
call v9d(1,72,50)
call v9d(3,151,51)
call v9d(3,152,50)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(6,48,20)
call v77(10,55,35)
call v77(2,53,45)
call v77(2,47,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,70)
call v9d(1,155,45)
call v9d(1,154,45)
call v9d(2,151,21)
call v9d(2,152,20)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(6,48,20)
call v77(1,hero[1],79)
call v77(1,63,80)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v152 takes nothing returns nothing
endfunction
function v153 takes nothing returns nothing
if tier==3 then
call v77(10,50,60)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,hero[3],40)
call v9d(1,67,45)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(8,50,60)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,10)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(1,hero[1],79)
call v77(1,63,80)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v154 takes nothing returns nothing
call va5(500,50,0,57,60)
call va6(1,59,false,1,64,60)
call va6(1,59,false,9,51,60)
endfunction
function v155 takes nothing returns nothing
if tier==3 then
call v77(30,49,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,hero[3],40)
call v9d(1,73,30)
call v9d(3,151,41)
call v9d(3,152,40)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(16,49,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,10)
call v9d(1,73,15)
call v9d(2,151,31)
call v9d(2,152,30)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(8,49,60)
call v77(1,hero[1],80)
call v77(1,63,15)
call v9d(1,73,10)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v156 takes nothing returns nothing
endfunction
function v157 takes nothing returns nothing
if tier==3 then
call v77(15,52,60)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,hero[3],40)
call v9d(1,71,85)
call v9d(3,150,41)
call v9d(3,152,40)
call v9d(1,68,50)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(8,52,60)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,10)
call v9d(2,150,31)
call v9d(2,152,30)
call v9d(1,68,25)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(1,hero[1],79)
call v77(1,63,80)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v158 takes nothing returns nothing
endfunction
function v159 takes nothing returns nothing
if tier==3 then
call v77(10,48,60)
call v77(6,46,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,hero[3],40)
call v9d(1,69,70)
call v9d(3,150,41)
call v9d(3,151,31)
call v9d(3,152,40)
call v9d(1,68,50)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(6,48,60)
call v77(5,46,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,10)
call v9d(2,150,31)
call v9d(2,151,21)
call v9d(2,152,30)
call v9d(1,68,25)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(3,48,60)
call v77(6,46,30)
call v77(1,hero[1],59)
call v77(1,63,60)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function v15a takes nothing returns nothing
call va5(500,50,0,57,60)
call va6(1,59,false,1,64,60)
call va6(1,59,false,9,51,60)
endfunction
function v15b takes nothing returns nothing
if tier==3 then
call v77(16,49,60)
call v77(5,46,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,hero[3],40)
call v9d(1,73,50)
call v9d(3,151,41)
call v9d(3,152,40)
if not(v14d==v45[1])then
call v9d(3,153,20)
endif
elseif tier==2 then
call v77(12,49,60)
call v77(4,46,50)
call v77(1,hero[1],80)
call v77(1,hero[2],60)
call v77(1,60,10)
call v9d(1,73,40)
call v9d(2,151,31)
call v9d(2,152,30)
if not(v14d==v45[1])then
call v9d(2,153,10)
endif
else
call v77(8,49,50)
call v77(3,46,30)
call v77(1,hero[1],59)
call v77(1,63,60)
if not(v14d==v45[1])then
call v9d(1,153,10)
endif
endif
endfunction
function vb8 takes nothing returns nothing
call vb9()
call vba()
call vbb()
call v9a()
set vbc=vbd[vbe]+v1a[v4b]
set vbf=vc0[vbe]+v1b[v4b]
call vc1()
if v4b<4 then
if v4b<1 then
call v158()
else
if v4b<3 then
if v4b<2 then
call v152()
else
call v156()
endif
else
call v14e()
endif
endif
else
if v4b<6 then
if v4b<5 then
call v14b()
else
call v154()
endif
else
if v4b<7 then
call v15a()
else
call v150()
endif
endif
endif
endfunction
function vc2 takes nothing returns nothing
call v9c()
if vc3 then
call va6(2,48,true,0,63,1000)
call v77(1,hero[1],100)
call v77(1,vc4,98)
endif
if v4b>=v21 then
call v87()
else
if v4b<4 then
if v4b<1 then
call v159()
else
if v4b<3 then
if v4b<2 then
call v153()
else
call v157()
endif
else
call v14f()
endif
endif
else
if v4b<6 then
if v4b<5 then
call v14c()
else
call v155()
endif
else
if v4b<7 then
call v15b()
else
call v151()
endif
endif
endif
endif
endfunction
function vc5 takes nothing returns nothing
if vc6 then
loop
exitwhen v8f(hero[1])>0
call Sleep(2*vc7)
endloop
endif
call vc8(0,2)
loop
loop
exitwhen not vc9 and not(CaptainRetreating()and vca)
exitwhen vcb
call CaptainGoHome()
call Sleep(2*vc7)
endloop
call vcc()
if vc6 then
call vcd()
call v32("RACIAL ATTACK: Heroes Are Ready")
endif
exitwhen vcb
if vce then
call v32("RACIAL ATTACK: Not allowed to attack setting is on")
else
if vcf and vd0 then
call v8e()
set vb=false
loop
exitwhen vb
call Sleep(vc7)
call v32("RACIAL ATTACK: Assigning Peons")
endloop
endif
call v8a(false)
call vd1()
set v93=0
endif
call Sleep(vc7)
endloop
endfunction
function vd2 takes integer vd3 returns nothing
if TownHasMine(vd3)then
call HarvestGold(vd3,5)
endif
endfunction
function vd4 takes nothing returns nothing
call ClearHarvestAI()
call vd2(0)
if not vd5 then
call vd2(1)
call vd2(2)
call vd2(3)
endif
if vcf then
if v98 then
call HarvestWood(0,v94(v8f(v90)-v93,v99)+v8f(v96))
else
call HarvestWood(0,v94(v8f(v90)-v93,1)+v8f(v96))
endif
set vb=true
elseif vd5 then
call HarvestWood(0,20)
endif
endfunction
function vd6 takes nothing returns nothing
if vcf or vd7 or vd5 then
call vd4()
else
call vd8()
endif
endfunction
function vd9 takes nothing returns nothing
local integer x=R2I(I2R(-v17[v4b]*(4-v97(3,tier)))/(3*vc7*v94(vda-1,1)))
local integer vdb=0
loop
exitwhen vcb
call vd6()
if x>2 then
set x=0
call v49()
endif
if vdc!=v4b then
set vdc=v4b
call v60()
if v4b<=49 then
set x=R2I(I2R(-v17[v4b]*(4-v97(3,tier)))/(3*vc7*v94(vda-1,1)))
endif
call vdd()
call vb8()
call vde(vdf())
call ve0(vdf())
endif
set vdb=ve1()
if tier!=vdb then
set tier=vdb
call vdd()
endif
call vc2()
call Sleep(3*vc7)
call vd6()
call Sleep(3*vc7)
set x=x+1
endloop
endfunction
function main takes nothing returns nothing
set ve2=3
call v29()
set ve3=3
call ve4()
set ve5=200
set ve6=120
set ve7=80
set ve8=2
set ve9=1
set vea=2
set veb=8
set vec=1
set ved=400
set vee=280
set vef=200
set vf0=300
set vf1=200
set vf2=11
set vf3=16
set vf4=18
set vf5=6
set vf6=11
set v52=1500
set v53=3
set vf7=3
set vf8=8
set vf9=9
set vfa=3
set vfb=10
set vfc=4
set vfd=7
set vfe=8
set vff=20
set v4d=-1
set v100=true
set vd5=false
set v101=0
set v102=0
set v35=true
set v31=false
set v64=3
set v103=0
set v104=0
set vcf=false
set v105=false
set vd7=false
set v106=false
set v107=false
set v108=true
set v109=false
set v10a=1000
set v10b='Amil'
set v10c='Amic'
set v10d="militia"
set v10e="peasant"
set v10f=false
set v33=false
set v34=33
set v110=15
set v111='earc'
set vc4=59
set vd0=true
set v112=false
set v113=0
set v114=1500
set v115=false
set v116=4
set v117=0
set v118=850
set v119=66
set v11a=0
set v36=40
set v11b=11
set v11c=false
set v3b=2
set v11d=2
call v2f()
call v22()
call v24()
call v26()
call v11e()
call v11f()
call v3d()
call v120()
call v121()
call v122()
set v4c=v123()
set v4b=v4c
call v124("Strategy",v125())
call v62()
if v35 then
call v37()
endif
call v88()
call v60()
call vb8()
call AMAI(function v126,function vd9,function vc5)
call v127()
endfunction
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -