wraithseeker
Tired.
- Reaction score
- 122
Wraith's Spellpack
This spellpack includes
Blizzard
Mass Entangling Roots ( can be changed to Aoe Banish Aoe Polymorph or whatever Aoe you want)
Knockback
Dead Will
Frost Armour
Screenshots are not amazing, you have to download the map and test it to see it
Blizzard
Import Difficulty : Medium
GUI / Jass : vJass
MUI / MPI : MUI
Leak / Leakess : Leakless
Quote
The mage makes the earth tremble at the target point and then raining down blizzard at his enemies
Screenshots
Code
JASS:
// +------------------------------------------------------------+
// | |
// | -=-=- Blizzard -=-=- |
// | Requires Jass NewGen |
// | |
// +------------------------------------------------------------+
// | Makes the earth shake at the targeted point , and then |
// | calling a blizzard to damage the caster's foes |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- How To Implement -=-=- |
// | 1. Create a trigger named Blizzard |
// | 2. Copy the text from this map's trigger |
// | 3. Copy/paste it into your map's Blizzard trigger |
// | 4. Copy all the abilities to your map |
// | 5. Copy all the units to your map |
// | 6. Enjoy! |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- Credits -=-=- |
// | Credits are not needed, but appreciated |
// | Just don't claim this as yours |
// | |
// +------------------------------------------------------------+
scope Blizzard initializer BZInit
// +-------------------------------------+
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// +-------------------------------------+
globals
private constant integer BZID = 039;A001039; // Rawcode of dummy spell
private constant integer BZDUMMY = 039;h003039; // Rawcode of dummy unit
private constant integer BLIZZARD = 039;BLIZ039; // Blizzard ability rawcode
private constant integer CLAPS = 039;CLAP039; // Thunder Clap ability rawcode
private constant string THUNDERCLAP = "thunderclap" // Order string of Thunderclap
private constant string BLIZZARDS = "blizzard" // Order string of Blizzard
endglobals
// +------------------------------------------------+
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// +------------------------------------------------+
private function BZConditions takes nothing returns boolean
return GetSpellAbilityId() == BZID
endfunction
private function BZActions takes nothing returns nothing
local unit t = GetTriggerUnit()
local location target = GetSpellTargetLoc()
local unit b = CreateUnitAtLoc(GetOwningPlayer(t), BZDUMMY, target, bj_UNIT_FACING)
local unit c = CreateUnitAtLoc(GetOwningPlayer(t), BZDUMMY, target, bj_UNIT_FACING)
call UnitAddAbility(b, BLIZZARD)
call UnitAddAbility(c, CLAPS)
call SetUnitAbilityLevel(b, BLIZZARD, GetUnitAbilityLevel(t, BZID))
call SetUnitAbilityLevel(c, CLAPS, GetUnitAbilityLevel(t, BZID))
call IssueImmediateOrder(c, THUNDERCLAP)
call IssuePointOrderLoc(b, BLIZZARDS, target)
call UnitApplyTimedLife(b, 039;BTLF039;, 5)
call UnitApplyTimedLife(c, 039;BTLF039;, 1)
set c = null
set b = null
set t = null
call RemoveLocation(target)
set target = null
endfunction
//===========================================================================
private function BZInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function BZConditions))
call TriggerAddAction(t, function BZActions)
endfunction
endscope
Mass Entangling Roots
Import Difficulty : Medium
GUI / Jass : vJass
MUI / MPI : MUI
Leak / Leakess : Leakless
Quote
The mage targets an area and then using his druidic powers, he calls upon the spirit of the forest to entangle the targeted units
Screenshots
JASS:
// +------------------------------------------------------------+
// | |
// | -=-=- Mass Entangling Roots -=-=- |
// | Requires Jass NewGen |
// | |
// +------------------------------------------------------------+
// | Entangles all targeted units in the point of ability |
// | being cast. |
// | Suitable for a Aoe Template (Mass Banish, Mass StunBolt|
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- How To Implement -=-=- |
// | 1. Create a trigger named Mass Entangling Roots |
// | 2. Copy the text from this map's trigger |
// | 3. Copy/paste it into your map's |
// | Mass Entangling Roots trigger. |
// | 4. Copy all the abilities to your map. |
// | 5. Copy all the units to your map. |
// | 6. Enjoy! |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- Credits -=-=- |
// | Credits are not needed, but appreciated |
// | Just don't claim this as yours |
// | |
// +------------------------------------------------------------+
scope MassEntangleRoots initializer MERInit
// +-------------------------------------+
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// +-------------------------------------+
globals
private constant integer MERID = 039;MER1039; // Rawcode of dummy spell
private constant integer MERDUMMY = 039;h003039; // Rawcode of dummy unit
private constant integer SPELL = 039;ENTA039; // Rawcode of entangling roots
private constant string MERORDER = "entanglingroots" // Order string of ability
private boolexpr MERCONDITION
endglobals
private function MERRange takes integer level returns integer
return level * 150 // Range per level
endfunction
// +------------------------------------------------+
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// +------------------------------------------------+
private function MERConditions takes nothing returns boolean
return GetSpellAbilityId() == MERID
endfunction
private function MERFilters takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitType(GetFilterUnit(), UNIT_TYPE_MECHANICAL) == false
endfunction
private function MERActions takes nothing returns nothing
local location target = GetSpellTargetLoc()
local unit t = GetTriggerUnit()
local group g = CreateGroup()
local unit u
local unit d
call GroupEnumUnitsInRange(g, GetLocationX(target), GetLocationY(target), MERRange(GetUnitAbilityLevel(t, MERID)), MERCONDITION)
loop
set u = FirstOfGroup(g)
exitwhen u == null
set d = CreateUnit(GetOwningPlayer(t), MERDUMMY, GetUnitX(u), GetUnitY(u), bj_UNIT_FACING)
call UnitAddAbility(d, SPELL)
call SetUnitAbilityLevel(d, SPELL, GetUnitAbilityLevel(t, MERID))
call IssueTargetOrder(d, MERORDER, u)
call UnitApplyTimedLife(d, 039;BTLF039;, 3)
call GroupRemoveUnit(g, u)
endloop
call DestroyGroup(g)
call RemoveLocation(target)
set target = null
set g = null
set d = null
set u = null
endfunction
//===========================================================================
private function MERInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function MERConditions))
call TriggerAddAction(t, function MERActions)
set MERCONDITION = Filter(function MERFilters)
endfunction
endscope
Knockback
Import Difficulty : High (Requires TT and DestructableLib)
GUI / Jass : vJass
MUI / MPI : MUI
Leak / Leakess : Leakless
Quote
The user hits the target with his axe, knocking him back and killing trees on the way and damages unit close to the spell target unit.
Screenshots
JASS:
// +------------------------------------------------------------+
// | |
// | -=-=- Knockback -=-=- |
// | Requires Jass NewGen |
// | |
// +------------------------------------------------------------+
// |Stuns the targeted unit and then knocks it by some distance |
// | killing trees, dealing damage to units who are beside the |
// | targeted unit |
// +------------------------------------------------------------+
// | |
// | -=-=- How To Implement -=-=- |
// | 1. Create a trigger named Knockback |
// | 2. Copy the text from this map's trigger |
// | 3. Copy/paste it into your map's Knockback trigger |
// | 4. Copy all the abilities to your map. |
// | 5. Copy all the units to your map. |
// | 6. Enjoy! |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- Credits -=-=- |
// | Credits are not needed, but appreciated |
// | Just don't claim this as yours |
// | |
// +------------------------------------------------------------+
scope Knockback initializer KBInit
// +-------------------------------------+
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// +-------------------------------------+
globals
private constant integer KBID = 039;BOLT039; // Rawcode of dummy spell
private constant real SLIDE_SPEED = 700 // Slide speed
private constant string KBEFFECT = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" // SFX of the targeted spell unit
private constant boolean KillTrees = true // Kill trees or not?
private constant string BLOOD = "Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl" // SFX when unit comes within the targeted spell unit who got hit
private constant real TreeRADIUS = 200 // Range needed for a tree to be beside targeted unit before tree dies
private constant real UnitRADIUS = 200 // Range needed for a unit to be beside targeted unit before they take damage
private boolexpr KBDAMGER
endglobals
private function KBDISTANCES takes integer level returns integer
return level * 300 // How far the unit will get knocked backed
endfunction
private function KBDAMAGE takes integer level returns integer
return level * 5 // Damage the targeted unit takes
endfunction
// +------------------------------------------------+
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// +------------------------------------------------+
private function KBConditions takes nothing returns boolean
return GetSpellAbilityId() == KBID // the ID of dummy spell
endfunction
private function KillTree takes nothing returns nothing
if IsDestructableTree(GetEnumDestructable()) then
call KillDestructable(GetEnumDestructable())
endif
endfunction
struct Knock
unit target
unit caster
real x1
real y1
real cos
real sin
real DISTANCE
real angle
endstruct
private function KBFilters takes nothing returns boolean
return true
endfunction
private function KBKnockback takes nothing returns boolean
local Knock data = TT_GetData()
local unit t
local real x = GetUnitX(data.target)
local real y = GetUnitY(data.target)
local location CasterLoc = GetUnitLoc(data.target)
//local group g = GetUnitsInRangeOfLocMatching(UnitRADIUS, CasterLoc, DAMGER)
// Start of what I added
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, CasterLoc, UnitRADIUS, KBDAMGER)
call DestroyBoolExpr(KBDAMGER)
// End of what I added
set x = x + data.cos * TT_PERIOD * SLIDE_SPEED
set y = y + data.sin * TT_PERIOD * SLIDE_SPEED
loop
set t = FirstOfGroup(g)
exitwhen t == null
call GroupRemoveUnit(g, t)
if IsUnitEnemy(data.caster, GetOwningPlayer(t)) then
call UnitDamageTarget(data.caster, t, KBDAMAGE(GetUnitAbilityLevel(data.caster, KBID)), false, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
if GetRandomInt(1,10) == 1 then
call DestroyEffect(AddSpecialEffect(BLOOD,GetUnitX(t),GetUnitY(t)))
endif
endif
endloop
if KillTrees == true then
call EnumDestructablesInCircleBJ(TreeRADIUS, CasterLoc, function KillTree)
endif
call SetUnitPosition (data.target, x, y)
set data.DISTANCE = data.DISTANCE - TT_PERIOD * SLIDE_SPEED
call RemoveLocation(CasterLoc)
call DestroyGroup(g)
set g = null
set CasterLoc = null
set t = null
if data.DISTANCE <= 0 then
call data.destroy ()
return true
endif
return false
endfunction
private function KBActions takes nothing returns nothing
local Knock data = Knock.create()
local real x1
local real y1
local real x2
local real y2
local real angle
local integer stomp = 7
set data.caster = GetTriggerUnit()
set data.target = GetSpellTargetUnit()
set x1 = GetUnitX (data.caster)
set y1 = GetUnitY (data.caster)
set x2 = GetUnitX (data.target)
set y2 = GetUnitY (data.target)
set angle = Atan2 (y2 - y1, x2 - x1)
set data.DISTANCE = KBDISTANCES(GetUnitAbilityLevel(GetTriggerUnit(), KBID))
set data.cos = Cos (angle)
set data.sin = Sin (angle)
call TT_Start (function KBKnockback, data)
loop
exitwhen stomp == 0
call TriggerSleepAction(GetRandomReal(0.090,0.1))
call DestroyEffect(AddSpecialEffect(KBEFFECT,GetUnitX(data.target),GetUnitY(data.target)))
set stomp = stomp - 1
endloop
endfunction
//===========================================================================
private function KBInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function KBConditions))
call TriggerAddAction(t, function KBActions)
set KBDAMGER = Filter(function KBFilters)
endfunction
endscope
Dead Will
Import Difficulty : Medium
GUI / Jass : vJass
MUI / MPI : MUI
Leak / Leakess : Leakless
Quote
The necromancer, being unholy and powerful, summons the fallen soul of a fallen unit near the necromancer
Screenshots
Code
JASS:
// +------------------------------------------------------------+
// | |
// | -=-=- Dead Will -=-=- |
// | Requires Jass NewGen |
// | |
// +------------------------------------------------------------+
// | Every 5 seconds , the necromancer has a chance to |
// | revive dead units beside the caster. |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- How To Implement -=-=- |
// | 1. Create a trigger named Dead Will |
// | 2. Copy the text from this map's trigger |
// | 3. Copy/paste it into your map's Dead Will trigger |
// | 4. Copy all the abilities to your map. |
// | 5. Copy all the units to your map. |
// | 6. Enjoy! |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- Credits -=-=- |
// | Credits are not needed, but appreciated |
// | Just don't claim this as yours |
// | |
// +------------------------------------------------------------+
scope DeadWill initializer DWInit
// +-------------------------------------+
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// +-------------------------------------+
globals
private constant integer REVIVE = 039;A00K039; // Rawcode of dummy passive ability
private constant integer DWDUMMY = 039;h003039; // Rawcode of Dummy Unit
private constant integer DEAD = 039;DEA1039; // Rawcode of Animate Dead
private constant string SUMMON = "animatedead" // Order String of Animate Dead
private boolexpr DWCONDITION
endglobals
private function DWCHANCE takes integer level returns integer
return level * 10 // Chance of Dead Will activating
endfunction
// +------------------------------------------------+
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// +------------------------------------------------+
private function DWHero takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(), REVIVE) > 0 and GetRandomInt(1, 100) <= DWCHANCE (GetUnitAbilityLevel(GetFilterUnit(), REVIVE)) //and GetUnitTypeId(GetFilterUnit()) == 'Ulic'
endfunction
private function DWRevive takes nothing returns nothing
local unit e = GetEnumUnit()
local unit d = CreateUnit(GetOwningPlayer(e), DWDUMMY, GetUnitX(e), GetUnitY(e), bj_UNIT_FACING)
call UnitAddAbility(d, DEAD)
call UnitApplyTimedLife(d, 039;BTLF039;, 3)
call IssueImmediateOrder(d, SUMMON)
set e = null
set d = null
endfunction
private function DWActions takes nothing returns nothing
local group g = CreateGroup()
call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, DWCONDITION)
call ForGroup(g, function DWRevive)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
private function DWInit takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 5.00, true)
call TriggerAddAction(t, function DWActions)
set DWCONDITION = Filter(function DWHero)
endfunction
endscope
Frost Armour
Screenshots
The lich has a armour that will freeze enemy units that attack it
Code
JASS:
// +------------------------------------------------------------+
// | |
// | -=-=- Lich Armor -=-=- |
// | Requires Jass NewGen |
// | |
// +------------------------------------------------------------+
// | Units that attack the lich has a chance to get |
// | a frostbite dealing damage and slowing the enemy |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- How To Implement -=-=- |
// | 1. Create a trigger named Lich Armor |
// | 2. Copy the text from this map's trigger |
// | 3. Copy/paste it into your map's Lich Armor trigger |
// | 4. Copy all the abilities to your map. |
// | 5. Copy all the units to your map. |
// | 6. Enjoy! |
// | |
// +------------------------------------------------------------+
// | |
// | -=-=- Credits -=-=- |
// | Credits are not needed, but appreciated |
// | Just don't claim this as yours |
// | |
// +------------------------------------------------------------+
scope LichArmor initializer LAInit
// +-------------------------------------+
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// | -=-=- MODIFY HERE -=-=- |
// +-------------------------------------+
globals
private constant integer FROST = 039;A00M039; // Rawcode of dummy passive spell
private constant integer NOVA = 039;B003039; // Rawcode of Frost Nova
private constant integer LADUMMY = 039;h003039; // Rawcode of Dummy Unit
private constant string LADAMAGE = "frostnova" // Order String of Frost Nova
endglobals
private function LACHANCE takes integer level returns integer
return level * 10 // Chance that Lich Armour will activate
endfunction
// +------------------------------------------------+
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// | -=-=- DO NOT TOUCH PAST HERE -=-=- |
// +------------------------------------------------+
private function LATrue takes nothing returns boolean
return true
endfunction
private function LAConditions takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetAttacker())) and GetRandomInt(0, 100) <= LACHANCE(GetUnitAbilityLevel(GetTriggerUnit(), FROST)) and GetUnitAbilityLevel(GetTriggerUnit(), FROST) > 0
endfunction
private function LAActions takes nothing returns nothing
local unit t = GetTriggerUnit()
local unit d = CreateUnit(GetOwningPlayer(t), LADUMMY, GetUnitX(t), GetUnitY(t), bj_UNIT_FACING)
call UnitAddAbility(d, NOVA)
call IssueTargetOrder(d, LADAMAGE, GetAttacker())
call UnitApplyTimedLife(d, 039;BTLF039;, 1)
set d = null
set t = null
endfunction
//===========================================================================
private function LAInit takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > 15
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_ATTACKED, Filter(function LATrue))
set i = i + 1
endloop
call TriggerAddCondition(t, Condition(function LAConditions))
call TriggerAddAction(t, function LAActions)
endfunction
endscope
The code is now neater done by Wolfie and code layout.