Spellpack Wind Spellpack

game_war48

New Member
Reaction score
5
Wind Spellpack

Information
+GUI/JASS/vJASS: vJASS.
+MUI: Yes, of course.
+Leakless: (Maybe) Yes.
+Lagless: (Maybe) Yes.
+Requires:
  1. JASS NewGen Pack v1.5d
  2. TimerUtils
  3. Damage Over Time
  4. GroupUtils
  5. xe 0.8 ( xebasic, xecast, xepreload )
  6. OID


Spells

images

Twister
Type Point Area of Effect
Target Allowed Enemy
Mana Cost 150
Cooldown 12 seconds

I can't write description for this spellpack because i can't think anything to write and I'm very bad in English :banghead:. Someone can help me ?

Level 1 200 damage on ground, 100 damage and 3 seconds stun afterward.
Level 2 200 damage on ground, 150 damage and 3 seconds stun afterward.
Level 3 200 damage on ground, 185 damage and 3 seconds stun afterward.
Level 4 200 damage on ground, 250 damage and 3 seconds stun afterward.

-Screenshot:
attachment.php

attachment.php

-Code:
JASS:
//===============================================================
//|                      game_war48 Presents
//|                           Twister
//|                           ¯¯¯¯¯¯¯
//|  Requires:
//| - JassNewGen v1.5d
//| - TimerUtils
//|
//|  How to Import:
//| - Copy ability: "Twister" (A002)
//| - Copy unit: Dummy Unit - Twister and Storm Spiral (n001)
//| - Copy trigger: Twister and TimerUtils (if you don't have it)
//| - Changes the raw id of abilities, units,... in the globals.
//| - And MUST remember to change the raw id of XE Dummy in "xebasic"
//|
//| Modification:
//| - Values in the globals block and functions below it
//|
//|  Credit
//| - Thanks Vexorian for TimerUtils and xe
//| - Thanks Cohadar for OID
//| - Thanks Tom_Kazansky for helping me
//| - Thanks Tink3 for his template map
//| - Thanks Rising_Dusk for GroupUtils
//===============================================================

scope Twister initializer InitTW

    globals
        private constant integer ABILITYID = 'A002' // Rawcode of the ability
        private constant integer DUMMYID = 'n001' // Rawcode of the "wind" dummy
        private constant integer DAMAGEID = 'A001' // Rawcode of the damage ability
        private constant integer DAMAGEORDERID = OID_thunderbolt // Order ID of the damage ability from OID Library by Cohadar(important, needed to cast damage ability)
        
        private constant string EFFECTDAMAGE = "Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl" // Path effect when damage on ground
        
        private constant real FLYHEIGHT = 500. // Maximum height to "fly"
        
        //------------------------------
        
        private constant real PERIOD = 0.04 // period of time, but i think that shouldn't edit this

    endglobals
    
    private function GetDamage takes integer lvl returns real
        return 200. + 0. * lvl // Damage deals when touching enemy units on ground, configurable
    endfunction
    
//=============================================================================
    globals
        private integer I
    endglobals
    
//=============================================================================
    
    private struct eo
        unit c
        unit array d[6]
        
        boolean array inc[6]
        boolean b = false
        boolean b2 = false
        
        real dx
        real dy
        real tx
        real ty
        real df
        real array hs[6]
        real h = 100.
        real hb = 150
        real dist
        real height = 500
        real ang
        real array a[6]
        real dam
        
        integer tick
        integer tk
        integer toss
        integer lvl
        
        group g
    endstruct
    
    private function TwisterG takes nothing returns nothing
        local eo d = I
        local unit e = GetEnumUnit()
        local real x = GetUnitX(e)
        local real y = GetUnitY(e) 
        local real dist = DistanceXY( d.dx, d.dy, x, y )
    
        call SetUnitX( e, GetPPX( d.dx, 100., 0. ) )
        call SetUnitY( e, GetPPY( d.dy, 100., 0. ) )
        call IssueImmediateOrder( e, "stop" )
        
        if not d.b2 then
            if GetUnitFlyHeight(e) < FLYHEIGHT then
                call SetUnitZ( e, d.height * Sin( (90/d.tk) * d.tick * bj_DEGTORAD ) )
            endif
        endif
        
        set e = null
    endfunction
    
    private function TwisterUP takes nothing returns nothing
        local eo d = I
        local xecast xe
        
        local unit e = GetEnumUnit()
        
        local real x = GetUnitX(e)
        local real y = GetUnitY(e)
        local real z = GetUnitDefaultFlyHeight(e)
        
        set xe = xecast.createBasicA( DAMAGEID, DAMAGEORDERID, GetOwningPlayer( d.c ) )
        call xe.setSourcePoint( x, y, 0. )
        call xe.castOnTarget( e, d.lvl )
                
        call SetUnitX( e, x )
        call SetUnitY( e, y )
        //call SetUnitPosition( e, x, y )
        call SetUnitZ( e, z )
        
        call DestroyTreesInCircle( x, y, 200 )
        
        set e = null
    endfunction
    
    private function TwisterM takes nothing returns nothing
        local eo d = I
        local unit e = GetEnumUnit()
        
        local real sinr = 90 / 25 * d.tick
        local real r1 = d.dist * Sin(sinr * bj_DEGTORAD)
        local real dx = GetPPX( d.dx, r1, d.df )
        local real dy = GetPPY( d.dy, r1, d.df )
        
        call SetUnitX( e, dx )
        call SetUnitY( e, dy )
        //call SetUnitPosition( e, dx, dy ) 
        
        call DestroyTreesInCircle( dx, dy, 200. )
        call DestroyEffect( AddSpecialEffect( EFFECTDAMAGE, GetUnitX(e), GetUnitY(e) ) )
        
        set e = null
    endfunction
    
    private function TwisterF takes nothing returns boolean
        local eo d = I
        local unit u = GetFilterUnit()
        local boolean ok = false
        
        if      IsUnitEnemy    (u, GetOwningPlayer(d.c)) /*
      */and     IsUnitVisible  (u, GetOwningPlayer(d.c)) /*
      */and not IsUnitType     (u, UNIT_TYPE_MAGIC_IMMUNE) /*
      */and not IsUnitType     (u, UNIT_TYPE_STRUCTURE) /*
      */and not IsUnitType     (u, UNIT_TYPE_DEAD) /*
      */and not IsUnitInGroup  (u, d.g) then
            set ok = true
        endif
        
        set u = null
        
        return ok
    endfunction
    
    private function TwisterT takes nothing returns nothing
        local timer ti = GetExpiredTimer()
        local eo d = GetTimerData(ti)
        
        local group g
        local unit p
        
        local integer i
        local integer j
        local integer k      

        local real dx
        local real dy
        local real h
        local real sinr 
        local real r1
        
        if d.toss == 2 then
            if d.tick < 0 then
                set j = 0
                loop
                    exitwhen j > 5
                    call KillUnit(d.d[j])
                    set j = j + 1
                endloop
                
                set I = d
                call ForGroup(d.g, function TwisterUP)
                
                call ReleaseGroup(d.g)
                call ReleaseTimer(ti)
                set ti = null
                call d.destroy()
                return
            endif
        endif
        
        if d.toss == 0 then
            if d.tick > 25 then
                set d.dx = d.tx
                set d.dy = d.ty
                
                call GroupEnumUnitsInArea(d.g, d.dx, d.dy, 300., Condition(function TwisterF) )
                
                set k = 0
                loop
                    exitwhen k > 5
                    set d.a[k] = 60 * k
                    set k = k + 1
                endloop
                set d.tick = 0
                set d.toss = 2
                set d.hb = 0
                set p = null
            endif
        endif
        
        if d.toss == 0 then
            set sinr = 90 / 25 * d.tick
            set r1 = d.dist * Sin(sinr * bj_DEGTORAD)
            set dx = GetPPX( d.dx, r1, d.df )
            set dy = GetPPY( d.dy, r1, d.df )
        endif
        
        set i = 0
        loop
            set i = i + 1
            exitwhen i > 8
            set j = 0
            loop
                exitwhen j > 5
                if d.toss == 0 then
                //*****************************************************
                    if d.inc[j] and d.hs[j] == 1 then
                        set d.inc[j] = false
                    endif
                    
                    if not d.inc[j] and d.hs[j] == -1 then
                        set d.inc[j] = true
                    endif
                    
                    if d.inc[j] then
                        set d.hs[j] = d.hs[j] + 0.05
                    else
                        set d.hs[j] = d.hs[j] - 0.05
                    endif
            
                    call SetUnitX(d.d[j],GetPPX( dx, d.h * d.hs[j], d.df - 90. ) )
                    call SetUnitY(d.d[j],GetPPY( dy, d.h * d.hs[j], d.df - 90. ) )
                    call DestroyTreesInCircle( dx, dy, 200. )
                    set h = SquareRoot( d.h * d.h - d.h * d.hs[j] * d.h * d.hs[j]  )
                    
                    if d.inc[j] then
                        call SetUnitZ(d.d[j], d.hb + h )
                    else
                        call SetUnitZ(d.d[j], d.hb - h )
                    endif
            //*****************************************************    
                endif
                
                set j = j + 1
                
            endloop
        endloop
        
        set j = 0
        loop
            exitwhen j > 5
            if d.toss == 2 then
            
                if d.tick >= 50 then
                    set d.height = 0
                    set d.tk = 5
                    set d.tick = 5
                    set d.b2 = true
                else
                    set d.height = FLYHEIGHT
                    set d.tk = 50
                endif
                        
                if d.a[j] >= 360 then
                    set d.a[j] = 0.
                else
                    set d.a[j] = d.a[j] + 10.
                endif
                        
                if not d.b2 then
                    call SetUnitX(d.d[j],GetPPX( d.dx, 250., d.a[j] ) )
                    call SetUnitY(d.d[j],GetPPY( d.dy, 250., d.a[j] ) )
                    call SetUnitZ(d.d[j], d.height * Sin( (90/d.tk) * d.tick * bj_DEGTORAD ) )
                else
                    call SetUnitZ(d.d[j], d.height * Sin( (90/d.tk) * d.tick * bj_DEGTORAD ) + 10 )
                endif
                        
                call DestroyTreesInCircle( d.dx, d.dy, 200. )
                        
                set I = d
                call ForGroup(d.g, function TwisterG)
            endif
            set j = j + 1
        endloop
        
        
        if d.toss == 0 then
            set g = NewGroup()
            set I = d
            call GroupEnumUnitsInArea(g, dx, dy, 200., Condition(function TwisterF) )
            
            loop
                set p = FirstOfGroup(g)
                exitwhen p == null
                
                call GroupRemoveUnit(g, p)
                call GroupAddUnit(d.g, p)
                call UnitDamageTarget(d.c, p, d.dam, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_DIVINE, null)
            endloop
            
            call ReleaseGroup(g)
            set g = null
            
            set I = d
            call ForGroup(d.g, function TwisterM)
        endif
        
        if d.b2 then
            set d.tick = d.tick - 1
        else
            set d.tick = d.tick + 1
        endif
        
        //set ti = null
    endfunction
        
    private function Twister takes nothing returns nothing
        local eo d = eo.create()
        local timer ti = NewTimer()
        
        set d.c = GetTriggerUnit()
        set d.dx = GetUnitX(d.c)
        set d.dy = GetUnitY(d.c)
        set d.tx = GetSpellTargetX()
        set d.ty = GetSpellTargetY()
        set d.df = AngleXY( d.dx, d.dy, d.tx, d.ty )
        set d.dist = DistanceXY( d.dx, d.dy, d.tx, d.ty )
        
        set d.hs[0] = 1
        set d.d[0] = CreateUnit(GetOwningPlayer(d.c),DUMMYID,GetPPX(d.dx,d.h*d.hs[0],d.df-90.),GetPPY(d.dy,d.h*d.hs[0],d.df-90.),d.df-90)
        call SetUnitZ(d.d[0],d.hb)
        call SetUnitVertexColor(d.d[0], 255, 255, 255, 0)
        set d.inc[0] = true
        
        set d.hs[1] = -1
        set d.d[1] = CreateUnit(GetOwningPlayer(d.c),DUMMYID,GetPPX(d.dx,d.h*d.hs[1],d.df+90.),GetPPY(d.dy,d.h*d.hs[1],d.df+90.),d.df+90)
        call SetUnitZ(d.d[1],d.hb)
        call SetUnitVertexColor(d.d[1], 255, 255, 255, 0)
        set d.inc[1] = false
    
        set d.hs[2] = 0.
        set d.d[2] = CreateUnit(GetOwningPlayer(d.c),DUMMYID,GetPPX(d.dx,d.h*d.hs[2],d.df+90.),GetPPY(d.dy,d.h*d.hs[2],d.df+90.),d.df+90)
        call SetUnitZ(d.d[2],d.hb+d.h)
        call SetUnitVertexColor(d.d[2], 255, 255, 255, 0)
        set d.inc[2] = true
    
        set d.hs[3] = 0.
        set d.d[3] = CreateUnit(GetOwningPlayer(d.c),DUMMYID,GetPPX(d.dx,d.h*d.hs[3],d.df+90.),GetPPY(d.dy,d.h*d.hs[3],d.df+90.),d.df+90)
        call SetUnitZ(d.d[3],d.hb-d.h)
        call SetUnitVertexColor(d.d[3], 255, 255, 255, 0)
        set d.inc[3] = false
        
        set d.hs[4] = 0.5
        set d.d[4] = CreateUnit(GetOwningPlayer(d.c),DUMMYID,GetPPX(d.dx,d.h*d.hs[4],d.df-90.),GetPPY(d.dy,d.h*d.hs[4],d.df-90.),d.df-90)
        call SetUnitZ(d.d[4],d.hb)
        call SetUnitVertexColor(d.d[4], 255, 255, 255, 0)
        set d.inc[4] = true
        
        set d.hs[5] = -0.5
        set d.d[5] = CreateUnit(GetOwningPlayer(d.c),DUMMYID,GetPPX(d.dx,d.h*d.hs[5],d.df+90.),GetPPY(d.dy,d.h*d.hs[5],d.df+90.),d.df+90)
        call SetUnitZ(d.d[5],d.hb)
        call SetUnitVertexColor(d.d[5], 255, 255, 255, 0)
        set d.inc[5] = false
        
        set d.lvl = GetUnitAbilityLevel( d.c, ABILITYID )
        set d.toss = 0
        set d.tick = 0
        set d.dam = GetDamage( d.lvl )
        
        set d.g = NewGroup()
        call SetTimerData( ti, d )
        call TimerStart( ti, PERIOD, true, function TwisterT )

        //set ti = null
    endfunction

    private function TwisterC takes nothing returns boolean
        return GetSpellAbilityId() == ABILITYID
    endfunction
    
//===========================================================================
    private function InitTW takes nothing returns nothing
        local trigger TrigTW = CreateTrigger(  )
        local integer index
        
        set index = 0
        loop
            call TriggerRegisterPlayerUnitEvent( TrigTW, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)

            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop
        
        call TriggerAddCondition( TrigTW, Condition( function TwisterC ) )
        call TriggerAddAction( TrigTW, function Twister )
    
        call XE_PreloadAbility( DAMAGEID )
        
        //set TrigTW = null
    endfunction
endscope


images

Storm Spiral
Type Point Area of Effect
Target Allowed Enemy
Mana Cost 300
Cooldown 25 seconds

I can't write description for this spellpack because i can't think anything to write and I'm very bad in English :banghead:. Someone can help me ?

Level 1 400 damage.
Level 2 500 damage.
Level 3 600 damage.

-Screenshot:
attachment.php

attachment.php

-Code:
JASS:
//===============================================================
//|                      game_war48 Presents
//|                           Storm Spiral
//|                           ¯¯¯¯¯¯¯¯¯¯¯¯
//|  Requires:
//| - JassNewGen v1.5d
//| - TimerUtils (red+blue+orange flavors for 1.24b+) by Vexorian
//| - Damage Over Time v1.7 by Dynasti on hiveworkshop.com
//|
//|  How to Import:
//| - Copy ability: "Storm Spiral" (A000)
//| - Copy unit: Dummy Unit - Twister and Storm Spiral (n001)
//| - Copy trigger: Storm Spiral and TimerUtils, DOT (if you don't have it)
//| - Changes the raw id of abilities, units,... in the globals.
//|
//| Modification:
//| - Values in the globals block and functions below it
//|
//|  Credit
//| - Thanks Vexorian for TimerUtils
//| - Thanks Tom_Kazansky for helping me
//| - Thanks Tink3 for his template map
//| - Thanks Dynasti for his system
//| - Thanks Rising_Dusk for his system
//===============================================================

scope StormSpiral initializer InitSS

    globals
    
        private constant integer ABILITYID = 'A000' // Rawcode of the ability
        private constant integer DUMMYID = 'n001' // Rawcode of the dummy
        
        private constant string EFFECTDAMAGE1 = "Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl" // Path effect when damage
        private constant string EFFECTDAMAGE2 = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" // Path effect when damage, too
        private constant string EFFECTDAMAGE1ATTACH = "chest" // EffectDamage1 attachment point on unit
        private constant string EFFECTDAMAGE2ATTACH = "chest" // EffectDamage2 attachment point on unit

        //----------------------------
        
        private constant real PERIOD = 0.04 // period of time, but i think that shouldn't edit this

    endglobals
        
        
    private function GetDamage takes integer lvl returns real
        return 300. + 100. * lvl // spell's damage, configurable
    endfunction
//=====================================================================    

    globals
        private group GROUP
        private integer I
        private integer I2
    endglobals

    private struct ss
        unit c
        unit d
        unit d2
        
        group gc
                
        real dx
        real dy
        
        real tx
        real ty
        real height
        real dis
        real ang
        real a
        real a2
        real dam
        real dps
        
        integer tick
        integer toss
    endstruct
    
    private function StormSpiralF takes nothing returns boolean
        local ss d = I
        local unit u = GetFilterUnit()
        local boolean ok = false
        
        if      IsUnitEnemy(u, GetOwningPlayer(d.c)) /*
     */ and     IsUnitVisible(u, GetOwningPlayer(d.c)) /*
     */ and not IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) /*
     */ and not IsUnitType(u, UNIT_TYPE_STRUCTURE) /*
     */ and not IsUnitType(u, UNIT_TYPE_DEAD) /*
     */ and not IsUnitInGroup(u, GROUP) then
            set ok = true
        endif
        
        set u = null
        return ok
    endfunction
    
    private function StormSpiralD takes nothing returns nothing
        local unit e = GetEnumUnit()
        
        call GroupRemoveUnit( GROUP, e )
        
        set e = null
    endfunction

    private function StormSpiralG takes nothing returns nothing
        local ss d = I
        local unit e = GetEnumUnit()
        
        call SetUnitX( e, GetPPX( GetUnitX( e ), 15., d.ang ) )
        call SetUnitY( e, GetPPY( GetUnitY( e ), 15., d.ang ) )
        
        call DestroyEffect( AddSpecialEffectTarget( EFFECTDAMAGE1, e, EFFECTDAMAGE1ATTACH ) )
        call DestroyEffect( AddSpecialEffectTarget( EFFECTDAMAGE2, e, EFFECTDAMAGE2ATTACH ) )
        
        set e = null
    endfunction
    
    private function StormSpiralT takes nothing returns nothing
        local timer ti = GetExpiredTimer()
        local ss d = GetTimerData(ti)
        
        local real x
        local real y
        
        local unit v
        
        if d.toss == 1 then
            if d.tick <= 0 then
                
                call ForGroup( d.gc, function StormSpiralD )
                
                if GROUP != null then
                    call ReleaseGroup( GROUP )
                    set GROUP = null
                endif
                
                call KillUnit( d.d )
                call KillUnit( d.d2 )
                
                call ReleaseGroup( d.gc )
                
                call ReleaseTimer(ti)
                set ti = null
                call d.destroy()
                return
                
            endif
        endif
        
        if d.toss == 0 then
            if d.tick < 0 then
            
                call SetUnitZ( d.d, 0. )
                
                set d.d2 = CreateUnit( GetOwningPlayer( d.c ), DUMMYID, GetUnitX( d.d ), GetUnitY( d.d ), 0. )
                call SetUnitVertexColor( d.d2, 255, 255, 255, 0 )
                
                set d.dx = GetPPX( d.tx, 50., d.ang )
                set d.dy = GetPPY( d.ty, 50., d.ang )
                set d.a = 0.
                set d.a2 = 180.
                
                set d.toss = 1
                set d.tick = 50
                
            endif
        endif
        
        if d.toss == 0 then
        
            set d.height = d.height - 22.5
            set d.dis = d.dis - 15.
            set d.a = d.a - 9.

            set x = GetPPX( d.tx, d.dis, d.a )
            set y = GetPPY( d.ty, d.dis, d.a )
            
            call SetUnitX( d.d, x )
            call SetUnitY( d.d, y )
            call SetUnitZ( d.d, d.height )
        
        elseif d.toss == 1 then
            set d.a = d.a + 30.
            set x = GetPPX( d.dx, 50., d.a )
            set y = GetPPY( d.dy, 50., d.a )
            call SetUnitX( d.d, x )
            call SetUnitY( d.d, y )
            
            set d.a2 = d.a2 + 30.
            set x = GetPPX( d.dx, 50., d.a2 )
            set y = GetPPY( d.dy, 50., d.a2 )
            call SetUnitX( d.d2, x )
            call SetUnitY( d.d2, y )
                
            set I = d
            set v = GetNearestUnit( d.dx, d.dy, 100., Condition( function StormSpiralF ) )
            
            if v != null then
                call DamageOverTime( d.c, v, d.dam, d.tick * PERIOD, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DIVINE )
                call GroupAddUnit( GROUP, v )
                call GroupAddUnit( d.gc, v )
            endif
                
            set I = d
            call ForGroup( d.gc, function StormSpiralG )
            
            set d.dx = GetPPX( d.dx, 10., d.ang )
            set d.dy = GetPPY( d.dy, 10., d.ang )

        endif
        
        set d.tick = d.tick - 1
        
        //set ti = null
    endfunction
    
    private function StormSpiral takes nothing returns nothing
        local ss d
        local timer ti
        local integer i
        local real x
        local real y
        
        set GROUP = NewGroup()
        
        set i = 0
        loop
            exitwhen i > 17
            
            set d = ss.create()
            set d.c = GetTriggerUnit()
            
            set d.tx = GetSpellTargetX()
            set d.ty = GetSpellTargetY()
            
            set d.a = 20 * i
            set d.ang = d.a
            set d.dx = GetPPX( d.tx, 600., d.a )
            set d.dy = GetPPY( d.ty, 600., d.a )
            
            set d.height = 950.
            set d.dis = 600.
            
            set d.d = CreateUnit( GetOwningPlayer( d.c ), DUMMYID, d.dx, d.dy, 0. )
            call SetUnitVertexColor( d.d, 255, 255, 255, 0 )
            call SetUnitZ( d.d, d.height )
            
            set d.gc = NewGroup()
            
            set d.toss = 0
            set d.tick = 40
            
            set d.dam = GetDamage( GetUnitAbilityLevel( d.c, ABILITYID  ) )
            
            set ti = NewTimer()
            call SetTimerData( ti, d )
            call TimerStart( ti, PERIOD, true, function StormSpiralT )
            //set ti = null
            
            set i = i + 1
        endloop
        
    endfunction
    
    private function StormSpiralC takes nothing returns boolean
        return GetSpellAbilityId() == ABILITYID
    endfunction

//===========================================================================
    private function InitSS takes nothing returns nothing
        local trigger TrigSS = CreateTrigger(  )
        local integer index

        set index = 0
        loop
            call TriggerRegisterPlayerUnitEvent( TrigSS, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null )

            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop        
        call TriggerAddCondition( TrigSS, Condition( function StormSpiralC ) )
        call TriggerAddAction( TrigSS, function StormSpiral )
        
        //set TrigSS = null
    endfunction
endscope

[Spellpack] Twister and Storm Spiral v1.5

Credits
-Tom_Kazansky for helping me very very much.
-Vexorian for TimerUtils and xe.
-Rising_Dusk for GroupUtils.
-Cohadar for OID.
-Tink3 for template map.
-Dynasti for Damage Over Time.

Changelog
v1.0: Release spellpack.
v1.1: Fix filter function.
v1.2: Fix group problem.
v1.3: Edit Storm Spiral's effect.
v1.4: Capitalizing constant global variables and fix some filters.
v1.5: Add preload ability.

P/s: Please help me the description of both, thank you so much:p..
 

Attachments

  • Twister1.JPG
    Twister1.JPG
    111.3 KB · Views: 2,839
  • Twister2.JPG
    Twister2.JPG
    110.5 KB · Views: 2,867
  • StormSpiral1.JPG
    StormSpiral1.JPG
    100.2 KB · Views: 2,831
  • StormSpiral2.JPG
    StormSpiral2.JPG
    99.3 KB · Views: 2,829
  • [Spellpack] Twister and Storm Spiral v1.5.w3x
    107.6 KB · Views: 356

Laiev

Hey Listen!!
Reaction score
188
JASS:
 private function TwisterF takes nothing returns boolean
        local eo d = I
        local unit u = GetFilterUnit()
        local boolean ok = false
        
        if IsUnitEnemy(u, GetOwningPlayer(d.c)) then
            if IsUnitVisible(u, GetOwningPlayer(d.c)) then
                if IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) == false then
                    if IsUnitType(u, UNIT_TYPE_STRUCTURE) == false then
                        if GetWidgetLife(u) > 0.405 then
                            if IsUnitInGroup(u, d.g) == false then
                                set ok = true
                            endif
                        endif
                    endif
                endif
            endif
        endif
        
        return ok
    endfunction


can be

JASS:
private function TwisterF takes nothing returns boolean
        local eo d = I
        local unit u = GetFilterUnit()
        local boolean ok = false
        
        if      IsUnitEnemy    (u, GetOwningPlayer(d.c)) /*
      */and     IsUnitVisible  (u, GetOwningPlayer(d.c)) /*
      */and not IsUnitType     (u, UNIT_TYPE_MAGIC_IMMUNE) /*
      */and not IsUnitType     (u, UNIT_TYPE_STRUCTURE) /*
      */and     GetWidgetLife  (u) > 0.405 /*
      */and not IsUnitInGroup  (u, d.g) then
      
            set ok = true
        endif
        set u = null //you forget to null the unit
        return ok
    endfunction


or

JASS:
    private function TwisterF takes nothing returns boolean
        local eo d = I
        local unit u = GetFilterUnit()
        local boolean ok = false
        
        if IsUnitEnemy(u, GetOwningPlayer(d.c)) and IsUnitVisible(u, GetOwningPlayer(d.c)) and not IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) and not IsUnitType(u, UNIT_TYPE_STRUCTURE) and GetWidgetLife(u) > 0.405 and not IsUnitInGroup(u, d.g) then
            set ok = true
        endif
        set u = null //you forget to null the unit        
        return ok
    endfunction


and same for other functions and spells...

just suggesting a bit improve to prevent lots of if's (don't want to read all the triggers... anyway.. testing ingame)

EDIT: Wow... nice effect ingame :)
 

BlackRose

Forum User
Reaction score
239
The effects are really nice. Really nice. Although your coding is a gigantic mess [to me]. And I really don't know where to start on how to help.

^:

JASS:
private function TwisterF takes nothing returns boolean
        local eo d = I
        local unit u = GetFilterUnit()
        local boolean ok = false
        
        if IsUnitEnemy(u, GetOwningPlayer(d.c)) and /*
	*/ IsUnitVisible(u, GetOwningPlayer(d.c)) and /*
	*/ not IsUnitType(u, UNIT_TYPE_MAGIC_IMMUNE) and /*
	*/ not IsUnitType(u, UNIT_TYPE_STRUCTURE) and /*
	*/ GetWidgetLife(u) > 0.405 and not /*
	*/ IsUnitInGroup(u, d.g) then
            set ok = true
        endif
        set u = null //you forget to null the unit        
        return ok
    endfunction
 

game_war48

New Member
Reaction score
5
FIXED. +rep for both.

Although your coding is a gigantic mess [to me]. And I really don't know where to start on how to help.

Had a lot of people repine me about that problem. But I don't know how to make it more simple than :(.
 

Viikuna

No Marlo no game.
Reaction score
265
Remember to have private constants for all constant values.


Recycle our groups. theres a cool tutorial about groups usage here in theHelper, made by Jesus4Lyf.

You dont have to create new dummies every time a storm bolt is casted. One dummy unit, created at map init, can easily do all the stunning for you, because StormBolt can be edited to be instantly castable.

( Creating units is fokken slow, probably one of the slowest operations in wc3. )


edit. Also you only need to null locals pointing to some agent that is gonna get destroyed in some part of the game. ( So no need to null recycled timers, or groups or those spell triggers, because those are never destroyed )


edit.
Damn cool spells, though. I love effects, these look really fucking good. Nice work. :thup:

You should probably use SetUnitX/Y instead of position for moving units though. Right now it looks kinda weird when they teleport around when their collinsion sizes stack.
 

Laiev

Hey Listen!!
Reaction score
188
in the filter function, change [ljass]== false[/ljass] to [ljass]and not[/ljass]

more fast ( i think)... just like how me and blackrose show to u
 

game_war48

New Member
Reaction score
5
Reading this tutorial and I will fix map soon.
Thanks :thup:.

EDIT: FIXED and UPDATED.
EDIT2: ...The raw code of xe dummy same the raw code of my hero, fixed :|.
EDIT3: UPDATED v1.5, fixed the effects of Storm Spiral.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits
  • Varine Varine:
    I see that, despite your insistence to the contrary, we are becoming a recipe website
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top