so basically, after patch 1.24, i had to sift through my map and remove all the retun bugs (which i did) but its still not loading (like im still using the return bug(which im not)) and then i read somewhere about if/elseif blocks causing wc3 to think im using the return bug... so i isolated the triggers that are causing it to not load... so i disabled the triggers, the map loads fine, and then when i re-enable the triggers, the map doesnt load (like im using the bug)... now 4/6 of the spells dont use *anything* fancy, just a basic unit casts spell. do simple effects (the other two use TimerUtils, but i fixed that to use GetHandleId(h) instead of the return bug)... but for some reason its still not loading (i disabled the condition, cause i thought something might be messed up with the condition's return, but its not that, i also removed the filter cause it uses if/elseif blocks, but its not that either)
so, after my long explanation, here are my spells, if anyone could *please* help me, i really would rather be able to actually finish this map...
EDIT: so only stalker and blood for the blood god dont work now
EDIT2: so everything is fixed, i set booleans isntead of returninig, and put the single spells without filters into scopes and made the gobals private, and everything works... this thread can be closed now.
so, after my long explanation, here are my spells, if anyone could *please* help me, i really would rather be able to actually finish this map...
EDIT: so only stalker and blood for the blood god dont work now
EDIT2: so everything is fixed, i set booleans isntead of returninig, and put the single spells without filters into scopes and made the gobals private, and everything works... this thread can be closed now.
JASS:
globals
integer i
endglobals
function Trig_Stalker_Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(), 039;A04P039;) > 0
endfunction
struct stalker
unit u
endstruct
function stalker_filter takes nothing returns nothing
if GetDestructableTypeId(GetEnumDestructable()) == 039;JTtw039; then
set i = i+1
endif
endfunction
function stalker_timer takes nothing returns nothing
local location l
local stalker d = GetTimerData(GetExpiredTimer())
set i = 0
set l = GetUnitLoc(d.u)
call LoreEnumDestructablesInRangeOfLoc(l, 350, function stalker_filter)
if i > 0 then
if GetUnitAbilityLevel(d.u, 039;A04U039;) == 0 then
call UnitAddAbility(d.u, 039;A04W039;)
endif
call SetUnitAbilityLevel(d.u, 039;A04U039;, GetUnitAbilityLevel(d.u, 039;A04P039;))
call SetUnitAbilityLevel(d.u, 039;A04V039;, GetUnitAbilityLevel(d.u, 039;A04P039;))
else
call UnitRemoveAbility(d.u, 039;A04W039;)
endif
call RemoveLocation(l)
set l = null
endfunction
function Trig_Stalker_Actions takes nothing returns nothing
local timer t = NewTimer()
local stalker d = stalker.create()
set d.u = GetTriggerUnit()
call SetTimerData(t, d)
call TimerStart(t, 1, true, function stalker_timer)
endfunction
//===========================================================================
function InitTrig_Stalker takes nothing returns nothing
set gg_trg_Stalker = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Stalker, GetWorldBounds())
call TriggerAddCondition( gg_trg_Stalker, Condition( function Trig_Stalker_Conditions ) )
call TriggerAddAction( gg_trg_Stalker, function Trig_Stalker_Actions )
endfunction
JASS:
function Trig_the_shrouding_Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(), 039;A06A039;) > 0
endfunction
struct shrouding
unit u
endstruct
function shrouding_filter takes nothing returns boolean
if IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) then
return false
elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then
return false
elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD) then
return false
endif
return true
endfunction
function shrouding_timer takes nothing returns nothing
local timer t = GetExpiredTimer()
local shrouding d = GetTimerData(t)
local unit u = d.u
local location l = GetUnitLoc(u)
local group g = CreateGroup()
local unit n
local unit i
if IsUnitType(d.u, UNIT_TYPE_DEAD) == false then
call GroupEnumUnitsInRangeOfLoc(g, l, 800, Condition(function shrouding_filter))
loop
set n = FirstOfGroup(g)
call GroupRemoveUnit(g, n)
exitwhen n == null
if IsUnitEnemy(n, GetOwningPlayer(u)) then
set i = CreateUnitAtLoc(GetOwningPlayer(u), 039;h000039;, l, 270)
call UnitAddAbility(i, 039;A080039;)
call SetUnitAbilityLevel(i, 039;A080039;, GetUnitAbilityLevel(u, 039;A06A039;))
call IssueTargetOrder(i, "curse", n)
call UnitApplyTimedLife(i, 039;BTLF039;, 2)
endif
endloop
endif
call d.destroy()
call DestroyGroup(g)
call RemoveLocation(l)
set g = null
set l = null
set u = null
set n = null
set i = null
endfunction
function Trig_the_shrouding_Actions takes nothing returns nothing
local timer t = NewTimer()
local shrouding d = shrouding.create()
set d.u = GetTriggerUnit()
call SetTimerData(t, d)
call TimerStart(t, 1, true, function shrouding_timer)
call d.destroy()
endfunction
//===========================================================================
function InitTrig_the_shrouding takes nothing returns nothing
set gg_trg_the_shrouding = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_the_shrouding, GetWorldBounds())
call TriggerAddCondition( gg_trg_the_shrouding, Condition( function Trig_the_shrouding_Conditions ) )
call TriggerAddAction( gg_trg_the_shrouding, function Trig_the_shrouding_Actions )
endfunction
JASS:
function Trig_nemasis_active_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A06C039;
endfunction
function Trig_nemasis_active_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit n
local unit i = GetSpellTargetUnit()
local unit t
local location l = GetUnitLoc(u)
set n = CreateUnitAtLoc(GetOwningPlayer(u), 039;h000039;, l, 270)
call UnitAddAbility(n, 039;A06K039;)
call IssueTargetOrder(n, "spiritlink", u)
call UnitApplyTimedLife(n, 039;BTLF039;, 2)
set t = CreateUnitAtLoc(GetOwningPlayer(u), 039;h000039;, l, 270)
call UnitAddAbility(t, 039;A075039;)
call IssueTargetOrder(t, "thunderbolt", i)
call UnitApplyTimedLife(t, 039;BTLF039;, 2)
call UnitAddAbility(u, 039;A06M039;)
call SetUnitAbilityLevel(u, 039;A06J039;, GetUnitAbilityLevel(u, 039;A06C039;))
call IssueTargetOrder(u, "attack", i)
call RemoveLocation(l)
set l = null
set u = null
set n = null
set i = null
set t = null
endfunction
function StartNemasis takes nothing returns nothing
set gg_trg_nemasis_active = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_nemasis_active, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_nemasis_active, Condition( function Trig_nemasis_active_Conditions ) )
call TriggerAddAction( gg_trg_nemasis_active, function Trig_nemasis_active_Actions )
endfunction
//===========================================================================
function InitTrig_nemasis_active takes nothing returns nothing
endfunction
JASS:
function Trig_ardent_blade_cast_Conditions takes nothing returns boolean
return true
endfunction
function blade_filter takes nothing returns boolean
if IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) then
return false
elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then
return false
elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD) then
return false
endif
return true
endfunction
function Trig_ardent_blade_cast_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit n
local unit i
local location l = GetUnitLoc(u)
local group g = CreateGroup()
call SetUnitTimeScale(u, .5)
call SetUnitAnimation(u, "attack")
call GroupEnumUnitsInRangeOfLoc(g, l, 700, Condition(function blade_filter))
loop
set n = FirstOfGroup(g)
call GroupRemoveUnit(g, n)
exitwhen n == null
if AngleBetweenUnits(n, u)+180 > (GetUnitFacing(u)-45) and AngleBetweenUnits(n, u)+180 < (GetUnitFacing(u)+45) and IsUnitAlly(n, GetOwningPlayer(u)) == false then
set i = CreateUnitAtLoc(GetOwningPlayer(u), 039;h01E039;, l, 270)
call SetUnitAbilityLevel(i, 039;A09N039;, GetUnitAbilityLevel(u, 039;A09J039;))
call IssueTargetOrder(i, "attack", n)
call UnitApplyTimedLife(i, 039;BTLF039;, 1)
endif
endloop
call SetUnitTimeScale(u, 1)
call RemoveLocation(l)
call DestroyGroup(g)
set l = null
set g = null
set u = null
set n = null
set i = null
endfunction
function StartArdentCast takes nothing returns nothing
set gg_trg_ardent_blade_cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ardent_blade_cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ardent_blade_cast, Condition( function Trig_ardent_blade_cast_Conditions ) )
call TriggerAddAction( gg_trg_ardent_blade_cast, function Trig_ardent_blade_cast_Actions )
endfunction
//===========================================================================
function InitTrig_ardent_blade_cast takes nothing returns nothing
endfunction
JASS:
function Trig_UnstableInjection_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A00O039;
endfunction
function Trig_UnstableInjection_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit n = GetSpellTargetUnit()
local location l = GetUnitLoc(n)
local unit i
local real r = GetUnitState(n, UNIT_STATE_LIFE)
if IsUnitAlly(n, GetOwningPlayer(u)) == true then
call SetUnitState(n, UNIT_STATE_LIFE, r + (75 + 50*GetUnitAbilityLevel(u, 039;A00O039;)) )
set i = CreateUnitAtLoc(GetOwningPlayer(u), 039;h000039;, l, 270)
call UnitAddAbility(i, 039;A00Q039;)
call SetUnitAbilityLevel(i, 039;A00Q039;, GetUnitAbilityLevel(u, 039;A00O039;))
call IssueTargetOrder(i, "bloodlust", n)
call UnitApplyTimedLife(i, 039;BTFL039;, 2)
else
call UnitDamageTarget(u, n, (75 + 50*GetUnitAbilityLevel(u, 039;A00O039;)), true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_FIRE, WEAPON_TYPE_WHOKNOWS)
set i = CreateUnitAtLoc(GetOwningPlayer(u), 039;h000039;, l, 270)
call UnitAddAbility(i, 039;A00P039;)
call SetUnitAbilityLevel(i, 039;A00P039;, GetUnitAbilityLevel(u, 039;A00O039;))
call IssueTargetOrder(i, "slow", n)
call UnitApplyTimedLife(i, 039;BTFL039;, 2)
endif
call RemoveLocation(l)
set u = null
set n = null
set i = null
endfunction
function StartInjection takes nothing returns nothing
set gg_trg_UnstableInjection = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UnstableInjection, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_UnstableInjection, Condition( function Trig_UnstableInjection_Conditions ) )
call TriggerAddAction( gg_trg_UnstableInjection, function Trig_UnstableInjection_Actions )
endfunction
//===========================================================================
function InitTrig_UnstableInjection takes nothing returns nothing
endfunction
JASS:
globals
integer level = 0
endglobals
function Trig_Blood_for_the_Blood_God_Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetKillingUnit(), 039;A03O039;) > 0
endfunction
function Trig_Blood_for_the_Blood_God_Actions takes nothing returns nothing
local unit u = GetKillingUnit()
local unit n
local location l = GetUnitLoc(u)
set n = CreateUnitAtLoc(GetOwningPlayer(u), 039;h000039;, l, 270)
call UnitAddAbility(n, 039;A03Q039;)
if IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) then
set level = 5 + 5*GetUnitAbilityLevel(u, 039;A03O039;)
elseif GetUnitAbilityLevel(u, 039;B015039;) == 0 then
set level = 1
else
set level = level + 1
if level > 5 + 5*GetUnitAbilityLevel(u, 039;A03O039;) then
set level = 5 + 5*GetUnitAbilityLevel(u, 039;A03O039;)
endif
endif
call SetUnitAbilityLevel(n, 039;A03Q039;, level)
call IssueImmediateOrder(n, "roar")
call UnitApplyTimedLife(n, 039;BTLF039;, 2)
call RemoveLocation(l)
set u = null
set n = null
set l = null
endfunction
function StartBloodGod takes nothing returns nothing
set gg_trg_Blood_for_the_Blood_God = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blood_for_the_Blood_God, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Blood_for_the_Blood_God, Condition( function Trig_Blood_for_the_Blood_God_Conditions ) )
call TriggerAddAction( gg_trg_Blood_for_the_Blood_God, function Trig_Blood_for_the_Blood_God_Actions )
endfunction
//===========================================================================
function InitTrig_Blood_for_the_Blood_God takes nothing returns nothing
endfunction