|
发表于 2008-11-9 21:11:53
|
显示全部楼层
哦哦,好高级呢~~
我再去看下代码,顺便帖出来吧~~
//------------------------------------------------------------------
[codes=jass]globals
real OI00OO
unit OI0IIO
gamecache OOII=null
real array OIO0OO
trigger array OIOO1O
integer OIO00O=0
integer OIOO0O
boolean array O0111O
boolean OIOOIO=false
integer OIOOOO
force OO01O=null
group array O011IO
boolean IO0I00=false
boolean OOIOO=false
timer OO0=null
real OIO11O
string OIO1IO
real OOI0O=0
endglobals
function O11O1I takes nothing returns boolean
return true
endfunction
function I11110 takes handle h returns integer
return h
return 0
endfunction
function OOOO0I takes handle h returns string
return I2S(I11110(h))
endfunction
function OOOIII takes string OOOO1I,string OOOIOI,integer OOOI1I returns nothing
call StoreInteger(OOII,OOOO1I,OOOIOI,OOOI1I)
endfunction
function OO11OI takes unit OO1I1I,string OO1O0I returns nothing
call OOOIII(OOOO0I(OO1I1I),"state"+OO1O0I,1)
endfunction
function OOO01I takes string OOOO1I,string OOOIOI,handle OOOI0I returns nothing
call StoreInteger(OOII,OOOO1I,OOOIOI,I11110(OOOI0I))
endfunction
function OOO10I takes string OOOO1I,string OOOIOI,string OOOI1I returns nothing
call StoreString(OOII,OOOO1I,OOOIOI,OOOI1I)
endfunction
function OOIOOI takes string OOOO1I,string OOOIOI returns string
return GetStoredString(OOII,OOOO1I,OOOIOI)
endfunction
function OO0OII takes string OOOO1I,string OOOIOI returns unit
return GetStoredInteger(OOII,OOOO1I,OOOIOI)
return null
endfunction
function OOOOII takes string OOOO1I returns nothing
call FlushStoredMission(OOII,OOOO1I)
endfunction
function OOIIII takes nothing returns real
return TimerGetElapsed(OO0)
endfunction
function OOII0I takes nothing returns nothing
local integer i=0
if OOIOO==false and IO0I00==false then
loop
call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303An internal checksum has failed|r")
call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303This might not be a serious glitch, but it is importat for me to get it|r")
call DisplayTimedTextToPlayer(Player(i),0,0,120,"|c00ff0303Please send me the replay for this game to [email protected]|r")
set i=i+1
exitwhen i==12
endloop
endif
endfunction
function I11II0 takes nothing returns nothing
call DisplayTimedTextToPlayer(GetEnumPlayer(),0,OOI0O,OIO11O,OIO1IO)
endfunction
function IO11II takes unit u returns boolean
return GetUnitTypeId(u)<1 or IsUnitType(u,UNIT_TYPE_DEAD)==true
endfunction
function OIO1OI takes unit u returns boolean
return GetUnitAbilityLevel(u,1113815395)>0
endfunction
function OO110I takes unit OO1I1I,string OO1O0I returns nothing
call OOOIII(OOOO0I(OO1I1I),"state"+OO1O0I,2)
endfunction
function OOII1I takes trigger t returns nothing
call DisableTrigger(t)
set OIO00O=OIO00O+1
set OIOO1O[OIO00O]=t
set OIO0OO[OIO00O]=OOIIII()+60
if OIO00O>8000 then
call OOII0I()
endif
endfunction
function I11I10 takes force I111O0,real I1IOO0,string I11100 returns nothing
set OIO1IO=I11100
set OIO11O=I1IOO0
call ForForce(I111O0,function I11II0)
endfunction
function I0O10I takes unit O0O00I returns boolean
local integer I0O1II=GetUnitTypeId(O0O00I)
return I0O1II==1848651828 or I0O1II==1848652103 or I0O1II==1848652099 or I0O1II==1848652088 or I0O1II==1697656907 or I0O1II==1697656905 or I0O1II==1697656908 or I0O1II==1697657162
endfunction
function I0O11I takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),1093678162)==0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IO11II(GetFilterUnit())==false and OIO1OI(GetFilterUnit())==false
endfunction
function OO11II takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string OO100I=OOOO0I(t)
call OO110I(OO0OII(OO100I,"hero"),OOIOOI(OO100I,"state"))
call OOOOII(OO100I)
call OOII1I(t)
set t=null
return false
endfunction
function OI010I takes unit OI01II,unit OI011I,integer OIIOOI,real OIIO0I returns nothing
if OIIOOI==0 then
return
endif
if OIIOOI==1 then
call UnitDamageTarget(OI01II,OI011I,OIIO0I,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
elseif OIIOOI==2 then
call UnitDamageTarget(OI01II,OI011I,OIIO0I,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
elseif OIIOOI==3 then
call UnitDamageTarget(OI01II,OI011I,OIIO0I,true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
endif
endfunction
function OOI00I takes nothing returns group
local integer i=OIOO0O
loop
exitwhen i==OIOO0O-1
if O0111O==false then
set OIOO0O=i+1
if OIOO0O==120 then
set OIOO0O=0
endif
set O0111O=true
return O011IO
endif
set i=i+1
if i==120 then
set i=0
endif
endloop
call I11I10(OO01O,5.00,"|c00ff0303CRITICAL ERROR: FOUND NO AVAILABLE GROUPS|r")
call I11I10(OO01O,5.00,"|c00ff0303Send this replay to [email protected]|r")
return CreateGroup()
endfunction
function I0000I takes nothing returns boolean
return IsUnitEnemy(OI0IIO,GetOwningPlayer(GetFilterUnit()))and I0O11I()and(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT)==false or I0O10I(GetFilterUnit()))
endfunction
function OOI0OI takes group g returns nothing
local integer i=I11110(g)-OIOOOO
if i<0 or i>120 then
set OIOOIO=true
else
call GroupClear(g)
set O0111O=false
set OIOO0O=i
endif
endfunction
function OO010I takes string OOOO1I,string OOOIOI returns integer
return GetStoredInteger(OOII,OOOO1I,OOOIOI)
endfunction
function OO0IOI takes string OOOO1I,string OOOIOI returns effect
return GetStoredInteger(OOII,OOOO1I,OOOIOI)
return null
endfunction
function OO1III takes unit OO1I1I,string OO1O0I returns boolean
return OO010I(OOOO0I(OO1I1I),"state"+OO1O0I)==1
endfunction
function OO111I takes unit OO1I1I,string OO1O0I,real I1IOO0 returns nothing
local trigger t=CreateTrigger()
call TriggerAddCondition(t,Condition(function OO11II))
call TriggerRegisterTimerEvent(t,I1IOO0,false)
call OO11OI(OO1I1I,OO1O0I)
call OOO01I(OOOO0I(t),"hero",OO1I1I)
call OOO10I(OOOO0I(t),"state",OO1O0I)
set t=null
endfunction
function O110OI takes trigger t,playerunitevent O1100I returns nothing
local integer I110O0=0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(I110O0),O1100I,Condition(function O11O1I))
set I110O0=I110O0+1
exitwhen I110O0==16
endloop
endfunction
function OO0I110 takes nothing returns nothing
local unit I01OII=CreateUnit(GetOwningPlayer(OI0IIO),1697656901,GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()),0)
call UnitAddAbility(I01OII,1093686069)
call IssueTargetOrder(I01OII,"slow",GetEnumUnit())
call OI010I(OI0IIO,GetEnumUnit(),1,OI00OO)
set I01OII=null
endfunction
function OO01OO0 takes unit OI01II,unit OI011I returns nothing
local group g=OOI00I()
set OI0IIO=OI01II
set OI00OO=GetUnitAbilityLevel(OI01II,1093685591)*15+15
call GroupEnumUnitsInRange(g,GetUnitX(OI011I),GetUnitY(OI011I),300,Condition(function I0000I))
call ForGroup(g,function OO0I110)
call OOI0OI(g)
call DestroyEffect(AddSpecialEffect("Abilities\\\\Spells\\\\Human\\\\Thunderclap\\\\ThunderClapCaster.mdl",GetUnitX(OI011I),GetUnitY(OI011I)))
set g=null
endfunction
function OO01O00 takes unit OI01II,unit OI011I returns nothing
local string OO100I=OOOO0I(OI01II)
local integer OOI01I=OO010I(OO100I,"StormreachCount")
local string fx=""
set OOI01I=OOI01I+1
if OOI01I>(8-GetUnitAbilityLevel(OI01II,1093685591))then
if IsUnitAlly(OI011I,GetOwningPlayer(OI01II))==false then
set OOI01I=0
call DestroyEffect(OO0IOI(OO100I,"OverloadFX1"))
call DestroyEffect(OO0IOI(OO100I,"OverloadFX2"))
call OO01OO0(OI01II,OI011I)
endif
elseif OOI01I==(8-GetUnitAbilityLevel(OI01II,1093685591))then
if IsUnitAlly(OI01II,GetLocalPlayer())then
set fx="Abilities\\\\Weapons\\\\FarseerMissile\\\\FarseerMissile.mdl"
endif
call OOO01I(OO100I,"OverloadFX1",AddSpecialEffectTarget(fx,OI01II,"right hand"))
call OOO01I(OO100I,"OverloadFX2",AddSpecialEffectTarget(fx,OI01II,"left hand"))
endif
call OOOIII(OO100I,"StormreachCount",OOI01I)
endfunction
function OO01OI0 takes nothing returns boolean
local trigger t=GetTriggeringTrigger()
local string OO100I=OOOO0I(t)
local unit OI011I=OO0OII(OO100I,"Target")
local unit OI01II=OO0OII(OO100I,"Source")
if GetTriggerEventId()==EVENT_UNIT_DAMAGED then
if GetEventDamageSource()==OI01II then
call DisableTrigger(t)
call OO01O00(OI01II,OI011I)
call OOOOII(OO100I)
call OOII1I(t)
endif
else
call OOOOII(OO100I)
call OOII1I(t)
endif
set t=null
set OI01II=null
set OI011I=null
return false
endfunction
function OO01O10 takes nothing returns nothing
local trigger t=CreateTrigger()
local unit OI011I=GetTriggerUnit()
local unit OI01II=GetAttacker()
local string OO100I=OOOO0I(t)
call TriggerRegisterUnitEvent(t,OI011I,EVENT_UNIT_DAMAGED)
call TriggerRegisterTimerEvent(t,2.5,false)
call TriggerAddCondition(t,Condition(function OO01OI0))
call OOO01I(OO100I,"Target",OI011I)
call OOO01I(OO100I,"Source",OI01II)
set OI011I=null
set OI01II=null
set t=null
endfunction
function OO010O0 takes nothing returns nothing
local unit OI01II=GetAttacker()
if OO1III(OI01II,"OverloadCooldown")==false then
call OO111I(OI01II,"OverloadCooldown",0.4)
call OO01O10()
endif
endfunction
function OO01000 takes nothing returns boolean
if GetUnitAbilityLevel(GetAttacker(),1093685591)>0 and IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false and GetAttacker()==OO0OII(OOOO0I(GetTriggeringTrigger()),"Hero")then
call OO010O0()
endif
return false
endfunction
function OO010I0 takes nothing returns nothing
local trigger t=CreateTrigger()
call O110OI(t,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(t,Condition(function OO01000))
call OOO01I(OOOO0I(t),"Hero",GetTriggerUnit())
set t=null
endfunction
function OO01010 takes nothing returns boolean
if GetLearnedSkill()==1093685591 and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),1093685591)==1 then
call OO010I0()
endif
return false
endfunction
function O0OOO1O takes nothing returns nothing
local trigger t=CreateTrigger()
call O110OI(t,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t,Condition(function OO01010))
set t=null
endfunction[/codes] |
|