麻豆国产欧美一区二区三区r,久久久男人天堂,深夜在线视频,国产精品美女久久久久aⅴ

當前位置:魔獸基地 > 魔獸攻略秘籍 > 瀏覽信息

【觸發】一鍵移植通用版-電腦英雄自動施放技能

更新時間:2025年09月20日信息來源:魔獸基地信息作者:金皮鳳凰蛋

感謝小伙伴“月夜星歌”的分享!

這個系統使得電腦的英雄能夠自動集火敵方英雄并且先手施放技能,適合絕大部分地圖

一鍵移植,用法極其方便,只需直接復制這個觸發到地圖即可,無需修改

支持包括通魔在內的幾乎所有的英雄技能模板

對于自定義通魔技能的話,將基礎命令ID改成常用的英雄技能模板的命令就可以了,例如風暴之錘(單體目標)、戰爭踐踏(無目標)、烈焰風暴(點目標)

dcf77b8b4710b9127aa83080c9fdfc039345224d.gif

觸發腳本如下:

//==================================================================

//電腦英雄自動施放技能系統V1.3 BY 金皮蛋

//使得電腦英雄能夠自動對附近的敵方英雄集火并且使用技能

//支持包括通魔在內的絕大部分英雄技能模板

//一鍵移植,用法極其方便

//==================================================================

library GoldenEggAISettings

globals

public real Range = 1600//AI進攻范圍

public real Ratio = 1//AI技能施放范圍系數

public boolean Lock = true//true為鎖定血量最少的目標,false為不鎖定

public boolean OnlyHero = true//true為只對英雄有效,false為對所有單位有效

public boolean CreepAI = false//true為對野怪玩家有效,false為對野怪玩家無效

public boolean HumanAI = false//true為對人類玩家有效,false為對人類玩家無效

endglobals

endlibrary

//==================================================================

//==================================================================

//==================================================================

//==================================================================

//==================================================================

//==================================================================

//==================================================================

//==================================================================

//==================================================================

//==================================================================

library HeroSpellSystemAI initializer Init needs GoldenEggAISettings

globals

private integer Top = 0

private boolean AB = false

private unit array Hero

private unit array Htu

private real array Htx

private real array Hty

private integer array LastOI

private integer array OT

private integer array TYPE

private boolean array GUARD

private timer array HT

private group AG = null

private region RR = null

private trigger TE = null

private real Range = 1600

private real Ratio = 1.

private boolean OnlyHero = true

private boolean CreepAI = false

private boolean HumanAI = false

private boolean Lock = true

endglobals

private function DistanceBetweenUnits takes unit u1, unit u2 returns real

return SquareRoot(( GetUnitX(u1)-GetUnitX(u2))*(GetUnitX(u1)-GetUnitX(u2))+(GetUnitY(u1)-GetUnitY(u2))*(GetUnitY(u1)-GetUnitY(u2)))

endfunction

private function IsPlayerComputer takes player p returns boolean

if GetPlayerController(p)==MAP_CONTROL_COMPUTER /*

*/or (GetPlayerController(p)==MAP_CONTROL_USER and HumanAI) /*

*/or (GetPlayerController(p)==MAP_CONTROL_CREEP and CreepAI) then

return true

endif

return false

endfunction

private function IsUnitUseAI takes unit u returns boolean

if IsUnitType(u,UNIT_TYPE_HERO) or OnlyHero==false then

return true

endif

return false

endfunction

private function IsUnitVisibleToEnemy takes unit u returns boolean

local integer i = 0

loop

if IsUnitVisible(u,Player(i)) and IsUnitEnemy(u,Player(i)) then

return true

endif

set i = i + 1

exitwhen i > 15

endloop

return false

endfunction

private function GetHeroId takes unit u returns integer

local integer i = 1

loop

exitwhen i > Top

if u==Hero[i] then

return i

endif

set i = i + 1

endloop

return 0

endfunction

private function GetTimerId takes timer t returns integer

local integer i = 1

loop

exitwhen i > Top

if t==HT[i] then

return i

endif

set i = i + 1

endloop

return 0

endfunction

private function IsFree takes integer OI returns boolean

if OI==0 or OI==851972 or OI==851983 or OI == 852128 then

return true

endif

return false

endfunction

private function IS takes unit AU returns boolean

local integer OI = GetUnitCurrentOrder(AU)

if OI == 0/*

*/or OI == 851972/*

*/or OI == 851993/*

*/or OI == 851983/*

*/or OI == 851984/*

*/or OI == 851988/*

*/or OI == 851990/*

*/or OI == 851983/*

*/or OI == 851985/*

*/or OI == 851986/*

*/or OI == 851988/*

*/or OI == 851990/*

*/or OI == 999999 then

return true

endif

return false

endfunction

private function IC takes unit u, integer i returns boolean

if AB==false and GetUnitCurrentOrder(u)!=i and i!=LastOI[GetHeroId(u)] then

return true

endif

return false

endfunction

private function SD takes unit u, integer i returns nothing

local integer id = GetHeroId(u)

set AB = true

set LastOI[id] = i

set OT[id] = 5

endfunction

private function IO takes unit AU, integer AI returns nothing

if IC(AU,AI) then

if IssueImmediateOrderById( AU, AI ) then

call SD(AU,AI)

endif

endif

endfunction

private function IL takes unit AU, integer AI, real x, real y returns nothing

if IC(AU,AI) then

if IssuePointOrderById( AU, AI ,x ,y ) then

call SD(AU,AI)

endif

endif

endfunction

private function IU takes unit AU, integer AI, unit AT returns nothing

if IC(AU,AI) then

if IssueTargetOrderById( AU, AI , AT ) then

call SD(AU,AI)

endif

endif

endfunction

private function SO1 takes unit AU, real R returns nothing//無目標

local real H = GetUnitLifePercent(AU)

call IO( AU, 852129 )

if R<=800*Ratio then

call IO( AU, 852097 )

call IO( AU, 852489 )

call IO( AU, 852126 )

call IO( AU, 852503 )

call IO( AU, 852100 )

call IO( AU, 852528 )

call IO( AU, 852184 )

call IO( AU, 852164 )

call IO( AU, 852180 )

call IO( AU, 852554 )

call IO( AU, 852200 )

call IO( AU, 852594 )

call IO( AU, 852595 )

call IO( AU, 852596 )

call IO( AU, 852667 )

call IO( AU, 852663 )

call IO( AU, 852598 )

call IO( AU, 852599 )

call IO( AU, 852600 )

if H<=50. then

call IO( AU, 852586 )

endif

endif

if R<=400*Ratio then

call IO( AU, 852096 )

call IO( AU, 852086 )

call IO( AU, 852090 )

call IO( AU, 852094 )

call IO( AU, 852127 )

call IO( AU, 852128 )

call IO( AU, 852526 )

call IO( AU, 852181 )

call IO( AU, 852183 )

call IO( AU, 852556 )

call IO( AU, 852217 )

call IO( AU, 852588 )

call IO( AU, 852253 )

call IO( AU, 852246 )

endif

if R<=100*Ratio then

call IO( AU, 852123 )

endif

//激活

call IO( AU, 852174 )

call IO( AU, 852552 )

call IO( AU, 852458 )

call IO( AU, 852656 )

call IO( AU, 852589 )

call IO( AU, 852244 )

call IO( AU, 852578 )

call IO( AU, 852671 )

call IO( AU, 852244 )

call IO( AU, 852602 )

call IO( AU, 852212 )

call IO( AU, 852522 )

call IO( AU, 852150 )

call IO( AU, 852133 )

call IO( AU, 852102 )

call IO( AU, 852249 )

if R<=200*Ratio then

call IO( AU, 852177 )

endif

endfunction

private function SO2 takes unit AU, real x, real y, real R returns nothing//點目標

if R>1200 then

call IL( AU, 852093, x, y )

endif

call IL( AU, 852089, x, y )

call IL( AU, 852488, x, y )

call IL( AU, 852121, x, y )

call IL( AU, 852504, x, y )

call IL( AU, 852125, x, y )

call IL( AU, 852555, x, y )

call IL( AU, 852218, x, y )

call IL( AU, 852224, x, y )

call IL( AU, 852221, x, y )

call IL( AU, 852593, x, y )

call IL( AU, 852592, x, y )

call IL( AU, 852597, x, y )

call IL( AU, 852580, x, y )

call IL( AU, 852238, x, y )

call IL( AU, 852652, x, y )

call IL( AU, 852658, x, y )

call IL( AU, 852669, x, y )

call IL( AU, 852229, x, y )

call IL( AU, 852237, x, y )

call IL( AU, 852560, x, y )

call IL( AU, 852591, x, y )

call IL( AU, 852238, x, y )

if R>800 then

call IL( AU, 852122, x, y )

endif

if R>400 then

call IL( AU, 852525, x, y )

endif

if R<200*Ratio then

call IL( AU, 852664, x, y )

endif

call IL( AU, 852600, x, y )

endfunction

private function SO3 takes unit AU, unit AT, boolean Ally returns nothing//單位目標

// 敵

//if Ally == false then

call IU( AU, 852095, AT )

call IU( AU, 852119, AT )

call IU( AU, 852502, AT )

call IU( AU, 852179, AT )

call IU( AU, 852171, AT )

call IU( AU, 852527, AT )

call IU( AU, 852555, AT )

call IU( AU, 852227, AT )

call IU( AU, 852226, AT )

call IU( AU, 852587, AT )

call IU( AU, 852585, AT )

call IU( AU, 852583, AT )

call IU( AU, 852662, AT )

call IU( AU, 852665, AT )

call IU( AU, 852668, AT )

call IU( AU, 852670, AT )

call IU( AU, 852230, AT )

call IU( AU, 852480, AT )

call IU( AU, 852106, AT )

call IU( AU, 852487, AT )

call IU( AU, 852487, AT )

call IU( AU, 852243, AT )

call IU( AU, 852560, AT )

call IU( AU, 852231, AT )

call IU( AU, 852252, AT )

//else

// 友

call IU( AU, 852501, AT )

call IU( AU, 852225, AT )

//endif

// 任意

call IU( AU, 852092, AT )

call IU( AU, 852222, AT )

call IU( AU, 852274, AT )

call IU( AU, 852600, AT )

endfunction

private function HeroSpell takes integer id returns nothing

local unit hero = Hero[id]

local real r = DistanceBetweenUnits(hero,Htu[id])

if IS(hero) and IsUnitVisibleToEnemy(hero) then

set AB = false

if TYPE[id] == 1 then

call SO3(hero,Htu[id],false)

elseif TYPE[id] == 2 then

call SO2(hero,Htx[id],Hty[id],r)

elseif TYPE[id] == 3 then

call SO1(hero,r)

endif

endif

set hero = null

endfunction

private function GetTargetHero takes integer id returns nothing

local unit u = null

local unit WT = null

local unit hero = Hero[id]

local real HPmin = 10000000000.

local real Dismin = 10000000000.

local real HP = 0.

local real Dis = 0.

local real x = GetUnitX(hero)

local real y = GetUnitY(hero)

local group G = CreateGroup()

local player p = GetOwningPlayer(hero)

local integer OI = GetUnitCurrentOrder(hero)

call GroupEnumUnitsInRange(G,x,y,Range,null)

loop

set u = FirstOfGroup(G)

if IsUnitUseAI(u) then

set HP = GetUnitState(u,UNIT_STATE_LIFE)

if HP > 0. and IsUnitEnemy(u,p) then

if Lock == false then

set Dis = DistanceBetweenUnits(hero,u)

if Dis < Dismin then

set Dismin = Dis

set WT = u

endif

else

if HP < HPmin then

set HPmin = HP

set WT = u

endif

endif

endif

endif

call GroupRemoveUnit(G,u)

exitwhen u==null

endloop

call GroupClear(G)

call DestroyGroup(G)

if WT != null then

set Htu[id] = WT

set Htx[id] = GetUnitX(WT)

set Hty[id] = GetUnitY(WT)

if IsFree(OI) then

if not IssueTargetOrderById( hero, 851983, WT ) or TYPE[id]!=1 then

call IssuePointOrderById( hero, 851983, Htx[id], Hty[id] )

endif

endif

call HeroSpell(id)

endif

set u = null

set WT = null

set hero = null

set p = null

set G = null

endfunction

private function SetGuardPosition takes integer id returns nothing

if IsUnitVisibleToEnemy(Hero[id]) then

if GUARD[id] == false then

call RecycleGuardPosition(Hero[id])

endif

set GUARD[id] = true

else

if GUARD[id] == true then

call RemoveGuardPosition(Hero[id])

endif

set GUARD[id] = false

endif

endfunction

private function TimerLoop takes nothing returns nothing

local integer id = GetTimerId(GetExpiredTimer())

if IsUnitType(Hero[id],UNIT_TYPE_HERO)==false and GetUnitState(Hero[id],UNIT_STATE_LIFE)<=0 then

call DestroyTimer(HT[id])

call GroupRemoveUnit(AG,Hero[id])

set Hero[id] = Hero[Top]

set HT[id] = HT[Top]

set OT[id] = OT[Top]

set TYPE[id] = TYPE[Top]

set GUARD[id] = GUARD[Top]

set Hero[Top] = null

set Top = Top - 1

else

if OT[id] > 0 then

set OT[id] = OT[id] - 1

else

set LastOI[id] = 0

endif

set TYPE[id] = TYPE[id] + 1

if TYPE[id] > 3 then

set TYPE[id] = 0

endif

call SetGuardPosition(id)

call GetTargetHero(id)

endif

endfunction

private function HC takes unit u returns boolean

if IsUnitUseAI(u) /*

*/and IsUnitIllusion(u)==false /*

*/and IsUnitInGroup(u,AG)==false /*

*/and GetUnitAbilityLevel(u,'Aloc')==0/*

*/and IsUnitType(u,UNIT_TYPE_PEON)==false /*

*/and IsUnitType(u,UNIT_TYPE_STRUCTURE)==false /*

*/and IsPlayerComputer(GetOwningPlayer(u)) then

call GroupAddUnit(AG,u)

return true

endif

return false

endfunction

private function Reg takes unit u returns nothing

set Top = Top + 1

set Hero[Top] = u

set HT[Top] = CreateTimer()

set OT[Top] = 0

set TYPE[Top] = 0

set GUARD[Top] = true

call TimerStart(HT[Top],1.11,true,function TimerLoop)

endfunction

private function Trg01 takes nothing returns nothing

local unit u = GetTriggerUnit()

if HC(u) then

call Reg(u)

endif

set u = null

endfunction

private function Init takes nothing returns nothing

local unit u = null

local group g = CreateGroup()

set Range = GoldenEggAISettings_Range

set Ratio = GoldenEggAISettings_Ratio

set OnlyHero = GoldenEggAISettings_OnlyHero

set CreepAI = GoldenEggAISettings_CreepAI

set HumanAI = GoldenEggAISettings_HumanAI

set Lock = GoldenEggAISettings_Lock

set AG = CreateGroup()

set TE = CreateTrigger()

set RR = CreateRegion()

call GroupEnumUnitsInRect(g,bj_mapInitialPlayableArea,null)

loop

set u = FirstOfGroup(g)

if HC(u) then

call Reg(u)

endif

call GroupRemoveUnit(g,u)

exitwhen u==null

endloop

call GroupClear(g)

call DestroyGroup(g)

call RegionAddRect(RR,bj_mapInitialPlayableArea)

call TriggerAddAction(TE,function Trg01)

call TriggerRegisterEnterRegion(TE,RR,null)

set u = null

set g = null

endfunction

endlibrary


相關攻略秘籍

魔獸攻略秘籍閱讀排行

魔獸專題更多>

魔獸生存恐怖解密地圖合集四方陣FootmenFrenzy合集

魔獸攻略秘籍| 魔獸工具補丁| 魔獸視頻錄像| 標簽tag| 網站地圖

麻豆国产欧美一区二区三区r,久久久男人天堂,深夜在线视频,国产精品美女久久久久aⅴ
亚洲激情六月丁香| 国产精品一区二区你懂的| 国产精品乡下勾搭老头1| www.久久艹| 在线观看免费91| 日韩精品在线网站| 亚洲激情图片小说视频| 国产一区欧美日韩| 国产一区二区三区四区五区在线| 综合操久久久| 久久久美女艺术照精彩视频福利播放| 亚洲激情在线激情| 国产v综合v亚洲欧| 日韩欧美精品在线不卡 | 免费看欧美美女黄的网站| 99在线精品视频| 亚洲欧洲在线一区| 精品国产免费一区二区三区香蕉| 亚洲主播在线观看| 成人性视频免费网站| 欧美日韩另类丝袜其他| 欧美一级欧美三级| 一区二区三区四区不卡在线 | 国产 高清 精品 在线 a| 一区二区在线中文字幕电影视频| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲成人三级小说| 91免费版在线| 在线亚洲欧美专区二区| 国产精品亲子伦对白| 久久精品72免费观看| 精品国产91亚洲一区二区三区www| 欧美日韩国产综合一区二区| **网站欧美大片在线观看| 国产精品亚洲成人| 亚洲v国产v| 久久久久久免费网| 另类的小说在线视频另类成人小视频在线 | 99久久一区三区四区免费| 欧美艳星brazzers| 亚洲日本va在线观看| 成人午夜视频在线| 最新欧美日韩亚洲| 国产精品久久久久一区二区三区| 国产精品影视在线| 亚洲国产精品一区在线观看不卡| 国产丝袜在线精品| 国产老肥熟一区二区三区| 图片区小说区区亚洲五月| 国产亚洲综合性久久久影院| 狠狠色综合色综合网络| 视频一区不卡| 国产精品久久久一区麻豆最新章节| 国产精品69毛片高清亚洲| 一本一道久久a久久精品综合 | 91久久伊人青青碰碰婷婷| 欧美三级韩国三级日本三斤| 一区二区三区产品免费精品久久75| 91在线观看视频| 3atv一区二区三区| 日本在线播放一区二区三区| 免费观看国产成人| 国产丝袜美腿一区二区三区| 国产精品一二三四| 91福利在线看| 亚洲午夜久久久久久久久电影院| 国产精品theporn88| 欧美成人精品高清在线播放| 六月丁香综合在线视频| 色一情一区二区三区四区| 国产精品久久福利| 1区1区3区4区产品乱码芒果精品| 欧美一区二区福利视频| 毛片一区二区三区| 亚洲一区影院| 一区二区三区色| 国产日韩精品久久| 久久久国际精品| 成人av免费在线| 欧美一区二区三区在线观看视频| 蜜桃视频一区二区三区| 涩涩涩999| 亚洲激情第一区| 老司机精品福利在线观看| 中文字幕精品—区二区四季| 99re66热这里只有精品3直播| 日韩一区二区三区四区| 国产一区日韩二区欧美三区| 欧美三级在线视频| 日韩精品电影在线观看| 亚洲欧美成人一区| 亚洲一区二区三区四区在线免费观看 | 国产一区二区看久久| 欧美色综合网站| 免费人成精品欧美精品 | 精品国产乱码久久久久久夜甘婷婷 | 中文字幕一区二| 国产精品久久一区二区三区| 国产午夜精品久久| 91嫩草免费看| 国产婷婷色一区二区三区四区| av高清久久久| 精品av久久707| 99v久久综合狠狠综合久久| 欧美成人一区二区| av日韩在线网站| 久久久综合视频| 99热国产免费| 国产精品国产精品国产专区不蜜| 黑人另类av| 日韩理论片在线| 欧美一二三区| 亚洲成人福利片| 色偷偷成人一区二区三区91| 蜜臀av性久久久久蜜臀aⅴ流畅| 色噜噜狠狠一区二区三区果冻| 麻豆国产精品一区二区三区| 欧美日韩中文字幕一区二区| 国内精品写真在线观看| 欧美一区二区三区免费大片| 成人高清免费观看| 久久久精品影视| 国产伦精品一区二区三区四区免费| 国产精品成人免费精品自在线观看| 精品国产91亚洲一区二区三区www| 日韩欧美成人激情| 国产v日产∨综合v精品视频| 欧美大胆人体bbbb| 成人毛片老司机大片| 久久久美女毛片| 国产精品免费一区二区三区在线观看 | 欧美国产精品久久| 久久资源亚洲| 欧美国产成人精品| 欧美理论一区二区| 亚洲一卡二卡三卡四卡五卡| 亚洲精品一区二区三区蜜桃久| 亚洲高清在线视频| 欧美怡红院视频| 国产精品一区二区三区网站| 日韩欧美美女一区二区三区| 99久久久精品| 国产欧美va欧美不卡在线| 另类视频在线观看+1080p| 一级日本不卡的影视| 五月天色一区| 免费黄网站欧美| 欧美日本国产视频| 懂色av噜噜一区二区三区av| 久久婷婷色综合| 好吊色欧美一区二区三区| 有码一区二区三区| 欧洲人成人精品| 国产福利91精品一区| 欧美成人a视频| 国产精品sss| 亚洲欧洲日本在线| 色婷婷综合久久久久中文| 狠狠色综合日日| www久久精品| 精品免费一区二区三区蜜桃| 亚洲黄色小视频| 91搞黄在线观看| 懂色av一区二区在线播放| 日本一区二区三区国色天香| 蜜桃在线一区二区三区精品| 免费在线观看不卡| 欧美一级高清大全免费观看| 99久久伊人精品影院| 一区二区三区四区国产精品| 一区二区视频国产| 成人午夜视频在线| 国产精品伦理一区二区| 色婷婷综合中文久久一本| 高清成人在线观看| 亚洲男人电影天堂| 欧美在线视频日韩| 91原创国产| 亚洲h在线观看| 欧美一区二区三区白人| 国产精品区一区| 午夜天堂影视香蕉久久| 欧美一区二区免费观在线| 国产偷国产偷亚洲高清97cao| 视频一区视频二区中文| 欧美丝袜自拍制服另类| 电影午夜精品一区二区三区| 婷婷国产在线综合| 制服丝袜在线91| 国产一区二区三区四区五区在线| 久久国产精品免费| 国产日本欧美一区二区| 中国成人在线视频| 不卡的电影网站| 亚洲欧美日韩在线不卡| 欧美日韩一区国产| 国产精品v欧美精品v日韩| 无码av免费一区二区三区试看 | 一区二区视频在线观看| av电影在线观看一区|