• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

C:\fakepath\Unk

Level 14
Joined
Oct 19, 2014
Messages
187

Unknown v1.0


DescriptionSends an unknown ball to target location,
the ball will stop to target loc for a while
then draining hp of enemy near,
the ball will back to position of caster
and the drain hp will goes to caster.

Requirements
-None

Credits
-None

Screenshot

241353-albums7956-picture94635.png



Triggers



  • Unknown Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ----------------- --------
      • Custom script: set udg_UKHash = InitHashtable()
      • -------- ----------------- --------
      • Set UKAbility = Unknown
      • Set UKDummyId = Unknown Dummy
      • Set UKDummyDrainId = UnknownDrain Dummy
      • -------- ----------------- --------
      • Set UKMinimumRange = 200.00
      • -------- ----------------- --------
      • Set UKSpeed = 35.00
      • -------- ----------------- --------
      • Set UKInterval = 1.00
      • -------- ----------------- --------
      • Set UKDuration[1] = 6.00
      • Set UKDuration[2] = 8.00
      • Set UKDuration[3] = 10.00
      • -------- ----------------- --------
      • Set UKLifeDrain[1] = 10.00
      • Set UKLifeDrain[2] = 15.00
      • Set UKLifeDrain[3] = 20.00
      • -------- ----------------- --------
      • Set UKLifeDrainRange = 600.00
      • -------- ----------------- --------
      • Set UKLifeDrainSpeed = 18.00
      • -------- ----------------- --------
      • Set UKFx = Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • -------- ----------------- --------
      • Set UKFxCaster = Abilities\Spells\Human\Polymorph\PolyMorphDoneGround.mdl
      • -------- ----------------- --------
      • Set UKFxAttach = overhead
      • -------- ----------------- --------
      • Custom script: set udg_UKAccuracy = 0.03125
      • Trigger - Add to Unknown Periodic <gen> the event (Time - Every UKAccuracy seconds of game time)



  • Unknown Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to UKAbility
    • Actions
      • Set UKCaster = (Triggering unit)
      • Set UKTempLoc1 = (Position of UKCaster)
      • Set UKTempLoc2 = (Target point of ability being cast)
      • Set UKAngle = (Angle from UKTempLoc1 to UKTempLoc2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between UKTempLoc1 and UKTempLoc2) Less than UKMinimumRange
        • Then - Actions
          • Custom script: call RemoveLocation( udg_UKTempLoc2 )
          • Set UKTempLoc2 = (UKTempLoc1 offset by UKMinimumRange towards UKAngle degrees)
        • Else - Actions
      • Unit - Create 1 UKDummyId for (Owner of UKCaster) at UKTempLoc1 facing UKAngle degrees
      • Set UKUnit = (Last created unit)
      • Custom script: set udg_UKHandleId = GetHandleId( udg_UKUnit )
      • Hashtable - Save Handle OfUKCaster as 0 of UKHandleId in UKHash
      • Hashtable - Save UKAngle as 1 of UKHandleId in UKHash
      • Hashtable - Save (Distance between UKTempLoc1 and UKTempLoc2) as 2 of UKHandleId in UKHash
      • Hashtable - Save UKSpeed as 3 of UKHandleId in UKHash
      • Hashtable - Save 1 as 4 of UKHandleId in UKHash
      • Hashtable - Save 0.00 as 5 of UKHandleId in UKHash
      • Hashtable - Save UKDuration[(Level of (Ability being cast) for UKCaster)] as 6 of UKHandleId in UKHash
      • Hashtable - Save UKLifeDrain[(Level of (Ability being cast) for UKCaster)] as 7 of UKHandleId in UKHash
      • Hashtable - Save 0.00 as 8 of UKHandleId in UKHash
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (UKGroup is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on Unknown Periodic <gen>
        • Else - Actions
      • Unit Group - Add UKUnit to UKGroup
      • Custom script: call RemoveLocation( udg_UKTempLoc1 )
      • Custom script: call RemoveLocation( udg_UKTempLoc2 )



  • Unknown Periodic
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UKGroup and do (Actions)
        • Loop - Actions
          • Set UKUnit = (Picked unit)
          • Set UKTempLoc1 = (Position of UKUnit)
          • Custom script: set udg_UKHandleId = GetHandleId( udg_UKUnit )
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load 4 of UKHandleId from UKHash) Equal to 1
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 2 of UKHandleId from UKHash) Less than or equal to 0.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of UKUnit) Equal to UKDummyId
                    • Then - Actions
                      • Hashtable - Save 2 as 4 of UKHandleId in UKHash
                    • Else - Actions
                      • Custom script: set udg_UKHandleId1 = GetHandleId( LoadUnitHandle( udg_UKHash, udg_UKHandleId, 0 ) )
                      • Hashtable - Save ((Load 8 of UKHandleId1 from UKHash) + (Load 7 of UKHandleId1 from UKHash)) as 8 of UKHandleId1 in UKHash
                      • Unit - Kill UKUnit
                      • Unit Group - Remove UKUnit from UKGroup
                      • Hashtable - Clear all child hashtables of child UKHandleId in UKHash
                • Else - Actions
                  • Hashtable - Save ((Load 2 of UKHandleId from UKHash) - (Load 3 of UKHandleId from UKHash)) as 2 of UKHandleId in UKHash
                  • Set UKTempLoc2 = (UKTempLoc1 offset by (Load 3 of UKHandleId from UKHash) towards (Load 1 of UKHandleId from UKHash) degrees)
                  • Custom script: set udg_UKTempX = GetLocationX( udg_UKTempLoc2 )
                  • Custom script: set udg_UKTempY = GetLocationY( udg_UKTempLoc2 )
                  • Custom script: call SetUnitX( udg_UKUnit, udg_UKTempX )
                  • Custom script: call SetUnitY( udg_UKUnit, udg_UKTempY )
                  • Custom script: call RemoveLocation( udg_UKTempLoc2 )
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load 4 of UKHandleId from UKHash) Equal to 2
                • Then - Actions
                  • Hashtable - Save ((Load 5 of UKHandleId from UKHash) + UKAccuracy) as 5 of UKHandleId in UKHash
                  • Hashtable - Save ((Load 6 of UKHandleId from UKHash) - UKAccuracy) as 6 of UKHandleId in UKHash
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load 5 of UKHandleId from UKHash) Greater than or equal to UKInterval
                    • Then - Actions
                      • Hashtable - Save 0.00 as 5 of UKHandleId in UKHash
                      • Set UKTempGroup = (Units within UKLifeDrainRange of UKTempLoc1)
                      • Unit Group - Pick every unit in UKTempGroup and do (Actions)
                        • Loop - Actions
                          • Set UKTempUnit = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (UKTempUnit is alive) Equal to True
                              • (UKTempUnit is A structure) Equal to False
                              • (UKTempUnit is Mechanical) Equal to False
                              • (UKTempUnit is Magic Immune) Equal to False
                              • (UKTempUnit belongs to an ally of (Owner of (Load 0 of UKHandleId in UKHash))) Equal to False
                            • Then - Actions
                              • Set UKTempLoc4 = (Position of UKTempUnit)
                              • Unit - Cause (Load 0 of UKHandleId in UKHash) to damage UKTempUnit, dealing (Load 7 of UKHandleId from UKHash) damage of attack type Spells and damage type Normal
                              • Special Effect - Create a special effect attached to the UKFxAttach of UKTempUnit using UKFx
                              • Special Effect - Destroy (Last created special effect)
                              • Unit - Create 1 UKDummyDrainId for (Owner of (Load 0 of UKHandleId in UKHash)) at UKTempLoc4 facing (Angle from UKTempLoc1 to UKTempLoc4) degrees
                              • Custom script: set udg_UKHandleId1 = GetHandleId( GetLastCreatedUnit() )
                              • Hashtable - Save Handle OfUKUnit as 0 of UKHandleId1 in UKHash
                              • Hashtable - Save (Angle from UKTempLoc4 to UKTempLoc1) as 1 of UKHandleId1 in UKHash
                              • Hashtable - Save (Distance between UKTempLoc4 and UKTempLoc1) as 2 of UKHandleId1 in UKHash
                              • Hashtable - Save UKLifeDrainSpeed as 3 of UKHandleId1 in UKHash
                              • Hashtable - Save 1 as 4 of UKHandleId1 in UKHash
                              • Unit Group - Add (Last created unit) to UKGroup
                              • Custom script: call RemoveLocation( udg_UKTempLoc4 )
                            • Else - Actions
                      • Custom script: call DestroyGroup( udg_UKTempGroup )
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load 6 of UKHandleId from UKHash) Less than or equal to 0.00
                    • Then - Actions
                      • Hashtable - Save 3 as 4 of UKHandleId in UKHash
                    • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load 4 of UKHandleId from UKHash) Equal to 3
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of UKUnit) Not equal to UKDummyId
                        • Then - Actions
                          • Unit - Kill UKUnit
                          • Unit Group - Remove UKUnit from UKGroup
                          • Hashtable - Clear all child hashtables of child UKHandleId in UKHash
                        • Else - Actions
                      • Set UKTempLoc2 = (Position of (Load 0 of UKHandleId in UKHash))
                      • Hashtable - Save (Angle from UKTempLoc1 to UKTempLoc2) as 1 of UKHandleId in UKHash
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between UKTempLoc1 and UKTempLoc2) Less than or equal to 50.00
                        • Then - Actions
                          • Unit - Kill UKUnit
                          • Unit - Set life of (Load 0 of UKHandleId in UKHash) to ((Life of (Load 0 of UKHandleId in UKHash)) + (Load 8 of UKHandleId from UKHash))
                          • Special Effect - Create a special effect attached to the UKFxAttach of (Load 0 of UKHandleId in UKHash) using UKFxCaster
                          • Special Effect - Destroy (Last created special effect)
                          • Unit Group - Remove UKUnit from UKGroup
                          • Hashtable - Clear all child hashtables of child UKHandleId in UKHash
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (UKGroup is empty) Equal to True
                            • Then - Actions
                              • Trigger - Turn off (This trigger)
                            • Else - Actions
                        • Else - Actions
                          • Set UKTempLoc3 = (UKTempLoc1 offset by UKSpeed towards (Load 1 of UKHandleId from UKHash) degrees)
                          • Custom script: set udg_UKTempX = GetLocationX( udg_UKTempLoc3 )
                          • Custom script: set udg_UKTempY = GetLocationY( udg_UKTempLoc3 )
                          • Custom script: call SetUnitX( udg_UKUnit, udg_UKTempX )
                          • Custom script: call SetUnitY( udg_UKUnit, udg_UKTempY )
                          • Custom script: call RemoveLocation( udg_UKTempLoc3 )
                      • Custom script: call RemoveLocation( udg_UKTempLoc2 )
                    • Else - Actions
          • Custom script: call RemoveLocation( udg_UKTempLoc1 )





v1
-Initial Upload

Attachments

  • Unknown v1.0.w3x
    24.3 KB · Views: 12
Last edited:
Top