Welcome

Welcome to the community where modding your favorite game can be possible, and supported by a nice and warm community. Here you will find resources which will help you to develop your projects faster. Additionally you can show your projects and share with a growing community, even be part of the Blizzard Modding Network, which aims to gather all the projects and clans around this game.

Please enjoy your stance here.

Warcraft III Spells & systems

[Spell] Dark Matter v1.0


By Dalve


(Description)
Summons  a dark matter at the targeted point. The dark  matter has  ability to absorb all enemy units within 400  range  onto it's position while releasing smaller dark particles to attack those  captured units. Each particle deals 90 damage  on  hit. Lasts for 15 seconds.

(Details)
  • Level(s): 1
  • Manacost: 270
  • Cooldown: 145 s
  • Cast range: 800
  • Area of Effect: 400







  • (Required)
    • Stack
    • CTL
    • WorldBounds
  • (Optional)
    • SpellEffectEvent
    • AutoFly

  • Import all necessary datas (imports, objects, triggers, etc.) into your map.
  • Install all required dependencies correctly.
  • Configure the spell.
  • Done.

(Readme)
Code: jass  [Select]
  1. /*
  2.  
  3.     [General]
  4.         Name: Dark Matter
  5.         Version: 1.0
  6.         Class: Ultimate
  7.    
  8.     [Details]
  9.         Level(s): 1
  10.         Manacost: 270
  11.         Cooldown: 145 s
  12.         Cast range: 800
  13.         Area of Effect: 400
  14.        
  15.     [Description]
  16.         Summons  a dark matter at the targeted point. The dark  matter
  17.         has  ability to absorb all enemy units within 400  range  onto
  18.         it's position while releasing smaller dark particles to attack
  19.         those  captured units. Each particle deals 90 damage  on  hit.
  20.         Lasts for 15 seconds.
  21.  
  22.     [External dependencies]
  23.         (Required)
  24.             - Stack
  25.             - CTL
  26.             - WorldBounds
  27.         (Optional)
  28.             - SpellEffectEvent
  29.             - AutoFly
  30.            
  31.     [Credits]
  32.         - Nestharus
  33.             | Stack, CTL, WorldBounds, AutoFly
  34.            
  35.         - Bribe
  36.             | SpellEffectEvent
  37.            
  38.         - JetFangInferno
  39.             | Deathwave.mdx
  40.            
  41.         - WILL THE ALMIGHTY
  42.             | Blackhole.mdx
  43.            
  44.         - Hellx-Magnus
  45.             | BTNEyeOfShadow
  46.            
  47.     [How to import]
  48.         - Import all necessary datas (imports, objects, triggers, etc.)
  49.             into your map.
  50.         - Install all required dependencies correctly.
  51.         - Configure the spell.
  52.         - Done.
  53. */
(Spell)
Code: jass  [Select]
  1. scope DarkMatter
  2. /*
  3.  
  4.             ~* Dark Matter *~
  5.                     version 1.0
  6.            
  7.         Created by: Dalvengyr
  8.         Copyright 2015
  9.    
  10.         This resource is copyright protected.
  11.         Don't redistribute without permission.
  12.        
  13.         You are free to edit, use, remake, etc.
  14.         but don't remove the copyright notes
  15.         above.
  16.    
  17. */
  18.  
  19.     /*                 *\
  20.         Configuration
  21.     \*                 */
  22.    
  23.     globals
  24.    
  25.     /*  I. General settings */
  26.    
  27.         // Dummy unit's raw code at Object Editor.
  28.         private constant integer    DUMMY_OBJECT_ID       = 'h000'
  29.        
  30.         // Main spell's raw code at Object Editor.
  31.         private constant integer    SPELL_OBJECT_ID       = 'A000'
  32.        
  33.         // General decay time for special effects.
  34.         // Time for effects to finish their death animations
  35.         // before removed completely.
  36.         private constant real       SFX_DECAY_TIME        = 5.0
  37.        
  38.         // General units' hit z offset. Used for 3D collision.
  39.         private constant real       UNITS_HIT_Z_OFFSET    = 50.0
  40.        
  41.    
  42.     /*  II. Orb settings
  43.                 Orb is an object at the center of spell area.
  44.     */
  45.        
  46.         // Orb model's file path.
  47.         private constant string     ORB_SFX               = "war3mapImported\\BlackHole.mdx"
  48.        
  49.         // Orb's flying height.
  50.         private constant real       ORB_HEIGHT_Z          = 0.0
  51.        
  52.         // Orb's scale/size.
  53.         private constant real       ORB_SCALE             = 1.0
  54.        
  55.         // How bad range between victims and the orb can affect the absorb power.
  56.         private constant real       ORB_POWER_FACTOR      = 0.375
  57.        
  58.        
  59.     /*  III. Swirl settings
  60.                 Swirl is consisted by several "waves" (because I use wave model) which
  61.                 swirl around the main orb.
  62.     */
  63.        
  64.         // Wave's raw code at Object Editor.
  65.         private constant integer    SWIRL_WAVE_OBJECT_ID  = 'h001'
  66.        
  67.         // Wave's animation speed.
  68.         private constant real       SWIRL_TIME_SCALE      = 0.1
  69.        
  70.         // Wave's flying height.
  71.         private constant real       SWIRL_HEIGHT_Z        = 100.0
  72.        
  73.         // Wave's scale/size.
  74.         private constant real       SWIRL_SCALE           = 1.25
  75.        
  76.        
  77.     /*  IV. Particle settings
  78.                 Particles are missiles that are periodically released by the orb to attack
  79.                 captured units.
  80.     */
  81.    
  82.         // Particle's model file path.
  83.         private constant string     PARTICLE_SFX          = "Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl"
  84.    
  85.         // Particle's starting fly height when launched.
  86.         private constant real       PARTICLE_LAUNCH_Z     = 100.0
  87.    
  88.         // Particle's scale/size.
  89.         private constant real       PARTICLE_SCALE        = 0.2
  90.    
  91.         // Particle's turn rate.
  92.         private constant real       PARTICLE_TURN_SPEED   = 0.1
  93.    
  94.         // Max range between particle at target to hit the target.
  95.         private constant real       PARTICLE_HIT_RADIUS   = 70.0
  96.    
  97.         // If false, each particle can only hits one target.
  98.         private constant boolean    PARTICLE_PIERCING     = false
  99.        
  100.         // Dealt damage setting.
  101.         private constant attacktype PARTICLE_ATTACK_TYPE  = ATTACK_TYPE_NORMAL
  102.         private constant damagetype PARTICLE_DAMAGE_TYPE  = DAMAGE_TYPE_NORMAL
  103.        
  104.     endglobals
  105.    
  106.     // These settings allow you to assign different values for each level
  107.     // in case the ability has more than one level.
  108.    
  109.     // Number of created wave to swirl around the orb.
  110.     private constant function SwirlCount takes integer level returns integer
  111.         return 9
  112.     endfunction
  113.    
  114.     // Range/distance from the orb to the created waves.
  115.     private constant function SwirlRadius takes integer level returns real
  116.         return 125.0
  117.     endfunction
  118.    
  119.     // Rotation speed of waves, in radians.
  120.     private constant function SwirlRotation takes integer level returns real
  121.         return 0.09
  122.     endfunction
  123.    
  124.     // Dealt damage when particle hits a target.
  125.     private constant function ParticleDamage takes integer level returns real
  126.         return 90.0
  127.     endfunction
  128.    
  129.     // Move speed of each particle.
  130.     private constant function ParticleSpeed takes integer level returns real
  131.         return 5.0
  132.     endfunction
  133.    
  134.     // Maximum delay before the orb releases another particle.
  135.     // Delay is randomized between zero and this value.
  136.     private constant function ParticleSpawnDelayMax takes integer level returns real
  137.         return 0.5
  138.     endfunction
  139.    
  140.     // Maximum range between the orb and targets to absorb them.
  141.     private constant function OrbAoE takes integer level returns real
  142.         return 400.0
  143.     endfunction
  144.    
  145.     // Duration of the spell.
  146.     private constant function OrbDuration takes integer level returns real
  147.         return 15.0
  148.     endfunction
  149.    
  150.     // The absorbtion power.
  151.     private constant function OrbPower takes integer level returns real
  152.         return 15.0
  153.     endfunction
  154.    
  155.     // Classifications of targets that can be affected by this spell.
  156.     private constant function SpellTargets takes unit target, player caster returns boolean
  157.         return IsUnitEnemy(target, caster) and not IsUnitType(target, UNIT_TYPE_STRUCTURE)
  158.     endfunction
  159.    
  160.     // You can add any additional effect to the target here.
  161.     // This function is executed right before the damage is dealt to
  162.     // the target.
  163.     // If you don't need this, you are free to remove this module
  164.     // anytime.
  165.     private module DarkMatterDamageEvent
  166.         static method onDamage takes unit caster, unit target returns nothing
  167.            
  168.         endmethod
  169.     endmodule
  170.    
  171.     // ~*~*~*~*~**~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
  172.    
  173.     globals
  174.         private constant real INTERVAL = 0.0312500
  175.         private group Group = CreateGroup()
  176.     endglobals
  177.    
  178.    
  179.     // Native declaration.
  180.     native UnitAlive takes unit id returns boolean
  181.    
  182.    
  183.     // Stack used to contain/store waves.
  184.     private struct Swirl extends array
  185.         unit unit
  186.         implement Stack
  187.     endstruct
  188.    
  189.    
  190.     // Create swirl at give coordinates.
  191.     private struct Tornado extends array
  192.        
  193.         Swirl swirl
  194.         integer count
  195.        
  196.         real distance
  197.         real angle
  198.         real rotation
  199.        
  200.         real space
  201.         real x
  202.         real y
  203.        
  204.         static constant real TAU = 2*bj_PI
  205.        
  206.         method terminate takes nothing returns nothing
  207.            
  208.             local Swirl node = .swirl.first
  209.            
  210.             // Kill all waves.
  211.             loop
  212.                 exitwhen node == 0
  213.                
  214.                 call KillUnit(node.unit)
  215.                 set node.unit = null
  216.                
  217.                 set node = node.next
  218.             endloop
  219.            
  220.             call .swirl.destroy()
  221.             call destroy()
  222.            
  223.         endmethod
  224.        
  225.        
  226.         implement CTL
  227.        
  228.             local real a
  229.             local integer i
  230.             local Swirl node
  231.            
  232.         implement CTLExpire
  233.        
  234.             set i = .count
  235.             set node = .swirl.first
  236.             set .angle = .angle + .rotation
  237.            
  238.             // Iterate through all nodes to update
  239.             // their angles/rotations.
  240.             loop
  241.                 exitwhen i <= 0
  242.                
  243.                 set a = .angle+.space*i
  244.                 call SetUnitX(node.unit, .x + .distance * Cos(a))
  245.                 call SetUnitY(node.unit, .y + .distance * Sin(a))
  246.                 call SetUnitFacing(node.unit, a*bj_RADTODEG)
  247.                
  248.                 set node = node.next
  249.                 set i = i - 1
  250.             endloop
  251.            
  252.         implement CTLEnd
  253.        
  254.        
  255.         static method spawn takes player p, integer count, real x, real y, real dist, real rot returns thistype
  256.            
  257.             local thistype this = create()
  258.             local integer i = 0
  259.             local real a
  260.             local Swirl node
  261.            
  262.             // Number of waves.
  263.             set .count = count
  264.             // Angle difference between each wave (in radian).
  265.             set .space = TAU/count
  266.             // Initial angle (random).
  267.             set .angle = GetRandomReal(-bj_PI, bj_PI)
  268.             // Allocate stack for waves.
  269.             set .swirl = Swirl.create()
  270.            
  271.             // Distance from center to waves.
  272.             set .distance = dist
  273.             // Rotation rate.
  274.             set .rotation = rot
  275.             set .x = x
  276.             set .y = y
  277.            
  278.             // Create the waves and store into the stack.
  279.             loop
  280.                 exitwhen i >= count
  281.                
  282.                 // Allocate new node to the stack.
  283.                 set node = .swirl.push()
  284.                 set a = .angle+.space*i
  285.                 set node.unit = CreateUnit(p, SWIRL_WAVE_OBJECT_ID, x+dist*Cos(a), y+dist*Sin(a), a*bj_RADTODEG)
  286.                
  287.                 call SetUnitScale(node.unit, SWIRL_SCALE, 1, 1)
  288.                 call SetUnitTimeScale(node.unit, SWIRL_TIME_SCALE)
  289.                
  290.                 if SWIRL_HEIGHT_Z > 0 then
  291.                
  292.                     static if not LIBRARY_AutoFly then
  293.                         if UnitAddAbility(node.unit, 'Amrf') and UnitRemoveAbility(node.unit, 'Amrf') then
  294.                         endif
  295.                     endif
  296.                    
  297.                     call SetUnitFlyHeight(node.unit, SWIRL_HEIGHT_Z, 0)
  298.                 endif
  299.                
  300.                 set i = i + 1
  301.             endloop
  302.            
  303.             return this
  304.         endmethod
  305.        
  306.     endstruct
  307.    
  308.    
  309.     private keyword DarkMatter
  310.    
  311.    
  312.     // Launch 3D homing missile.
  313.     private struct SimpleMissile extends array
  314.        
  315.         effect sfx
  316.         player owner
  317.         group targets
  318.        
  319.         unit caster
  320.         unit target
  321.         unit missile
  322.        
  323.         real x
  324.         real y
  325.         real z
  326.        
  327.         real dc
  328.         real dx
  329.         real damage
  330.        
  331.         real turn
  332.         real angle
  333.         real speed
  334.        
  335.         method terminate takes nothing returns nothing
  336.        
  337.             // Group is only created if piercing is true.
  338.             static if PARTICLE_PIERCING then
  339.                 call DestroyGroup(.targets)
  340.                 set .targets = null
  341.             endif
  342.            
  343.             call DestroyEffect(.sfx)
  344.             call UnitApplyTimedLife(.missile, 'BTLF', SFX_DECAY_TIME)
  345.             call destroy()
  346.            
  347.             // Remove leaks.
  348.             set .missile = null
  349.             set .target = null
  350.             set .caster = null
  351.             set .sfx = null
  352.            
  353.         endmethod
  354.        
  355.         implement optional DarkMatterDamageEvent
  356.        
  357.         implement CTL
  358.        
  359.             local real a
  360.             local real v
  361.             local real h
  362.            
  363.             local real d
  364.             local real x
  365.             local real y
  366.            
  367.             local unit u
  368.             local unit t
  369.             local integer rand
  370.            
  371.         implement CTLExpire
  372.        
  373.             set .dc = .dc + .speed
  374.             set .x = .x + .speed * Cos(.angle)
  375.             set .y = .y + .speed * Sin(.angle)
  376.            
  377.             // Parabola equation.
  378.             set v = 4 * (.dx-.dc) * (.dc/.dx) + PARTICLE_LAUNCH_Z
  379.            
  380.             // If haven't touched the ground and still inside the map bounds.
  381.             if v > 0 and .x < WorldBounds.maxX and .x > WorldBounds.minX and .y < WorldBounds.maxY and .y > WorldBounds.minY then
  382.            
  383.                 call SetUnitX(.missile, .x)
  384.                 call SetUnitY(.missile, .y)
  385.                 call SetUnitFlyHeight(.missile, v, 0)
  386.                
  387.                 // Adjust the angle to face the target.
  388.                 set a = Atan2(GetUnitY(.target)-.y, GetUnitX(.target)-.x)
  389.                 if Cos(.angle - a) < Cos(.turn) then
  390.                     if Sin(a - .angle) >= 0 then
  391.                         set .angle = .angle + .turn
  392.                     else
  393.                         set .angle = .angle - .turn
  394.                     endif
  395.                 else
  396.                     set .angle = a
  397.                 endif
  398.                
  399.                 // Determine one random target from all possible targets.
  400.                 // if not piercing.
  401.                 static if not PARTICLE_PIERCING then
  402.                     set t = null
  403.                     set rand = 0
  404.                 endif
  405.                
  406.                 // Iterates all units around the missile.
  407.                 call GroupEnumUnitsInRange(Group, .x, .y, PARTICLE_HIT_RADIUS, null)
  408.                 loop
  409.                     set u = FirstOfGroup(Group)
  410.                     exitwhen u == null
  411.                     call GroupRemoveUnit(Group,  u)
  412.                    
  413.                     if UnitAlive(u) and SpellTargets(u, owner) then
  414.                    
  415.                         set x = GetUnitX(u)
  416.                         set y = GetUnitY(u)
  417.                         set h = GetUnitFlyHeight(u) + UNITS_HIT_Z_OFFSET - v
  418.                         set d = SquareRoot((.x-x)*(.x-x)+(.y-y)*(.y-y))
  419.                        
  420.                         // 3D spherical collision.
  421.                         if SquareRoot(d*d+h*h) <= PARTICLE_HIT_RADIUS then
  422.                        
  423.                             static if PARTICLE_PIERCING then
  424.                            
  425.                                 if not IsUnitInGroup(u, .targets) then
  426.                                
  427.                                     static if thistype.onDamage.exists then
  428.                                         call thistype.onDamage(.caster, u)
  429.                                     endif
  430.                                
  431.                                     call UnitDamageTarget(.caster, u, .damage, false, false, PARTICLE_ATTACK_TYPE, PARTICLE_DAMAGE_TYPE, null)
  432.                                     call GroupAddUnit(.targets, u)
  433.                                    
  434.                                 endif
  435.                                
  436.                             else
  437.                                
  438.                                 // Quite effective to obtain random unit from a group.
  439.                                 set rand = rand + 1
  440.                                
  441.                                 if GetRandomInt(1, rand) == 1 then
  442.                                     set t = u
  443.                                 endif
  444.                                
  445.                             endif
  446.                         endif
  447.                        
  448.                     endif
  449.                 endloop
  450.                
  451.                 static if not PARTICLE_PIERCING then
  452.                     // If a target is found.
  453.                     if t != null then
  454.                        
  455.                         static if thistype.onDamage.exists then
  456.                             call thistype.onDamage(.caster, t)
  457.                         endif
  458.                    
  459.                         call UnitDamageTarget(.caster, t, .damage, false, false, PARTICLE_ATTACK_TYPE, PARTICLE_DAMAGE_TYPE, null)
  460.                         call terminate()
  461.                         set t = null
  462.                        
  463.                     endif
  464.                 endif
  465.                
  466.             else
  467.                 call terminate()
  468.             endif
  469.            
  470.         implement CTLEnd
  471.        
  472.        
  473.         static method launch takes DarkMatter source, unit target returns thistype
  474.            
  475.             local thistype this = create()
  476.             local real x = GetUnitX(target)
  477.             local real y = GetUnitY(target)
  478.            
  479.             set .target = target
  480.             set .caster = source.caster
  481.             set .owner = source.owner
  482.            
  483.             // Launch from random location nearby the orb.
  484.             set .x = source.x + GetRandomReal(-source.tornado.distance, source.tornado.distance)
  485.             set .y = source.y + GetRandomReal(-source.tornado.distance, source.tornado.distance)
  486.             set .angle = GetRandomReal(-bj_PI, bj_PI)
  487.            
  488.             set .missile = CreateUnit(.owner, DUMMY_OBJECT_ID, .x, .y, .angle*bj_RADTODEG)
  489.             set .sfx = AddSpecialEffectTarget(PARTICLE_SFX, .missile, "origin")
  490.             set .turn = PARTICLE_TURN_SPEED
  491.            
  492.             set .damage = source.damage
  493.             set .speed = source.speed
  494.             set .dx = source.aoe
  495.             set .dc = 0
  496.            
  497.             // Create group if only piercing is true.
  498.             static if PARTICLE_PIERCING then
  499.                 set .targets = CreateGroup()
  500.             endif
  501.            
  502.             static if not LIBRARY_AutoFly then
  503.                 if UnitAddAbility(.missile, 'Amrf') and UnitRemoveAbility(.missile, 'Amrf') then
  504.                 endif
  505.             endif
  506.            
  507.             call SetUnitFlyHeight(.missile, PARTICLE_LAUNCH_Z, 0)
  508.             call SetUnitScale(.missile, PARTICLE_SCALE, 1, 1)
  509.            
  510.             return this
  511.         endmethod
  512.        
  513.     endstruct
  514.    
  515.    
  516.     // Main spell's struct.
  517.     private struct DarkMatter extends array
  518.    
  519.         unit orb
  520.         unit caster
  521.         group targets
  522.        
  523.         Tornado tornado
  524.         player owner
  525.         effect sfx
  526.        
  527.         real aspd
  528.         real aspdx
  529.         real speed
  530.        
  531.         real damage
  532.         real power
  533.         real aoe
  534.        
  535.         real duration
  536.         real x
  537.         real y
  538.        
  539.         real delay
  540.         real delayx
  541.         real rotation
  542.         real amount
  543.        
  544.         static constant real HP = bj_PI/2
  545.        
  546.         method terminate takes nothing returns nothing
  547.        
  548.             local unit u
  549.        
  550.             // Turn all remaining units' collision back to on.
  551.             loop
  552.                 set u = FirstOfGroup(.targets)
  553.                 exitwhen u == null
  554.                 call GroupRemoveUnit(.targets, u)
  555.                 call SetUnitPathing(u, true)
  556.             endloop
  557.        
  558.             call .tornado.terminate()
  559.             call DestroyEffect(.sfx)
  560.             call DestroyGroup(.targets)
  561.             call UnitApplyTimedLife(.orb, 'BTLF', SFX_DECAY_TIME)
  562.            
  563.             call destroy()
  564.             // Remove leaks.
  565.             set .targets = null
  566.             set .caster = null
  567.             set .orb = null
  568.             set .sfx = null
  569.            
  570.         endmethod
  571.        
  572.        
  573.         implement CTL
  574.            
  575.             local group g
  576.        
  577.             local integer rand = 0
  578.             local unit t = null
  579.             local unit u
  580.            
  581.             local real d
  582.             local real x
  583.             local real y
  584.            
  585.             local real h
  586.             local real a
  587.             local real pow
  588.            
  589.         implement CTLExpire
  590.        
  591.             if .duration > INTERVAL then
  592.            
  593.                 set .duration = .duration - INTERVAL
  594.                
  595.                 // Iterate through all units around the orb (within aoe).
  596.                 call GroupEnumUnitsInRange(Group, .x, .y, .aoe, null)
  597.                 loop
  598.                     set u = FirstOfGroup(Group)
  599.                     exitwhen u == null
  600.                     call GroupRemoveUnit(Group, u)
  601.                    
  602.                     if UnitAlive(u) and SpellTargets(u, owner) then
  603.                        
  604.                         set x = GetUnitX(u)
  605.                         set y = GetUnitY(u)
  606.                         set d = SquareRoot((.x-x)*(.x-x)+(.y-y)*(.y-y))
  607.                         // Power is affected by distance between orb and the target.
  608.                         set pow = .power - .power*(d/.aoe)*ORB_POWER_FACTOR
  609.                         // Calculate target angle.
  610.                         set a = Atan2(.y-y, .x-x) - (HP*(d/.aoe))*.rotation
  611.                        
  612.                         if not IsUnitInGroup(u, .targets) then
  613.                             call GroupAddUnit(.targets, u)
  614.                             call SetUnitPathing(u, false)
  615.                         endif
  616.                    
  617.                         if .aspd <= INTERVAL then
  618.                        
  619.                             set rand = rand + 1
  620.                            
  621.                             if GetRandomInt(1, rand) == 1 then
  622.                                 set t = u
  623.                             endif
  624.                            
  625.                         endif
  626.                        
  627.                         if d > pow then
  628.                        
  629.                             call SetUnitX(u, x + pow * Cos(a))
  630.                             call SetUnitY(u, y + pow * Sin(a))
  631.                            
  632.                         else
  633.                        
  634.                             call SetUnitX(u, .x)
  635.                             call SetUnitY(u, .y)
  636.                            
  637.                         endif
  638.                        
  639.                     endif
  640.                 endloop
  641.                
  642.                 // Iterates all affected units which have
  643.                 // escaped the spell area and turn their
  644.                 // collision on.
  645.                 set g = .targets
  646.                 set .targets = CreateGroup()
  647.                 loop
  648.                     set u = FirstOfGroup(g)
  649.                     exitwhen u == null
  650.                     call GroupRemoveUnit(g, u)
  651.                    
  652.                     set x = GetUnitX(u)
  653.                     set y = GetUnitY(u)
  654.                     if SquareRoot((.x-x)*(.x-x)+(.y-y)*(.y-y)) > .aoe then
  655.                         call SetUnitPathing(u, true)
  656.                     else
  657.                         call GroupAddUnit(.targets, u)
  658.                     endif
  659.                 endloop
  660.                
  661.                 if .aspd > INTERVAL then
  662.                     set .aspd = .aspd - INTERVAL
  663.                 elseif t != null then
  664.                     // Launch missile if a random target is found.
  665.                     set .aspd = GetRandomReal(0, .aspdx)
  666.                     call SimpleMissile.launch(this, t)
  667.                     set t = null
  668.                 endif
  669.                
  670.                 // Remove leaks.
  671.                 call DestroyGroup(g)
  672.                 set g = null
  673.             else
  674.                 call terminate()
  675.             endif
  676.            
  677.         implement CTLEnd
  678.        
  679.        
  680.         static method onCast takes nothing returns nothing
  681.            
  682.             local thistype this = create()
  683.             local integer l
  684.            
  685.             set .caster = GetTriggerUnit()
  686.             set .owner = GetTriggerPlayer()
  687.            
  688.             set .x = GetSpellTargetX()
  689.             set .y = GetSpellTargetY()
  690.             set .targets = CreateGroup()
  691.            
  692.             set .orb = CreateUnit(.owner, DUMMY_OBJECT_ID, .x, .y, 270)
  693.             set .sfx = AddSpecialEffectTarget(ORB_SFX, .orb, "origin")
  694.             set l = GetUnitAbilityLevel(.caster, SPELL_OBJECT_ID)
  695.            
  696.             set .aoe = OrbAoE(l)
  697.             set .power = OrbPower(l)
  698.             set .duration = OrbDuration(l)
  699.            
  700.             set .rotation = SwirlRotation(l)
  701.             set .tornado = Tornado.spawn(.owner, SwirlCount(l), .x, .y, SwirlRadius(l), .rotation)
  702.             // Get the rotation direction.
  703.             set .rotation = .rotation/RAbsBJ(.rotation)
  704.            
  705.             set .speed = ParticleSpeed(l)
  706.             set .damage = ParticleDamage(l)
  707.             set .aspd = ParticleSpawnDelayMax(l)
  708.            
  709.             set .aspdx = .aspd
  710.             call SetUnitScale(.orb, ORB_SCALE, 1, 1)
  711.            
  712.             if ORB_HEIGHT_Z > 0 then
  713.                 static if not LIBRARY_AutoFly then
  714.                     if UnitAddAbility(.orb, 'Amrf') and UnitRemoveAbility(.orb, 'Amrf') then
  715.                     endif
  716.                 endif
  717.                 call SetUnitFlyHeight(.orb, ORB_HEIGHT_Z, 0)
  718.             endif
  719.            
  720.         endmethod
  721.            
  722.            
  723.         static if not LIBRARY_SpellEffectEvent then
  724.             private static method check takes nothing returns boolean
  725.                 if GetSpellAbilityId() == SPELL_OBJECT_ID then
  726.                     call thistype.onCast()
  727.                 endif
  728.                 return false
  729.             endmethod
  730.         endif
  731.        
  732.        
  733.         static method onInit takes nothing returns nothing
  734.  
  735.             local trigger t
  736.            
  737.             static if LIBRARY_SpellEffectEvent then
  738.                 call RegisterSpellEffectEvent(SPELL_OBJECT_ID, function thistype.onCast)
  739.             else
  740.                 set t = CreateTrigger()
  741.                 call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
  742.                 call TriggerAddCondition(t, Condition(function thistype.check))
  743.             endif
  744.            
  745.         endmethod
  746.        
  747.     endstruct
  748.    
  749. endscope

  • Nestharus

| Stack, CTL, WorldBounds, AutoFly

           
  • Bribe

| SpellEffectEvent

           
  • JetFangInferno

| Deathwave.mdx


           
  • WILL THE ALMIGHTY

| Blackhole.mdx

           
  • Hellx-Magnus

| BTNEyeOfShadow

[/list]

Picked from the vault...

HSS v1.3


By radamantus

A unique window full screen hero selection :D

To Import:
Copy the models and the doodads, also copy the triggers and variables and dummies.

Triggers

Trigger: HSS Setup
    Events
        Map initialization
    Conditions
    Actions
        Custom script:   set udg_HSS_Hash = InitHashtable()
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Paladin
        Set HSS_Model = Hero(Paladin)
        Set HSS_Icon = (Icon) Paladin
        Set HSS_Info = Warrior Hero, exceptional at defense and augmenting nearby friendly troops. Can learn Holy Light, Divine Shield, Devotion Aura and Resurrection. |n|n|cffffcc00Attacks land units.|r
        Set HSS_Name = |cffffcc00Paladin
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 22 + 2.70
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 13 + 1.50
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 17 + 1.80
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0012 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0033 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Archmage
        Set HSS_Model = Hero(Archmage)
        Set HSS_Icon = (Icon) Archmage
        Set HSS_Info = Mystical Hero, adept at ranged assaults. Can learn Blizzard, Summon Water Elemental, Brilliance Aura and Mass Teleport. |n|n|cffffcc00Attacks land and air units.|r
        Set HSS_Name = |cffffcc00Archmage
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 14 + 1.80
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 17 + 1.00
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 19 + 3.20
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0013 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0034 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Mountain King
        Set HSS_Model = Hero(Mountain King)
        Set HSS_Icon = (Icon) Mountain King
        Set HSS_Info = Warrior Hero, adept at offensive combat and disrupting enemy troops. Can learn Storm Bolt, Thunder Clap, Bash and Avatar. |n|n|cffffcc00Attacks land units.|r
        Set HSS_Name = |cffffcc00Mountain King
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 24 + 3.00
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 11 + 1.50
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 15 + 1.50
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0035 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0014 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Determines all the information of the hero --------
        -------- ------------------------------------ --------
        Set HSS_HeroType = Blood Mage
        Set HSS_Model = Hero(Blood Mage)
        Set HSS_Icon = (Icon) Blood Mage
        Set HSS_Info = Mystical Hero, adept at controlling magic and ranged assaults. Can learn Flame Strike, Banish, Siphon Mana and Phoenix. |n|n|cffffcc00Attacks land and air units.|r
        Set HSS_Name = |cffffcc00Blood Mage
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[1] = 18 + 2.00
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[2] = 14 + 1.00
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_Attribute[3] = 19 + 3.00
        -------- ------------------------------------ --------
        -------- Trigger --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Info <gen>
        -------- ------------------------------------ --------
        -------- Save --------
        -------- ------------------------------------ --------
        Set HSS_Button = Button 0015 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0036 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Main Buttons --------
        -------- ------------------------------------ --------
        -------- ------------------------------------ --------
        -------- Select Hero Button --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Create Hero <gen>
        Set HSS_Button = Button 0021 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0042 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Random Hero --------
        -------- ------------------------------------ --------
        Set HSS_Trigger = HSS Random <gen>
        Set HSS_Button = Button 0020 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        Set HSS_Button = Button 0041 <gen>
        Custom script:   set udg_HSS_Key[1] = GetHandleId(udg_HSS_Button)
        Trigger - Run HSS Main Save <gen> (ignoring conditions)
        -------- ------------------------------------ --------
        -------- Cameras --------
        -------- ------------------------------------ --------
        Set HSS_Camera[0] = Camera Debugger <gen>
        Set HSS_Camera[1] = Camera Player 1 <gen>
        Set HSS_Camera[2] = Camera Player 2 <gen>
        -------- ------------------------------------ --------
        -------- Regions --------
        -------- ------------------------------------ --------
        -------- ------------------------------------ --------
        -------- Main --------
        -------- ------------------------------------ --------
        Set HSS_MainRegion[1] = Main 1 <gen>
        Set HSS_MainRegion[2] = Main 2 <gen>
        -------- ------------------------------------ --------
        -------- Info --------
        -------- ------------------------------------ --------
        Set HSS_RegionInfo[1] = Hero Info 1 <gen>
        Set HSS_RegionInfo[2] = Hero Info 2 <gen>
        -------- ------------------------------------ --------
        -------- Heroes --------
        -------- ------------------------------------ --------
        Set HSS_RegionHeroes[1] = Heroes 1 <gen>
        Set HSS_RegionHeroes[2] = Heroes 2 <gen>
        -------- ------------------------------------ --------
        -------- Hero Model --------
        -------- ------------------------------------ --------
        Set HSS_HeroModelRegion[1] = Hero 3D Model 1 <gen>
        Set HSS_HeroModelRegion[2] = Hero 3D Model 2 <gen>
        -------- ------------------------------------ --------
        -------- Hero Icon --------
        -------- ------------------------------------ --------
        Set HSS_HeroIconRegion[1] = Hero Icon 1 <gen>
        Set HSS_HeroIconRegion[2] = Hero Icon 2 <gen>
        -------- ------------------------------------ --------
        -------- Hero Name --------
        -------- ------------------------------------ --------
        Set HSS_HeroNameRegion[1] = Hero Name 1 <gen>
        Set HSS_HeroNameRegion[2] = Hero Name 2 <gen>
        -------- ------------------------------------ --------
        -------- Agility --------
        -------- ------------------------------------ --------
        Set HSS_AgiRegion[1] = Hero Agi 1  <gen>
        Set HSS_AgiRegion[2] = Hero Agi 2 <gen>
        -------- ------------------------------------ --------
        -------- Strength --------
        -------- ------------------------------------ --------
        Set HSS_StrRegion[1] = Hero Str 1 <gen>
        Set HSS_StrRegion[2] = Hero Str 2 <gen>
        -------- ------------------------------------ --------
        -------- Intelligence --------
        -------- ------------------------------------ --------
        Set HSS_IntRegion[1] = Hero Int 1  <gen>
        Set HSS_IntRegion[2] = Hero Int 2 <gen>
        -------- ------------------------------------ --------
        -------- Sets all Players --------
        -------- ------------------------------------ --------
        Set HSS_Player[1] = Player 1 (Red)
        Set HSS_Player[2] = Player 2 (Blue)
        -------- ------------------------------------ --------
        -------- You can add all of the players if you want --------
        -------- Adding the triggers and cameras for them --------
        -------- ------------------------------------ --------
        For each (Integer HSS_Integer) from 1 to 2, do (Actions)
            Loop - Actions
                Custom script:   set udg_HSS_Key[2] = GetHandleId(udg_HSS_Player[udg_HSS_Integer])
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by an info --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_RegionInfo[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_InfoText[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by a hero name --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_HeroNameRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_NameText[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by the agility of the hero --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_AgiRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_Agi[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by the Strength of the hero --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_StrRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_Str[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates a text which will be replaced by the Intelligence of the hero --------
                -------- ------------------------------------ --------
                Set HSS_TextLoc = (Center of HSS_IntRegion[HSS_Integer])
                Floating Text - Create floating text that reads     at HSS_TextLoc with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set HSS_Int[HSS_Integer] = (Last created floating text)
                Custom script:   call RemoveLocation(udg_HSS_TextLoc)
                -------- ------------------------------------ --------
                -------- Creates the visibility --------
                -------- ------------------------------------ --------
                Set HSS_VisibilityLoc = (Center of HSS_MainRegion[HSS_Integer])
                Unit - Create 1 Selector for HSS_Player[HSS_Integer] at HSS_VisibilityLoc facing Default building facing degrees
                Set HSS_Selector[HSS_Integer] = (Last created unit)
                Custom script:   call RemoveLocation(udg_HSS_VisibilityLoc)
                -------- ------------------------------------ --------
                -------- Starts the camera --------
                -------- ------------------------------------ --------
                Player Group - Add HSS_Player[HSS_Integer] to HSS_CameraGroup
                Trigger - Turn on HSS Camera <gen>
                Trigger - Add to HSS Select <gen> the event (Player - HSS_Player[HSS_Integer] Selects a unit)
        -------- ------------------------------------ --------
        -------- Hides all buttons --------
        -------- ------------------------------------ --------
        For each (Integer HSS_Integer) from 1 to 2, do (Actions)
            Loop - Actions
                Custom script:   set bj_wantDestroyGroup = true
                Unit Group - Pick every unit in (Units in HSS_MainRegion[HSS_Integer]) and do (Animation - Change (Picked unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency)

Trigger: HSS Save
    Events
    Conditions
    Actions
        Custom script:   call SaveInteger(udg_HSS_Hash,udg_HSS_Key[1],1,udg_HSS_HeroType)
        Custom script:   call SaveInteger(udg_HSS_Hash,udg_HSS_Key[1],2,udg_HSS_Model)
        Custom script:   call SaveInteger(udg_HSS_Hash,udg_HSS_Key[1],3,udg_HSS_Icon)
        Hashtable - Save HSS_Info as 4 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Attribute[1] as 5 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Attribute[2] as 6 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Attribute[3] as 7 of HSS_Key[1] in HSS_Hash
        Hashtable - Save Handle OfHSS_Trigger as 8 of HSS_Key[1] in HSS_Hash
        Hashtable - Save HSS_Name as 9 of HSS_Key[1] in HSS_Hash

Trigger: HSS Main Save
    Events
    Conditions
    Actions
        Hashtable - Save Handle OfHSS_Trigger as 8 of HSS_Key[1] in HSS_Hash

Trigger: HSS Select
    Events
    Conditions
        (Unit-type of (Triggering unit)) Equal to Button
    Actions
        Set HSS_CurrentButton = (Triggering unit)
        Custom script:   set udg_HSS_Key[3] = GetHandleId(udg_HSS_CurrentButton)
        Set HSS_TempPlayer = (Triggering player)
        -------- ------------------------------------ --------
        -------- Starting Trigger --------
        -------- ------------------------------------ --------
        Set HSS_ID = (Player number of HSS_TempPlayer)
        Trigger - Turn off (This trigger)
        Selection - Clear selection for HSS_TempPlayer
        Set HSS_TempTrigger = (Load 8 of HSS_Key[3] in HSS_Hash)
        Trigger - Run HSS_TempTrigger (ignoring conditions)
        Trigger - Turn on (This trigger)

Trigger: HSS Info
    Events
    Conditions
    Actions
        -------- ------------------------------------ --------
        -------- Removing all models --------
        -------- ------------------------------------ --------
        Unit - Remove HSS_CurrentModel[HSS_ID] from the game
        Destructible - Remove HSS_CurrentIcon[HSS_ID]
        -------- ------------------------------------ --------
        -------- Load --------
        -------- ------------------------------------ --------
        Custom script:   set udg_HSS_TempHeroType = LoadInteger(udg_HSS_Hash,udg_HSS_Key[3],1)
        Custom script:   set udg_HSS_TempModel = LoadInteger(udg_HSS_Hash,udg_HSS_Key[3],2)
        Custom script:   set udg_HSS_TempIcon = LoadInteger(udg_HSS_Hash,udg_HSS_Key[3],3)
        Set HSS_TempInfo = (Load 4 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempAttribute[1] = (Load 5 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempAttribute[2] = (Load 6 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempAttribute[3] = (Load 7 of HSS_Key[3] from HSS_Hash)
        Set HSS_TempName = (Load 9 of HSS_Key[3] from HSS_Hash)
        -------- ------------------------------------ --------
        -------- Creating Icon --------
        -------- ------------------------------------ --------
        Set HSS_TempLoc = (Center of HSS_HeroIconRegion[HSS_ID])
        Destructible - Create a HSS_TempIcon at HSS_TempLoc facing 0.00 with scale 1.50 and variation 0
        Set HSS_CurrentIcon[HSS_ID] = (Last created destructible)
        Custom script:   call RemoveLocation(udg_HSS_TempLoc)
        -------- ------------------------------------ --------
        -------- Creating Hero Model --------
        -------- ------------------------------------ --------
        Set HSS_TempLoc = (Center of HSS_HeroModelRegion[HSS_ID])
        Unit - Create 1 HSS_TempModel for HSS_TempPlayer at HSS_TempLoc facing 180.00 degrees
        Set HSS_CurrentModel[HSS_ID] = (Last created unit)
        Custom script:   call RemoveLocation(udg_HSS_TempLoc)
        -------- ------------------------------------ --------
        -------- Creating Info --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_RegionInfo[HSS_ID])
        Floating Text - Destroy HSS_InfoText[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempInfo at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_InfoText[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Creating Name Info --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_HeroNameRegion[HSS_ID])
        Floating Text - Destroy HSS_NameText[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempName at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_NameText[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Creates all attribute info --------
        -------- ------------------------------------ --------
        -------- ------------------------------------ --------
        -------- Str --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_StrRegion[HSS_ID])
        Floating Text - Destroy HSS_Str[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempAttribute[1] at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_Str[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Agi --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_AgiRegion[HSS_ID])
        Floating Text - Destroy HSS_Agi[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempAttribute[2] at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_Agi[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Int --------
        -------- ------------------------------------ --------
        Set HSS_TempLocSys = (Center of HSS_IntRegion[HSS_ID])
        Floating Text - Destroy HSS_Int[HSS_ID]
        Floating Text - Create floating text that reads HSS_TempAttribute[3] at HSS_TempLocSys with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
        Set HSS_Int[HSS_ID] = (Last created floating text)
        Custom script:   call RemoveLocation(udg_HSS_TempLocSys)
        -------- ------------------------------------ --------
        -------- Creates a current selected indicator --------
        -------- ------------------------------------ --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                HSS_Indicator[HSS_ID] Equal to No unit
            Then - Actions
                Set HSS_TempLoc = (Position of HSS_CurrentButton)
                Unit - Create 1 Current Selected for HSS_TempPlayer at HSS_TempLoc facing Default building facing degrees
                Set HSS_Indicator[HSS_ID] = (Last created unit)
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
            Else - Actions
                Set HSS_TempLoc = (Position of HSS_CurrentButton)
                Unit - Move HSS_Indicator[HSS_ID] instantly to HSS_TempLoc
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
        Set HSS_CurrentSelected[HSS_ID] = HSS_CurrentButton
        Set HSS_CurrentHeroType[HSS_ID] = HSS_TempHeroType

Trigger: HSS Create Hero
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                HSS_CurrentSelected[HSS_ID] Not equal to No unit
            Then - Actions
                Set HSS_TempLoc = (HSS_TempPlayer start location)
                Unit - Create 1 HSS_CurrentHeroType[HSS_ID] for HSS_TempPlayer at HSS_TempLoc facing Default building facing degrees
                -------- ------------------------------------ --------
                -------- Removing Units --------
                -------- ------------------------------------ --------
                Unit - Remove HSS_Selector[HSS_ID] from the game
                Unit - Remove HSS_CurrentSelected[HSS_ID] from the game
                -------- ------------------------------------ --------
                -------- Removing all models --------
                -------- ------------------------------------ --------
                Unit - Remove HSS_CurrentModel[HSS_ID] from the game
                Destructible - Remove HSS_CurrentIcon[HSS_ID]
                -------- ------------------------------------ --------
                -------- Restoring Camera --------
                -------- ------------------------------------ --------
                Player Group - Remove HSS_TempPlayer from HSS_CameraGroup
                Camera - Apply HSS_Camera[0] for HSS_TempPlayer over 0.00 seconds
                Camera - Pan camera for HSS_TempPlayer to HSS_TempLoc over 0.00 seconds
                Selection - Select (Last created unit) for HSS_TempPlayer
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
                -------- ------------------------------------ --------
                -------- Creating Disabled Icon --------
                -------- ------------------------------------ --------
                Set HSS_TempLoc = (Position of HSS_CurrentSelected[HSS_ID])
                Destructible - Create a   Button (Disabled) at HSS_TempLoc facing 0.00 with scale 1.50 and variation 0
                Custom script:   call RemoveLocation(udg_HSS_TempLoc)
                -------- ------------------------------------ --------
                -------- Destroying all text --------
                -------- ------------------------------------ --------
                Floating Text - Destroy HSS_InfoText[HSS_ID]
                Floating Text - Destroy HSS_NameText[HSS_ID]
                Floating Text - Destroy HSS_Agi[HSS_ID]
                Floating Text - Destroy HSS_Int[HSS_ID]
                Floating Text - Destroy HSS_Str[HSS_ID]
                Set HSS_CurrentSelected[HSS_ID] = No unit
            Else - Actions

Trigger: HSS Random
    Events
    Conditions
    Actions
        Set HSS_RandomGroup[1] = (Units in HSS_MainRegion[HSS_ID] matching ((((Unit-type of (Matching unit)) Equal to Button) and ((Matching unit) Not equal to Button 0020 <gen>)) and ((((Matching unit) Not equal to Button 0021 <gen>) and ((Matching unit) Not equal to Button 0042 <gen>)) and
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in HSS_RandomGroup[1]) Greater than 0
            Then - Actions
                Set HSS_RandomGroup[2] = (Random 1 units from HSS_RandomGroup[1])
                Set HSS_TempButton[1] = Button 0021 <gen>
                Set HSS_TempButton[2] = Button 0042 <gen>
                Unit Group - Pick every unit in HSS_RandomGroup[2] and do (Actions)
                    Loop - Actions
                        Selection - Select (Picked unit) for HSS_TempPlayer
                Selection - Select HSS_TempButton[HSS_ID] for HSS_TempPlayer
                Custom script:   call DestroyGroup(udg_HSS_RandomGroup[2])
            Else - Actions
        Custom script:   call DestroyGroup(udg_HSS_RandomGroup[1])

Trigger: HSS Camera
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Player Group - Pick every player in HSS_CameraGroup and do (Actions)
            Loop - Actions
                Set HSS_TempID = (Player number of (Picked player))
                Camera - Apply HSS_Camera[HSS_TempID] for (Picked player) over 0.00 seconds

Warcraft III models

Picked from the vault...

Warcraft III Skins

Picked from the vault...

Blizzard Modding Network News

Blizzard Modding Information Center Starcraft II Modding Information Center Wacraft III Modding Information Center WC3JASS.com - The JASS Vault Chronicles of Darkness - A Warcraft III mod Jetcraft - A Starcraft II mod Troll Smash - A Warcraft III Arena
  UDMod Mod DB - Change the Game Power of Corruption - A Warcraft III altered melee map Chaos Realm - The world of Game modders and wc3 addicts Follow us on Facebook!!