我想把刚刚上面那个技能的J文件里面的代码加到
这个脚本里去~看这个脚本`
1.globals为变量声明部分
下面的是globals的内容
unit udg_MonkUnitMH=null
player udg_PlayerTIDD=null
location udg_PointA=null
unit udg_UnitsSelectA=null
unit array udg_ZhiZunREU1
integer udg_ZhiZunRCC1=0
effect array udg_ZhiZunRTeX1
boolean udg_ZhiZunRBool1=false
boolean udg_ZhiZunRBool2=false
integer udg_ZhiZunRCC2=0
unit array udg_ZhiZunREU2
lightning array udg_ZhiZunRTeX2
integer udg_HeroCounterC=0
effect udg_StartBagO=null
texttag udg_FloatWordM=null
trigger gg_trg_MyheroSetLeft=null
trigger gg_trg_MyheroSetRight=null
trigger gg_trg_MyheroSetUp=null
trigger gg_trg_MyheroSetDown=null
trigger gg_trg_HeroGetWeaponAblity=null
trigger gg_trg_WuJiGunA01=null
trigger gg_trg_WuJiGunD01=null
trigger gg_trg_ZhiZunRA01=null
trigger gg_trg_ZhiZunRD01=null
trigger gg_trg_ZhiZunRA11=null
trigger gg_trg_ZhiZunRA12=null
trigger gg_trg_GetAnyWhereM=null
trigger gg_trg_RemoveWeaponAblity=null
2.function为用户自定义触发器的注册
下面是function的内容
function Trig_MyheroSetLeft_Actions takes nothing returns nothing
call EnableTrigger(gg_trg_MyheroSetRight)
call TriggerSleepAction(0.50)
call DisableTrigger(gg_trg_MyheroSetRight)
endfunction
function Trig_MyheroSetRight_Actions takes nothing returns nothing
call EnableTrigger(gg_trg_MyheroSetUp)
call TriggerSleepAction(0.50)
call DisableTrigger(gg_trg_MyheroSetUp)
endfunction
function Trig_MyheroSetUp_Actions takes nothing returns nothing
call EnableTrigger(gg_trg_MyheroSetDown)
call TriggerSleepAction(0.50)
call DisableTrigger(gg_trg_MyheroSetDown)
endfunction
function Trig_MyheroSetDown_Actions takes nothing returns nothing
set udg_PlayerTIDD=GetTriggerPlayer()
set udg_ZhiZunRBool1=true
set udg_ZhiZunRBool2=true
set udg_HeroCounterC=0
call EnableTrigger(gg_trg_HeroGetWeaponAblity)
endfunction
//上面四个为对键盘输入上下左右响应的注册
function Trig_HeroGetWeaponAblity_Conditions takes nothing returns boolean
return ((GetOwningPlayer(GetTriggerUnit())==udg_PlayerTIDD))and((IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)))
endfunction
//这个为输入上下左右后点击英雄的响应注册
function Trig_HeroGetWeaponAblity_Actions takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
set udg_MonkUnitMH=GetTriggerUnit()
call PauseUnit(udg_MonkUnitMH,true)
call SetUnitInvulnerable(udg_MonkUnitMH,true)
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"Abilities\\Spells\\NightElf\\Starfall\\StarfallCaster.mdl") //输对秘技后英雄身上的效果,为群星坠落效果
call CreateTextTagUnitBJ("璇哥榛勬槒",udg_MonkUnitMH,0.00,50.00,0,255.00,0,30.00) //变身时屏幕上显示的文字,为绿色的无界变幻
call RotateCameraAroundLocBJ(360.00,GetUnitLoc(GetTriggerUnit()),udg_PlayerTIDD,4.70) //变身时视角旋转360度
set udg_FloatWordM=bj_lastCreatedTextTag
set udg_StartBagO=bj_lastCreatedEffect
call TriggerSleepAction(5.00)
call ResetToGameCameraForPlayer(udg_PlayerTIDD,0)
call DestroyTextTag(udg_FloatWordM)
call DestroyEffect(udg_StartBagO)
call SetUnitVertexColorBJ(udg_MonkUnitMH,255.00,0.00,255.00,0) //变身后英雄的颜色,为紫色
call SetUnitScalePercent(udg_MonkUnitMH,110.00,110.00,110.00)
call PauseUnit(udg_MonkUnitMH,false)
call SetUnitInvulnerable(udg_MonkUnitMH,false)
call EnableTrigger(gg_trg_WuJiGunA01)
call EnableTrigger(gg_trg_ZhiZunRA01)
call EnableTrigger(gg_trg_GetAnyWhereM)
call EnableTrigger(gg_trg_WuJiGunD01)
call EnableTrigger(gg_trg_ZhiZunRD01)
call EnableTrigger(gg_trg_RemoveWeaponAblity)
endfunction
function Trig_WuJiGunA01_Conditions takes nothing returns boolean
return ((GetAttacker()==udg_MonkUnitMH))
endfunction
function Trig_WuJiGunA01_Func002Func001001002003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_WuJiGunA01_Func002Func001001002003002 takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))
endfunction
function Trig_WuJiGunA01_Func002Func001001002003 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func002Func001001002003001(),Trig_WuJiGunA01_Func002Func001001002003002())
endfunction
function Trig_WuJiGunA01_Func002Func001A takes nothing returns nothing
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl") //效果1原本为5%概率600范围随机10个敌人单位末日审判
call DestroyEffect(bj_lastCreatedEffect)
call UnitDamageTarget(GetAttacker(),GetEnumUnit(),((I2R(GetHeroAgi(GetAttacker(),true)))*GetRandomReal(2.00,5.00)),true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_WHOKNOWS) //伤害计算,英雄敏捷*随机一数(2-5范围)
call RemoveLocation(GetUnitLoc(GetEnumUnit()))
endfunction
function Trig_WuJiGunA01_Func002C takes nothing returns boolean
return ((GetRandomInt(1,100)<=5))
endfunction
function Trig_WuJiGunA01_Func004Func001001002003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_WuJiGunA01_Func004Func001001002003002 takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))
endfunction
function Trig_WuJiGunA01_Func004Func001001002003 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func004Func001001002003001(),Trig_WuJiGunA01_Func004Func001001002003002())
endfunction
function Trig_WuJiGunA01_Func004Func001A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnumUnit(),"Abilities\\Spells\\Demon\\RainOfFire\\RainOfFireTarget.mdl") //效果2为2%概率700范围随机16个敌人单位---火炎雨攻击
call DestroyEffect(bj_lastCreatedEffect)
call UnitDamageTarget(GetAttacker(),GetEnumUnit(),(((I2R(GetHeroStr(GetAttacker(),true)))+(I2R(GetHeroAgi(GetAttacker(),true)))+(I2R(GetHeroInt(GetAttacker(),true))))*GetRandomReal(10.00,20.00)),true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_WHOKNOWS) //伤害计算,英雄(力量+敏捷+智力)*随机一数(5-10)
endfunction
function Trig_WuJiGunA01_Func004C takes nothing returns boolean
return ((GetRandomInt(1,100)<=2))
endfunction
function Trig_WuJiGunA01_Func006Func001001002003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_WuJiGunA01_Func006Func001001002003002001 takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))
endfunction
function Trig_WuJiGunA01_Func006Func001001002003002002001 takes nothing returns boolean
return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!=true)
endfunction
function Trig_WuJiGunA01_Func006Func001001002003002002002 takes nothing returns boolean
return (IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)!=true)
endfunction
function Trig_WuJiGunA01_Func006Func001001002003002002 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func006Func001001002003002002001(),Trig_WuJiGunA01_Func006Func001001002003002002002())
endfunction
function Trig_WuJiGunA01_Func006Func001001002003002 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func006Func001001002003002001(),Trig_WuJiGunA01_Func006Func001001002003002002())
endfunction
function Trig_WuJiGunA01_Func006Func001001002003 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func006Func001001002003001(),Trig_WuJiGunA01_Func006Func001001002003002())
endfunction
function Trig_WuJiGunA01_Func006Func001A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetEnumUnit(),"Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl") // 效果3为0%概率500范围随机4个敌人单位----黑暗召唤
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitOwner(GetEnumUnit(),GetOwningPlayer(GetAttacker()),false)
call SetUnitVertexColorBJ(GetEnumUnit(),255.00,0.00,255.00,0) //召唤的单位移动速度变成500颜色变成紫色
call SetUnitMoveSpeed(GetEnumUnit(),500.00)
endfunction
function Trig_WuJiGunA01_Func006C takes nothing returns boolean
return ((GetRandomInt(1,100)<=10)) //机率为20%
endfunction
function Trig_WuJiGunA01_Func008Func001001002003001 takes nothing returns boolean
return (IsUnitDeadBJ(GetFilterUnit()))
endfunction
function Trig_WuJiGunA01_Func008Func001001002003002 takes nothing returns boolean
return (IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)
endfunction
function Trig_WuJiGunA01_Func008Func001001002003 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func008Func001001002003001(),Trig_WuJiGunA01_Func008Func001001002003002())
endfunction
function Trig_WuJiGunA01_Func008Func001Func009001003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_WuJiGunA01_Func008Func001Func009001003002 takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetAttacker())))
endfunction
function Trig_WuJiGunA01_Func008Func001Func009001003 takes nothing returns boolean
return GetBooleanAnd(Trig_WuJiGunA01_Func008Func001Func009001003001(),Trig_WuJiGunA01_Func008Func001Func009001003002())
endfunction
function Trig_WuJiGunA01_Func008Func001Func009A takes nothing returns nothing
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl") //效果4为8%概率700范围随机10个尸体------尸体爆炸,为效果为雷霆一击,现改为霜冻新星
call DestroyEffect(bj_lastCreatedEffect)
call UnitDamageTarget(GetAttacker(),GetEnumUnit(),((I2R(GetHeroInt(GetAttacker(),true)))*GetRandomReal(1.00,5.00)),true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_WHOKNOWS) //伤害计算,距离尸体200范围内受到伤害=英雄智力*随机一数(1--5)
call RemoveLocation(GetUnitLoc(GetEnumUnit()))
endfunction
function Trig_WuJiGunA01_Func008Func001A takes nothing returns nothing
set udg_UnitsSelectA=GetEnumUnit()
set udg_PointA=GetUnitLoc(udg_UnitsSelectA)
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl") //这三个为尸体爆炸的效果,现改为雷和火
call DestroyEffect(bj_lastCreatedEffect)
call ForGroupBJ(GetUnitsInRangeOfLocMatching(200.00,udg_PointA,Condition(function Trig_WuJiGunA01_Func008Func001Func009001003)),function Trig_WuJiGunA01_Func008Func001Func009A)
call RemoveUnit(udg_UnitsSelectA)
call RemoveLocation(udg_PointA)
endfunction
function Trig_WuJiGunA01_Func008C takes nothing returns boolean
return ((GetRandomInt(1,100)<=8)) //尸体爆炸机率为8%
endfunction
function Trig_WuJiGunA01_Actions takes nothing returns nothing
if (Trig_WuJiGunA01_Func002C()) then
call ForGroupBJ(GetRandomSubGroup(10,GetUnitsInRangeOfLocMatching(600.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_WuJiGunA01_Func002Func001001002003))),function Trig_WuJiGunA01_Func002Func001A)
call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
return
endif
if (Trig_WuJiGunA01_Func004C()) then
call ForGroupBJ(GetRandomSubGroup(16,GetUnitsInRangeOfLocMatching(700.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_WuJiGunA01_Func004Func001001002003))),function Trig_WuJiGunA01_Func004Func001A)
call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
return
endif
if (Trig_WuJiGunA01_Func006C()) then
call ForGroupBJ(GetRandomSubGroup(4,GetUnitsInRangeOfLocMatching(500.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_WuJiGunA01_Func006Func001001002003))),function Trig_WuJiGunA01_Func006Func001A)
call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
return
endif
if (Trig_WuJiGunA01_Func008C()) then
call ForGroupBJ(GetRandomSubGroup(10,GetUnitsInRangeOfLocMatching(700.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_WuJiGunA01_Func008Func001001002003))),function Trig_WuJiGunA01_Func008Func001A)
call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
return
endif
endfunction
function Trig_WuJiGunD01_Func004C takes nothing returns boolean
return ((GetKillingUnit()==udg_MonkUnitMH))and((IsUnitEnemy(GetTriggerUnit(),udg_PlayerTIDD)))and((GetRandomInt(1,100)<=40)) //效果5为 4%概率杀死敌人获得力/敏/智增加5点
endfunction
function Trig_WuJiGunD01_Conditions takes nothing returns boolean
return (Trig_WuJiGunD01_Func004C())
endfunction
function Trig_WuJiGunD01_Actions takes nothing returns nothing
call ModifyHeroStat(0,GetKillingUnit(),0,5)
call ModifyHeroStat(1,GetKillingUnit(),0,5)
call ModifyHeroStat(2,GetKillingUnit(),0,5) //三围各加5
endfunction
function Trig_ZhiZunRA01_Conditions takes nothing returns boolean
return ((GetTriggerUnit()==udg_MonkUnitMH))
endfunction
function Trig_ZhiZunRA01_Func002C takes nothing returns boolean
return ((GetUnitLifePercent(udg_MonkUnitMH)<=10))and((GetRandomInt(1,10)==1))
endfunction
function Trig_ZhiZunRA01_Func004Func003001003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_ZhiZunRA01_Func004Func003001003002 takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_ZhiZunRA01_Func004Func003001003 takes nothing returns boolean
return GetBooleanAnd(Trig_ZhiZunRA01_Func004Func003001003001(),Trig_ZhiZunRA01_Func004Func003001003002())
endfunction
function Trig_ZhiZunRA01_Func004Func003A takes nothing returns nothing
set udg_ZhiZunRCC1=(udg_ZhiZunRCC1+1)
set udg_ZhiZunREU1[udg_ZhiZunRCC1]=GetEnumUnit()
call PauseUnit(GetEnumUnit(),true)
set udg_ZhiZunRTeX1[udg_ZhiZunRCC1]=AddSpecialEffectLocBJ(GetUnitLoc(GetEnumUnit()),"Abilities\\Spells\\NightElf\\EntanglingRoots\\EntanglingRootsTarget.mdl") //效果1为受到攻击2%概率对600范围内所有敌人释放缠绕须根--无法攻击移动5秒
call RemoveLocation(GetUnitLoc(GetEnumUnit()))
endfunction
function Trig_ZhiZunRA01_Func004C takes nothing returns boolean
return ((GetRandomInt(1,100)<=2))and((udg_ZhiZunRBool1)) //效果1的机率为2%
endfunction
function Trig_ZhiZunRA01_Func006Func003001003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))
endfunction
function Trig_ZhiZunRA01_Func006Func003001003002 takes nothing returns boolean
return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function Trig_ZhiZunRA01_Func006Func003001003 takes nothing returns boolean
return GetBooleanAnd(Trig_ZhiZunRA01_Func006Func003001003001(),Trig_ZhiZunRA01_Func006Func003001003002())
endfunction
function Trig_ZhiZunRA01_Func006Func003A takes nothing returns nothing
set udg_ZhiZunRCC2=(udg_ZhiZunRCC2+1)
set udg_ZhiZunREU2[udg_ZhiZunRCC2]=GetEnumUnit()
call PauseUnit(GetEnumUnit(),true)
set udg_ZhiZunRTeX2[udg_ZhiZunRCC2]=AddLightningLoc("LEAS",GetUnitLoc(GetTriggerUnit()),GetUnitLoc(GetEnumUnit())) //效果2为受到攻击3%概率对710范围内所有敌人释放魔法镣铐--瞬间打断敌人攻击移动
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),((I2R(GetHeroAgi(GetTriggerUnit(),true)))*GetRandomReal(2.00,5.00)),true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_WHOKNOWS) //伤害计算为英雄等级*英雄敏捷*随机一数(2-5)
call RemoveLocation(GetUnitLoc(GetEnumUnit()))
endfunction
function Trig_ZhiZunRA01_Func006C takes nothing returns boolean
return ((GetRandomInt(1,100)<=3))and((udg_ZhiZunRBool2)) //效果2的机率为3%
endfunction
function Trig_ZhiZunRA01_Actions takes nothing returns nothing
if (Trig_ZhiZunRA01_Func002C()) then
call SetUnitInvulnerable(udg_MonkUnitMH,true)
call AddSpecialEffectTargetUnitBJ("origin",udg_MonkUnitMH,"Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl") //效果3为英雄生命低于10%时候10%概率释放鬼降无敌一秒
call DestroyEffect(bj_lastCreatedEffect)
call TriggerSleepAction(1.00)
call SetUnitLifePercentBJ(udg_MonkUnitMH,100)
call SetUnitInvulnerable(udg_MonkUnitMH,false)
endif
if (Trig_ZhiZunRA01_Func004C()) then
set udg_ZhiZunRBool1=false
set udg_ZhiZunRCC1=0
call ForGroupBJ(GetUnitsInRangeOfLocMatching(600.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_ZhiZunRA01_Func004Func003001003)),function Trig_ZhiZunRA01_Func004Func003A)
call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
call TriggerSleepAction(2.00)
call TriggerExecute(gg_trg_ZhiZunRA11)
return
endif
if (Trig_ZhiZunRA01_Func006C()) then
set udg_ZhiZunRBool2=false
set udg_ZhiZunRCC2=0
call ForGroupBJ(GetUnitsInRangeOfLocMatching(710.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_ZhiZunRA01_Func006Func003001003)),function Trig_ZhiZunRA01_Func006Func003A)
call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
call TriggerSleepAction(0.30)
call TriggerExecute(gg_trg_ZhiZunRA12)
endif
endfunction
function Trig_ZhiZunRD01_Conditions takes nothing returns boolean
return ((GetTriggerUnit()==udg_MonkUnitMH))
endfunction
function Trig_ZhiZunRD01_Actions takes nothing returns nothing //效果4为英雄死亡,复活后三维属性力/敏/智各增加30点
call ModifyHeroStat(0,GetTriggerUnit(),0,30)
call ModifyHeroStat(1,GetTriggerUnit(),0,30)
call ModifyHeroStat(2,GetTriggerUnit(),0,30)
endfunction
function Trig_ZhiZunRA11_Actions takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=udg_ZhiZunRCC1
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(udg_ZhiZunREU1[bj_forLoopAIndex],false)
call DestroyEffect(udg_ZhiZunRTeX1[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_ZhiZunRBool1=true
call DisableTrigger(GetTriggeringTrigger())
endfunction
function Trig_ZhiZunRA12_Actions takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=udg_ZhiZunRCC2
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call DestroyLightning(udg_ZhiZunRTeX2[bj_forLoopAIndex])
call PauseUnit(udg_ZhiZunREU2[bj_forLoopAIndex],false)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set udg_ZhiZunRBool2=true
call DisableTrigger(GetTriggeringTrigger())
endfunction
function Trig_GetAnyWhereM_Conditions takes nothing returns boolean
return ((GetTriggerUnit()==udg_MonkUnitMH))and((GetIssuedOrderId()==String2OrderIdBJ("patrol")))
endfunction
function Trig_GetAnyWhereM_Actions takes nothing returns nothing
call SetUnitPositionLoc(GetTriggerUnit(),GetOrderPointLoc())
endfunction
function Trig_RemoveWeaponAblity_Conditions takes nothing returns boolean
return ((GetTriggerPlayer()==udg_PlayerTIDD))
endfunction
function Trig_RemoveWeaponAblity_Actions takes nothing returns nothing
call DisableTrigger(gg_trg_GetAnyWhereM)
call DisableTrigger(gg_trg_WuJiGunA01)
call DisableTrigger(gg_trg_WuJiGunD01)
call DisableTrigger(gg_trg_ZhiZunRA01)
call DisableTrigger(gg_trg_ZhiZunRD01)
call SetUnitVertexColorBJ(udg_MonkUnitMH,100.00,100.00,100.00,0)
call SetUnitScalePercent(udg_MonkUnitMH,100.00,100.00,100.00)
call DisableTrigger(GetTriggeringTrigger())
endfunction
3.主函数main
set gg_trg_MyheroSetLeft=CreateTrigger() //下面为开启秘技的方法,上左下右
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(0),0,3) //0,3为上
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(1),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(2),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(3),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(4),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(5),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(6),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(7),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(8),0,3)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetLeft,Player(9),0,3)
call TriggerAddAction(gg_trg_MyheroSetLeft,function Trig_MyheroSetLeft_Actions)
set gg_trg_MyheroSetRight=CreateTrigger()
call DisableTrigger(gg_trg_MyheroSetRight)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(0),0,0) //0,0为左
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(1),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(2),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(3),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(4),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(5),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(6),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(7),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(8),0,0)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetRight,Player(9),0,0)
call TriggerAddAction(gg_trg_MyheroSetRight,function Trig_MyheroSetRight_Actions)
set gg_trg_MyheroSetUp=CreateTrigger()
call DisableTrigger(gg_trg_MyheroSetUp)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(0),0,2) //0,2为下
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(1),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(2),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(3),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(4),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(5),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(6),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(7),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(8),0,2)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetUp,Player(9),0,2)
call TriggerAddAction(gg_trg_MyheroSetUp,function Trig_MyheroSetUp_Actions)
set gg_trg_MyheroSetDown=CreateTrigger()
call DisableTrigger(gg_trg_MyheroSetDown)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(0),0,1) //0,1为右
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(1),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(2),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(3),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(4),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(5),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(6),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(7),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(8),0,1)
call TriggerRegisterPlayerKeyEventBJ(gg_trg_MyheroSetDown,Player(9),0,1)
call TriggerAddAction(gg_trg_MyheroSetDown,function Trig_MyheroSetDown_Actions)
set gg_trg_HeroGetWeaponAblity=CreateTrigger()
call DisableTrigger(gg_trg_HeroGetWeaponAblity)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(0),true) //输对后再点击英雄
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(1),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(2),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(3),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(4),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(5),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(6),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(7),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(8),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(9),true)
call TriggerRegisterPlayerSelectionEventBJ(gg_trg_HeroGetWeaponAblity,Player(10),true)
call TriggerAddCondition(gg_trg_HeroGetWeaponAblity,Condition(function Trig_HeroGetWeaponAblity_Conditions))
call TriggerAddAction(gg_trg_HeroGetWeaponAblity,function Trig_HeroGetWeaponAblity_Actions)
set gg_trg_WuJiGunA01=CreateTrigger()
call DisableTrigger(gg_trg_WuJiGunA01)
call TriggerRegisterAnyUnitEventBJ(gg_trg_WuJiGunA01,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_WuJiGunA01,Condition(function Trig_WuJiGunA01_Conditions))
call TriggerAddAction(gg_trg_WuJiGunA01,function Trig_WuJiGunA01_Actions)
set gg_trg_WuJiGunD01=CreateTrigger()
call DisableTrigger(gg_trg_WuJiGunD01)
call TriggerRegisterAnyUnitEventBJ(gg_trg_WuJiGunD01,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_WuJiGunD01,Condition(function Trig_WuJiGunD01_Conditions))
call TriggerAddAction(gg_trg_WuJiGunD01,function Trig_WuJiGunD01_Actions)
set gg_trg_ZhiZunRA01=CreateTrigger()
call DisableTrigger(gg_trg_ZhiZunRA01)
call TriggerRegisterAnyUnitEventBJ(gg_trg_ZhiZunRA01,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_ZhiZunRA01,Condition(function Trig_ZhiZunRA01_Conditions))
call TriggerAddAction(gg_trg_ZhiZunRA01,function Trig_ZhiZunRA01_Actions)
set gg_trg_ZhiZunRD01=CreateTrigger()
call DisableTrigger(gg_trg_ZhiZunRD01)
call TriggerRegisterAnyUnitEventBJ(gg_trg_ZhiZunRD01,EVENT_PLAYER_UNIT_DEATH)
call TriggerAddCondition(gg_trg_ZhiZunRD01,Condition(function Trig_ZhiZunRD01_Conditions))
call TriggerAddAction(gg_trg_ZhiZunRD01,function Trig_ZhiZunRD01_Actions)
set gg_trg_ZhiZunRA11=CreateTrigger()
call DisableTrigger(gg_trg_ZhiZunRA11)
call TriggerAddAction(gg_trg_ZhiZunRA11,function Trig_ZhiZunRA11_Actions)
set gg_trg_ZhiZunRA12=CreateTrigger()
call DisableTrigger(gg_trg_ZhiZunRA12)
call TriggerAddAction(gg_trg_ZhiZunRA12,function Trig_ZhiZunRA12_Actions)
set gg_trg_GetAnyWhereM=CreateTrigger()
call DisableTrigger(gg_trg_GetAnyWhereM)
call TriggerRegisterAnyUnitEventBJ(gg_trg_GetAnyWhereM,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerAddCondition(gg_trg_GetAnyWhereM,Condition(function Trig_GetAnyWhereM_Conditions))
call TriggerAddAction(gg_trg_GetAnyWhereM,function Trig_GetAnyWhereM_Actions)
set gg_trg_RemoveWeaponAblity=CreateTrigger()
call DisableTrigger(gg_trg_RemoveWeaponAblity)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(0),"鍙樺够",true) //输入变幻可以变回来
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(1),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(2),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(3),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(4),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(5),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(6),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(7),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(8),"鍙樺够",true)
call TriggerRegisterPlayerChatEvent(gg_trg_RemoveWeaponAblity,Player(9),"鍙樺够",true)
call TriggerAddCondition(gg_trg_RemoveWeaponAblity,Condition(function Trig_RemoveWeaponAblity_Conditions))
call TriggerAddAction(gg_trg_RemoveWeaponAblity,function Trig_RemoveWeaponAblity_Actions)
[ 本帖最后由 2517420 于 2008-6-22 20:25 编辑 ]