• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Volcano

Status
Not open for further replies.
Level 3
Joined
Jul 17, 2004
Messages
57
I edited Darky's Volcano-Spell, using the CasterSystem instead of units to shout out of the crater and immolation-abilities :


function Vulkancache takes nothing returns gamecache
return gg_trg_Vulkan
return null
endfunction
function VulkanHandle2Integer takes handle h returns integer
return h
return 0
endfunction
function Vulkanvars takes nothing returns nothing
local integer VulkanSkill = 'AOeq'
local gamecache g = Vulkancache()
call StoreIntegerBJ( VulkanSkill, "Ability", "Ability", g )
endfunction
function Vulkancache2 takes gamecache g returns trigger
return g
return null
endfunction
function VulkanTimer takes nothing returns timer
return GetStoredInteger(Vulkancache(), "Timer", "Timer")
return null
endfunction
function VulkanSkill takes nothing returns integer
return GetStoredInteger(Vulkancache(), "Ability", "Ability")
endfunction
function Vulkancondition takes nothing returns boolean
return ( GetSpellAbilityId() == VulkanSkill() )
endfunction
function Doodadskill takes nothing returns nothing
if (not IsDestructableInvulnerableBJ(GetEnumDestructable())) then
call SetDestructableLife( GetEnumDestructable(), ( GetDestructableLife(GetEnumDestructable()) - 500 ) )
endif
endfunction
function Vulkanaction takes nothing returns nothing
local gamecache g = Vulkancache()
local location s = GetSpellTargetLoc()
local unit u=GetTriggerUnit()
local integer x=GetUnitAbilityLevel( u, GetSpellAbilityId() )
local player p = GetOwningPlayer(GetSpellAbilityUnit())
local timer t = VulkanTimer()
local effect array effects
local integer i = 1
local integer j = 1
local location l
call EnumDestructablesInCircleBJ( 175.00+75*x, s, function Doodadskill )
call TerrainDeformationCraterBJ( 0.50, true, s, (175.00+75*x), -(185.00+85*x) )
call TerrainDeformationCraterBJ( 0.50, true, s, (125.00+25*x), (175.00+75*x) )
call PolledWait( 0.5 )
set i = 1
loop
exitwhen i > 5
set l = PolarProjectionBJ(s, 25.00*(x+1), I2R(i) * 72.00 )
set effects = AddSpecialEffectLoc("Doodads\\Cinematic\\FireRockSmall\\FireRockSmall.mdl", l)
call RemoveLocation(l)
set i = i + 1
endloop
set effects[6] = AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", s)
call AddDamagingEffectExLoc(p, "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", "Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl", "origin", s, x*5 ,0.5, (5*(x+3)-3), 25*(x+5), false)
loop
exitwhen i > 5*(3+x)
set j = 1
loop
exitwhen j > 2+x
set l = PolarProjectionBJ(s, GetRandomReal(200.00+75*x, 400.00+85*x), GetRandomDirectionDeg())
call ProjectileLaunchDamageLoc(p, "abilities\\weapons\\ancientprotectormissile\\ancientprotectormissile.mdl", 500, 1.0, s, 0, l, 0, 200,5*(3+x),false)
call RemoveLocation(l)
set l = PolarProjectionBJ(s, GetRandomReal(200.00+75*x, 400.00+85*x), GetRandomDirectionDeg())
call ProjectileLaunchDamageLoc(p, "abilities\\weapons\\reddragonbreath\\reddragonmissile.mdl", 500, 1.0, s, 0, l, 0, 200,5*(3+x),false)
call RemoveLocation(l)
set j = j + 1
endloop
if ( ModuloInteger(i, 5) == 1 ) then
call DestroyEffect( effects[6] )
set effects[6] = AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", s)
endif
call PolledWait( 1.0 )
set i = i + 1
endloop
set j = 1
call TerrainDeformationCraterBJ( 0.50, true, s, (175.00+75*x), (185.00+85*x) )
call TerrainDeformationCraterBJ( 0.50, true, s, (125.00+25*x), -(175.00+75*x) )
set i = 1
loop
exitwhen i > 6
call DestroyEffect( effects )
set i = i + 1
endloop
endfunction
function InitTrig_Vulkan takes nothing returns nothing
local integer i = 0
local trigger t = CreateTrigger( )
set gg_trg_Vulkan = Vulkancache2(InitGameCache( "Vulkan.w3v" ))
call Vulkanvars()
loop
exitwhen i > 11
if ( GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING ) then
call TriggerRegisterPlayerUnitEventSimple( t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT )
endif
set i = i + 1
endloop
call TriggerAddCondition( t, Condition( function Vulkancondition ) )
call TriggerAddAction( t, function Vulkanaction )

i dont have much knowledge in jass. could anyone tell me if theres some thats not needed or how i could shorten it ? uses earthquake as baseability and work in this version with multiple casts and players.
 
Status
Not open for further replies.
Top