dota吧 关注:4,646,546贴子:155,327,124

回复:诈尸钓鱼帖:龟速直播翻新光环指南

只看楼主收藏回复

临睡前再更点吧


IP属地:山东31楼2012-07-05 23:12
回复
    不稳定电流
    A1E6/1093748022
    code:AUau 邪恶光环
    BuffID:B03X/1110455128
    这个J涉及的函数貌似如果从源头看的话多得惊人
    function M8I takes trigger t,playerunitevent M9I returns nothing
    local integer VXI=0
    loop
    call TriggerRegisterPlayerUnitEvent(t,Player(VXI),M9I,Condition(function M7I))
    set VXI=VXI+1
    exitwhen VXI==16
    endloop
    endfunction
    function M7I takes nothing returns boolean
    return true
    endfunction
    这两个函数的作用是给触发器注册任意单位事件。在触发器里单位事件分任意单位事件(其实也就是所有玩家的单位事件都注册一遍),指定玩家单位事件和指定单位事件。
    function Z91 takes nothing returns nothing
    local trigger t=CreateTrigger()
    call M8I(t,EVENT_PLAYER_HERO_SKILL)
    call TriggerAddCondition(t,Condition(function DU4))
    set t=null
    endfunction
    function DU4 takes nothing returns boolean
    if GetLearnedSkill()==1093748022 and GetUnitAbilityLevel(GetTriggerUnit(),1093748022)==1 and IsUnitIllusion(GetTriggerUnit())==false then
    call DQ4()
    endif
    return false
    endfunction
    注册一个任意单位学习技能事件,条件为非幻象学习1级不稳定电流的触发器
    function DQ4 takes nothing returns nothing
    local unit JTI=GetTriggerUnit()
    local trigger t=CreateTrigger()
    local integer XII=GetHandleId(t)
    call M8I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t,Condition(function DP4))
    call SaveUnitHandle(HY,(XII),(2),(JTI))
    set JTI=null
    set t=null
    endfunction
    function DP4 takes nothing returns boolean
    local trigger t=GetTriggeringTrigger()
    local integer XII=GetHandleId(t)
    local unit JTI=(LoadUnitHandle(HY,(XII),(2)))
    local integer YRI
    if GetSpellTargetUnit()==JTI and DS4(GetSpellAbilityId())==true and IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(JTI))==false and IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)==true then
    set YRI=GetUnitAbilityLevel(JTI,1093748022)
    call DR4(JTI,JTI,GetTriggerUnit(),YRI)
    endif
    set t=null
    set JTI=null
    return false
    endfunction
    function DR4 takes unit YPI,unit JTI,unit JRI,integer YRI returns nothing
    local unit P4I=CreateUnit(GetOwningPlayer(YPI),1697656901,GetUnitX(JTI),GetUnitY(JTI),0)
    call MLI(P4I,1093747019)
    call SetUnitAbilityLevel(P4I,1093747019,YRI)
    call IssueTargetOrder(P4I,"chainlightning",JRI)
    call MLI(P4I,1093744708)
    call SetUnitAbilityLevel(P4I,1093744708,YRI)
    call IssueTargetOrder(P4I,"purge",JRI)
    set P4I=null
    endfunction
    function MLI takes unit X9I,integer MMI returns nothing
    call UnitAddAbility(X9I,MMI)
    call UnitMakeAbilityPermanent(X9I,true,MMI)
    endfunction
    注册一个触发器。任意单位发动技能效果事件;条件为施法目标为之前学习技能的单位、施法者不是同盟或单位所有者、施法者是英雄;动作是创造一个傀儡单位添加闪电链、净化技能并设置永久性,设置技能等级,对触发单位(即施法者)发布闪电链、净化命令。
    


    IP属地:山东32楼2012-07-05 23:49
    回复
      2025-08-10 09:55:01
      广告
      不感兴趣
      开通SVIP免广告
      我擦,没想到一个看起来这么简单的技能IF用了这么多函数这就是运行效率高的原因吗?


      IP属地:山东33楼2012-07-05 23:51
      回复
        25楼遗留问题的解释:
        function JSI takes unit JTI,unit JRI,integer JPI,real JQI returns nothing
        if JPI==0 then
        return
        endif
        if JPI==1 then
        call UnitDamageTarget(JTI,JRI,JQI,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
        elseif JPI==2 then
        call UnitDamageTarget(JTI,JRI,JQI,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
        elseif JPI==3 then
        call UnitDamageTarget(JTI,JRI,JQI,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
        elseif JPI==4 then
        call UnitDamageTarget(JTI,JRI,JQI,true,true,ATTACK_TYPE_PIERCE,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
        elseif JPI==5 then
        call UnitDamageTarget(JTI,JRI,JQI,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
        endif
        endfunction
        其实3、1、2也就是英雄攻击魔法伤害、普通攻击火焰伤害和英雄攻击普通伤害,对魔免、虚无都有伤害,而且高护甲、高魔抗也可以有足够的致死伤害。


        IP属地:山东34楼2012-07-05 23:54
        收起回复
          略懂一点…敲碗等更


          IP属地:广西来自掌上百度35楼2012-07-06 07:53
          回复
            参见楼主


            IP属地:浙江来自Android客户端36楼2012-07-06 09:33
            回复
              另外得补一下NEC竭心光环的前置函数,之前忽略了
              function FP1 takes nothing returns nothing
              local trigger t=CreateTrigger()
              call M8I(t,EVENT_PLAYER_HERO_SKILL)
              call TriggerAddCondition(t,Condition(function OL4))
              set t=null
              endfunction
              function OL4 takes nothing returns boolean
              if GetLearnedSkill()==1093677390 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093677390)==1 then
              call OK4()
              endif
              return false
              endfunction
              看过M8I函数的解释的童鞋应该知道了这其实就是注册了个任意单位学习技能的触发
              另外其实FP1也并不是真正的发端,有兴趣的可以接着向上搜索会看到真正的起始函数,大概也就一二百行吧
              


              IP属地:山东37楼2012-07-06 09:36
              回复
                神行太保
                A0ES 1093682515
                code:AUau 邪恶光环
                擦,一开始就误入歧途了不知道IF出于什么蛋疼目的,竟然在一个长的令人发指的函数里加上了技能ID不是神行太保的判断,可混蛋触发器的事件明明是发动技能效果啊,被动技能你给我发动技能效果啊
                


                IP属地:山东38楼2012-07-06 10:04
                回复
                  2025-08-10 09:49:01
                  广告
                  不感兴趣
                  开通SVIP免广告



                  IP属地:江苏来自掌上百度40楼2012-07-06 10:24
                  回复
                    为了方便起见先把技能的SLK数据全列出来算了
                    夜晚中的狩猎者
                    S00A 1395667009
                    code:AOae 耐久光环
                    buffID:B02L 1110454860
                    900范围,仅对自己有效
                    瘟疫
                    A15K 1093743947
                    code:AOae 耐久光环
                    buffID:B0AI
                    air,enemies,ground,her0,invulnerable,vulnerable 空中地面,敌人,英雄,无敌的,可攻击的
                    野性驱使
                    A03E
                    AOae 耐久光环
                    player,self 玩家单位,自己 Roshan Aura(名字没汉化,就是肉山光环)
                    A142
                    AHad专注光环
                    buffID:B0A9
                    最后遗言
                    A0MC
                    AOae 耐久光环
                    air,enemies,ground,her0,invulnerable,vulnerable
                    buffID:B05V
                    施虐之心
                    A060
                    AHab辉煌光环
                    self
                    buffID:B02R
                    精气光环
                    A0IF
                    AOae 耐久光环
                    air,friend,ground,her0,invulnerable,self,vulnerable
                    buffID:B06X
                    并列
                    A0DB
                    AHab辉煌光环
                    self
                    buffID:B03B
                    地精的贪婪
                    A0O3
                    AHab辉煌光环
                    self
                    buffID:B00X
                    反击
                    A00V
                    AEah荆棘光环
                    self
                    buffID:B00M
                    反击螺旋
                    A0C6
                    AHab辉煌光环(数值是0.01~)
                    buffID: B03P
                    风行者
                    A14I
                    集中火力
                    A1D6
                    寒冰之墙
                    A0VP
                    幽灵漫步
                    A0XL
                    黑洞
                    A0BY
                    跳跃
                    A0LN
                    追踪术
                    A0B4
                    织网
                    A0BG
                    极度饥渴
                    A0WQ
                    暗影之舞
                    A1IN
                    幽鬼之刃
                    A0HW
                    幽灵船
                    A11K
                    长大!
                    A0CY
                    神之力量
                    A1WH
                    酸性喷雾
                    A0IL
                    战意
                    A0FV
                    焦土
                    A1OP
                    嗥叫
                    A0ZF
                    变狼
                    A093
                    腐烂
                    A06K
                    剩下的就基本都是看J了。既然现在没人看,就到此为止了


                    IP属地:山东41楼2012-07-06 11:18
                    回复
                      夜晚中的狩猎者(学习)
                      A086 1093679158
                      code:ANcl 通魔
                      夜晚中的狩猎者(真技能)
                      1395667009
                      code:AOae 耐久光环
                      buffID:B02L 1110454860
                      900范围,仅对自己有效
                      S00A
                      以下函数对暗夜魔王的3个技能都有影响
                      function B94 takes nothing returns nothing
                      local integer XII=GetHandleId(GetTriggerUnit())
                      local trigger t
                      if((LoadBoolean(HY,(XII),(306)))==false)then
                      call SaveBoolean(HY,(XII),(306),(true))
                      set t=CreateTrigger()
                      call TriggerRegisterTimerEventPeriodic(t,2.00)
                      call TriggerRegisterGameStateEventTimeOfDay(t,LESS_THAN,6.00)
                      call TriggerRegisterGameStateEventTimeOfDay(t,GREATER_THAN,18.00)
                      call TriggerAddAction(t,function B84)
                      call SaveUnitHandle(HY,(GetHandleId(t)),(304),(GetTriggerUnit()))
                      set t=CreateTrigger()
                      set XII=GetHandleId(t)
                      call TriggerRegisterTimerEvent(t,0.5,true)
                      call TriggerAddCondition(t,Condition(function B54))
                      call SaveUnitHandle(HY,(XII),(304),(GetTriggerUnit()))
                      call SaveUnitHandle(HY,(XII),(305),(CreateUnit(GetOwningPlayer(GetTriggerUnit()),1865429313,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0)))
                      endif
                      if(GetLearnedSkill()==1093679158)then
                      call MLI(GetTriggerUnit(),1395667009)
                      if(KBI())then
                      call SetUnitAbilityLevel(GetTriggerUnit(),1395667009,5)
                      else
                      call SetUnitAbilityLevel(GetTriggerUnit(),1395667009,GetUnitAbilityLevel(GetTriggerUnit(),1093679158))
                      endif
                      endif
                      if(GetLearnedSkill()==1093679173)then
                      call UnitAddAbility(GetTriggerUnit(),1093679171)
                      if(KBI())then
                      call SetUnitAbilityLevel(GetTriggerUnit(),1093679171,5)
                      else
                      call SetUnitAbilityLevel(GetTriggerUnit(),1093679171,GetUnitAbilityLevel(GetTriggerUnit(),1093679173))
                      endif
                      endif
                      endfunction
                      function MLI takes unit X9I,integer MMI returns nothing
                      call UnitAddAbility(X9I,MMI)
                      call UnitMakeAbilityPermanent(X9I,true,MMI)
                      endfunction
                      function KBI takes nothing returns boolean
                      if(GetTimeOfDay()>6.00 and GetTimeOfDay()<18.00)then
                      return true
                      else
                      return false
                      endif
                      endfunction
                      function B84 takes nothing returns nothing
                      local integer XII=GetHandleId(GetTriggeringTrigger())
                      local unit B64=(LoadUnitHandle(HY,(XII),(304)))
                      if B64!=null and KBI()and MNI(B64)==false then
                      call UnitRemoveAbility(B64,1093742902)
                      call UnitRemoveAbility(B64,1093742903)
                      call SetUnitAbilityLevel(B64,1395667009,5)
                      call SetUnitAbilityLevel(B64,1093679171,5)
                      elseif B64!=null and KBI()==false and MNI(B64)==false then
                      call MLI(B64,1093742902)
                      call MLI(B64,1093742903)
                      call SetUnitAbilityLevel(B64,1395667009,GetUnitAbilityLevel(B64,1093679158))
                      call SetUnitAbilityLevel(B64,1093679171,GetUnitAbilityLevel(B64,1093679173))
                      endif
                      endfunction
                      简单来说基础技能是个通魔,学习技能后添加一个耐久光环,在6-18点设为5级,其他时间设为通魔等级。奇怪的是SLK里IF貌似只给这个技能设置3个等级的数据,第四级内容就是空了,第五级则连表头都没有还是不太懂SLK啊


                      IP属地:山东42楼2012-07-06 21:52
                      回复
                        精品?!!!必须后排


                        来自手机贴吧43楼2012-07-06 21:55
                        回复
                          目测很多内容啊...
                          这东西做起来烦死了的说,静候玉米完成巨坑了。


                          IP属地:美国44楼2012-07-07 22:52
                          收起回复
                            瘟疫的J发出来看看吧


                            IP属地:重庆45楼2012-07-16 11:13
                            回复
                              2025-08-10 09:43:01
                              广告
                              不感兴趣
                              开通SVIP免广告
                              好久没看了~很多还有我半成品的注解
                              瘟疫
                              A15K 1093743947
                              code:AOae 耐久光环
                              buffID:B0AI
                              数值-0.09
                              血肉傀儡
                              A15J 1093743946
                              function ZT1 takes nothing returns nothing
                              local trigger t=CreateTrigger()
                              call M8I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
                              call TriggerAddCondition(t,Condition(function L63))
                              call KWI(1093743947)
                              set t=null
                              endfunction
                              function KWI takes integer KXI returns nothing
                              local unit u=CreateUnit(Player(15),1211117657,0,0,270)
                              call UnitAddAbility(u,KXI)
                              call UnitRemoveAbility(u,KXI)
                              call RemoveUnit(u)
                              set u=null
                              endfunction
                              又是注册任意单位发动技能效果事件,同时让傀儡单位预加载技能
                              function L63 takes nothing returns boolean
                              if GetSpellAbilityId()==1093743946 and GetUnitTypeId(GetTriggerUnit())==1211117650 then
                              call L53()
                              endif
                              return false
                              endfunction
                              function L53 takes nothing returns nothing
                              local unit JTI=GetTriggerUnit()
                              local trigger t1=CreateTrigger()
                              local integer YF2=GetHandleId(t1)
                              local trigger t2=CreateTrigger()
                              local integer BBO=GetHandleId(t2)
                              local trigger t3=CreateTrigger()
                              local integer K63=GetHandleId(t3)
                              local integer YRI=GetUnitAbilityLevel(JTI,1093743946)
                              set CUI=YRI
                              call TriggerRegisterUnitInRange(t1,JTI,750,Condition(function VPI))
                              call TriggerAddCondition(t1,Condition(function L43))
                              call SaveTriggerHandle(HY,(YF2),(275),(t2))
                              call SaveUnitHandle(HY,(YF2),(2),(JTI))
                              call TriggerRegisterTimerEvent(t2,30,false)
                              call TriggerRegisterUnitEvent(t2,JTI,EVENT_UNIT_DEATH)
                              call TriggerAddCondition(t2,Condition(function L23))
                              call SaveTriggerHandle(HY,(BBO),(274),(t1))
                              call SaveUnitHandle(HY,(BBO),(2),(JTI))
                              call SaveBoolean(HY,(BBO),(273),(false))
                              call TriggerRegisterTimerEvent(t3,0.01,false)
                              call TriggerAddCondition(t3,Condition(function L13))
                              call SaveUnitHandle(HY,(K63),(2),(JTI))
                              set JTI=null
                              set t1=null
                              set t2=null
                              set t3=null
                              endfunction
                              注册3个触发器,触发器的大部分内容在下文的函数里,除了给t2注册30秒时间事件、单位死亡事件(尸王死亡)
                              function VPI takes nothing returns boolean
                              return true
                              endfunction
                              function L43 takes nothing returns boolean
                              local trigger t1=GetTriggeringTrigger()
                              local integer YF2=GetHandleId(t1)
                              local trigger t2=(LoadTriggerHandle(HY,(YF2),(275)))
                              local integer BBO=GetHandleId(t2)
                              local unit JRI=GetTriggerUnit()
                              local unit JTI=(LoadUnitHandle(HY,(YF2),(2)))
                              if IsUnitEnemy(JTI,GetOwningPlayer(JRI))==true and IsUnitType(JRI,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(JRI,1093678162)==0 then
                              if(LoadBoolean(HY,(BBO),(GetHandleId(JRI))))==false then
                              call TriggerRegisterUnitEvent(t2,JRI,EVENT_UNIT_DAMAGED)
                              call TriggerRegisterUnitEvent(t2,JRI,EVENT_UNIT_DEATH)
                              call SaveBoolean(HY,(BBO),(GetHandleId(JRI)),(true))
                              endif
                              endif
                              set t1=null
                              set t2=null
                              set JRI=null
                              set JTI=null
                              return false
                              endfunction
                              t1的实际功能,进入尸王750范围内的单位进过判断是敌人、不是建筑、没有标记技能A04R(免疫触发的那个技能)以后注册被伤害事件、死亡事件到t2


                              IP属地:山东46楼2012-07-16 11:23
                              回复