Name | Type | is_array | initial_value |
Admin | boolean | No | |
AdminNameSection | string | Yes | |
Adminsupername | string | No | |
Adminuser | player | No | |
airmiddle | boolean | Yes | false |
Antistuck | unit | No | |
Aragorn | unit | No | |
attackcritters | group | No | |
Attackers | player | No | Player11 |
Blocked | string | No | |
Blue | unit | No | UnitNull |
BlueTeam | force | No | |
Bombermen | group | No | |
BootSysOn | boolean | No | false |
BootSysTimer | timer | No | |
Bottomspawn1 | group | No | |
BottomSpawn2 | group | No | |
Cancel | button | No | |
Chances | player | No | |
Chooseplayer | dialog | No | |
Coinagers | unit | Yes | |
controls | boolean | Yes | |
crosshair | unit | No | |
crosshair_dummy | unit | Yes | |
CrosshairBounty | integer | No | 1 |
CrosshairFloatingText | texttag | No | |
crosshairposition | location | No | |
CrosshairTarget | unit | No | |
CTFBoard | leaderboard | No | |
CTFMode | boolean | No | |
CTFScore | integer | Yes | |
Debug | boolean | No | |
Debuglevel | integer | No | |
Defeat | boolean | No | false |
Defenders | force | No | |
Destroyer | unit | No | |
Destroyer2 | unit | No | |
DiffDialog | dialog | No | |
Duke | unit | No | |
Easy | button | No | |
fireEffect1v2 | effect | Yes | |
fireEffect2v2 | effect | Yes | |
fireEffect3v2 | effect | Yes | |
fireEffect4v2 | effect | Yes | |
firespec | effect | Yes | |
FireSpiralCaster | unit | No | |
FireSpiralv2Caster | unit | No | |
FireSpiralv2isCanceled | boolean | No | |
Flagtaken | boolean | Yes | |
g1 | button | No | |
g10 | button | No | |
g100 | button | No | |
g5 | button | No | |
Gates | destructable | Yes | |
Giveamount | integer | Yes | |
GiveMoney | dialog | Yes | |
Gold_Amount | integer | No | 10 |
Goldfinger | unit | No | |
Hard | button | No | |
hoarfrostAbility | abilcode | No | |
hoarfrostUnitType | unitcode | No | |
kills | integer | Yes | |
Leaderboard | leaderboard | No | |
Leaving | integer | Yes | |
leavingplayer | player | Yes | |
Leftspawn | group | No | |
Leftspawn2 | group | No | |
Legolas | unit | No | |
Level_Number | integer | No | 0 |
LittleKarmo | integer | No | |
LittleKarmoP | player | No | |
Lives | integer | No | 40 |
Lives_Lost | integer | No | 0 |
Mind_Confusion_Target | unit | Yes | |
Mind_Confusion_Target_group | group | No | |
Mindcontrolnumberin | integer | No | 1 |
Mindcontrolnumberout | integer | No | 1 |
Mindcontrolplayer | player | Yes | |
Monster_Amount | integer | No | |
Monster_Type | unitcode | No | |
MonsterTeam | force | No | |
Names | string | Yes | |
Next_Level | timer | No | |
NoLivesLost | boolean | No | true |
Normal | button | No | |
OK | button | Yes | |
Perfection | button | No | |
Playercash | real | Yes | |
Playerchoose | button | Yes | |
Playergold | integer | Yes | |
Players | player | Yes | |
Playesno | integer | No | 0 |
Rainbow | string | Yes | |
RandomTip | integer | No | 0 |
RedBlue | unit | Yes | |
RedTeam | force | No | |
restart | boolean | No | |
Returntime | timer | No | |
Rightspawn | group | No | |
Rightspawn2 | group | No | |
Sell | unitcode | No | nC57 |
Shake | boolean | Yes | |
SpecialEffects | effect | Yes | |
SpellMaster | integer | No | |
Startvisability | fogmodifier | Yes | |
targeting | boolean | No | |
tesst | real | No | |
Test | string | No | |
TestMode | string | No | Duke-Wintermaul |
Texttimer | real | Yes | 10.00 |
Timevisibility | fogmodifier | Yes | |
TimeWarpOne | boolean | Yes | |
TimeWarpRandom | boolean | No | |
TimeWarpunit | unit | No | |
Tip | string | Yes | |
Togivetribute | player | Yes | |
Victim | player | No | |
Watch | boolean | No | |
Watch_unit | unit | No | |
Watchlevel | integer | No | |
Woodused | boolean | Yes | |
xposition | real | No | |
yposition | real | No |
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 = 3 // <-- You can adjust the Value
local integer StonePrisonAbility = 'A00G' // <-- 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
//Time the prison lasts for each Level
set StonePrisonTime[1] = 05.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
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, false)
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, false)
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
//***************************************************************************************************
//*
//* Artic Fury by Vexorian
//* ¯¯¯¯¯¯¯¯¯¯
//* Requires:
//* - The Artic Fury Ability
//* - This Trigger (make sure it points to the right rawcode)
//* Art:
//* - The Ability's target art is the frozen effect
//* - The Ability's Special art spawns if a frozen unit dies.
//* - The Ability's effect art is the start of the spell.
//*
//***************************************************************************************************
//====================================================================================================
// Artic Fury Spell Configuration
//
constant function ArticFury_SpellId takes nothing returns integer
return 'A00A' //// Artic Fury ability Rawcode
endfunction
constant function ArticFury_Area takes real level returns real
return 200+25*level //// the Area of effect formula
endfunction
constant function ArticFury_Duration takes real level returns real
return 5+2*level //// The duration formula
endfunction
constant function ArticFury_FreezingTime takes nothing returns real
return 1.0 //// The time the snow lasts, and before the units get completelly frozen (aesthetic option only)
endfunction
//====================================================================================================
function Trig_ArticFury_Conditions takes nothing returns boolean
return GetSpellAbilityId() == ArticFury_SpellId()
endfunction
function ArticFury_Control takes nothing returns nothing
local unit p=bj_lastCreatedUnit
local effect fx=bj_lastCreatedEffect
local timer t=bj_lastStartedTimer
local boolean b=true
loop
exitwhen IsUnitDeadBJ(p) or TimerGetRemaining(t)<=0
if b and TimerGetElapsed(t)>=ArticFury_FreezingTime() then
set b=false
call SetUnitTimeScale(p,0)
endif
if not IsUnitPaused(p) then
call PauseUnit(p,true)
if not(b) then
call SetUnitTimeScale(p,0)
endif
endif
call TriggerSleepAction(0)
endloop
call DestroyEffect(fx)
if IsUnitAliveBJ(p) then
call PauseUnit(p,false)
call SetUnitTimeScale(p,1)
else
call DestroyEffect( AddSpellEffectById(ArticFury_SpellId(),EFFECT_TYPE_SPECIAL,GetUnitX(p),GetUnitY(p) ) )
call ShowUnit(p,false)
if not IsUnitType(p,UNIT_TYPE_HERO) then
call TriggerSleepAction(0)
call RemoveUnit(p)
endif
endif
endfunction
function ArticFury_DestroyTimer takes nothing returns nothing
call DestroyTimer( GetExpiredTimer() )
endfunction
function Trig_ArticFury_Actions takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer s=GetSpellAbilityId()
local integer l=GetUnitAbilityLevel(u,s)
local location loc=GetSpellTargetLoc()
local group range=CreateGroup()
local unit p
local trigger sp=CreateTrigger()
local timer cronos=CreateTimer()
local rect fxr=RectFromCenterSizeBJ(loc,ArticFury_Area(l)*2,ArticFury_Area(l)*2)
local weathereffect fx=AddWeatherEffect(fxr,'SNbs')
local real d
local real a
call EnableWeatherEffect(fx,true)
call TriggerAddAction(sp,function ArticFury_Control)
call TimerStart(cronos,ArticFury_Duration(l), false,function ArticFury_DestroyTimer)
call GroupEnumUnitsInRangeOfLoc(range,loc,ArticFury_Area(l),null)
set bj_lastStartedTimer=cronos
loop
set p=FirstOfGroup(range)
exitwhen p==null
if IsUnitEnemy(p,GetOwningPlayer(u)) and IsUnitAliveBJ(p) then
call PauseUnit(p,true)
set d=GetRandomReal(0,ArticFury_Area(l))
set a=GetRandomReal(0,360)
call DestroyEffect(AddSpellEffectById(s,EFFECT_TYPE_EFFECT,GetLocationX(loc)+d*CosBJ(a) , GetLocationY(loc)+d*SinBJ(a) ) )
set bj_lastCreatedEffect = AddSpellEffectTargetById(s,EFFECT_TYPE_TARGET,p,"origin")
set bj_lastCreatedUnit=p
call TriggerExecute(sp)
endif
call GroupRemoveUnit(range,p)
endloop
call PolledWait(ArticFury_FreezingTime())
call SetRect(fxr, GetLocationX(loc)-20,GetLocationY(loc)-20,GetLocationX(loc)+20,GetLocationY(loc)+20)
call TriggerSleepAction(0)
call RemoveWeatherEffect(fx)
call RemoveRect(fxr)
call ResetTrigger(sp)
call DestroyTrigger(sp)
call DestroyGroup(range)
call RemoveLocation(loc)
set fx=null
set fxr=null
set u=null
set loc=null
set range=null
set p=null
set sp=null
set cronos=null
endfunction
//=================================================================================================
function InitTrig_Artic_Fury takes nothing returns nothing
set gg_trg_Artic_Fury = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Artic_Fury, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Artic_Fury, Condition( function Trig_ArticFury_Conditions ) )
call TriggerAddAction( gg_trg_Artic_Fury, function Trig_ArticFury_Actions )
endfunction