waaaks!
Zinctified
- Reaction score
- 255
JASS: yes
MUI: yes
JESP: think so?
LEAKFREE: think so? cause it has less lag
SYSTEM: caster system
Import difficulty low
Magic Bolt
Throws a magical bolt to an enemy unit, that deals damage and stunning it, when the bolt arrives, it creates another magic bolts to enemy units nearby, also dealing damage and stunning it
Water Shock
Creates a lightning to the targeted deep water, any units inside the radius shall take damage.
Magic Missile
Creates a magic missile to the target location, any unit that collides with the missile shall receive damage and stunned
Ethereal Dagger
Shoots an ethereal dagger to the target location, any enemy units that collides with the missile shall receive some damage, while friendly units that collide with the missile shall be healed.
images are not so perfect so its best to try it ingame
thx to vexorian for helping me out
MUI: yes
JESP: think so?
LEAKFREE: think so? cause it has less lag
SYSTEM: caster system
Import difficulty low
Magic Bolt
Throws a magical bolt to an enemy unit, that deals damage and stunning it, when the bolt arrives, it creates another magic bolts to enemy units nearby, also dealing damage and stunning it
JASS:
//****************************************************************************************************
//*-----------------------------------Spell made by: waaaks!------------------------------------------
//*
//*-----------------------------------Requires the caster system and cscache module-------------------
//*
//****************************************************************************************************
//*
//* *Requires the Magic Pulse spell
//* *Requires the Magic Pulse (dummy) spell
//*
//* -Copy the spells Magic Pulse and Magic Pulse (dummy) spells into your map
//* -Change the rawcodes below like 'A000' to the raw code of the spell
//* -To know the raw codes go to object editor and press CTRL+D
//*
//****************************************************************************************************
constant function MagicBoltId takes nothing returns integer
return 039;A000039; //Rawcode for Hero's Spell
endfunction
constant function MagicBoltDummyId takes nothing returns integer
return 039;A001039; //Rawcode for Dummy's Spell
endfunction
constant function MagicBoltSpeed takes nothing returns real
return 1000.0 //Change this to your Spell's Missile speed
endfunction
constant function MagicBoltOrderId takes nothing returns string
return "thunderbolt" //Order Id of your spell
endfunction
constant function MagicBoltRad takes nothing returns real
return 600.0 //Radius on the units affected with the bolt
endfunction
function MagicBolt_Actions takes nothing returns nothing
local unit cast = GetTriggerUnit()
local unit targ = GetSpellTargetUnit()
local location loc1 = GetUnitLoc(cast)
local location loc2 = GetUnitLoc(targ)
local integer l
local real wait
set l = GetUnitAbilityLevel( cast, MagicBoltId() )
set wait = DistanceBetweenPoints( loc1, loc2)/MagicBoltSpeed()
call PolledWait(wait)
call CasterSetRecycleDelay(3.0)
call CasterSetCastSourceLoc( loc2 )
call CasterCastAbilityLevelAOELoc( GetOwningPlayer(cast), MagicBoltDummyId(), l, MagicBoltOrderId(), loc2, MagicBoltRad(), false, false )
call RemoveLocation(loc1)
call RemoveLocation(loc2)
set loc1 = null
set loc2 = null
set cast = null
set targ = null
endfunction
//===========================================================================
function InitTrig_MagicBolt takes nothing returns nothing
call OnAbilityEffect(MagicBoltId(), "MagicBolt_Actions")
endfunction
Water Shock
Creates a lightning to the targeted deep water, any units inside the radius shall take damage.
JASS:
//****************************************************************************************************
//*--------------------------------------Spell made by: waaaks!---------------------------------------
//*-----------------------------Requires the caster system and cscache module-------------------------
//*--------------------------------------Requires the Sim Error---------------------------------------
//*
//****************************************************************************************************
//*
//* *Copy all the functions in the header to your map's header
//* *Requires the Water Shock spell
//*
//* -Copy the spell Water Shock spell into your map
//* -Change the rawcodes below like 'A005' to the raw code of the spell
//* -To know the raw codes go to object editor and press CTRL+D
//*
//****************************************************************************************************
constant function ShockId takes nothing returns integer
return 039;A005039; //Rawcode for the Water Shock Spell
endfunction
constant function ShockDamage takes nothing returns real
return 50.0 //Damage dealt x level
endfunction
constant function ShockRad takes nothing returns real
return 500.0 //AOE radius of the spell
endfunction
constant function ShockSfx takes nothing returns string
return "Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl"
//Special effect you want to use for the lightning bolt
endfunction
constant function ShockMsg takes nothing returns string
return "Must target deep water" //The message when the spell is not target on deep water
endfunction
function Shock_Actions takes nothing returns nothing
local unit cast = GetTriggerUnit()
local location loc = GetSpellTargetLoc()
local integer dopt
local integer l
if IsPointWaterLoc(loc) then
set dopt = DamageTypes(ATTACK_TYPE_SIEGE,DAMAGE_TYPE_FORCE)
set dopt = dopt + DamageOnlyTo(UNIT_TYPE_GROUND)
set l = GetUnitAbilityLevel(cast, ShockId())
call DestroyEffect( AddSpecialEffectLoc( ShockSfx(), loc) )
call DamageUnitsInAOEExLoc(cast, l*ShockDamage(), loc, ShockRad(), false, dopt)
else
call SimError(GetOwningPlayer(cast), ShockMsg())
endif
call RemoveLocation(loc)
set loc = null
set cast = null
endfunction
//===========================================================================
function InitTrig_Shock takes nothing returns nothing
call OnAbilityEffect(ShockId(), "Shock_Actions")
endfunction
Magic Missile
Creates a magic missile to the target location, any unit that collides with the missile shall receive damage and stunned
JASS:
//****************************************************************************************************
//*---------------------------------------Spell made by: waaaks!--------------------------------------
//*---------------------------Requires the caster system and cscache module---------------------------
//*
//****************************************************************************************************
//*
//* *Requires the Magic missile spell
//* *Requires the Magic missile (dummy) spell
//*
//* -Copy the spells Magic Missile and Magic Missile (dummy) spells into your map
//* -Change the rawcodes below like 'A003' to the raw code of the spell
//* -To know the raw codes go to object editor and press CTRL+D
//*
//****************************************************************************************************
scope Missile
globals
private constant integer SPELL_ID = 039;A003039; //Rawcode for spell
private constant integer DUMMY_ID = 039;A004039; //Rawcode for dummy spell
private constant string ORDER_ID = "thunderbolt" //order id of the dummy spell
private constant string SFX = "Abilities\\Spells\\Other\\FrostBolt\\FrostBoltMissile.mdl" //missile effect
private constant real COLLISION = 400.0 //collision size of the missile
private constant real SPEED = 1000.0 //missile speed
private constant real RANGE = 1000.0 //missile max range
private constant real Z_OFFSET = 50.0 //missile's flying height
private constant real SCALE = 5.0 //missile's scaling
endglobals
private struct missiledata
unit castingunit
endstruct
private function Impact takes nothing returns nothing
local unit targ = GetTriggerUnit()
local unit m = GetTriggerCollisionMissile()
local missiledata D= missiledata( CollisionMissile_GetTag(GetTriggerCollisionMissile()) )
local location loc
local location loc2
local location loc3
local integer l
local integer dopt
if(targ==null) then
call D.destroy()
return
endif
set loc = GetUnitLoc(D.castingunit)
set loc2 = GetUnitLoc(targ)
set loc3 = GetUnitLoc(m)
call SetUnitScale(m, SCALE, SCALE, SCALE)
call CasterSetCastSourceLoc(loc3)
call CasterSetRecycleDelay(3.00)
set l = GetUnitAbilityLevel( D.castingunit, SPELL_ID )
if IsUnitEnemy(targ, GetOwningPlayer(D.castingunit)) and IsUnitAliveBJ(targ) then
call CasterCastAbilityLevel(GetOwningPlayer(D.castingunit), DUMMY_ID, l, ORDER_ID, targ, false )
endif
call RemoveLocation(loc)
call RemoveLocation(loc2)
set loc = null
set loc2 = null
set targ = null
endfunction
private function Start takes nothing returns nothing
local unit cast = GetTriggerUnit()
local missiledata D = missiledata.create()
local location loc1 = GetUnitLoc(cast)
local location loc2 = GetSpellTargetLoc()
local real face = AngleBetweenPoints(loc1, loc2)
local unit m
set D.castingunit = cast
set m=CollisionMissile_CreateLoc( SFX, loc1, face, SPEED, 0, RANGE, Z_OFFSET, false, COLLISION, function Impact )
call CollisionMissile_SetTag(m , integer(D) )
call RemoveLocation(loc1)
call RemoveLocation(loc2)
set loc1 = null
set loc2 = null
set cast = null
set m=null
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
call OnAbilityEffect( SPELL_ID, SCOPE_PRIVATE+"Start" )
endfunction
endscope
Ethereal Dagger
Shoots an ethereal dagger to the target location, any enemy units that collides with the missile shall receive some damage, while friendly units that collide with the missile shall be healed.
JASS:
//****************************************************************************************************
//*---------------------------------------Spell made by: waaaks!--------------------------------------
//*-------------------------Requires the caster system and cscache module-----------------------------
//*
//****************************************************************************************************
//*
//* *Requires the Ethereal Dagger Spell
//*
//* -Copy the spell Ethereal Dagger spell into your map
//* -Change the rawcodes below like 'A006' to the raw code of the spell
//* -To know the raw codes go to object editor and press CTRL+D
//*
//****************************************************************************************************
scope EtherealDagger
globals
private constant integer EDSPELL_ID = 039;A006039; //Rawcode for ethereal dagger
private constant real EDRANGE = 1000.0 //max range of spell
private constant real EDCOLLISION = 300.0 //collision size of the spell
private constant real EDSPEED = 1000.0 //missile's speed
private constant real EDZ_OFFSET = 50.0 //flying height of missile
private constant real EDSCALE = 6.0 //scaling of missile
private constant real EDDMG = 50.0 //heal or damage per level
private constant string EDSFX = "Abilities\\Weapons\\BloodElfMissile\\BloodElfMissile.mdl" //missile model
private constant string EDSFX1 = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl" //enemy sfx when hit
private constant string EDSFX2 = "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" //ally sfx when hit
endglobals
private struct data
unit caster
endstruct
private function EDImpact takes nothing returns nothing
local unit targ = GetTriggerUnit()
local unit m = GetTriggerCollisionMissile()
local data E= data(CollisionMissile_GetTag(GetTriggerCollisionMissile()))
local location loc
local location loc2
local integer l
if (targ==null) then
call E.destroy()
return
endif
set loc = GetUnitLoc(E.caster)
set loc2 = GetUnitLoc(targ)
call SetUnitScale(m, EDSCALE, EDSCALE, EDSCALE)
set l = GetUnitAbilityLevel(E.caster, EDSPELL_ID)
if IsUnitEnemy(targ, GetOwningPlayer(E.caster)) == true and IsUnitAliveBJ(targ) == true then
call UnitDamageTargetBJ(E.caster, targ, l*EDDMG, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
call DestroyEffect(AddSpecialEffectLoc(EDSFX1, loc2))
else
if IsUnitEnemy(targ, GetOwningPlayer(E.caster)) == false and IsUnitAliveBJ(targ) == true then
call SetUnitLifeBJ( targ, ( GetUnitStateSwap(UNIT_STATE_LIFE, targ) + ( l * EDDMG ) ) )
call DestroyEffect(AddSpecialEffectLoc(EDSFX2, loc2))
endif
endif
call RemoveLocation(loc)
call RemoveLocation(loc2)
set loc = null
set loc2 = null
set targ = null
endfunction
private function EDStart takes nothing returns nothing
local unit cast = GetTriggerUnit()
local data E= data.create()
local location loc1 = GetUnitLoc(cast)
local location loc2 = GetSpellTargetLoc()
local real face = AngleBetweenPoints(loc1, loc2)
local unit m
set E.caster = cast
set m = CollisionMissile_CreateLoc(EDSFX, loc1, face, EDSPEED, 0.0, EDRANGE, EDZ_OFFSET, false, EDCOLLISION, function EDImpact)
call CollisionMissile_SetTag(m, integer(E))
call RemoveLocation(loc1)
call RemoveLocation(loc2)
set loc1 = null
set loc2 = null
set cast = null
set m = null
endfunction
//===========================================================================
public function InitTrig takes nothing returns nothing
call OnAbilityEffect(EDSPELL_ID, SCOPE_PRIVATE+"EDStart")
endfunction
endscope
images are not so perfect so its best to try it ingame
thx to vexorian for helping me out