• 🏆 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!

Clockwerk Goblin Spellpack[Kingz]v1.5

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
I forgot about this hero i made for some time, and i thought it was time for me to update it so it works with 1.24b+.

So i uploaded this newest version with several changes since the last one was deleted in the "purge".
There is a lot of code in the map and therefore i was too lazy to paste it here :p



Fires off a mortar missile, upon reaching the targeted area the missile cracks sheding mines upon the battlefield. Each mine deals 65 damage in 250 AOE upon destruction.Gains benefits from Shrapnel Technology.

Level 1 - Deploys 3 mines.
Level 2 - Deploys 4 mines.
Level 3 - Deploys 5 mines.


Throws a spining bomb at the target area. Upon almost reaching the ground the bomb explodes sending shrapnel on nearby units dealing physical damage and reducing speed. Multiple casts stack.Gains benefits from Shrapnel Technology.

Level 1 - Deals 15 direct damage, reduces movement speed by 5 and deals 3 damage per second for 10 seconds.
Level 2 - Deals 20 direct damage, reduces movement speed by 7 and deals 4 damage per second for 10 seconds.
Level 3 - Deals 25 direct damage, reduces movement speed by 9 and deals 5 damage per second for 10 seconds.


Provides the Clockwerk hero a deeper understanding of physics allowing him to improve his abilities. Each level increases the potency of his other spells.

Cluster Mines - Adds 3 damage per second to affected enemies and a knockback.
Crack Bomb - Increases the potency of the shrapnel sprayed, increasing the chances of double shrapnel sprays for 10%.
Massive Fragmentation - Increases the number of fragments by 5 for each level.


Causes the Clockwerk to change his parts into giant razor blades and explode. The explosion send the blades flying in all directions, dealing damage and eventualy returning to form the Clockwerk again. Causes 25 damage per second to every unit, disolves into 20 parts, can hit flying units. Deals damage as the parts passes through units.





JASS:
//***********************************************************************************
//* By Kingz:                                                                       *
//*                         Basic Stuff Library                                     *
//* A library i made to speed up my coding of the submision                         *
//* Contains several usefull functions and several functions i use                  *
//* are simmilar to existing ones.                                                  *
//* Also contains the Max/Min values of the maps X/Y which are used as boundaries   *
//* Used in all of the spells in this submision to provide easier coding            *
//***********************************************************************************

library BasicStuff initializer XY

globals
    real MaxX   // used for the maps Max X
    real MaxY   // used for the maps Max Y
    real MinX   // used for the maps Min X
    real MinY   // used for the maps Min Y
    
    private constant real OffsetAngle = 0   // used for the Z facing function but is model based,for this model the value is 0
endglobals

//parabola function for the missile - Credits go to Moyack
constant function ParabolaZ takes real h,real d,real cd returns real
    return (4*h / d)*(d - cd)*(cd / d)
endfunction

//used to replace AnyUnitEventBJ
constant function dummyFilter takes nothing returns boolean
    return true
endfunction

//polar projection x
function PPX takes real x,real dist,real rad returns real
    return x + dist * Cos(rad)
endfunction

//polar projection y
function PPY takes real y,real dist,real rad returns real
    return y + dist * Sin(rad)
endfunction

//radian between locations
function RBL takes real x1, real y1, real x2, real y2 returns real
    return Atan2(y2 - y1, x2 - x1)
endfunction

//distance between locations
function DBL takes real x1, real y1, real x2, real y2 returns real
    return SquareRoot((x2-x1) * (x2-x1) + (y2-y1) * (y2-y1))
endfunction

// used for dummy unit z facings
function SetUnitZFacing takes unit whichUnit, real facingAngle returns nothing
	local integer i = R2I((facingAngle+OffsetAngle)*0.7+0.5)
	if i>0 then
		call SetUnitAnimationByIndex(whichUnit, i)
	else
		call SetUnitAnimationByIndex(whichUnit, i+252)
	endif
endfunction

//sets up the min/max X/Y values
function XY takes nothing returns nothing
    set MaxX = GetRectMaxX(bj_mapInitialPlayableArea)
    set MaxY = GetRectMaxY(bj_mapInitialPlayableArea)
    set MinX = GetRectMinX(bj_mapInitialPlayableArea)
    set MinY = GetRectMinY(bj_mapInitialPlayableArea)
endfunction

endlibrary


JASS:
//***********************************************************************************************************
//* By Kingz:                                                                                               *
//*                                 Shrapnel Library                                                        *
//*                                                                                                         *
//* A simple library made only for the contest, as i didn't want to use any DOT system i made this one      *
//* Quite simple, with low amount of fixed options which actualy are fixed for my needs and the hero alone  *
//* Made for the Hero Contest and is a mixture of DPI and movement speed reduction                          *
//* Again used to avoid work with object editor abilities                                                   *
//* Hopefully it's usage won't be treated in the score as it's options are fixed to fit the requirements    *
//* of this submision for the Hero Contest ONLY                                                             *
//***********************************************************************************************************
library ShrapnelSystem initializer StartPreload requires TimerUtils 

//************************************************
//Settings - All of the library settings are here*
//************************************************

globals
    private constant attacktype Att =  ATTACK_TYPE_NORMAL   // attack type of the damage dealt (intentionaly made it normal not spell like)
    private constant damagetype Dtype = DAMAGE_TYPE_NORMAL  // damage type of the damage dealt (intentionaly made it normal not spell like)
    private constant weapontype Wtype = WEAPON_TYPE_WHOKNOWS    // changing this may result in sound upon damage
    private constant string Effect = "Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodFootman.mdl"   // first effect of the damage   (apears on the unit)
    private constant string Effect2 = "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl"            // second effect of the damage (apears on the unit)
    private constant string Atpoint = "chest"   // special effects attach point   
    private constant real EffSpam = 1.00 // interval for effect spaming, this is a constant value to avoid overspamming of effects(default 1.00 seconds)
endglobals

//***************************************************************************************
//Settings end - Do not modify anything below this if you don't know what you are doing!*
//***************************************************************************************

private struct Core

    unit u  // suffering unit
    unit ds // damage source
    real dmg    // damage per interval
    real msdeg  // movement speed degration
    real duration   // duration
    real chkint // used for interval checks
    real effint // used for special effect interval
    real offt   // when this value reaches the duration value the effect stops
    real interval
    timer t
    
    // the main method used for damage dealing and other stuff
    static method Periodic takes nothing returns nothing
        local timer t =GetExpiredTimer()
        local thistype dat = GetTimerData(t)
        local integer i = 0
        set dat.chkint = dat.chkint + 0.1
        set dat.effint = dat.effint + 0.1
        set dat.offt = dat.offt + 0.1
        if GetUnitState(dat.u,UNIT_STATE_LIFE) <= 0.405 then
            set dat.offt = dat.duration
        endif
        if dat.effint >= EffSpam then
            call DestroyEffect(AddSpecialEffectTarget(Effect,dat.u,Atpoint))
            call DestroyEffect(AddSpecialEffectTarget(Effect2,dat.u,Atpoint))
            set dat.effint = 0
        endif
        if dat.chkint >= dat.interval then
            call UnitDamageTarget(dat.ds,dat.u,dat.dmg,true,false,null,null,null)
            set dat.chkint = 0.00
        endif
        if dat.offt >= dat.duration then
            call SetUnitMoveSpeed(dat.u,GetUnitMoveSpeed(dat.u) + dat.msdeg)
            call ReleaseTimer(t)
            call dat.destroy()
        endif
    endmethod
    
    
    // implements the fetched variables into the struct
    static method DefineVal takes unit u,unit source, real dmg,real MSdeg, real duration,real interval returns nothing
        local thistype dat = thistype.allocate()
        set dat.u = u
        set dat.ds = source
        set dat.dmg = dmg
        set dat.msdeg = MSdeg
        set dat.duration = duration
        set dat.chkint = interval
        set dat.offt = 0
        set dat.effint = EffSpam
        set dat.t = NewTimer()
        call SetTimerData(dat.t,dat)
        if interval > 0.1 then
            set dat.interval = interval
        else
            set dat.interval = 0.1
        endif
        call SetUnitMoveSpeed(u,GetUnitMoveSpeed(dat.u) - MSdeg)
        call TimerStart(dat.t,0.1,true,function thistype.Periodic)
    endmethod
endstruct

// function that is called upon to execute the shrapnel system
function Shrapnel takes unit t,unit u,real dmg,real MSdeg,real duration,real interval returns nothing
    call Core.DefineVal(t,u,dmg,MSdeg,duration,interval)
endfunction

// preloads the used effects
private function StartPreload takes nothing returns nothing
    call Preload(Effect)
    call Preload(Effect2)
    call PreloadStart()
endfunction

endlibrary


JASS:
//*******************************************************************************************************************************************
//* By Kingz:                                                                                                                               *
//*                                 Simple Knockback                                                                                        *
//*                          -Requires BasicStuff library-                                                                                  *
//*                                                                                                                                         *
//*Since i needed a good knockback system that works on distance rather on speed,                                                           *
//* i decided to make one, this system is simple to use and provides a good precision                                                       *
//* of the distance you wanted. Namely i made an equation that takes in count the speed decrease factor and tried to make a good system.    *
//* On the end i got a system that is really precise at hight values (300 distance or more) but is unprecise at low values (~100 and less). *
//* All in all a simple system i made only for the Hero contest #2.                                                                         *
//*******************************************************************************************************************************************

library KnockbackSystem requires BasicStuff

globals

//*****************************************************
//Settings - All of the system fixed settings are here*
//*****************************************************

    private constant real TimerInterval = 0.02  //timer interval, so obvious
    private constant real KB_speed_dec = 0.05   //speed decrease factor
    
//***************************************************************************************
//Settings end - Do not modify anything below this if you don't know what you are doing!*
//***************************************************************************************
    
    private group TmpGroup = CreateGroup()  //group used to avoid multiple speed stacking issue
endglobals

private function Kill_destructables takes nothing returns nothing
    call KillDestructable(GetEnumDestructable())
endfunction

private struct Knockback

    unit u  // unit that is knockbacked
    unit s  // source of the knockback
    real speed  // speed at which the unit is knockbacked
    real rad    // radian used for the angled movement
    string eff  // string used for the trail effect
    boolean kd  // if true destroys trees around the pushed unit
    
    
    static thistype array ind
    static integer on = 0
    static timer counter = CreateTimer()
    
    static method Motion takes nothing returns nothing
        local thistype dat
        local real x    // used only for simplified equations
        local real y    // also
        local real h    // height variable calculated via the parabola function
        local rect r    // used for tree destruction
        local integer i = 0 // used for the loop
        local conditionfunc cf = Condition(function dummyFilter)
        loop
            exitwhen i >= thistype.on
            set dat = thistype.ind[i]
            if dat.speed > 0 then
                set x = GetUnitX(dat.u) + dat.speed * Cos(dat.rad)
                set y = GetUnitY(dat.u) + dat.speed * Sin(dat.rad)
                set dat.speed = dat.speed - KB_speed_dec
                if x > MaxX or x < MinX or y > MaxY or y < MinY then
                    set dat.speed = 0
                    set x = GetUnitX(dat.u)
                    set y = GetUnitY(dat.u)
                endif
                if IsUnitType(dat.u,UNIT_TYPE_FLYING) == false then
                    if (IsTerrainPathable(x,y,PATHING_TYPE_AMPHIBIOUSPATHING) == false) then
                        call SetUnitX(dat.u,x)
                        call SetUnitY(dat.u,y)
                    endif
                else
                    call SetUnitX(dat.u,x)
                    call SetUnitY(dat.u,y)
                endif
                set x = GetUnitX(dat.u)
                set y = GetUnitY(dat.u)
                if GetRandomInt(0,10) == 6 then
                    call DestroyEffect(AddSpecialEffect(dat.eff,x,y))
                endif
                if dat.kd == true then
                    set r = Rect(x - 250,y - 250,x + 250,y + 250)
                    call EnumDestructablesInRect(r,cf,function Kill_destructables)
                    call DestroyCondition(cf)
                    set cf = null
                endif
            else
                call GroupRemoveUnit(TmpGroup,dat.u)
                set dat.u = null
                set dat.s = null
                set dat.eff = null
                call dat.destroy()
                set thistype.on = thistype.on - 1
                set thistype.ind[i] = thistype.ind[thistype.on]  
            endif
            set i = i + 1
        endloop
        call RemoveRect(r)
        set r = null
        if thistype.on == 0 then
            call PauseTimer(thistype.counter)
        endif
    endmethod
    
    static method AddtoKnock takes unit s,unit t,real dist,real time,real rad,boolean kd,string eff returns nothing
        local thistype dat = thistype.allocate()
        set dat.u = t
        set dat.s = s
        set dat.speed = (dist*0.5 / time) * TimerInterval + (time / TimerInterval * KB_speed_dec)
        set dat.rad = rad
        set dat.kd = kd
        set dat.eff = eff
        if thistype.on == 0 then
            call TimerStart(thistype.counter,TimerInterval,true,function thistype.Motion)
        endif
        set Knockback.ind[Knockback.on] = dat
        set Knockback.on = Knockback.on + 1
    endmethod
endstruct

    //function that is called upon
    function KnockbackTarget takes unit source, unit target, real distance, real time,real radian,boolean killdestructables,string kbeff returns nothing
        if IsUnitInGroup(target,TmpGroup) == false then
            call Knockback.AddtoKnock(source,target,distance,time,radian,killdestructables,kbeff)
            call GroupAddUnit(TmpGroup,target)
        endif
    endfunction

endlibrary





JASS:
//*******************************************************************************
//* By Kingz:                                                                   *
//*                             Cluster Mines                                   *
//*                             Requirements:                                   *
//*                           A point based spell                               *
//*                         The Trigger Mine ability                            *
//*                  Zdummy.mdx model which is featured in this map             *
//*                           The dummy unit                                    *
//*                           JassNewGenPack                                    *
//*                           Library OnDeath                                   *
//*                     -which requires GroupUtils-                             *
//*                                                                             *
//*                           Library BasicStuff                                *
//*                       Shrapnel Technology Ability                           *
//*******************************************************************************

//***************************************************************************************************
//                                        *NOTICE*                                                  *
//  The synergy effect(knockback and shranpel effect) are based on the Trigger Mine ability level.  *
//  Therefore that ability has 4 levels(1st level means no synergy).                                *                               *
//  I made it like that to avoid using custom values or even more complicated methods.              *
//***************************************************************************************************

library ClusterMines initializer InitCM requires OnDeath,BasicStuff,TimerUtils
//**********************************************
//Settings - All of the spell settings are here*
//**********************************************
globals
    private constant integer SpellID = 'A000' //spell ID
    private constant integer SynergySpellID = 'A004' // Shrapnel Ability ID
    private constant integer TriggerMineID = 'A002' // Trigger Mine ability ID
    private constant integer DummyID = 'e000' //dummy unit ID
    private constant integer MineID = 'n000' //mine unit ID
    private constant string MissileEff = "Abilities\\Spells\\Other\\TinkerRocket\\TinkerRocketMissile.mdl" //missile art
    private constant string ImpactEff = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" //this effects will get created upon missile impact with the ground
    private constant string MineArt_Air = "Abilities\\Weapons\\GyroCopter\\GyroCopterMissile.mdl" //upon cracking the new mines get this effect attached
    private constant string MineArt_Ground = "units\\creeps\\GoblinLandMine\\GoblinLandMine.mdl" //upon impact attaches this effect to the missile
    private constant string MissileCluster = "Abilities\\Weapons\\FlyingMachine\\FlyingMachineImpact.mdl" // attached effect which is instantly destroyed upon clustering
    private constant string MissileCluster2 = "Abilities\\Weapons\\GyroCopter\\GyroCopterMissile.mdl" // attached effect which is instantly destroyed upon clustering
    private constant integer Mine_num = 3 // base mine number
    private constant integer Mine_inc = 1 // mine increase per level
    private constant real Gravity = 0.05 // gravity pull effect upon mine fall
    private constant real Missile_Speed = 12 // cluster missile speed
    private constant real Max_height = 700 // maximum height reached during the flight
    private constant real Max_AOE = 600 // maximum AOE in which the mines can fall
    private constant real Mine_life_span = 60 // the number of seconds the mines stay on the ground before detonation(used for life timer)
endglobals
//***************************************************************************************
//Settings end - Do not modify anything below this if you don't know what you are doing!*
//***************************************************************************************

// triggers condition
private function Cond takes nothing returns boolean
    return GetSpellAbilityId() == SpellID
endfunction

// the spells struct
private struct Core
    unit c      // used for damage source reasons
    real cd     // used for parabola function and distance check
    real s      // missile speed
    real rad    // used for missile angle in radians
    real md     // used for distance checking
    unit m      // used for the missile unit
    effect art  // used for the missile art
    boolean eod // used for secondary execution upon missile death
    integer no  // defines the number of secondary effect unit's spawned
    timer t
  
    // method used for missile motion and secondary execution
    static method Motion takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local thistype dat = GetTimerData(t)
        local real x            // used for simplified equations
        local real y            // also
        local real h            // used for parabola calculations
        local integer i = 0     // used for the main loop
        local integer num = 0   // used for secondary execution of the spell
        local integer maxnum    // also
        local real radian = 0   // used for reimplementation of missiles(secondary effect)
        local unit missile      // same
        local real dist         // same
        local string art        // same
        local unit tu           // same    
        local player tp         // used to avoid GetOwningPlayer() function in a loop
            set x = GetUnitX(dat.m)
            set y = GetUnitY(dat.m)
            if x > MaxX or x < MinX or y > MaxY or y < MinY then
                set dat.cd = dat.md
            endif
        if dat.eod == true then
            if dat.cd < dat.md / 2 then
                set x = GetUnitX(dat.m) + dat.s * Cos(dat.rad)
                set y = GetUnitY(dat.m) + dat.s * Sin(dat.rad)
                set dat.cd = dat.cd + dat.s
                call SetUnitX(dat.m,x)
                call SetUnitY(dat.m,y)
                set h = ParabolaZ(Max_height,dat.md,dat.cd)
                call SetUnitFlyHeight(dat.m,h,0)
            else
                call DestroyEffect(dat.art)
                set maxnum = dat.no
                set x = GetUnitX(dat.m)
                set y = GetUnitY(dat.m)
                set tp = GetOwningPlayer(dat.c)
                loop
                    exitwhen num == maxnum
                        set radian = GetRandomReal(0,2)
                        set missile = CreateUnit(tp,DummyID,x,y,bj_RADTODEG * radian)
                        call UnitAddAbility(missile,'Arav')
                        call UnitRemoveAbility(missile,'Arav')
                        call SetUnitAbilityLevel(missile,TriggerMineID,1 + GetUnitAbilityLevel(dat.c,SynergySpellID))
                        set art = MineArt_Air
                        set dist = GetRandomReal(Max_AOE / 2,Max_AOE)
                        call SetUnitZFacing(missile,-Atan(Max_height / dist) * bj_RADTODEG)
                        call thistype.Implement(dat.c,missile,dist / 3 * 0.02,art,radian,dist/2,dist,false,0)
                        call SetUnitFlyHeight(missile,ParabolaZ(Max_height,dist,dist/2),0)
                        call DestroyEffect(AddSpecialEffectTarget(MissileCluster,missile,"origin"))
                        call DestroyEffect(AddSpecialEffectTarget(MissileCluster2,missile,"origin"))
                    set num = num + 1
                endloop
                call RemoveUnit(dat.m)
                set dat.art = null
                set dat.c = null
                set dat.m = null    
                set tp = null
                set tu = null
                set art = null
                set missile = null
                call PauseTimer(t)
                call ReleaseTimer(t)
                call dat.destroy()   
            endif
        else
            if dat.cd < dat.md then
                set x = GetUnitX(dat.m) + dat.s * Cos(dat.rad)
                set y = GetUnitY(dat.m) + dat.s * Sin(dat.rad)
                set dat.s = dat.s + Gravity
                set dat.cd = dat.cd + dat.s
                call SetUnitX(dat.m,x)
                call SetUnitY(dat.m,y)
                set h = ParabolaZ(Max_height,dat.md,dat.cd)
                call SetUnitFlyHeight(dat.m,h,0)
            else
                set x = GetUnitX(dat.m)
                set y = GetUnitY(dat.m)
                call DestroyEffect(dat.art)
                call DestroyEffect(AddSpecialEffect(ImpactEff,x,y))
                set tu = CreateUnit(GetOwningPlayer(dat.c),MineID,x,y,GetRandomReal(0,360))
                call SetUnitAbilityLevel(tu,TriggerMineID,1 + GetUnitAbilityLevel(dat.c,SynergySpellID))
                call UnitApplyTimedLife(tu,'BTLF',60)
                call SetUnitAnimation(tu,"birth")
                call RemoveUnit(dat.m)
                set tu = null
                set dat.art = null
                set dat.c = null
                set dat.m = null    
                call PauseTimer(t)
                call ReleaseTimer(t)
                call dat.destroy()  
            endif
        endif
    endmethod
    
    // used to implement fetched variables into the struct
    static method Implement takes unit c,unit m,real s,string e,real rad,real cd,real md,boolean b,integer mn returns nothing
        local thistype dat = thistype.allocate()
        set dat.c = c
        set dat.m = m
        set dat.s = s
        set dat.art = AddSpecialEffectTarget(e,dat.m,"origin")
        set dat.rad = rad
        set dat.cd = cd
        set dat.md = md
        set dat.eod = b
        set dat.no = mn
        set dat.t = NewTimer()
        call SetTimerData(dat.t, dat)
        call TimerStart(dat.t,0.02,true,function thistype.Motion)
    endmethod
endstruct

    // the triggers actions
private function Actions takes nothing returns nothing
    local unit c = GetTriggerUnit()
    local real x = GetUnitX(c)
    local real y = GetUnitY(c)
    local real sx = GetSpellTargetX()
    local real sy = GetSpellTargetY()
    local real d = DBL(x,y,sx,sy)*2
    local real s = Missile_Speed
    local real rad = RBL(x,y,sx,sy)
    local unit m = CreateUnit(GetOwningPlayer(c),DummyID,x,y,bj_RADTODEG *rad)
    local string e = MissileEff
    local integer mn = Mine_num + ((GetUnitAbilityLevel(c,SpellID) - 1) * Mine_inc)
    if x == sx and y == sy then
        set d = 1
        set s = d / 2 * 0.02
    endif
    call SetUnitZFacing(m,Atan(Max_height / d) * bj_RADTODEG)
    call UnitAddAbility(m,'Amrf')
    call UnitRemoveAbility(m,'Amrf')
    call Core.Implement(c,m,s,e,rad,0,d,true,mn)
    set m = null
    set e = null
endfunction

    // creates the triggers, setups it's events,conditions,actions and preloads the effects used
private function InitCM takes nothing returns nothing
    local trigger t = CreateTrigger()
    local filterfunc f = Filter(function dummyFilter)
    local conditionfunc c = Condition(function Cond)
    local integer i = 0
    loop
     call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,f)
     set i = i + 1
     exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t,c)
    call TriggerAddAction(t,function Actions)
    call Preload(MissileEff)
    call Preload(ImpactEff)
    call Preload(MineArt_Air)
    call Preload(MineArt_Ground)
    call PreloadStart()
    call DestroyFilter(f)
    set f = null
endfunction
endlibrary

JASS:
//***********************************************************************
//* By Kingz:                                                           *
//*                     OnDeath Library                                 *
//*                                                                     *                 
//*A small library made only for the Cluster Mines spell                *
//*as i didn't like the usage of Damage Upon Death Ability              *
//*and the fact that users would have to modify it                      *
//*i created this simple yet usefull library for the mines death        *
//*the effect upon death are nice and the library is pretty simple      *
//*made only for the Cluster Mines spell                                *
//*requires GroupUtils library                                          *
//*NOTE: mines always deal damage upon death, even if you destroy them  *
//***********************************************************************

library OnDeath initializer OnDeathInit requires GroupUtils,BasicStuff

//************************************************
//Settings - All of the library settings are here*
//************************************************

globals
    private constant string DeathEff = "Abilities\\Spells\\Other\\Volcano\\VolcanoMissile.mdl"  // first death effect of the unit
    private constant string ExDeathEff = "abilities\\weapons\\DemolisherMissile\\DemolisherMissile.mdl" // second death effect of the unit
    private constant real Damage = 65   // damage dealt upon death
    private constant real DamageAoE = 250   // damage AOE
    private constant integer TriggerMineSpellID = 'A002'    // ability ID used mainly for synergy purposes
    private constant integer TriggerUnitID = 'n000'     // ID of the unit that triggers the library
    private constant string KB_eff = "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" // effect used for knockback trail
    private constant boolean KB_kd = true // used for knockback; kills destructables if true
endglobals

//***************************************************************************************
//Settings end - Do not modify anything below this if you don't know what you are doing!*
//***************************************************************************************

native UnitAlive takes unit u returns boolean

private function OnDeathCond takes nothing returns boolean
    return GetUnitTypeId(GetTriggerUnit()) == TriggerUnitID
endfunction

private function GroupFilter takes nothing returns boolean
    return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) == true) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL) == false) and (UnitAlive(GetFilterUnit())) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false)
endfunction

private function GroupFunction takes nothing returns nothing
    local real a = RBL(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()))
    local integer lvl = GetUnitAbilityLevel(GetTriggerUnit(),TriggerMineSpellID)
    call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),Damage,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
    if lvl > 1 then
        call KnockbackTarget(GetTriggerUnit(),GetEnumUnit(),150 * GetUnitAbilityLevel(GetTriggerUnit(),TriggerMineSpellID),1.5,a,KB_kd,KB_eff)
    endif
endfunction

private function OnDeathActions takes nothing returns nothing
    local unit tu = GetTriggerUnit()
    local real x = GetUnitX(tu)
    local real y = GetUnitY(tu)
    local conditionfunc c = Condition(function GroupFilter)
    call GroupEnumUnitsInRange(ENUM_GROUP,x,y,DamageAoE,c)
    call ForGroup(ENUM_GROUP,function GroupFunction)
    call GroupClear(ENUM_GROUP)
    call GroupRefresh(ENUM_GROUP)
    call DestroyEffect(AddSpecialEffect(DeathEff,x,y))
    call DestroyEffect(AddSpecialEffect(ExDeathEff,x,y))
    call RemoveUnit(tu)
    call DestroyCondition(c)
    set c = null
    set tu = null
endfunction

private function OnDeathInit takes nothing returns nothing
    local trigger t = CreateTrigger()
    local filterfunc f = Filter(function dummyFilter)
    local conditionfunc c = Condition(function OnDeathCond)
    local integer i = 0
    loop
        call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_DEATH,f)
        set i = i + 1
        exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t,c)
    call TriggerAddAction(t,function OnDeathActions)
    call DestroyFilter(f)
    call Preload(DeathEff)
    call Preload(ExDeathEff)
    call Preload(KB_eff)
    call PreloadStart()
    set f = null
endfunction

endlibrary




JASS:
//********************************************************************************
//* By Kingz:                                                                    *
//*                              Crack Bomb                                      *
//*                             Requirements:                                    *
//*                            A point based spell                               *
//*               Zdummy.mdx model which is featured in this map                 *
//*                            The dummy unit                                    *
//*                            JassNewGenPack                                    *
//*                         Library ShrapnelSystem                               *
//*                            Library BasicStuff                                *
//********************************************************************************
library CrackBomb initializer InitCB requires ShrapnelSystem,BasicStuff,TimerUtils

//**********************************************
//Settings - All of the spell settings are here*
//**********************************************
globals
    private constant integer dummyID = 'e000' // unit id of the dummy unit
    private constant integer SpellID = 'A001' // spell ability ID
    private constant integer SynergySpellID = 'A004' // spell ability ID of the Shrapnel Technology
    private constant real Base_dmg = 15 // instant impact damage
    private constant real Dmg_inc = 5 // instant damage increase per level
    private constant real Base_AoE = 350 // base AoE of the spell
    private constant real AoE_inc = 0 // AoE increase per level
    private constant real Max_height = 420 // max height which the missile reaches
    private constant string Missile_Art = "Abilities\\Weapons\\GyroCopter\\GyroCopterMissile.mdl" // missile look
    private constant string ExEff = "Abilities\\Weapons\\GyroCopter\\GyroCopterImpact.mdl" // effect spawned on missile and units damaged
    private constant real Base_dmg2 = 3 // base damage dealt per interval time
    private constant real Dmg2_inc = 1 // damage dealt per interval increase per level
    private constant real Base_Duration = 10 // damage per interval duration
    private constant real Duration_inc = 0 // duration increase per lvl
    private constant real MS_deg = 5 // movement speed degration
    private constant real MS_deg_inc = 2 // movement speed degration per level
    private constant real Height_trigger = 0.3 // height offset at which the missile cracks, 0.3 meants 30% away from the ground(Z=0)
    private constant real Dmg_interval = 1 // damage interval which is passed to the shrapnel system,can't be lower than 0.1(default 1.00 second)
    private constant real Dmg_interval_change = 0.0 // damage interval change per spell level(default 0)
    
//***************************************************************************************
//Settings end - Do not modify anything below this if you don't know what you are doing!*
//***************************************************************************************
    
    private player TP = null // used for ForGroup function
    private real array TR // used for ForGroup function
    private unit TU // used for ForGroup function and dpi setup
endglobals

native UnitAlive takes unit u returns boolean

//spells condition
private function Cond takes nothing returns boolean
    return GetSpellAbilityId() == SpellID
endfunction

//unit group filter
private function GroupFilter takes nothing returns boolean
    return (IsUnitEnemy(GetFilterUnit(),TP) == true) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL) == false) and (UnitAlive(GetFilterUnit())) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false)
endfunction

//unit group actions 
private function GroupAction takes nothing returns nothing
    call UnitDamageTarget(TU,GetEnumUnit(),TR[1],true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
    call DestroyEffect(AddSpecialEffectTarget(ExEff,GetEnumUnit(),"origin"))
    call Shrapnel(GetEnumUnit(),TU,TR[2],TR[3],TR[4],TR[5])
endfunction

//spells struct
private struct Core

    unit c      // used for damage source
    unit bomb   // missile
    real rad    // angle of the missile movement in radians
    real dmg    // instant damage
    real AoE    // AoE enough said
    real dmg2   // damage dealt per interval
    real msr    // movement speed reduction
    real dur    // duration
    effect art  // missile art
    real d      // used for maximum distance check and parabola
    real s      // speed of the missile
    real cd     // curent distance
    real za     // Z angle for missile rotations
    real int    // used for damage interval
    timer t
    
    static method Motion takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local thistype dat = GetTimerData(t)
        local real x    // used only for simplified equations
        local real y    // also
        local real h    // height variable calculated via the parabola function
        local integer i = 0 // used for the loop
        local conditionfunc c = Condition(function GroupFilter)
            if GetUnitX(dat.bomb) > MaxX or GetUnitX(dat.bomb) < MinX or GetUnitY(dat.bomb) > MaxY or GetUnitX(dat.bomb) < MinY then
                set dat.cd = dat.d
            endif
            if dat.cd < dat.d then
                set x = GetUnitX(dat.bomb) + dat.s * Cos(dat.rad)
                set y = GetUnitY(dat.bomb) + dat.s * Sin(dat.rad)
                set dat.cd = dat.cd + dat.s
                call SetUnitX(dat.bomb,x)
                call SetUnitY(dat.bomb,y)
                set h = ParabolaZ(Max_height,dat.d + (dat.d * Height_trigger),dat.cd)
                call SetUnitFlyHeight(dat.bomb,h,0)
                if GetRandomInt(0,14) == 6 then
                    call DestroyEffect(AddSpecialEffectTarget(ExEff,dat.bomb,"origin"))
                endif
                if dat.za < -360 then
                    set dat.za = dat.za + 360
                endif
                set dat.za = dat.za - 7
                call SetUnitZFacing(dat.bomb,dat.za)
            else
                set x = GetUnitX(dat.bomb)
                set y = GetUnitY(dat.bomb)
                set TP = GetOwningPlayer(dat.bomb)
                set TU = dat.c
                set TR[1] = dat.dmg
                set TR[2] = dat.dmg2
                set TR[3] = dat.msr
                set TR[4] = dat.dur
                set TR[5] = dat.int
                call GroupEnumUnitsInRange(ENUM_GROUP,x,y,dat.AoE,c)
                call ForGroup(ENUM_GROUP,function GroupAction)
                if GetRandomInt(1,100) <= (10 * GetUnitAbilityLevel(dat.c,SynergySpellID)) then
                    call ForGroup(ENUM_GROUP,function GroupAction)
                endif
                call GroupClear(ENUM_GROUP)
                call GroupRefresh(ENUM_GROUP)
                call DestroyEffect(dat.art)
                call SetUnitFacing(dat.bomb,180)
                call KillUnit(dat.bomb)
                set TU = null
                set dat.art = null
                set dat.c = null
                set dat.bomb = null    
                call PauseTimer(t)
                call ReleaseTimer(t)
                call dat.destroy()  
                call DestroyCondition(c)
                set c = null
            endif
    endmethod
    
    // method use to implement the needed variables into the struct
    static method Implement takes unit c, real a, unit m, real dmg, real AoE, real dmg2, real msdeg, real dur,real d,real s,real interval returns nothing
        local thistype dat = thistype.allocate()
        set dat.c = c
        set dat.rad = a
        set dat.bomb = m
        set dat.dmg = dmg
        set dat.AoE = AoE
        set dat.dmg2 = dmg2
        set dat.msr = msdeg
        set dat.dur = dur
        set dat.art = AddSpecialEffectTarget(Missile_Art,dat.bomb,"origin")
        set dat.d = d
        set dat.s = s
        set dat.cd = 0
        set dat.za = 90
        set dat.int = interval
        set dat.t = NewTimer()
        call SetTimerData(dat.t, dat)
        call TimerStart(dat.t,0.02,true,function thistype.Motion)
    endmethod
    
    
endstruct

    // trigger actions
private function Actions takes nothing returns nothing
    local unit c = GetTriggerUnit()
    local real x = GetUnitX(c)
    local real y = GetUnitY(c)
    local real sx = GetSpellTargetX()
    local real sy = GetSpellTargetY()
    local real a = RBL(x,y,sx,sy)
    local unit m = CreateUnit(GetOwningPlayer(c),dummyID,x,y,a)
    local integer lvl = GetUnitAbilityLevel(c,SpellID)
    local real dmg = Base_dmg + ((lvl - 1) * Dmg_inc)
    local real AoE = Base_AoE  + ((lvl - 1) * AoE_inc)
    local real dmg2 = Base_dmg2  + ((lvl - 1) * Dmg2_inc)
    local real msdeg = MS_deg  + ((lvl - 1) * MS_deg_inc)
    local real dur = Base_Duration  + ((lvl - 1) * Duration_inc)
    local real d = DBL(x,y,sx,sy)
    local real s = d / 1.5 * 0.02
    local real interval = Dmg_interval + ((lvl - 1) * Dmg_interval_change)
    call SetUnitPathing(m,false)
    call SetUnitPosition(m,x,y)
    if sx == x and sy == y then
        set d = 1
        set s = d / 1 * 0.02
    endif
    call UnitAddAbility(m,'Amrf')
    call UnitRemoveAbility(m,'Amrf')
    call Core.Implement(c,a,m,dmg,AoE,dmg2,msdeg,dur,d,s,interval)
endfunction

    // creates a trigger, setups conditions,events and actions
private function InitCB takes nothing returns nothing
    local trigger t = CreateTrigger()
    local filterfunc f = Filter(function dummyFilter)
    local conditionfunc c = Condition(function Cond)
    local integer i = 0
    loop
     call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,f)
     set i = i + 1
     exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t,c)
    call TriggerAddAction(t,function Actions)
    call Preload(Missile_Art)
    call Preload(ExEff)
    call PreloadStart()
    call DestroyFilter(f)
    set f = null
endfunction

endlibrary



JASS:
//*******************************************************************************
//* By Kingz:                                                                   *
//*                            Requirements:                                    *
//*                           A instant based spell                             *
//*              Zdummy.mdx model which is featured in this map                 *
//*                           The dummy unit                                    *
//*                           JassNewGenPack                                    *
//*                        Library Group Utils                                  *
//*                         Library BasicStuff                                  *
//*******************************************************************************

library MassiveFragmentation initializer InitMF requires BasicStuff,GroupUtils,TimerUtils

//**********************************************
//Settings - All of the spell settings are here*
//**********************************************

globals
    private constant integer SpellID = 'A003'   // spell ability ID
    private constant integer SynergySpellID = 'A004'    // synergy spell ability ID(in this case Shrapnel Technology)
    private constant integer DummyID = 'e000'   // ID of the dummy unit used
    private constant real Damage = 35   // damage dealt per second to units that get hit by the missiles
    private constant real Time = 2.00   // time needed for the missiles to spread and return(lower value == higher speed)
    private constant string MissileArt = "abilities\\weapons\\DemolisherMissile\\DemolisherMissile.mdl" // missile art(effect attached)
    private constant integer MissileCount = 20  // missiles normaly released
    private constant integer MissileCountInc = 5    // additional missiles spawned per synergy spell level
    private constant damagetype DT = DAMAGE_TYPE_NORMAL // damage type
    private constant attacktype AT = ATTACK_TYPE_NORMAL // attack type
    private constant weapontype WT = WEAPON_TYPE_WHOKNOWS   // weapon type
    private constant real MaxHeight = 500   // maximum height that a missile can reach
    private constant real MinHeight = 40    // minimal height at what the missile can travel
    private constant real MaxDist = 800 // maximal distance from the casters position that the missiles can travel
    private constant real MinDist = 250 // minimal distance from the casters position that the missiles can travel
    private constant string HitEff = "Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodFootman.mdl" // effect created on hit units
    private constant string HitEffAP = "chest"  // attach point for the hit effect
    private constant integer LoopNumber = 1 // loop number is actualy the numbers of "rotations" for this spell it is REQUIRED that it is 1 else it looks bad
    private constant string ImpactSFX = "war3mapImported\\NewDirtEXNofire.mdx"  // one time spawned effect upon spell cast
    private constant real ColisionSize = 30 // colision size of a single missile, used for Z height checking
    private constant real AoE = 125 // aoe in which the fragments deal damage
    
//***************************************************************************************
//Settings end - Do not modify anything below this if you don't know what you are doing!*
//***************************************************************************************
    
    private player TP
    private unit TU
endglobals

native UnitAlive takes unit u returns boolean

private function Cond takes nothing returns boolean
    return GetSpellAbilityId() == SpellID
endfunction

private function UnitFilter takes nothing returns boolean
    return (IsUnitEnemy(GetFilterUnit(),TP) == true) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL) == false) and (UnitAlive(GetFilterUnit())) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and GetUnitFlyHeight(GetFilterUnit()) <= GetUnitFlyHeight(TU) + ColisionSize and GetUnitFlyHeight(GetFilterUnit()) >= GetUnitFlyHeight(TU) - ColisionSize
endfunction

private function EnumDamage takes nothing returns nothing
    call UnitDamageTarget(TU,GetEnumUnit(),Damage * 0.02,true,false,AT,DT,WT)
    if GetRandomInt(0,40) == 40 then
        call DestroyEffect(AddSpecialEffectTarget(HitEff,GetEnumUnit(),"chest"))
    endif
endfunction

private struct Core
    unit c      // used for damage source
    unit m      // missile unit
    real s      // speed at which the missile travels
    real d      // distance that the missile reaches
    real cd     // current distance of the missile
    integer ln  // loop number
    real rad    // radian (used for angled movement)
    effect eff  // missile effect(art)
    real mh     // maximal height the missile reaches
    real hc     // height change per timer interval
    real dmg    // damage dealt per timer interval seconds
    timer t
    
    static method Motion takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local thistype dat = GetTimerData(t)
        local real x    // used only for simplified equations
        local real y    // also
        local real h    // height variable calculated via the parabola function
        local integer i = 0 // used for the loop
        local conditionfunc c = Condition(function UnitFilter)
            if GetUnitX(dat.m) > MaxX or GetUnitX(dat.m) < MinX or GetUnitY(dat.m) > MaxY or GetUnitX(dat.m) < MinY then
                set dat.cd = dat.d
                set dat.ln = 0
            endif
            if dat.cd < dat.d then
                set x = GetUnitX(dat.m) + dat.s * Cos(dat.rad)
                set y = GetUnitY(dat.m) + dat.s * Sin(dat.rad)
                set dat.cd = dat.cd + dat.s
                call SetUnitX(dat.m,x)
                call SetUnitY(dat.m,y)
                call SetUnitFlyHeight(dat.m,GetUnitFlyHeight(dat.m) + dat.hc,0)
                set TP = GetOwningPlayer(dat.c)
                set TU = dat.c
                call GroupEnumUnitsInRange(ENUM_GROUP,GetUnitX(dat.m),GetUnitY(dat.m),AoE,c)
                call ForGroup(ENUM_GROUP,function EnumDamage)
                call GroupClear(ENUM_GROUP)
                call GroupRefresh(ENUM_GROUP)
            else
                if dat.ln > 0 then
                    set dat.cd = 0
                    set dat.rad = ((dat.rad * bj_RADTODEG) + 180) * bj_DEGTORAD
                    set dat.hc = -dat.hc
                    set dat.ln = dat.ln - 1
                else
                    call DestroyEffect(dat.eff)
                    call RemoveUnit(dat.m)
                    call ShowUnit(dat.c,true)
                    call PauseUnit(dat.c,false)
                    call SelectUnit(dat.c,true)
                    call PauseTimer(t)
                    call ReleaseTimer(t)
                    call dat.destroy()
                    call DestroyCondition(c)
                    set c = null
                endif
            endif
    endmethod
    
    // Implements the fetched variables into the struct
    static method Implement takes unit c, unit m, real rad,real speed,real dist,real height,integer ln returns nothing
        local thistype dat = thistype.allocate()
        set dat.c = c
        set dat.m = m
        set dat.rad = rad
        set dat.s = speed
        set dat.d = dist
        set dat.mh = height
        set dat.hc = height / Time * 0.02
        set dat.eff = AddSpecialEffectTarget(MissileArt,dat.m,"origin")
        set dat.cd = 0
        set dat.ln = ln
        set dat.t = NewTimer()
        call SetTimerData(dat.t, dat)
        call UnitAddAbility(dat.m,'Amrf')
        call UnitRemoveAbility(dat.m,'Amrf')
        call TimerStart(dat.t,0.02,true,function thistype.Motion)
    endmethod
    
endstruct

// trigger actions
private function Actions takes nothing returns nothing
    local integer i = 0
    local unit c = GetTriggerUnit()
    local integer im = MissileCount + (MissileCountInc * (GetUnitAbilityLevel(c,SynergySpellID) - 1))
    local unit u
    local real rad
    local real dist
    local real speed
    local real height
    local integer ln = 1
    local real x = GetUnitX(c)
    local real y = GetUnitY(c)
    call DestroyEffect(AddSpecialEffect(ImpactSFX,x,y))
    call ShowUnit(c,false)
    call PauseUnit(c,true)
    loop
        exitwhen i > im
        set u = CreateUnit(GetOwningPlayer(c),DummyID,x,y,0)
        set rad = GetRandomReal(0,360) * bj_DEGTORAD
        call SetUnitFacing(u,rad * bj_RADTODEG)
        set dist = GetRandomReal(MinDist,MaxDist)
        set speed = dist*2 / Time * 0.02
        set height = GetRandomReal(MinHeight,MaxHeight)
        call Core.Implement(c,u,rad,speed,dist,height,ln)
        set i = i + 1
    endloop
endfunction

// library initializer and setups
private function InitMF takes nothing returns nothing
    local trigger t = CreateTrigger()
    local filterfunc f = Filter(function dummyFilter)
    local conditionfunc c = Condition(function Cond)
    local integer i = 0
    loop
     call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,f)
     set i = i + 1
     exitwhen i == bj_MAX_PLAYER_SLOTS
    endloop
    call TriggerAddCondition(t,c)
    call TriggerAddAction(t,function Actions)
    call Preload(MissileArt)
    call Preload(HitEff)
    call Preload(ImpactSFX)
    call PreloadStart()
    call DestroyFilter(f)
    set f = null
endfunction

endlibrary





v1.0 made it 1.24b+ compatible and added UnitAlive native
v1.1 forgot to change some stuff like map comments/ingame comments
v1.2 fixed some errors
v1.3 fixed some long due issues
v1.4 removed use of locations
v1.5 rewrote a part of all spells to use RegisterAnyUnitEvent, tried to minimise function calls


Keywords:
bomb,shrapnel,hero,clock,gear,goblin,clockwerk,blood,tech,technology,rocket,bomb,mass,pack
Contents

Kingz - Hero Contest #2 submision (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 6 April 2012 Bribe: If you want to submit a spell here with requirements, the libraries should at least be submissions in our JASS Submissions forum, approved spell resources or approved...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

6 April 2012
Bribe:

If you want to submit a spell here with requirements, the libraries should at least be submissions in our JASS Submissions forum, approved spell resources or approved on TheHelper.net or wc3c.net. The following highlighted libraries are invalid requirements.

JASS:
library ClusterMines initializer InitCM requires @OnDeath@,@BasicStuff@,TimerUtils, RegisterAnyUnitEvent

Crackbomb:

Get rid of the ForGroups in "Motion" static method. Use FirstOfGroup loop or "for unit in group" in Cohadar's updated JassHelper.

"call DestroyCondition(c)" should only be used if you created things with "Not, And, Or" natives. It is useless the way you have it set up.

This should be using a stack or linked list, not TimerUtils, for fast timers like 0.02.

The following lines:

JASS:
                call GroupClear(ENUM_GROUP) //Never needed with ENUM_GROUP.
                call GroupRefresh(ENUM_GROUP) //Pointless as you already used GroupClear.

JASS:
                //Why not just store "dat" into a global?
                set TR[1] = dat.dmg
                set TR[2] = dat.dmg2
                set TR[3] = dat.msr
                set TR[4] = dat.dur
                set TR[5] = dat.int

MassiveFragmentation:

Use FirstOfGroup loops instead of filters & ForGroups.

Again you use "call DestroyCondition(c)" so I'll refer you to the same advice I gave you before: don't use it...

These lines:

JASS:
        set rad = GetRandomReal(0,360) * bj_DEGTORAD
        call SetUnitFacing(u,rad * bj_RADTODEG)
        //It's like me writing "1 + 1 + 1 + 1 + 1 + 1" instead of "6"...

Much of the same advice from the previous trigger applies here.

Overall, if you apply the advice here to all three of your spells, you will improve a lot. Because there are a lot of crossover redundancies and overdone code.
 
Level 2
Joined
Jun 20, 2009
Messages
8
i like the spells but pls add a command or something like that to refresh abilties (ulti 210 sec cd -.- )
also i found a bug with your ulti.
I casted it and ordered to move somewhere and after that, the clock respawn at my ordered Point ( not at the point where he starts casting )
 
i like the spells but pls add a command or something like that to refresh abilties (ulti 210 sec cd -.- )
also i found a bug with your ulti.
I casted it and ordered to move somewhere and after that, the clock respawn at my ordered Point ( not at the point where he starts casting )

If it spawns on the position of the hero, then it isnt a bug. If it spawns far away from the hero, then its a bug.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Something is seriously wrong with my JNGP, please tell me if this version is compiling/working, since my JNGP doesn't check the code for some frickin reason the JASS helper never runs....

EDIT:

My JNGP refuses to run Jass Helper on this map, and also refuses to compile the script itself....

I really don't know what is causing that...
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
Something is seriously wrong with my JNGP, please tell me if this version is compiling/working, since my JNGP doesn't check the code for some frickin reason the JASS helper never runs....

EDIT:

My JNGP refuses to run Jass Helper on this map, and also refuses to compile the script itself....

I really don't know what is causing that...

I can't play it without recompiling it (the test button opens wc3 but sends me to the main menu immediately)
but many other spell maps have the same problem
I'd suggest turning off your everything what might interfere with your JNGP as antivirus and just to be sure everything else
 
Top