1 [Jass] Earthshaker SpellPack Mar Abr 10, 2012 5:01 pm
Rogue_Mc
Novato
Hola. aca les traigo las spells del Earthshaker en jass =/, perdonen por no ser original jeje.
Esta seccion del foro esta re vacia . Bueno aca la tienen.
Cualquier Duda, sugerencia etc es bienvenida.
Creditos por las librerias que usa:
Faux(Frank) - Timers(muZk) - NewGroup(muZk) - Stun(muZk) - Damage(Jesus4Lyf )
Saludos.
Esta seccion del foro esta re vacia . Bueno aca la tienen.
- Fissure:
- Código:
scope Fissure initializer OnInit //Uses NewGroup, Damage, Stun, Faux, Timers
globals
public constant integer F_SPELLID = 'A003'
private constant integer F_FISSUREID = 'B002'
private constant string F_EFFECT1 = "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl"
private constant string F_EFFECT2 = "Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl"
private constant real F_MAXRANGE = 1200
private constant real F_DISCRE = 64
private constant real F_AOE = 175.
private constant real F_DGBAS = 75
private constant real F_DGINC = 50
private constant real F_DBAS = 0.75
private constant real F_DINC = 0.25
private unit U
private player PLAYER
private hashtable HT = InitHashtable()
endglobals
private function F_GroupDmg takes group g, real dm, real du, unit u, group g2 returns nothing
loop
set U = FirstOfGroup(g)
exitwhen U == null
call GroupRemoveUnit(g,U)
if IsUnitEnemy(U,PLAYER) and GetWidgetLife(U) > 0.405 and not IsUnitInGroup(U,g2) then
call GroupAddUnit (g2,U)
call AddStun (U,du)
call Damage_Spell (u,U,dm)
endif
endloop
endfunction
private function F_End takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer id = GetHandleId(t)
local integer d = 0
loop
exitwhen d >= 19
call RemoveDestructable(LoadDestructableHandle(HT,id,d))
set d = d + 1
endloop
call FlushChildHashtable (HT,id)
call ReleaseTimerEx()
set t = null
endfunction
private function F_SpellApply takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetSpellTargetX()
local real y = GetSpellTargetY()
local real xu = GetUnitX(u)
local real yu = GetUnitY(u)
local real xd = xu
local real yd = yu
local real a = Angle (xu,yu,x,y)
local integer lv = GetUnitAbilityLevel(u,F_SPELLID)
local timer t = NewTimer()
local group g = NewGroup()
local group g2 = NewGroup()
local real d = 0
local integer c = 0
local integer id
set PLAYER = GetTriggerPlayer()
call TimerStart(t,8,false,function F_End)
set id = GetHandleId(t)
loop
exitwhen d >= F_MAXRANGE
call GroupEnumUnitsInRange(g,xd,yd,F_AOE,null)
call F_GroupDmg(g,F_DGINC+(F_DGINC*lv),F_DBAS+(F_DINC*lv),u,g2)
set xd = xd + F_DISCRE * Cos(a)
set yd = yd + F_DISCRE * Sin(a)
call SaveDestructableHandle(HT,id,c,CreateDestructable(F_FISSUREID,xd,yd,a,.45,1))
call DestroyEffect(AddSpecialEffect(F_EFFECT1,xd,yd))
call DestroyEffect(AddSpecialEffect(F_EFFECT2,xd,yd))
set d = d + F_DISCRE
set c = c + 1
endloop
call ReleaseGroup(g)
call ReleaseGroup(g2)
set u = null
set t = null
set g = null
set g2 = null
endfunction
private function F_Conditions takes nothing returns boolean
if GetSpellAbilityId() == F_SPELLID then
call F_SpellApply()
endif
return false
endfunction
private function OnInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function F_Conditions))
set t = null
//Preload
call RemoveDestructable(CreateDestructable(F_FISSUREID,0,0,0,1,1))
call Preload("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl")
call Preload("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl")
endfunction
endscope
- EnchantTotem:
- Código:
scope EnchantTotem initializer OnInit //uses Damage
globals
public constant integer ET_SPELLID = 'A002'
private constant integer ET_BUFFID = 'B001'
endglobals
private function ET_Conditions takes nothing returns boolean
if GetUnitAbilityLevel(GetEventDamageSource(),ET_BUFFID) > 0 and Damage_IsAttack() then
call UnitRemoveAbility(GetEventDamageSource(),ET_BUFFID)
endif
return false
endfunction
private function OnInit takes nothing returns nothing
local trigger t = CreateTrigger()
call Damage_RegisterEvent(t)
call TriggerAddCondition(t,Condition(function ET_Conditions))
set t = null
endfunction
endscope
- Aftershock:
- Código:
scope AfterShock initializer OnInit
globals
private constant integer AS_SPELLID = 'A004'
private constant integer AS_DUMMYID = 'u002'
private constant integer AS_SPELLDID = 'A005'
private unit DUMMY
endglobals
private function AS_SpellCondi takes nothing returns boolean
return GetSpellAbilityId() == Fissure_F_SPELLID or GetSpellAbilityId() == EnchantTotem_ET_SPELLID or GetSpellAbilityId() == EchoSlam_ES_SPELLID and GetUnitAbilityLevel(GetTriggerUnit(),AS_SPELLID) > 0
endfunction
private function AS_Conditions takes nothing returns boolean
local unit u
if AS_SpellCondi() then
set u = GetTriggerUnit()
set DUMMY = CreateUnit(GetTriggerPlayer(),AS_DUMMYID,GetUnitX(u) , GetUnitY(u), 0)
call UnitAddAbility(DUMMY, AS_SPELLDID)
call SetUnitAbilityLevel(DUMMY, AS_SPELLDID, GetUnitAbilityLevel(u,AS_SPELLID))
call IssueImmediateOrder(DUMMY, "stomp")
call UnitApplyTimedLife(DUMMY, 'BTLF', 0.03)
set u = null
endif
return false
endfunction
private function OnInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function AS_Conditions))
set t = null
endfunction
endscope
- EchoSlam:
- Código:
scope EchoSlam initializer OnInit //uses NewGroup
globals
public constant integer ES_SPELLID = 'A006'
private constant integer ES_SPELLDID = 'A000'
private constant integer ES_DUMMYID = 'u002'
private constant real ES_AOE = 600.
endglobals
private function ES_SpellApply takes nothing returns nothing
local unit u = GetSpellAbilityUnit()
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local integer lvl = GetUnitAbilityLevel(u,ES_SPELLID)
local player p = GetTriggerPlayer()
local unit temp
local unit dummy = CreateUnit(p,ES_DUMMYID,x,y,0)
call UnitAddAbility(dummy, ES_SPELLDID)
call SetUnitAbilityLevel(dummy, ES_SPELLDID, lvl)
call SetUnitScale(dummy,0.25,0.25,0.25)
call GroupEnumUnitsInRange(bj_lastCreatedGroup,x,y,ES_AOE,null)
loop
set temp = FirstOfGroup(bj_lastCreatedGroup)
exitwhen temp == null
call GroupRemoveUnit(bj_lastCreatedGroup,temp)
if GetWidgetLife(temp) > 0.405 and IsUnitEnemy(temp,p) then
call SetUnitX(dummy,GetUnitX(temp))
call SetUnitY(dummy,GetUnitY(temp))
call IssueImmediateOrder(dummy, "fanofknives" )
endif
endloop
call UnitApplyTimedLife(dummy, 'BTLF', 1)
set u = null
set p = null
set dummy = null
endfunction
private function ES_Conditions takes nothing returns boolean
if GetSpellAbilityId() == ES_SPELLID then
call ES_SpellApply()
endif
return false
endfunction
private function OnInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function ES_Conditions))
set t = null
//Preload
set bj_lastCreatedUnit = CreateUnit(Player(15),'u000',0,0,0)
call UnitAddAbility(bj_lastCreatedUnit,ES_SPELLDID)
call RemoveUnit(bj_lastCreatedUnit)
endfunction
endscope
Cualquier Duda, sugerencia etc es bienvenida.
Creditos por las librerias que usa:
Faux(Frank) - Timers(muZk) - NewGroup(muZk) - Stun(muZk) - Damage(Jesus4Lyf )
Saludos.