找回密码
 点一下
查看: 1456|回复: 1

哪位高手帮我看看哪里出问题了

[复制链接]
发表于 2011-2-18 00:24:44 | 显示全部楼层 |阅读模式
function CV2 takes nothing returns boolean
local unit e=GetFilterUnit()
if IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(e))and IsUnitType(e,UNIT_TYPE_STRUCTURE)==false and GetUnitState(e, UNIT_STATE_LIFE)>0 then
if udg_I==1 or udg_I==2 then
call EDI(GetTriggerUnit(),e,2,80)
endif
if udg_I==1 or udg_I==3 then
call EDI(GetTriggerUnit(),e,1,80)
endif
endif
set e=null
return false
endfunction
function CW2 takes nothing returns nothing
local timer t = CreateTimer()
local string BNI=(I2S(H2I((t))))
local unit EEI=GetTriggerUnit()
local real x=GetUnitX(EEI)
local real y=GetUnitY(EEI)
local unit WGI=CreateUnit(GetOwningPlayer(EEI),'e000',x,y,0)
local unit u
if((GetStoredInteger(udg_GC,((I2S(H2I(((EEI)))))),("stateCX2")))==1)==false then
call SetUnitTimeScale(WGI,2.5)
call UnitApplyTimedLife(WGI,1112820806,2)
set WGI=CreateUnit(GetOwningPlayer(EEI),'e002',x,y,0)
call UnitAddAbility(WGI,'A002')
call SetUnitAbilityLevel(WGI,'A002',GetUnitAbilityLevel(EEI,'A006'))
call IssueImmediateOrder(WGI,"stomp")
set udg_I=1
call GroupEnumUnitsInRange(udg_G,x,y,500,Condition(function CV2))
else
call SetUnitTimeScale(WGI,2.5)
call UnitApplyTimedLife(WGI,1112820806,2)
set WGI=CreateUnit(GetOwningPlayer(EEI),'e002',x,y,0)
call UnitAddAbility(WGI,'A002')
call SetUnitAbilityLevel(WGI,'A002',GetUnitAbilityLevel(EEI,'A006'))
call IssueImmediateOrder(WGI,"stomp")
set udg_I=2
call GroupEnumUnitsInRange(udg_G,x,y,500,Condition(function CV2))
set u=I2U2(I2S(H2I(EEI)),"Image")
set x=GetUnitX(u)
set y=GetUnitY(u)
set WGI=CreateUnit(GetOwningPlayer(EEI),'e000',x,y,0)
call SetUnitTimeScale(WGI,2.5)
call UnitApplyTimedLife(WGI,1112820806,2)
set WGI=CreateUnit(GetOwningPlayer(EEI),'e002',x,y,0)
call UnitAddAbility(WGI,'A002')
call SetUnitAbilityLevel(WGI,'A002',GetUnitAbilityLevel(EEI,'A006'))
call IssueImmediateOrder(WGI,"stomp")
set udg_I=3
call GroupEnumUnitsInRange(udg_G,x,y,500,Condition(function CV2))
call SetUnitAnimationByIndex(u,3)
endif
set t=null
set EEI=null
set WGI=null
set u=null
endfunction
function CY2 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=I2U2(BNI,"Source")
local unit I62=I2U2(BNI,"Image")
local boolean CJ2=(GetStoredBoolean(udg_GC,(BNI),("KillStompImage")))
if GetTriggerEventId()==EVENT_UNIT_SPELL_ENDCAST then
call StoreInteger(udg_GC,((I2S(H2I(((EEI)))))),("stateCW2"),(2))
if CJ2 then
call RemoveUnit(I62)
endif
call FlushStoredMission(udg_GC,(BNI))
call BXI(t,BNI)
else
if CJ2 then
call SetUnitFacing(I62,GetUnitFacing(EEI))
endif
endif
set t=null
set EEI=null
set I62=null
return false
endfunction
function CK2 takes nothing returns nothing
local trigger t=CreateTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=GetTriggerUnit()
local unit I62
call StoreBoolean(udg_GC,(BNI),("KillStompImage"),(false))
if((GetStoredInteger(udg_GC,(I2S(H2I(EEI))),("stateCX2")))==1)==false then
call StoreBoolean(udg_GC,(BNI),("KillStompImage"),(true))
set I62=CreateUnit(GetOwningPlayer(EEI),'e001',GetUnitX(EEI),GetUnitY(EEI),GetUnitFacing(EEI))
call UnitAddAbility(I62,1097167980)
call SetUnitPosition(I62,GetUnitX(EEI),GetUnitY(EEI))
call SetUnitScale(I62,1.4,1.4,1.4)
else
set I62=I2U2(I2S(H2I(EEI)),"Image")
endif
call IssueImmediateOrder(I62,"stop")
call StoreInteger(udg_GC,(I2S(H2I(EEI))),("stateCW2"),(1))
call SetUnitAnimation(I62,"spell slam")
call QueueUnitAnimation(I62,"spell slam")
call StoreInteger(udg_GC,(BNI),("Image"),H2I((I62)))
call StoreInteger(udg_GC,(BNI),("Source"),H2I((EEI)))
call TriggerRegisterTimerEvent(t,0.1,true)
call TriggerRegisterUnitEvent(t,EEI,EVENT_UNIT_SPELL_ENDCAST)
call StoreInteger(udg_GC,(BNI),("Condition"),H2I(TriggerAddCondition(t,Condition(function CY2))))
call StoreInteger(udg_GC,(BNI),("Image"),H2I((I62)))
set t=null
set EEI=null
set I62=null
endfunction
function CL1 takes nothing returns boolean
if GetSpellAbilityId()=='A006' then
call CW2()
endif
return false
endfunction
function CL2 takes nothing returns boolean
if GetSpellAbilityId()=='A006' then
call CK2()
endif
return false
endfunction
//==============================================================================================================================
function CM2 takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),'A00R')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A00R')
call UnitRemoveAbility(GetEnumUnit(),'B000')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A00U')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A00U')
call UnitRemoveAbility(GetEnumUnit(),'B000')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A00T')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A00T')
call UnitRemoveAbility(GetEnumUnit(),'B000')
endif
if GetUnitAbilityLevel(GetEnumUnit(),'A00S')>0 then
call UnitRemoveAbility(GetEnumUnit(),'A00S')
call UnitRemoveAbility(GetEnumUnit(),'B000')
endif
call YQI(GetEnumUnit(),0)
endfunction
function CN2 takes nothing returns nothing
if udg_I==1 then
if GetUnitAbilityLevel(GetEnumUnit(),'A00R')==0 then
call UnitAddAbility(GetEnumUnit(),'A00R')
endif
elseif udg_I==2 then
if GetUnitAbilityLevel(GetEnumUnit(),'A00U')==0 then
call UnitAddAbility(GetEnumUnit(),'A00U')
endif
elseif udg_I==3 then
if GetUnitAbilityLevel(GetEnumUnit(),'A00T')==0 then
call UnitAddAbility(GetEnumUnit(),'A00T')
endif
elseif udg_I==4 then
if GetUnitAbilityLevel(GetEnumUnit(),'A00S')==0 then
call UnitAddAbility(GetEnumUnit(),'A00S')
endif
endif
if IsUnitType(GetEnumUnit(),UNIT_TYPE_HERO)==true then
call YQI(GetEnumUnit(),R2I((I2R(GetHeroAgi(GetEnumUnit(),true))/ 7)*I2R(udg_I)/ 5))
endif
endfunction
function CP2 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=I2U2(BNI,"Source")
local group CQ2=I2G(BNI,"ActiveGroup")
local real x=GetUnitX(EEI)
local real y=GetUnitY(EEI)
local group g=I2G(BNI,"ActiveGroup1")
local group g2
call GroupClear(g)
set udg_H=EEI
call GroupEnumUnitsInRange(g,x,y,275,Condition(function VPI))
if((GetStoredInteger(udg_GC,((I2S(H2I(((EEI)))))),("stateCX2")))==1)==true then
set g2=I2G(BNI,"ActiveGroup2")
call GroupClear(g2)
call GroupEnumUnitsInRange(g2,GetUnitX(I2U2(I2S(H2I(EEI)),"Image")),GetUnitY(I2U2(I2S(H2I(EEI)),"Image")),250,Condition(function VPI))
call GroupAddGroup(g2,g)
set g2=null
endif
//call GroupRemoveGroup(g,CQ2)
call ForGroup(CQ2,function CM2)
if H9I(EEI)==false then
set udg_I=GetUnitAbilityLevel(EEI,'A008')
call ForGroup(g,function CN2)
call GroupClear(CQ2)
call GroupAddGroup(g,CQ2)
endif
set t=null                                                           
set EEI=null
set CQ2=null
set g=null
return false
endfunction
function CR2 takes nothing returns nothing
local trigger t=CreateTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=GetTriggerUnit()
local integer i
local group g=CreateGroup()
local group g1=CreateGroup()
local group g2=CreateGroup()
call UnitAddAbility(EEI,1098084401)
call TriggerRegisterTimerEvent(t,0.3,true)
call TriggerAddCondition(t,Condition(function CP2))
call StoreInteger(udg_GC,(BNI),("Source"),H2I((EEI)))
call StoreInteger(udg_GC,(BNI),("ActiveGroup"),H2I(g))
call StoreInteger(udg_GC,(BNI),("ActiveGroup1"),H2I(g1))
call StoreInteger(udg_GC,(BNI),("ActiveGroup2"),H2I(g2))
call StoreInteger(udg_GC,((I2S(H2I((EEI))))),("NaturalOrder|Trigger"),H2I((t)))
call StoreBoolean(udg_GC,((I2S(H2I((EEI))))),("NaturalOrder|Active"),(true))
set i=0
loop
exitwhen i>12
call SetPlayerAbilityAvailable(Player(i),'A00R',false)
call SetPlayerAbilityAvailable(Player(i),'A00U',false)
call SetPlayerAbilityAvailable(Player(i),'A00T',false)
call SetPlayerAbilityAvailable(Player(i),'A00S',false)
set i=i+1
endloop
set t=null
set EEI=null
set g=null
set g1=null
set g2=null
endfunction
function CS2 takes nothing returns boolean
if GetLearnedSkill()=='A008' and GetUnitAbilityLevel(GetTriggerUnit(),'A008')==1 and IsUnitIllusion(GetTriggerUnit())==false then
call CR2()
endif
return false
endfunction
//==================================================================================================================
function CT2 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=I2U2(BNI,"Source")
call DestroyEffect(I2E(BNI,"FX"))
call BXI(t,BNI)
call YNI(EEI,0)
set t=null
set EEI=null
return false
endfunction
function CU2 takes unit EEI,unit I62,integer D02,integer DI2 returns nothing
local trigger t
local string BNI
local unit WGI
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",I62,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",EEI,"chest"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",EEI,"origin"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",EEI,"hand,left"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",EEI,"hand,right"))
call ShowUnit(I62,false)
call KillUnit(I62)
call StoreInteger(udg_GC,((I2S(H2I(((EEI)))))),("stateCX2"),(2))
if DI2>0 or D02>0 then
set t=CreateTrigger()
set BNI=(I2S(H2I((t))))
call TriggerRegisterTimerEvent(t,9.1,false)
call TriggerRegisterUnitEvent(t,EEI,EVENT_UNIT_DEATH)
call StoreInteger(udg_GC,(BNI),("Condition"),H2I(TriggerAddCondition(t,Condition(function CT2))))
call StoreInteger(udg_GC,(BNI),("Source"),H2I((EEI)))
set WGI=CreateUnit(GetOwningPlayer(EEI),'e002',GetUnitX(EEI),GetUnitY(EEI),0)
call UnitAddAbility(WGI,'A017')
call SetUnitAbilityLevel(WGI,'A017',DI2)
call IssueTargetOrder(WGI,"bloodlust",EEI)
call YNI(EEI,D02)
call StoreInteger(udg_GC,(BNI),("FX"),H2I((AddSpecialEffectTarget("war3mapImported\\RadianceHands.mdx",EEI,"weapon"))))
endif
set t=null
set WGI=null
endfunction
function D12 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit e = GetFilterUnit()
local integer SG0=(GetStoredInteger(udg_GC,(BNI),("AttackBonus")))
local integer SH0=(GetStoredInteger(udg_GC,(BNI),("MovementBonus")))
local integer DXI=(GetStoredInteger(udg_GC,(BNI),("Level")))
if IsUnitInGroup(e,I2G(BNI,"AlreadyHit"))==false and IsUnitEnemy(I2U2(BNI,"Image"),GetOwningPlayer(e)) and IsUnitType(e,UNIT_TYPE_STRUCTURE)==false and GetUnitState(e, UNIT_STATE_LIFE)>0 then
call GroupAddUnit(I2G(BNI,"AlreadyHit"),e)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",e,"chest"))
set udg_B=true
call EDI(I2U2(BNI,"Source"),e,1,80+40*DXI)
set udg_B=false
endif
set t=null
set e=null
return false
endfunction
function DO2 takes real D22,real D32,real D42,real D52,real D62,real D72 returns real
local real D82
local real D92
local real DA2
local real DB2
local real DC2
local real DD2
local real DE2
local real DF2
local real DG2
local real DH2
local real DZ2
local real DV2
local real DW2
local real DX2
local real DY2
set DH2=D42-D62
set DZ2=D52-D72
set DV2=-1*DZ2
set DW2=DH2
set DX2=SquareRoot(DV2*DV2+DW2*DW2)
set DV2=DV2/ DX2
set DW2=DW2/ DX2
set D82=D22-D42
set D92=D32-D52
set DA2=SquareRoot(D82*D82+D92*D92)
set DB2=D82/ DA2
set DC2=D92/ DA2
set DY2=D82*DV2+D92*DW2
set DD2=-1*D22+2*D42+2*DV2*DY2
set DE2=-1*D32+2*D52+2*DW2*DY2
set DF2=D62+D42-DD2
set DG2=D72+D52-DE2
return DF2
endfunction
function DJ2 takes real D22,real D32,real D42,real D52,real D62,real D72 returns real
local real D82
local real D92
local real DA2
local real DB2
local real DC2
local real DD2
local real DE2
local real DF2
local real DG2
local real DH2
local real DZ2
local real DV2
local real DW2
local real DX2
local real DY2
set DH2=D42-D62
set DZ2=D52-D72
set DV2=-1*DZ2
set DW2=DH2
set DX2=SquareRoot(DV2*DV2+DW2*DW2)
set DV2=DV2/ DX2
set DW2=DW2/ DX2
set D82=D22-D42
set D92=D32-D52
set DA2=SquareRoot(D82*D82+D92*D92)
set DB2=D82/ DA2
set DC2=D92/ DA2
set DY2=D82*DV2+D92*DW2
set DD2=-1*D22+2*D42+2*DV2*DY2
set DE2=-1*D32+2*D52+2*DW2*DY2
set DF2=D62+D42-DD2
set DG2=D72+D52-DE2
return DG2
endfunction
function DK2 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=I2U2(BNI,"Source")
local unit I62=I2U2(BNI,"Image")
local real x0=(GetStoredReal(udg_GC,(BNI),("x0")))
local real y0=(GetStoredReal(udg_GC,(BNI),("y0")))
local real x1=GetUnitX(EEI)
local real y1=GetUnitY(EEI)
local real x2=GetUnitX(I62)
local real y2=GetUnitY(I62)
local real x3
local real y3
local real a
local real DL2=(GetStoredReal(udg_GC,(BNI),("LastMoved")))
local real LOI=(GetStoredReal(udg_GC,(BNI),("Time")))+0.02
call StoreReal(udg_GC,(BNI),("Time"),(LOI)*1.0)
if GetTriggerEventId()==EVENT_UNIT_DEATH then
call DestroyGroup(I2G(BNI,"AlreadyHit"))
call BXI(t,BNI)
call ShowUnit(I62,false)
call KillUnit(I62)
call StoreInteger(udg_GC,((I2S(H2I(EEI)))),("stateCX2"),(2))
elseif FQI(x1,y1,x2,y2)<100 then
call DestroyGroup(I2G(BNI,"AlreadyHit"))
call CU2(EEI,I62,(GetStoredInteger(udg_GC,(BNI),("AttackBonus"))),(GetStoredInteger(udg_GC,(BNI),("MovementBonus"))))
call BXI(t,BNI)
elseif GetTriggerEvalCount(t)>400 then
if GetTriggerEvalCount(t)==401 then
call SetUnitAnimationByIndex(I62,3)
endif
call GroupEnumUnitsInRange(udg_G,GetUnitX(I62),GetUnitY(I62),300,Condition(function D12))
if((GetStoredInteger(udg_GC,(I2S(H2I(EEI))),("stateCW2")))==1)==false then
set a=Atan2(y1-y2,x1-x2)
call SetUnitFacing(I62,a*bj_RADTODEG)
set x3=GetUnitX(I62)+12*Cos(a)
set y3=GetUnitY(I62)+12*Sin(a)
call SetUnitX(I62,FII(x3))
call SetUnitY(I62,FOI(y3))
call StoreReal(udg_GC,(BNI),("x0"),((x1)*1.0))
call StoreReal(udg_GC,(BNI),("y0"),((y1)*1.0))
endif
else
call GroupEnumUnitsInRange(udg_G,GetUnitX(I62),GetUnitY(I62),300,Condition(function D12))
if x0!=x1 or y0!=y1 then
set DL2=LOI
call StoreReal(udg_GC,(BNI),("LastMoved"),((DL2)*1.0))
endif
if((GetStoredInteger(udg_GC,(I2S(H2I(EEI))),("stateCW2")))==1)==false then
if DL2==LOI then
set x3=DO2(x0,y0,x1,y1,x2,y2)
set y3=DJ2(x0,y0,x1,y1,x2,y2)
set a=Atan2(y3-y2,x3-x2)*bj_RADTODEG
call SetUnitFacing(I62,a)
call SetUnitX(I62,FII(x3))
call SetUnitY(I62,FOI(y3))
call StoreReal(udg_GC,(BNI),("x0"),((x1)*1.0))
call StoreReal(udg_GC,(BNI),("y0"),((y1)*1.0))
endif
if(DL2+0.3)<LOI then
call StoreInteger(udg_GC,(BNI),("Moving"),(1))
call SetUnitAnimationByIndex(I62,2)
elseif(DL2+0.3)>LOI and(GetStoredInteger(udg_GC,(BNI),("Moving")))==1 then
call StoreInteger(udg_GC,(BNI),("Moving"),(2))
call SetUnitAnimationByIndex(I62,3)
elseif(GetStoredInteger(udg_GC,(BNI),("Moving")))==3 then
call SetUnitAnimationByIndex(I62,2)
call StoreInteger(udg_GC,(BNI),("Moving"),(1))
endif
else
call StoreInteger(udg_GC,(BNI),("Moving"),(3))
endif
endif
set t=null
set EEI=null
set I62=null
return false
endfunction
function CX2 takes nothing returns nothing
local trigger t=CreateTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=GetTriggerUnit()
local real x0=GetUnitX(EEI)
local real y0=GetUnitY(EEI)
local location l=GetSpellTargetLoc()
local real lx=GetLocationX(l)
local real ly=GetLocationY(l)
local real a=Atan2(ly-y0,lx-x0)
local real d=RMaxBJ(FQI(x0,y0,lx,ly),400)
local real x1=FII(x0+d*Cos(a))
local real y1=FOI(y0+d*Sin(a))
local unit I62=CreateUnit(GetOwningPlayer(EEI),'e001',x1,y1,(a*bj_RADTODEG)-180)
local group g=CreateGroup()
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl",I62,"chest"))
call RemoveLocation(l)
call StoreInteger(udg_GC,(I2S(H2I(EEI))),("stateCX2"),(1))               
call UnitAddAbility(I62,1097167980)
if(GetStoredBoolean(udg_GC,(I2S(H2I(EEI))),("NaturalOrder|Active")))==true then
call TriggerEvaluate(I2T((I2S(H2I(EEI))),"NaturalOrder|Trigger"))
endif
call TriggerRegisterTimerEvent(t,0.02,true)
call TriggerRegisterUnitEvent(t,EEI,EVENT_UNIT_DEATH)
call TriggerRegisterUnitEvent(t,EEI,EVENT_UNIT_SPELL_EFFECT)
call StoreInteger(udg_GC,(BNI),("Condition"),H2I(TriggerAddCondition(t,Condition(function DK2))))
call StoreInteger(udg_GC,(BNI),("Source"),H2I((EEI)))
call StoreInteger(udg_GC,(BNI),("Image"),H2I((I62)))
call StoreReal(udg_GC,(BNI),("x0"),((x0)*1.0))
call StoreReal(udg_GC,(BNI),("y0"),((y0)*1.0))
call StoreInteger(udg_GC,(BNI),("Level"),(GetUnitAbilityLevel(EEI,'A004')))
call StoreInteger(udg_GC,(BNI),("AlreadyHit"),H2I((g)))
call StoreInteger(udg_GC,(BNI),("Moving"),(2))
call StoreReal(udg_GC,(BNI),("Time"),(1)*1.0)
set BNI=(I2S(H2I((EEI))))
call StoreInteger(udg_GC,(BNI),("Image"),H2I((I62)))
set t=null
set EEI=null
set l=null
set I62=null
set g=null
endfunction
//===========================================================================================================
function DN2 takes nothing returns nothing
local unit e=GetEnumUnit()
local real x1=udg_X
local real y1=udg_Y
local real x2=udg_X0
local real y2=udg_Y0
local real x3=GetUnitX(e)
local real y3=GetUnitY(e)                                   
local real u=((x3-x1)*(x2-x1)+(y3-y1)*(y2-y1))/((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
local real x4=x1+u*(x2-x1)
local real y4=y1+u*(y2-y1)
local real Q8O=GetUnitState(e,UNIT_STATE_MAX_LIFE)*0.35/ 2   
if IsUnitType(e,UNIT_TYPE_HERO)==true then
call SetUnitPosition(e,x4,y4)
else
call SetUnitX(e,x4)
call SetUnitY(e,y4)
endif
call IssueTargetOrder(udg_U,"slow",GetEnumUnit())
call EDI(udg_H,e,1,Q8O)
call EDI(udg_H,e,2,Q8O)
set e=null
endfunction
function DP2 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=I2U2(BNI,"Source")                              
local real x0=(GetStoredReal(udg_GC,(BNI),("x0")))
local real y0=(GetStoredReal(udg_GC,(BNI),("y0")))
local real a0=(GetStoredReal(udg_GC,(BNI),("a0")))
local integer i=0
local real x
local real y
local group g=CreateGroup()
local group ZFO=CreateGroup()
local integer DXI=GetUnitAbilityLevel(EEI,'A007')
loop
exitwhen i>11
set x=x0+i*200*Cos(a0)
set y=y0+i*200*Sin(a0)
call G7I("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl",x,y,1.6)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y-200))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x+200,y))
call GSI(x,y,300)
set udg_H=EEI
call GroupEnumUnitsInRange(g,x,y,375,Condition(function VPI))
call GroupAddGroup(g,ZFO)
call GroupClear(g)
set i=i+1
endloop
call BXI(t,BNI)
set udg_X=x0
set udg_Y=y0
set udg_X0=x
set udg_Y0=y
set udg_H=EEI
set udg_U=CreateUnit(GetOwningPlayer(EEI),'e002',x0,y0,0)
call UnitAddAbility(udg_U,'A00Z')
call SetUnitAbilityLevel(udg_U,'A00Z',DXI)
call ForGroup(ZFO,function DN2)
call DestroyGroup(ZFO)
call DestroyGroup(g)
set t=null
set EEI=null
set g=null
set ZFO=null
return false
endfunction
function DQ2 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=I2U2(BNI,"Source")
local real a=(GetStoredReal(udg_GC,(BNI),("a")))
local real x=(GetStoredReal(udg_GC,(BNI),("x")))
local real y=(GetStoredReal(udg_GC,(BNI),("y")))
local real DR2
local real DS2
local real H71
local real DT2
local real H81
local real DU2
local real H91
local real E02
local ubersplat HA1
local integer BZI=GetTriggerEvalCount(t)
set x=x+200*BZI*Cos(a)
set y=y+200*BZI*Sin(a)
set HA1=CreateUbersplat(x,y,"THND",255,255,255,255,false,false)
call SetUbersplatRenderAlways(HA1,true)
set a=a*bj_RADTODEG
set DR2=x+200*Cos(bj_DEGTORAD*(a-45))
set DS2=y+200*Sin(bj_DEGTORAD*(a-45))
set H71=x+200*Cos(bj_DEGTORAD*(a+45))
set DT2=y+200*Sin(bj_DEGTORAD*(a+45))
set H81=x-100*Cos(bj_DEGTORAD*(a-45))
set DU2=y-100*Sin(bj_DEGTORAD*(a-45))
set H91=x-100*Cos(bj_DEGTORAD*(a+45))
set E02=y-100*Sin(bj_DEGTORAD*(a+45))
call HOI(GetOwningPlayer(EEI),4,x,y,500)
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",DR2,DS2))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",H71,DT2))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",H81,DU2))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",H91,E02))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y))
call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl",x,y))
if GetTriggerEvalCount(t)>11 then
set x=(GetStoredReal(udg_GC,(BNI),("x")))
set y=(GetStoredReal(udg_GC,(BNI),("y")))
set a=(GetStoredReal(udg_GC,(BNI),("a")))
call BXI(t,BNI)
set t=CreateTrigger()
set BNI=(I2S(H2I((t))))
call TriggerRegisterTimerEvent(t,0.5,false)
call StoreInteger(udg_GC,(BNI),("Condition"),H2I(TriggerAddCondition(t,Condition(function DP2))))
call StoreInteger(udg_GC,(BNI),("Source"),H2I((EEI)))
call StoreReal(udg_GC,(BNI),("x0"),((x)*1.0))
call StoreReal(udg_GC,(BNI),("y0"),((y)*1.0))
call StoreReal(udg_GC,(BNI),("a0"),((a)*1.0))
endif
set t=null
set EEI=null
set HA1=null
return false
endfunction
function E32 takes nothing returns nothing
local trigger t=CreateTrigger()
local string BNI=(I2S(H2I((t))))
local unit EEI=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(EEI),x-GetUnitX(EEI))
call RemoveLocation(l)
call TriggerRegisterTimerEvent(t,0.22,true)
call StoreInteger(udg_GC,(BNI),("Condition"),H2I(TriggerAddCondition(t,Condition(function DQ2))))
call StoreInteger(udg_GC,(BNI),("Source"),H2I((EEI)))
call StoreReal(udg_GC,(BNI),("x"),((GetUnitX(EEI))*1.0))
call StoreReal(udg_GC,(BNI),("y"),((GetUnitY(EEI))*1.0))
call StoreReal(udg_GC,(BNI),("a"),((a)*1.0))
set t=null
set l=null
set EEI=null
endfunction
function E42 takes nothing returns boolean
if GetSpellAbilityId()=='A007' then
call E32()
elseif GetSpellAbilityId()=='A004' then
call CX2()
endif
return false                       
endfunction
//===========================================================================
function InitTrig_NT takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function E42))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function CS2))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_FINISH)
call TriggerAddCondition(t,Condition(function CL1))
set t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(t,Condition(function CL2))
call YNM()
call YQM()
call F2I()
set t=null
endfunction

Dota 牛头人酋长.w3x

124 KB, 下载次数: 9

DotaAllstars_DoTa.w3x

1.15 MB, 下载次数: 5

从这里复制的

0102.w3x

239 KB, 下载次数: 3

发表于 2011-2-18 15:07:42 | 显示全部楼层
晕……这是直接从DOTA里面拷出来的吧……
相关函数根本都没有复制出来,如果他能正确运行绝对是见鬼了……
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-4-27 21:46 , Processed in 0.135243 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表