[J演示]stone giant:tiny(dota6.41)
bloodtypec吧
全部回复
仅看楼主
level 9
bloodtypec 楼主
//===========================================================================
// Trigger: Grow
//===========================================================================
// OpenDota 6.41 deprotected by NETRAT and DioD
// inspired by everyone who posted on forum threads and feedback page
// based on OpenDota 6.32b, deprotected by DimonT, NETRAT and TheBloodiest
// Objects used:
// 'A0CY' = Grow (Stone Giant : Tiny)
// 'R00E' = Grow,Melee Upgrade
// DEBUG Trigger Number : 76
function GrowSpell takes nothing returns boolean
return GetLearnedSkill()=='A0CY'and IsUnitIllusion(GetTriggerUnit())==false
endfunction
function GrowMain takes nothing returns nothing
local unit lQD=GetUnit(H2Tx(GetTriggeringTrigger()),"Tiny")
local integer lmZ=GetUnitAbilityLevel(lQD,'A0CY')
if GetUnitState(lQD,UNIT_STATE_LIFE)>1 then
call SetUnitScale(lQD,.5+.25*lmZ,.5+.25*lmZ,.5+.25*lmZ)
endif
endfunction
function GrowSetting takes nothing returns nothing
local trigger ltt
local unit lQD=GetTriggerUnit()
local integer lmZ=GetUnitAbilityLevel(lQD,'A0CY')
call SetPlayerTechResearched(GetOwningPlayer(lQD),'R00E',lmZ)
if lmZ==1 then
set ltt=CreateTrigger()
call TriggerAddAction(ltt,function GrowMain)
call TriggerRegisterTimerEvent(ltt,2.,true)
call SetHandle(H2Tx(ltt),"Tiny",lQD)
call SetUnitScale(lQD,.5+.25*lmZ,.5+.25*lmZ,.5+.25*lmZ)
endif
endfunction
function GrowInit takes nothing returns nothing
local trigger ltt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(ltt,Condition(function GrowSpell))
call TriggerAddAction(ltt,function GrowSetting)
endfunction
function InitTrig_Grow takes nothing returns nothing
endfunction
//===========================================================================
// Trigger: Avalanche
//===========================================================================
// OpenDota 6.41 deprotected by NETRAT and DioD
// inspired by everyone who posted on forum threads and feedback page
// based on OpenDota 6.32b, deprotected by DimonT, NETRAT and TheBloodiest
// Objects used:
// 'A0LL' = Avalanche (Stone Giant : Tiny)
// 'e00E' = Spellcaster
// 'A0KG' = Avalanche (effect)
// DEBUG Trigger Number : 279
function Trig_Avalanche_Conditions takes nothing returns boolean
if(not(GetSpellAbilityId()=='A0LL'))then
return false
endif
return true
endfunction
function Trig_Avalanche_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,bj_UNIT_FACING)
call RemoveLocation(liD)
call SetUnitInvulnerable(bj_lastCreatedUnit,true)
call ShowUnitHide(bj_lastCreatedUnit)
call UnitApplyTimedLifeBJ(10.,'BTLF',bj_lastCreatedUnit)
call UnitAddAbility(bj_lastCreatedUnit,'A0KG')
call SetUnitAbilityLevelSwapped('A0KG',bj_lastCreatedUnit,GetUnitAbilityLevel(GetTriggerUnit(),'A0LL'))
set liD=GetSpellTargetLoc()
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("clusterrockets"),liD)
call RemoveLocation(liD)
endfunction
function StartTrigger_Avalanche takes nothing returns nothing
set gg_trg_Avalanche=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Avalanche,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Avalanche,Condition(function Trig_Avalanche_Conditions))
call TriggerAddAction(gg_trg_Avalanche,function Trig_Avalanche_Actions)
endfunction
function InitTrig_Avalanche takes nothing returns nothing
endfunction
//===========================================================================
// Trigger: Toss
//===========================================================================
// OpenDota 6.41 deprotected by NETRAT and DioD
// inspired by everyone who posted on forum threads and feedback page
// based on OpenDota 6.32b, deprotected by DimonT, NETRAT and TheBloodiest
// Objects used:
// 'A0BZ' = Toss (Stone Giant : Tiny)
// 'n00I' = Chicken
// 'e01H' = Crow
// 'n00L' = Roshan
// 'A04R' = Marker (Nether Ward 4,Lightning Bolter,Nether Ward 3,Nether Ward 2,Vengeance Death caster,...)
// 'H00F' = Dragon Knight
// 'H00E' = Dragon Knight
// 'H00G' = Dragon Knight
// 'A0CY' = Grow (Stone Giant : Tiny)
// 'AEme' = Metamorphosis (Demon Hunter : Shadowsong,Shadowfury,Shadowstalker,Flameseeker,Darkweaver,...)
// DEBUG Trigger Number : 280
function Trig_Toss_Conditions takes nothing returns boolean
if(GetSpellAbilityId()!='A0BZ')then
return false
endif
if GetUnitTypeId(GetSpellTargetUnit())=='n00I'or GetUnitTypeId(GetSpellTargetUnit())=='e01H'then
return false
endif
if(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))then
return false
endif
return true
endfunction
function TossFilter takes nothing returns boolean
if(IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT))then
return false
endif
if IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) then
return false
elseif IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING) then
return false
elseif GetFilterUnit()==GetSpellAbilityUnit()then
return false
elseif IsUnitDeadBJ(GetFilterUnit())then
return false
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_ANCIENT) then
return false
elseif GetUnitTypeId(GetFilterUnit())=='n00L'then
return false
elseif IsUnitType(GetTriggerUnit(),UNIT_TYPE_GIANT) then
return false
elseif IsUnitVisible(GetFilterUnit(),GetOwningPlayer(GetSpellAbilityUnit()))==false then
return false
elseif GetUnitAbilityLevelSwapped('A04R',GetFilterUnit())!=0 then
return false
elseif(GetUnitTypeId(GetFilterUnit())=='H00F'or GetUnitTypeId(GetFilterUnit())=='H00E'or GetUnitTypeId(GetFilterUnit())=='H00G')then
return false
endif
return true
endfunction
function TossDamage takes unit pWho,real pxx,real pyy,real pAOE,real pDamage,integer pSpellId returns nothing
local group lVictims=CreateGroup()
local unit lFirst
local location lTMP
call GroupEnumUnitsInRange(lVictims,pxx,pyy,pAOE,null)
loop
set lFirst=FirstOfGroup(lVictims)
exitwhen lFirst==null
if IsUnitEnemy(lFirst,GetOwningPlayer(pWho))and IsUnitDeadBJ(lFirst)==false and GetUnitAbilityLevel(lFirst,'A04R')==0 then
if(IsUnitType(lFirst,UNIT_TYPE_STRUCTURE)==false)then
call UnitDamageTargetBJ(pWho,lFirst,pDamage,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
else
call UnitDamageTargetBJ(pWho,lFirst,pDamage/3,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
endif
set lTMP=GetUnitLoc(lFirst)
call DestroyEffect(AddSpellEffectByIdLoc(pSpellId,EFFECT_TYPE_CASTER,lTMP))
call DestroyEffect(AddSpellEffectByIdLoc(pSpellId,EFFECT_TYPE_CASTER,lTMP))
call DestroyEffect(AddSpellEffectByIdLoc(pSpellId,EFFECT_TYPE_CASTER,lTMP))
call RemoveLocation(lTMP)
call GroupRemoveUnit(lVictims,lFirst)
else
call GroupRemoveUnit(lVictims,lFirst)
endif
endloop
call GroupClear(lVictims)
call DestroyGroup(lVictims)
endfunction
function TossMain takes nothing returns nothing
local timer lMoveTimer=GetExpiredTimer()
local string lTable=H2Tx(lMoveTimer)
local integer lCount=GetInteger(lTable,"TossCounter")
local real lRange=GetReal(lTable,"TossDistance")
local real lAngle=GetReal(lTable,"TossAngle")
local location lTarget=GetLocation(lTable,"TossTargetLoc")
local location lStart=GetLocation(lTable,"TossSourceLoc")
local unit lCaster=GetUnit(lTable,"Tiny")
local unit lVictim=GetUnit(lTable,"TossSource")
local real lHeight=(lCount-25)*(lCount-25)
local real lSpeedMod=lRange*lCount/50-lRange
local location lDest=PolarProjectionBJ(lTarget,lSpeedMod,lAngle)
if(lCount<51)then
call SetUnitPositionLoc(lVictim,lDest)
call SetUnitFlyHeight(lVictim,775-lHeight,0)
set lCount=lCount+1
if(GetRandomInt(1,4)==2)then
call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",lVictim,"Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl"))
endif
endif
if(lCount>50)then
call SetUnitFlyHeight(lVictim,GetUnitDefaultFlyHeight(lVictim),0)
call PauseUnit(lVictim,false)
call SetUnitPathing(lVictim,true)
call TerrainDeformationRippleBJ(.2,true,lTarget,1.,300.,96.,1,64.)
if IsUnitAlly(lVictim,GetOwningPlayer(lCaster))then
call UnitDamageTargetBJ(lCaster,lVictim,.2*75*GetUnitAbilityLevel(lCaster,'A0BZ'),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
else
call UnitDamageTargetBJ(lCaster,lVictim,(.2+.15*GetUnitAbilityLevel(lCaster,'A0CY'))*75*GetUnitAbilityLevel(lCaster,'A0BZ'),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION)
endif
call TossDamage(lCaster,GetLocationX(lTarget),GetLocationY(lTarget),300,75.*I2R(GetUnitAbilityLevelSwapped('A0BZ',lCaster)),'A0BZ')
call EnumDestructablesInCircleBJ(300,lTarget,function KillDestructableEnum)
call PauseTimer(GetExpiredTimer())
call PolledWait(.01)
call FastFlush(lTable)
call DestroyTimer(GetExpiredTimer())
call RemoveLocation(lTarget)
call RemoveLocation(lStart)
endif
call SetInteger(lTable,"TossCounter",lCount)
call RemoveLocation(lDest)
endfunction
function Trig_Toss_Actions takes nothing returns nothing
local group lNearCaster=CreateGroup()
local timer lMoveTimer
local unit lCaster=GetTriggerUnit()
local unit lVictim
local location lTarget
local location lStart
local integer lCounter
local real lRange
local real lAngle
local string lf5
call GroupEnumUnitsInRange(lNearCaster,GetUnitX(lCaster),GetUnitY(lCaster),275,Condition(function TossFilter))
set lVictim=GroupPickRandomUnit(lNearCaster)
call DestroyGroup(lNearCaster)
set lTarget=GetUnitLoc(GetSpellTargetUnit())
set lStart=GetUnitLoc(lVictim)
set lCounter=1
set lRange=DistanceBetweenPoints(lStart,lTarget)
set lAngle=AngleBetweenPoints(lStart,lTarget)
if(lVictim!=null and GetUnitTypeId(lVictim)!='n00I'and GetUnitTypeId(lVictim)!='e01H'and GetOwningPlayer(GetSpellTargetUnit())!=GetOwningPlayer(lCaster))then
call SetUnitAnimationByIndex(lCaster,4)
call PauseUnit(lVictim,true)
call SetUnitPathing(lVictim,false)
call UnitAddAbility(lVictim,'AEme')
call UnitRemoveAbility(lVictim,'AEme')
set lMoveTimer=CreateTimer()
set lf5=H2Tx(lMoveTimer)
call SetHandle(lf5,"Tiny",lCaster)
call SetHandle(lf5,"TossSource",lVictim)
call SetHandle(lf5,"TossTargetLoc",lTarget)
call SetHandle(lf5,"TossSourceLoc",lStart)
call SetInteger(lf5,"TossCounter",lCounter)
call SetReal(lf5,"TossDistance",lRange)
call SetReal(lf5,"TossAngle",lAngle)
call TimerStart(lMoveTimer,.02,true,function TossMain)
endif
endfunction
function StartTrigger_Toss takes nothing returns nothing
set gg_trg_Toss=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Toss,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Toss,Condition(function Trig_Toss_Conditions))
call TriggerAddAction(gg_trg_Toss,function Trig_Toss_Actions)
endfunction
function InitTrig_Toss takes nothing returns nothing
endfunction
//===========================================================================
// Trigger: Craggy_Exterior
//===========================================================================
// OpenDota 6.41 deprotected by NETRAT and DioD
// inspired by everyone who posted on forum threads and feedback page
// based on OpenDota 6.32b, deprotected by DimonT, NETRAT and TheBloodiest
// Objects used:
// 'A0BU' = Craggy Exterior (Stone Giant : Tiny)
// 'e00E' = Spellcaster
// 'A0BV' = Craggy damage
// DEBUG Trigger Number : 281
function Trig_Craggy_Exterior_Conditions takes nothing returns boolean
if(not(GetUnitAbilityLevelSwapped('A0BU',GetTriggerUnit())>0))then
return false
endif
if(not(IsUnitType(GetAttacker(),UNIT_TYPE_MELEE_ATTACKER)))then
return false
endif
return true
endfunction
function Trig_Craggy_Exterior_Actions takes nothing returns nothing
local location liD=GetUnitLoc(GetTriggerUnit())
if(GetRandomInt(1,100)<=(GetUnitAbilityLevelSwapped('A0BU',GetTriggerUnit())*6))then
call CreateNUnitsAtLocFacingLocBJ(1,'e00E',GetOwningPlayer(GetTriggerUnit()),liD,GetUnitLoc(GetAttacker()))
call UnitAddAbility(bj_lastCreatedUnit,'A0BV')
call SetUnitAbilityLevelSwapped('A0BV',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0BU',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("thunderbolt"),GetAttacker())
endif
call RemoveLocation(liD)
endfunction
function StartTrigger_Craggy_Exterior takes nothing returns nothing
set gg_trg_Craggy_Exterior=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Craggy_Exterior,EVENT_PLAYER_UNIT_ATTACKED)
call TriggerAddCondition(gg_trg_Craggy_Exterior,Condition(function Trig_Craggy_Exterior_Conditions))
call TriggerAddAction(gg_trg_Craggy_Exterior,function Trig_Craggy_Exterior_Actions)
endfunction
function InitTrig_Craggy_Exterior takes nothing returns nothing
endfunction
为҉什҉么҉我҉感҉觉҉我҉电҉脑҉上҉的҉字҉都҉是҉花҉屏҉的҉呢҉?҉为҉什҉么҉感҉觉҉电҉脑҉上҉的҉字҉都҉是҉雾҉茫҉茫҉的҉?҉难҉道҉是҉我҉眼҉睛҉花҉了҉?҉还҉是҉我҉电҉脑҉的҉显҉示҉屏҉坏҉掉҉了҉?
2013年11月06日 19点11分 1
1