傳說中的瑤瑤提供一些代碼,由于都是JASS組成 不喜輕噴
function LZ3 takes nothing returns nothing
local real LV3=KRI(KTI(GetUnitState(GetEnumUnit(),UNIT_STATE_MANA),D5I),0)
local real LW3=LV3*0.5
if JBI(GetEnumUnit())==false and LV3>0 then
if GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)>LW3 then
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)-LW3)
else
call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,1)
call JLI(D6I,GetEnumUnit(),1,LW3)
endif
call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)-LV3)
endif
endfunction
function LX3 takes unit JMI,integer LY3,integer LJ3 returns nothing
local group g=WXI()
set D6I=JMI
set OK=JMI
set D5I=LY3*50+50
call GroupEnumUnitsInRange(g,GetUnitX(JMI),GetUnitY(JMI),700,Condition(function R3I))
call ForGroup(g,function LZ3)
call WWI(g)
set g=null
endfunction
function LK3 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local integer WJI=GetTriggerEvalCount(t)
local unit P1I=(LoadUnitHandle(ZY,(WQI),(19)))
local unit LL3
local real LM3=D4I-0.28*(LoadInteger(ZY,(WQI),(3000)))
local real LN3=D2I+(D3I-D2I)*WJI/(LM3/0.05)
call SetUnitScale(P1I,LN3,LN3,LN3)
if WJI>(LM3/0.05)then
call LX3(P1I,(LoadInteger(ZY,(WQI),(3000))),(LoadInteger(ZY,(WQI),(3002))))
set LL3=CreateUnit(GetOwningPlayer(P1I),1697657167,GetUnitX(P1I),GetUnitY(P1I),0)
call SetUnitTimeScale(LL3,0.3)
call RemoveUnit(P1I)
call KillUnit(LL3)
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
endif
set t=null
set P1I=null
set LL3=null
return false
endfunction
function LS3 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer WQI=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit JMI=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(JMI),x-GetUnitX(JMI))
local unit P1I=CreateUnit(GetOwningPlayer(JMI),1697657165,x,y,a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,0.05,true)
call TriggerAddCondition(t,Condition(function LK3))
call SaveUnitHandle(ZY,(WQI),(19),(P1I))
call SaveInteger(ZY,(WQI),(3000),((LoadInteger(ZY,(GetHandleId(JMI)),(3000)))))
call SaveInteger(ZY,(WQI),(3001),((LoadInteger(ZY,(GetHandleId(JMI)),(3001)))))
call SaveInteger(ZY,(WQI),(3002),((LoadInteger(ZY,(GetHandleId(JMI)),(3002)))))
call RemoveLocation(l)
set t=null
set l=null
set JMI=null
endfunction
function LT3 takes nothing returns boolean
if GetSpellAbilityId()==1093686867 then
call LS3()
endif
return false
endfunction
function LR3 takes nothing returns nothing
local trigger t=CreateTrigger()
call M5I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function LT3))
set t=null
endfunction
function LP3 takes unit JMI,unit JNI,integer LY3,integer LQ3 returns nothing
local unit P1I=CreateUnit(GetOwningPlayer(JMI),1697656901,GetUnitX(JNI),GetUnitY(JNI),0)
local unit LU3=CreateUnit(GetOwningPlayer(JMI),1697656901,GetUnitX(JNI),GetUnitY(JNI),0)
local real M03=0.5+0.3*LQ3
if LQ3==7 then
set M03=2.5
endif
call MYI(P1I,1093687371)
call SetUnitAbilityLevel(P1I,1093687371,LQ3)
call IssueTargetOrder(P1I,"cyclone",JNI)
call JQI(LU3,JNI,1,77.5+(LY3+LQ3)*23.0,M03)
set P1I=null
set LU3=null
endfunction
function MI3 takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),EK)==false then
call GroupAddUnit(EK,GetEnumUnit())
call LP3(OK,GetEnumUnit(),MJ,NJ)
endif
endfunction
function M13 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local unit P1I=(LoadUnitHandle(ZY,(WQI),(19)))
local real x2=(LoadReal(ZY,(WQI),(66)))
local real y2=(LoadReal(ZY,(WQI),(67)))
local real a=(LoadReal(ZY,(WQI),(137)))
local integer LY3=(LoadInteger(ZY,(WQI),(3000)))
local integer LQ3=(LoadInteger(ZY,(WQI),(3001)))
local group g=(LoadGroupHandle(ZY,(WQI),(22)))
local real x=GetUnitX(P1I)+25*Cos(a)
local real y=GetUnitY(P1I)+25*Sin(a)
local group MO3=WXI()
local real LOI=L8I(x,y,x2,y2)
if LOI<=30 then
set x=x2
set y=y2
endif
call SetUnitX(P1I,KCI(x))
call SetUnitY(P1I,KCI(y))
set OK=P1I
set EK=g
set MJ=LY3
set NJ=LQ3
call GroupEnumUnitsInRange(MO3,x,y,200,Condition(function R3I))
call ForGroup(MO3,function MI3)
call WWI(MO3)
if LOI<=30 or GetTriggerEvalCount(t)>125 then
call WWI(g)
call KillUnit(P1I)
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
endif
set t=null
set P1I=null
set g=null
set MO3=null
return false
endfunction
function M23 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer WQI=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit JMI=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(JMI),x-GetUnitX(JMI))
local unit P1I
set x=GetUnitX(JMI)
set y=GetUnitY(JMI)
set P1I=CreateUnit(GetOwningPlayer(JMI),1848652117,x,y,a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,0.025,true)
call TriggerAddCondition(t,Condition(function M13))
call SaveUnitHandle(ZY,(WQI),(19),(P1I))
call SaveReal(ZY,(WQI),(66),((x+(400+400.0*(LoadInteger(ZY,(GetHandleId((JMI))),(3000))))*Cos(a))*1.0))
call SaveReal(ZY,(WQI),(67),((y+(400+400.0*(LoadInteger(ZY,(GetHandleId((JMI))),(3000))))*Sin(a))*1.0))
call SaveInteger(ZY,(WQI),(3000),((LoadInteger(ZY,(GetHandleId(JMI)),(3000)))))
call SaveInteger(ZY,(WQI),(3001),((LoadInteger(ZY,(GetHandleId(JMI)),(3001)))))
call SaveReal(ZY,(WQI),(137),((a)*1.0))
call SaveGroupHandle(ZY,(WQI),(22),(WXI()))
call RemoveLocation(l)
set t=null
set l=null
set JMI=null
endfunction
function M33 takes nothing returns boolean
if GetSpellAbilityId()==1093686859 then
call M23()
endif
return false
endfunction
function M43 takes nothing returns nothing
local trigger t=CreateTrigger()
call M5I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function M33))
call KWI(1093687371,GetRandomReal(1,25))
set t=null
endfunction
function M53 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local unit JNI=(LoadUnitHandle(ZY,(WQI),(17)))
call UnitRemoveAbility(JNI,1093686858)
call UnitRemoveAbility(JNI,1093742649)
if GetUnitAbilityLevel(JNI,1093686858)==0 or GetUnitAbilityLevel(JNI,1093742649)==0 then
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
endif
set t=null
set JNI=null
return false
endfunction
function M63 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local unit JNI=(LoadUnitHandle(ZY,(WQI),(17)))
call DestroyEffect((LoadEffectHandle(ZY,(WQI),(32))))
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
call UnitRemoveAbility(JNI,1093686858)
call UnitRemoveAbility(JNI,1093742649)
if GetUnitAbilityLevel(JNI,1093686858)>0 or GetUnitAbilityLevel(JNI,1093742649)>0 then
set t=CreateTrigger()
set WQI=GetHandleId(t)
call SaveUnitHandle(ZY,(WQI),(17),(JNI))
call TriggerRegisterTimerEvent(t,1,true)
call TriggerAddCondition(t,Condition(function M53))
endif
set t=null
set JNI=null
return false
endfunction
function M73 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer WQI=GetHandleId(t)
local unit X6I=GetTriggerUnit()
local unit JNI=GetSpellTargetUnit()
local integer LY3=(LoadInteger(ZY,(GetHandleId(X6I)),(3000)))
local integer LJ3=(LoadInteger(ZY,(GetHandleId(X6I)),(3002)))
call MYI(JNI,1093686858)
call SetUnitAbilityLevel(JNI,1093686858,LY3)
call MYI(JNI,1093742649)
call SetUnitAbilityLevel(JNI,1093742649,LJ3)
call TriggerRegisterTimerEvent(t,9,false)
call TriggerAddCondition(t,Condition(function M63))
call SaveUnitHandle(ZY,(WQI),(17),(JNI))
call SaveEffectHandle(ZY,(WQI),(32),(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIsp\\SpeedTarget.mdl",JNI,"origin")))
set t=null
set X6I=null
set JNI=null
endfunction
function M83 takes nothing returns boolean
if GetSpellAbilityId()==1093686865 then
call M73()
endif
return false
endfunction
function M93 takes nothing returns nothing
local trigger t=CreateTrigger()
call M5I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function M83))
call KWI(1093686858,GetRandomReal(1,25))
call KWI(1093742649,GetRandomReal(1,25))
set t=null
endfunction
function MA3 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local unit P1I=(LoadUnitHandle(ZY,(WQI),(19)))
local unit X6I=(LoadUnitHandle(ZY,(WQI),(14)))
if GetUnitAbilityLevel(X6I,1110456408)==0 then
call KillUnit(P1I)
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
else
call SetUnitAbilityLevel(P1I,1093686856,(LoadInteger(ZY,(GetHandleId(X6I)),(3001))))
call SetUnitX(P1I,GetUnitX(X6I))
call SetUnitY(P1I,GetUnitY(X6I))
endif
set t=null
set P1I=null
set X6I=null
return false
endfunction
function MB3 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer WQI=GetHandleId(t)
local unit X6I=GetTriggerUnit()
local unit P1I=CreateUnit(GetOwningPlayer(X6I),1697657174,GetUnitX(X6I),GetUnitY(X6I),0)
call MYI(P1I,1093686856)
call SetUnitAbilityLevel(P1I,1093686856,(LoadInteger(ZY,(GetHandleId(X6I)),(3001))))
call TriggerRegisterTimerEvent(t,0.05,true)
call TriggerAddCondition(t,Condition(function MA3))
call SaveUnitHandle(ZY,(WQI),(19),(P1I))
call SaveUnitHandle(ZY,(WQI),(14),(X6I))
set t=null
set X6I=null
endfunction
function MC3 takes nothing returns boolean
if GetSpellAbilityId()==1093687372 then
call MB3()
endif
return false
endfunction
function MD3 takes unit X6I returns nothing
if GetUnitAbilityLevel(X6I,1093687372)>0 then
call SetUnitAbilityLevel(X6I,1093687372,(LoadInteger(ZY,(GetHandleId(X6I)),(3000))))
endif
endfunction
function ME3 takes nothing returns boolean
if IsUnitIllusion(GetTriggerUnit())==false then
call MD3(GetTriggerUnit())
endif
return false
endfunction
function MF3 takes nothing returns nothing
local trigger t=CreateTrigger()
call M5I(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function MC3))
set t=CreateTrigger()
call M5I(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function ME3))
call KWI(1093686856,GetRandomReal(1,25))
set t=null
endfunction
function MG3 takes unit JMI,unit JNI,integer LY3 returns nothing
local unit P1I=CreateUnit(GetOwningPlayer(JMI),1697656901,GetUnitX(JNI),GetUnitY(JNI),0)
call MYI(P1I,1093686868)
call SetUnitAbilityLevel(P1I,1093686868,LY3)
call IssueTargetOrder(P1I,"drunkenhaze",JNI)
set P1I=null
endfunction
function MH3 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local unit JMI=(LoadUnitHandle(ZY,(WQI),(2)))
local unit JNI=(LoadUnitHandle(ZY,(WQI),(17)))
local real F12=(LoadReal(ZY,(WQI),(13)))
local real WH2=(LoadReal(ZY,(WQI),(193)))
local integer LY3=(LoadInteger(ZY,(WQI),(3000)))
local integer LQ3=(LoadInteger(ZY,(WQI),(3001)))
local integer X92=LQ3*25/3
local real x
local real y
local integer WJI=GetTriggerEvalCount(t)
if WJI>X92/3 then
call SaveReal(ZY,(WQI),(193),((WH2*0.98)*1.0))
endif
if WJI>X92 or GetTriggerEventId()==EVENT_UNIT_DEATH then
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
if GetTriggerEventId()!=EVENT_UNIT_DEATH then
call MG3(JMI,JNI,LY3)
endif
else
set x=KCI(GetUnitX(JNI)+WH2*Cos(F12))
set y=KFI(GetUnitY(JNI)+WH2*Sin(F12))
call MAI(x,y,150)
call SetUnitPosition(JNI,x,y)
endif
set t=null
set JMI=null
set JNI=null
return false
endfunction
function MZ3 takes unit JMI,unit JNI,integer LY3,integer LQ3,integer LJ3 returns nothing
local trigger t=CreateTrigger()
local integer WQI=GetHandleId(t)
local real F12=Atan2(GetUnitY(JNI)-GetUnitY(JMI),GetUnitX(JNI)-GetUnitX(JMI))
call JLI(JMI,JNI,1,LJ3*40)
call SaveUnitHandle(ZY,(WQI),(2),(JMI))
call SaveUnitHandle(ZY,(WQI),(17),(JNI))
call SaveReal(ZY,(WQI),(13),((F12)*1.0))
call SaveReal(ZY,(WQI),(193),((6)*1.0))
call SaveInteger(ZY,(WQI),(3000),(LY3))
call SaveInteger(ZY,(WQI),(3001),(LQ3))
call TriggerRegisterTimerEvent(t,0.03,true)
call TriggerRegisterUnitEvent(t,JNI,EVENT_UNIT_DEATH)
call TriggerAddCondition(t,Condition(function MH3))
set t=null
endfunction
function MV3 takes nothing returns nothing
if IsUnitInGroup(GetEnumUnit(),EK)==false and JBI(GetEnumUnit())==false then
call GroupAddUnit(EK,GetEnumUnit())
call MZ3(OK,GetEnumUnit(),MJ,NJ,SJ)
endif
endfunction
function MW3 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local integer WQI=GetHandleId(t)
local unit P1I=(LoadUnitHandle(ZY,(WQI),(19)))
local real a=(LoadReal(ZY,(WQI),(137)))
local real x2=(LoadReal(ZY,(WQI),(66)))
local real y2=(LoadReal(ZY,(WQI),(67)))
local group g=(LoadGroupHandle(ZY,(WQI),(22)))
local integer LY3=(LoadInteger(ZY,(WQI),(3000)))
local integer LQ3=(LoadInteger(ZY,(WQI),(3001)))
local integer LJ3=(LoadInteger(ZY,(WQI),(3002)))
local real x=GetUnitX(P1I)
local real y=GetUnitY(P1I)
local group g2
if L8I(x,y,x2,y2)<100 then
set x=x2
set y=y2
else
set x=x+33*Cos(a)
set y=y+33*Sin(a)
endif
call SetUnitX(P1I,KCI(x))
call SetUnitY(P1I,KFI(y))
set g2=WXI()
set OK=P1I
set EK=g
set MJ=LY3
set NJ=LQ3
set SJ=LJ3
call GroupEnumUnitsInRange(g2,x,y,200,Condition(function R3I))
call ForGroup(g2,function MV3)
call WWI(g2)
if(x==x2 and y==y2)or GetTriggerEvalCount(t)>35 then
set g2=WXI()
set OK=P1I
set EK=g
set MJ=LY3
set NJ=LQ3
set SJ=LJ3
call GroupEnumUnitsInRange(g2,x,y,250,Condition(function R3I))
call ForGroup(g2,function MV3)
call WWI(g2)
call FlushChildHashtable(ZY,(WQI))
call WMI(t)
call KillUnit(P1I)
call WWI(g)
endif
set t=null
set P1I=null
set g=null
set g2=null
return false
endfunction
function MX3 takes nothing returns nothing
local trigger t=CreateTrigger()
local integer WQI=GetHandleId(t)
local location l=GetSpellTargetLoc()
local unit JMI=GetTriggerUnit()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local real a=Atan2(y-GetUnitY(JMI),x-GetUnitX(JMI))
local unit P1I=CreateUnit(GetOwningPlayer(JMI),1848652120,GetUnitX(JMI),GetUnitY(JMI),a*bj_RADTODEG)
call TriggerRegisterTimerEvent(t,0.03,true)
call TriggerAddCondition(t,Condition(function MW3))
call SaveUnitHandle(ZY,(WQI),(19),(P1I))
call SaveReal(ZY,(WQI),(137),((a)*1.0))
call SaveReal(ZY,(WQI),(66),((GetUnitX(JMI)+1000*Cos(a))*1.0))
call SaveReal(ZY,(WQI),(67),((GetUnitY(JMI)+1000*Sin(a))*1.0))
call SaveGroupHandle(ZY,(WQI),(22),(WXI()))
call SaveInteger(ZY,(WQI),(3000),((LoadInteger(ZY,(GetHandleId(JMI)),(3000)))))
call SaveInteger(ZY,(WQI),(3001),((LoadInteger(ZY,(GetHandleId(JMI)),(3001)))))
call SaveInteger(ZY,(WQI),(3002),((LoadInteger(ZY,(GetHandleId(JMI)),(3002)))))
call RemoveLocation(l)
set t=null
set l=null
set JMI=null
endfunction
function MY3 takes nothing returns boolean
if GetSpellAbilityId()==1093686861 then
call MX3()
endif
return false
endfunction
還有一段,請點擊