HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Volcano Hero ability

05-28-2004, 10:58 PM#1
Kam
downloaded the Volcano ability from this site, assimilated it into my map and changed the necessary data to match mine. Here is the scenario:
Player 1 is Orc. I gave the Arch mage the Volcano as his ultimate, and stuck him in under player 1 even though player 1 is orc. (This was so I could just hit the test button and see if it worked.) I did so and was pleased to see it work perfectly. I then tested it as a human player and made the arch mage and went to test it on some creeps, and nothing happened. I know I changed the right data because it works for Player 1(Orc), but when I try it on Player 5(Human) it does not work. Maybe this is a programming issue or something, but I really need an answer to this.
After looking at this more it seems to be geared to only work for player 1, as will all of Darky27's abilities. I don't know how to fix it, help please.
__________________
Code:

//================================================== =========================
// Trigger: Volcano
// Script Author: Darky27
// Info: Erupts a big volcano
//================================================== =========================

function Trig_Volcano_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == 'A00B' )
endfunction

function Trig_Volcano_Actions takes nothing returns nothing
local effect array effects
local location targetpoint = udg_VolcanoLoc
call TriggerExecute( udg_VolcanoTriggers[1] )

call TerrainDeformationCraterBJ( 0.50, true, targetpoint, 400.00, -450.00 )
call TerrainDeformationCraterBJ( 0.50, true, targetpoint, 200.00, 400.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( PolarProjectionBJ(targetpoint, 100.00, ( I2R(GetForLoopIndexA()) * 60.00 )), "Objects\\Spawnmodels\\Human\\FragmentationShards\\ FragBoomSpawn.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(targetpoint, 100.00, ( I2R(GetForLoopIndexA()) * 60.00 )), "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\Im paleTargetDust.mdl" )
call AddSpecialEffectLocBJ( PolarProjectionBJ(targetpoint, 100.00, ( I2R(GetForLoopIndexA()) * 60.00 )), "Objects\\Spawnmodels\\Other\\NeutralBuildingExplos ion\\NeutralBuildingExplosion.mdl" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( 0.50 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectLocBJ( PolarProjectionBJ(targetpoint, 100.00, ( I2R(GetForLoopIndexA()) * 60.00 )), "Doodads\\Cinematic\\FireRockSmall\\FireRockSmall.mdl" )
set effects[GetForLoopIndexA() * 2] = GetLastCreatedEffectBJ()
call AddSpecialEffectLocBJ( PolarProjectionBJ(targetpoint, 100.00, ( I2R(GetForLoopIndexA()) * 60.00 )), "Objects\\Spawnmodels\\Other\\NeutralBuildingExplos ion\\NeutralBuildingExplosion.mdl" )
set effects[(GetForLoopIndexA() * 2) + 1] = GetLastCreatedEffectBJ()
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call AddSpecialEffectLocBJ( targetpoint, "Doodads\\Cinematic\\TownBurningFireEmitter\\TownBu rningFireEmitter.mdl" )
set effects[1] = GetLastCreatedEffectBJ()
call TriggerSleepAction( 22.00 )
call TerrainDeformationCraterBJ( 0.50, true, targetpoint, 400.00, 450.00 )
call TerrainDeformationCraterBJ( 0.50, true, targetpoint, 200.00, -400.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call DestroyEffectBJ( effects[GetForLoopIndexA() * 2] )
call DestroyEffectBJ( effects[(GetForLoopIndexA() * 2) + 1] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyEffectBJ( effects[1] )
endfunction

function Trig_Volcano_Target_Conditions takes nothing returns boolean
return ( GetIssuedOrderIdBJ() == String2OrderIdBJ("silence") )
endfunction

function Trig_Volcano_Target_Actions takes nothing returns nothing
set udg_VolcanoLoc = GetOrderPointLoc()
endfunction

function Trig_Volcano_Attack_Actions takes nothing returns nothing
local integer i = 1
local integer j
local unit array volcano
local location target
local location targetpoint = udg_VolcanoLoc
set j = 1
loop
exitwhen j > 3
call CreateNUnitsAtLoc( 1, 'e002', Player(0), targetpoint, bj_UNIT_FACING )
set volcano[((j-1)*3)+1] = GetLastCreatedUnit()
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitPositionLoc( GetLastCreatedUnit(), targetpoint )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call CreateNUnitsAtLoc( 1, 'e003', Player(0), targetpoint, bj_UNIT_FACING )
set volcano[((j-1)*3)+2] = GetLastCreatedUnit()
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitPositionLoc( GetLastCreatedUnit(), targetpoint )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call CreateNUnitsAtLoc( 1, 'e004', Player(0), targetpoint, bj_UNIT_FACING )
set volcano[((j-1)*3)+3] = GetLastCreatedUnit()
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitPositionLoc( GetLastCreatedUnit(), targetpoint )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
set j = j + 1
endloop
loop
exitwhen i > 22
set j = 1
loop
exitwhen j > 9
set target = PolarProjectionBJ(targetpoint, GetRandomReal(300.00, 700.00), GetRandomDirectionDeg())
call IssuePointOrderLocBJ( volcano[j], "attackground", target )

set udg_VolcanoTarget = target
set udg_VolcanoTime = 1.6 * ((DistanceBetweenPoints(GetUnitLoc(volcano[j]), target)) / 500)
call TriggerExecute( udg_VolcanoTriggers[2] )

set j = j + 1
endloop
call TriggerSleepAction( 0.8 )
set i = i + 1
endloop
set j = 1
loop
exitwhen j > 9
call UnitRemoveAbilityBJ( 'Aloc', volcano[j] )
call RemoveUnit( volcano[j] )
set j = j + 1
endloop
endfunction

function Trig_Volcano_Damage_Group takes nothing returns boolean
return (( IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) == true ) and ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true ))
endfunction

function Trig_Volcano_Damage_Actions takes nothing returns nothing
local real time = udg_VolcanoTime
local location target = udg_VolcanoTarget
local effect fire
local unit Target2
local group DamageGroup = GetUnitsInRangeOfLocMatching(300.00, target, Condition(function Trig_Volcano_Damage_Group))
call TriggerSleepAction( time )
call AddSpecialEffectLocBJ( target, "Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl" )
set fire = GetLastCreatedEffectBJ()
call TriggerSleepAction( 1.0 )
call DestroyEffectBJ( fire )
loop
set Target2 = GroupPickRandomUnit(DamageGroup)
exitwhen Target2 == null
call SetUnitLifeBJ( Target2, ( GetUnitStateSwap(UNIT_STATE_LIFE, Target2) - 40 ) )
call GroupRemoveUnitSimple( Target2, DamageGroup )
endloop
endfunction

//================================================== =========================
function InitTrig_Volcano takes nothing returns nothing
local trigger Volcano_Target = CreateTrigger( )
set udg_VolcanoTriggers[1] = CreateTrigger( )
set udg_VolcanoTriggers[2] = CreateTrigger( )
set gg_trg_Volcano = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Volcano, Player(0), EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Volcano, Condition( function Trig_Volcano_Conditions ) )
call TriggerAddAction( gg_trg_Volcano, function Trig_Volcano_Actions )
call TriggerRegisterPlayerUnitEventSimple( Volcano_Target, Player(0), EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( Volcano_Target, Condition( function Trig_Volcano_Target_Conditions ) )
call TriggerAddAction( Volcano_Target, function Trig_Volcano_Target_Actions )
call TriggerAddAction( udg_VolcanoTriggers[1], function Trig_Volcano_Attack_Actions )
call TriggerAddAction( udg_VolcanoTriggers[2], function Trig_Volcano_Damage_Actions )
endfunction
05-28-2004, 11:11 PM#2
Vexorian
Darky fixed Volcano you should re download it
05-28-2004, 11:15 PM#3
Kam
Quote:
Originally Posted by Lord Vexorian
Darky fixed Volcano you should re download it

Did he fix all his abilities?
05-28-2004, 11:28 PM#4
Vexorian
heck I don't know, why do you expect me to know?
05-29-2004, 12:02 AM#5
Kam
Quote:
Originally Posted by Lord Vexorian
heck I don't know, why do you expect me to know?

Because you knew about the Volcano?
05-30-2004, 03:00 AM#6
Kam
These are two spells by Darky27, I have Pmed him but I have gotten no response and it's been two days. See if you can figure them out.

Here is the new code, it works for everyone but does little, if any damage. See if you can fond where it defines the damage done. I want the damage equal to that of Earthquake.

function GetVolcanoGameCache takes nothing returns gamecache
return gg_trg_Volcano
return null
endfunction

function VolcanoHandle2Integer takes handle h returns integer
return h
return 0
endfunction

function Initialize_Volcano_Variables takes nothing returns nothing
local gamecache g = GetVolcanoGameCache()
local group u = CreateGroup( )

local integer VolcanoAbility = 'A00B' // <-- You can adjust the Value
local integer VolcanoUnit1 = 'e002' // <-- You can adjust the Value
local integer VolcanoUnit2 = 'e003' // <-- You can adjust the Value
local integer VolcanoUnit3 = 'e004' // <-- You can adjust the Value

call StoreIntegerBJ( VolcanoHandle2Integer(u), "Unitgroup", "Unitgroup", g )
call StoreIntegerBJ( VolcanoAbility, "Ability", "Ability", g )
call StoreIntegerBJ( VolcanoUnit1, "Unit1", "Unit", g )
call StoreIntegerBJ( VolcanoUnit2, "Unit2", "Unit", g )
call StoreIntegerBJ( VolcanoUnit3, "Unit3", "Unit", g )
endfunction

function VolcanoGameCache2Trigger takes gamecache g returns trigger
return g
return null
endfunction

function VolcanoTimer takes nothing returns timer
return GetStoredInteger(GetVolcanoGameCache(), "Timer", "Timer")
return null
endfunction

function VolcanoGroup takes nothing returns group
return GetStoredInteger(GetVolcanoGameCache(), "Unitgroup", "Unitgroup")
return null
endfunction

function VolcanoAbility takes nothing returns integer
return GetStoredInteger(GetVolcanoGameCache(), "Ability", "Ability")
endfunction

function Trig_Volcano_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == VolcanoAbility() )
endfunction

function Trig_Volcano_Damage_Doodads takes nothing returns nothing
if (not IsDestructableInvulnerableBJ(GetEnumDestructable())) then
call SetDestructableLife( GetEnumDestructable(), ( GetDestructableLife(GetEnumDestructable()) - 500 ) )
endif
endfunction

function Trig_Volcano_Actions takes nothing returns nothing
local gamecache g = GetVolcanoGameCache()
local location s = GetSpellTargetLoc()
local effect array effects
local location l
local integer i = 1
local integer j = 1
local unit array volcano
local player p = GetOwningPlayer(GetSpellAbilityUnit())
local timer t = VolcanoTimer()
local group volcanos = VolcanoGroup()

call EnumDestructablesInCircleBJ( 400, s, function Trig_Volcano_Damage_Doodads )
call TerrainDeformationCraterBJ( 0.50, true, s, 400.00, -450.00 )
call TerrainDeformationCraterBJ( 0.50, true, s, 200.00, 400.00 )
loop
exitwhen i > 6
set l = PolarProjectionBJ(s, 100.00, I2R(i) * 60.00 )
call DestroyEffect( AddSpecialEffectLoc("Objects\\Spawnmodels\\Human\\FragmentationShards\\FragBoomSpawn.mdl", l) )
call DestroyEffect( AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", l) )
call DestroyEffect( AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion .mdl", l) )
call RemoveLocation(l)
set i = i + 1
endloop
call PolledWait( 0.5 )
set i = 1
loop
exitwhen i > 6
set l = PolarProjectionBJ(s, 100.00, I2R(i) * 60.00 )
set effects[i * 2] = AddSpecialEffectLoc("Doodads\\Cinematic\\FireRockSmall\\FireRockSmall.mdl", l)
set effects[(i * 2) + 1] = AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion .mdl", l)
call RemoveLocation(l)
set i = i + 1
endloop
set effects[1] = AddSpecialEffectLoc("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", s)
set effects[14] = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl", s)
set i = 1
set j = 1
loop
exitwhen j > 3
set volcano[((j-1)*3)+1] = CreateUnitAtLoc(p, GetStoredInteger(g, "Unit", "Unit1"), s, bj_UNIT_FACING)
call SetUnitPathing( volcano[((j-1)*3)+1], false )
call UnitAddAbilityBJ( 'Aloc', volcano[((j-1)*3)+1] )
call SetUnitPositionLoc( volcano[((j-1)*3)+1], s )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
set volcano[((j-1)*3)+2] = CreateUnitAtLoc(p, GetStoredInteger(g, "Unit", "Unit2"), s, bj_UNIT_FACING)
call SetUnitPathing( volcano[((j-1)*3)+2], false )
call UnitAddAbilityBJ( 'Aloc', volcano[((j-1)*3)+2] )
call SetUnitPositionLoc( volcano[((j-1)*3)+2], s )
call SetUnitInvulnerable( volcano[((j-1)*3)+2], true )
set volcano[((j-1)*3)+3] = CreateUnitAtLoc(p, GetStoredInteger(g, "Unit", "Unit3"), s, bj_UNIT_FACING)
call SetUnitPathing( volcano[((j-1)*3)+3], false )
call UnitAddAbilityBJ( 'Aloc', volcano[((j-1)*3)+3] )
call SetUnitPositionLoc( volcano[((j-1)*3)+3], s )
call SetUnitInvulnerable( volcano[((j-1)*3)+3], true )
set j = j + 1
endloop
loop
exitwhen i > 22
set j = 1
loop
exitwhen j > 9
set l = PolarProjectionBJ(s, GetRandomReal(300.00, 700.00), GetRandomDirectionDeg())
call IssuePointOrderLocBJ( volcano[j], "attackground", l )
call RemoveLocation(l)
set j = j + 1
endloop
call PolledWait( 0.8 )
set i = i + 1
endloop
call FlushStoredReal( g,"X", I2S(VolcanoHandle2Integer(volcano[1])))
call FlushStoredReal( g,"Y", I2S(VolcanoHandle2Integer(volcano[1])))
call GroupRemoveUnit( volcanos,volcano[1] )
set j = 1
loop
exitwhen j > 9
call UnitRemoveAbilityBJ( 'Aloc', volcano[j] )
call RemoveUnit( volcano[j] )
set j = j + 1
endloop
call TerrainDeformationCraterBJ( 0.50, true, s, 400.00, 450.00 )
call TerrainDeformationCraterBJ( 0.50, true, s, 200.00, -400.00 )
set i = 1
loop
exitwhen i > 6
call DestroyEffect( effects[i * 2] )
call DestroyEffect( effects[(i * 2) + 1] )
set i = i + 1
endloop
call DestroyEffect( effects[1] )
call DestroyEffect( effects[14] )
endfunction

//===========================================================================
function InitTrig_Volcano takes nothing returns nothing
local integer i = 0
local trigger t = CreateTrigger( )
set gg_trg_Volcano = VolcanoGameCache2Trigger(InitGameCache( "Volcano.w3v" ))
call Initialize_Volcano_Variables()
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 Trig_Volcano_Conditions ) )
call TriggerAddAction( t, function Trig_Volcano_Actions )
endfunction

--------------------------------------------------------------------------
Here is Stone Prison, it works up until level 4, which I added. See if you can find why it does'nt work at level 4.

function GetStonePrisonGameCache takes nothing returns gamecache
return gg_trg_Stone_Prison
return null
endfunction

function Initialize_StonePrison_Variables takes nothing returns nothing
local gamecache g = GetStonePrisonGameCache()
local integer i = 1
local real array StonePrisonRange
local real array StonePrisonTime

local integer Levels = 4 // <-- You can adjust the Value
local integer StonePrisonAbility = 'A00E' // <-- You can adjust the Value
local integer StonePrisonDestructable = 'DTrc' // <-- You can adjust the Value
//Radius for each level
set StonePrisonRange[1] = 300.00 // <-- You can adjust the Value
set StonePrisonRange[2] = 350.00 // <-- You can adjust the Value
set StonePrisonRange[3] = 400.00 // <-- You can adjust the Value
set StonePrisonRange[4] = 450.00 // <-- You can adjust the Value
//Time the prison lasts for each Level
set StonePrisonTime[1] = 10.00 // <-- You can adjust the Value
set StonePrisonTime[2] = 20.00 // <-- You can adjust the Value
set StonePrisonTime[3] = 30.00 // <-- You can adjust the Value
set StonePrisonTime[3] = 40.00 // <-- You can adjust the Value

call StoreIntegerBJ( StonePrisonAbility, "Ability", "Ability", g )
call StoreIntegerBJ( StonePrisonDestructable, "destructable", "destructable", g )
loop
exitwhen i > Levels
call StoreRealBJ( StonePrisonRange[i], "Range", "Range" + I2S(i), g )
call StoreRealBJ( StonePrisonTime[i], "Time", "Time" + I2S(i), g )
set i = i + 1
endloop
endfunction

function StonePrisonGameCache2Trigger takes gamecache g returns trigger
return g
return null
endfunction

function StonePrisonHandle2Integer takes handle h returns integer
return h
return 0
endfunction

function StonePrisonInteger2Destructable takes integer i returns destructable
return i
return null
endfunction

function StonePrisonInteger2Effect takes integer i returns effect
return i
return null
endfunction

function StonePrisonDestructable takes nothing returns integer
return GetStoredInteger(GetStonePrisonGameCache(), "destructable", "destructable")
endfunction

function StonePrisonAbility takes nothing returns integer
return GetStoredInteger(GetStonePrisonGameCache(), "Ability", "Ability")
endfunction

function StonePrisonRange takes integer level returns real
return GetStoredReal(GetStonePrisonGameCache(), "Range" + I2S(level), "Range")
endfunction

function StonePrisonTime takes integer level returns real
return GetStoredReal(GetStonePrisonGameCache(), "Time" + I2S(level), "Time")
endfunction

function Trig_Stone_Prison_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == StonePrisonAbility() )
endfunction

function Trig_Stone_Prison_Timer_Actions takes nothing returns nothing
local gamecache g = GetStonePrisonGameCache()
local timer tr = GetExpiredTimer()
local string str = I2S(StonePrisonHandle2Integer(tr))
local boolean beginCircle = GetStoredInteger (g, str, "BeginCircle") == 1
local integer num = GetStoredInteger (g, str, "num")
local integer dpn = GetStoredInteger (g, str, "dpn")
local integer timeleft = GetStoredInteger (g, str, "Timer")
local integer dn = GetStoredInteger (g, str, "dn")
local integer dd = GetStoredInteger (g, str, "dd")
local integer level = GetStoredInteger (g, str, "level")
local real angle = GetStoredReal (g, str, "angle")
local real startangle = GetStoredReal (g, str, "startangle")
local real calca = GetStoredReal (g, str, "calca")
local real dist = GetStoredReal (g, str, "distance")
local integer numdood = R2I(360 / calca)
local real range = StonePrisonRange(level)
local integer i = 1
local location sp
local location dp
local destructable d
local effect e

if (HaveStoredInteger(g,str,"effect")) then
set e = StonePrisonInteger2Effect( GetStoredInteger (g, str, "effect") )
call DestroyEffect(e)
endif
if (dn > 2) then
if (dd < dn+1) then
set d = StonePrisonInteger2Destructable(GetStoredInteger(g, str, "d" + I2S(dd)))
call SetDestructableInvulnerable(d, true)
call KillDestructable( d)
call FlushStoredInteger(g, str, "d" + I2S(dd))
set dd = dd + 1
call StoreIntegerBJ( dd, "dd", str, g )
else
call FlushStoredInteger(g, str, "dn")
call FlushStoredInteger(g, str, "dd")
endif
endif
if (beginCircle) then
set timeleft = timeleft -1
set sp = Location(GetStoredReal(g, str, "mX"),GetStoredReal(g, str, "mY"))
set dp = PolarProjectionBJ(sp,range,startangle + (num * calca) )

set e = AddSpecialEffectLoc("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl", dp)

set dpn = dpn + 1
if (dpn <= numdood) then
set d = CreateDestructable(StonePrisonDestructable(), GetLocationX(dp), GetLocationY(dp), GetRandomDirectionDeg(), 1, 0)
call SetDestructableInvulnerable(d, true)
call StoreIntegerBJ( StonePrisonHandle2Integer(d), "pd" + I2S(dpn), str, g )
call StoreIntegerBJ( dpn, "dpn", str, g )
endif
call StoreIntegerBJ( timeleft, "Timer", str, g )
call StoreIntegerBJ( num+1 , "num" , str, g )
call StoreIntegerBJ( StonePrisonHandle2Integer(e), "effect", str, g )
else
set sp = Location(GetStoredReal(g, str, "X"),GetStoredReal(g, str, "Y"))
set dp = PolarProjectionBJ(sp,dist,angle)
set d = CreateDestructable(StonePrisonDestructable(), GetLocationX(dp), GetLocationY(dp), GetRandomDirectionDeg(), 1, 0)
set dn = dn + 1
if (dist > 100) then
set dist = dist - 100
call StoreRealBJ( dist, "distance", str, g )
else
set dist = 0
call StoreIntegerBJ( 1, "BeginCircle", str, g )
call StoreIntegerBJ( 1, "dd", str, g )
endif

set e = AddSpecialEffectLoc("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl", dp)
call StoreIntegerBJ( StonePrisonHandle2Integer(e), "effect", str, g )
call StoreIntegerBJ (StonePrisonHandle2Integer(d), "d" + I2S(dn), str, g )
call StoreIntegerBJ (dn, "dn", str, g )
endif
call RemoveLocation (sp)
call RemoveLocation (dp)

if (timeleft == 0) then
call DestroyEffect ( e )
call PauseTimerBJ ( true, GetExpiredTimer() )
call DestroyTimer ( tr )
loop
exitwhen i > numdood
set d = StonePrisonInteger2Destructable(GetStoredInteger(g, str, "pd" + I2S(i)))
call KillDestructable( d)
set i = i + 1
endloop
call FlushStoredInteger (g, str, "BeginCircle")
call FlushStoredInteger (g, str, "num")
call FlushStoredInteger (g, str, "dpn")
call FlushStoredInteger (g, str, "Timer")
call FlushStoredInteger (g, str, "dn")
call FlushStoredInteger (g, str, "dd")
call FlushStoredReal (g, str, "angle")
call FlushStoredReal (g, str, "startangle")
call FlushStoredReal (g, str, "calca")
call FlushStoredReal (g, str, "distance")
call FlushStoredReal (g, str, "X")
call FlushStoredReal (g, str, "Y")
call FlushStoredReal (g, str, "mX")
call FlushStoredReal (g, str, "mY")

call DestroyTrigger ( GetTriggeringTrigger() )
endif
endfunction

function Trig_Stone_Prison_Actions takes nothing returns nothing
local gamecache g = GetStonePrisonGameCache()
local unit u = GetSpellAbilityUnit()
local location s = GetSpellTargetLoc()
local location l = GetUnitLoc(u)
local real angle = AngleBetweenPoints(l, s)
local integer level = GetUnitAbilityLevelSwapped(StonePrisonAbility(), u)
local real range = StonePrisonRange(level)
local integer time = R2I(StonePrisonTime(level) / 0.05)
local location sp = PolarProjectionBJ(s,range,angle-90)
local timer tr = CreateTimer ( )
local trigger t = CreateTrigger( )
local real calca = (360 / ((bj_PI * 2 * range) / 75)) + 2
local real dist = DistanceBetweenPoints(sp,l)
local real a = AngleBetweenPoints(sp, l)
local real X = GetLocationX(sp)
local real Y = GetLocationY(sp)
local real mX = GetLocationX(s)
local real mY = GetLocationY(s)
local string str

call RemoveLocation(s)
call RemoveLocation(l)
call RemoveLocation(sp)

call TriggerRegisterTimerExpireEventBJ( t, tr )
call TriggerAddAction( t, function Trig_Stone_Prison_Timer_Actions )
call TimerStart(tr, 0.05, true, null)

set str = I2S(StonePrisonHandle2Integer(tr))
call StoreIntegerBJ( time, "Timer" , str, g )
call StoreIntegerBJ( 0, "BeginCircle", str, g )
call StoreIntegerBJ( level, "level" , str, g )
call StoreRealBJ ( X, "X" , str, g )
call StoreRealBJ ( Y, "Y" , str, g )
call StoreRealBJ ( mX, "mX" , str, g )
call StoreRealBJ ( mY, "mY" , str, g )
call StoreRealBJ ( a, "angle" , str, g )
call StoreRealBJ ( angle-90, "startangle" , str, g )
call StoreRealBJ ( dist, "distance" , str, g )
call StoreRealBJ ( calca, "calca" , str, g )
endfunction

//===========================================================================
function InitTrig_Stone_Prison takes nothing returns nothing
local integer i = 0
local trigger t = CreateTrigger( )
set gg_trg_Stone_Prison = StonePrisonGameCache2Trigger(InitGameCache( "StonePrison.w3v" ))
call Initialize_StonePrison_Variables()
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 Trig_Stone_Prison_Conditions ) )
call TriggerAddAction( t, function Trig_Stone_Prison_Actions )
endfunction
05-30-2004, 04:25 AM#7
Xinlitik
Quote:
set StonePrisonTime[3] = 30.00 // <-- You can adjust the Value
set StonePrisonTime[3] = 40.00 // <-- You can adjust the Value

That could be it..... stoneprisontime[4] = 0 so it lasts for 0 seconds.
05-30-2004, 05:33 AM#8
Kam
Quote:
Originally Posted by Xinlitik
That could be it..... stoneprisontime[4] = 0 so it lasts for 0 seconds.


That was correct, thank you. :>

I figured out the other one, so you can disguard this post now. Thx.
06-02-2004, 08:31 AM#9
Darky28
damage of volcano is made by the 3 units you specify. Just adjust the damage of the 3 units to adjust the volcano damage