




已阅读5页,还剩13页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
AI?jass AIjass AIjassAIjass.AIDOTA AIAI.AIF12(ModulesImport manager)Import managerFile -Import file ( - )*.ai.Modify file properties().ai?AI+ Shingo Jass Highlighter 0.41globals/ endglobalsfunction blabla takes blabla returns blabla/ endfunctionfunction main takes nothing returns nothing/Endfunction TAI, (),1RPG,AI,AI,1AI,(,),AI.AI1,2,3.4,ORC3CAI,ORC,: : : 800 ( TRUE) ( ) ( FLASE) ( TRUE) ( ) LOOP AI, ( ),DOTAT11 LV4 MP 185 LV4 MP 160 LV2 350 3700,T1_: 70% : : A= /(T) 800 ( TRUE) ( ) ( FLASE) ( TRUE) ( ) LOOP B= /(T) B _ A 242_:0.2: A 200 ( LV2 TRUE) ( ) ( FLASE) ( TRUE) LOOP A3_: LV2: 24_:0.2: B 600 ( TRUE) ( ) ( FLASE) ( TRUE) LOOP B _ A5_: : : 46_: : : B _ A B AT,TAIAI RPGAI().RPGAIBlade.dk?onlyxuyangJASS-JASSJASSTTTJASSBUGJASSJASSBUG- AI- - AIAIWE1-1()JASS0-11AI(.?).(Channel)OrderString(game cache) udg_GameCache SetupSkills.AIInitTrigExecuteFuncjass: Copy codeSetupSkillsfunction SetupSkills takes nothing returns nothinglocal string h / Create a local string variable/ Paladin / Here well initialise the Paladins skills, repeat this for all other heroesset h = UnitId2String(Hpal) / Store the returned value of UnitId2String(Hpal) in the localcall StoreInteger(udg_GameCache, h, BaseSkill1, AHhb) / One of his base skills is Holy Light, store it as BaseSkill1call StoreInteger(udg_GameCache, h, BaseSkill2, AHds) / Store Divine Shield as BaseSkill2call StoreInteger(udg_GameCache, h, BaseSkill3, AHad) / Store Devotion Aura as BaseSkill3call StoreInteger(udg_GameCache, h, UltimateSkill, AHre) / Store Resurrection as his UltimateSkill / Repeat for each Hero.endfunctionAIInitTrigfunction InitTrig_AI takes nothing returns nothinglocal integer i = 0set gg_trg_AI = CreateTrigger( )loopexitwhen i 11call TriggerRegisterPlayerEventLeave( gg_trg_AI, Player(i) )set i = i + 1endloopcall TriggerAddAction( gg_trg_AI, function PlayerLeaves )call ExecuteFunc(SetupSkills)endfunctionAIAI(timer).StartAI:()AILoopStartAI(functionendfunctionWE) :jass: Copy codefunction AILoop takes nothing returns nothingendfunctionfunction StartAI takes unit hero returns nothinglocal timer m = CreateTimer()call AttachObject(m, hero, hero)call TimerStart(m, 0, false, function AILoop)set m = nullendfunctionStartAIperiodicfalse().AIjass: Copy codefunction PlayerLeaves takes nothing returns nothinglocal player p = GetTriggerPlayer()call DisplayTextToForce(bj_FORCE_ALL_PLAYERS, GetPlayerName(p)+ has left the game.)if udg_HeroGetPlayerId(p) != null thencall StartAI(udg_HeroGetPlayerId(p)endifset p = nullendfunctionAIAI, , e5jass: Copy code:function AILoop takes nothing returns nothinglocal string a = GetAttachmentTable(GetExpiredTimer()local unit h = GetTableUnit(a, hero)local rect ilocal location rlocal real x = GetUnitX(h)local real y = GetUnitY(h)local group glocal boolexpr blocal boolexpr belocal unit flocal string o = OrderId2String(GetUnitCurrentOrder(h)local real l = GetUnitState(h, UNIT_STATE_LIFE)local real e = 5e1.5(5,).l0e1.5.if l = 0 thenset e = 1.5endif20%.e3.20%,if l 0 and IsPlayerEnemy(GetOwningPlayer(GetFilterUnit(), GetOwningPlayer(GetAttachedUnit(GetExpiredTimer(), hero)endfunctionelseif (o = smart) or (o = attack) or (o = patrol) or (o = move) or (o = stop) or (o = hold) or (o = null) thenset g = CreateGroup()set b = Condition(function AIFilterEnemyConditions)call GroupEnumUnitsInRange(g, x, y, 500, b)set f = FirstOfGroup(g)if f = null thenelsecall IssueTargetOrder(h, attack, f)endifcall DestroyGroup(g)call DestroyBoolExpr(b)endif,.,.,.jass: Copy codefunction AISetItem takes nothing returns nothingset bj_lastRemovedItem=GetEnumItem()endfunctionfunction AIItemFilter takes nothing returns booleanreturn IsItemVisible(GetFilterItem() and GetWidgetLife(GetFilterItem() 0endfunctionfunction AIHasEmptyInventorySlot takes unit u returns booleanreturn UnitItemInSlot(u, 0) = null or UnitItemInSlot(u, 1) = null or UnitItemInSlot(u, 2) = null or UnitItemInSlot(u, 3) = null or UnitItemInSlot(u, 4) = null or UnitItemInSlot(u, 5) = nullendfunctionif f = null thenset i = Rect(x-800, y-800, x+800, y+800)set be = Condition(function AIItemFilter)set bj_lastRemovedItem=nullcall EnumItemsInRect(i, be, function AISetItem)if bj_lastRemovedItem != null and (GetItemType(bj_lastRemovedItem) = ITEM_TYPE_POWERUP or AIHasEmptyInventorySlot(h) thencall IssueTargetOrder(h, smart, bj_lastRemovedItem)elseendifcall RemoveRect(i)call DestroyBoolExpr(be),.elseset r = GetRandomLocInRect(bj_mapInitialPlayableArea)call IssuePointOrderLoc(h, patrol, r)call RemoveLocation(r) linzefei linzefei (zi 174)108 2 50383 120 3947 2012-9-11UID101045 6181 EXP5 1445 141 1 4 1156 2007-3-14 2008-11-16 05:45 | - - PVE,RPG(/).,.,:jass: Copy codefunction AILearnSkill takes unit h, string a returns nothinglocal integer i = GetTableInt(a, LearnSkillOrder)+1if i = 1 or i = 4 or i = 8 thencall SelectHeroSkill(h, GetStoredInteger(udg_GameCache, UnitId2String(GetUnitTypeId(h), BaseSkill1)elseif i = 2 or i = 5 or i = 9 thencall SelectHeroSkill(h, GetStoredInteger(udg_GameCache, UnitId2String(GetUnitTypeId(h), BaseSkill2)elseif i = 3 or i = 7 or i = 10 thencall SelectHeroSkill(h, GetStoredInteger(udg_GameCache, UnitId2String(GetUnitTypeId(h), BaseSkill3)elseif i = 6 thencall SelectHeroSkill(h, GetStoredInteger(udg_GameCache, UnitId2String(GetUnitTypeId(h), UltimateSkill)endifcall SetTableInt(a, LearnSkillOrder, i)endfunctionif GetHeroSkillPoints(h) 0 and l 0 thencall AILearnSkill(h, a)endife:call TimerStart(GetExpiredTimer(), e, true, function AILoop):set h = nullset i = nullset r = nullset g = nullset b = nullset f = nullset be = nullAI,.,.AI,:-.-AI.-,.-AI(AI)TOPlinzefei linzefei (zi 174)108 2 50383 120 3947 2012-9-11UID101045 6181 EXP5 1445 141 1 4 1156 2007-3-14 2008-11-16 18:59 | - -2)(Threads)(AI, , AIJASS, AI EDITOR. , AI, .)AI(AI JASS), (Trigger Jass). , AI, comman.j:+ Shingo Jass Highlighter 0.41native StartThread takes code func returns nothing call StartThread(function myfunc) myfunc.6, . 6, StartThread(). , 5, ., . , .(). , ., a) (opcode), 1 b) Sleep(n), n , ., a) call StartThread(null), b) , .(StartThread().)c) , . , .d) , e) .: AIcommon.j, AI, :a) (string), I2S(), SubString()b) code, trigger, boolexpr , , (ForGroup, ): AIBlizzard.j, common.ai, AIcommon.j(, AI, )common.aicommon.jAI, AI, 2.3) (Inter-Script Communication), Jass. , , AI. . , AIAI.AI. . (integer): (command value)(data value).+ Shingo Jass Highlighter 0.41AI, common.j:native CommandAI takes player num,integer command, integer data returns nothing:player num /integer command /integer data /AIcommon.j, : AI, ,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 离婚协议书模板制作与子女抚养权变更
- 企业签订劳动合同的劳动合同续签与变更处理
- 高效节能空调系统箱涵施工与安装工程合同
- 离婚协议财产分割及专利权转让合同
- 2025年新能源行业上市公司市值增长与产业政策环境研究报告
- 2025年影视剧制片人聘用合同范本
- 2025年新能源行业绿色制造工艺标准与碳排放交易市场报告
- 2025木材采购合同
- 高校创新创业教育课程体系与实践教学互动模式研究2025年报告
- 【2025案例】合同终止协议解除劳动合同经济补偿问题
- 德邦防御性驾驶培训课件
- 煤场安全生产知识培训课件
- 客户开发思路课件
- 2025年人教版八年级地理上册全册教案
- 软骨分化关键分子机制-洞察及研究
- 2025年涉台知识竞赛试题及答案
- 黑龙江省哈尔滨市哈尔滨市第一中学校2024-2025学年度上高一期中考试语文试题
- 2025年广西壮族自治区招聘警务辅助人员考试真题及答案
- (完整版)人教八年级下册期末物理测试真题经典及解析
- GJB3206B-2022技术状态管理
- 园林养护服务公司简介范文
评论
0/150
提交评论