Demi666
New Member
- Reaction score
- 127
Ok so thanks to all on thehelper.net who helped me with some small problems in my jassing,
also credit is given to 4 persons who helped me the Most
so lets see.. what more.. well
MUI: Yes sir
GUI/Jass?: its jass
Leakless: Yes sire i think so <3
**Screenshots Are Comming**
NOTE: Level 1 on electricity is just like a regular storm bolt,
due to the AoE of the effect gets so small, its not a large chance the eyecandy will show
More info are on tooltips where i added
Description
Additonal Info
Comments
KK Well download map and have fun!
Map Includes
Electricity
Rooting Rots
Random Missiles
Go easy with commenting they are my first jass spells
Codes...
Note: i wanted to make these spells so editeble as possible
Rotten Rots
Random Missile
Electricity
also credit is given to 4 persons who helped me the Most
so lets see.. what more.. well
MUI: Yes sir
GUI/Jass?: its jass
Leakless: Yes sire i think so <3
**Screenshots Are Comming**
NOTE: Level 1 on electricity is just like a regular storm bolt,
due to the AoE of the effect gets so small, its not a large chance the eyecandy will show
More info are on tooltips where i added
Description
Additonal Info
Comments
KK Well download map and have fun!
Map Includes
Electricity
Rooting Rots
Random Missiles
Go easy with commenting they are my first jass spells
Codes...
Note: i wanted to make these spells so editeble as possible
Rotten Rots
JASS:
function Trig_Rotten_Rots_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A000039;
endfunction
constant function damagee takes nothing returns real
return 99999.00
//Edit " 20.00 " for the amount of damage the target will recieve per second!<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
endfunction
function length takes unit cast returns real
return ( 1200 / GetUnitLifePercent(cast))
// Edit the " 1200 " for amount of time the unit will be entangled
endfunction
function refill takes unit cast returns integer
return ( 90 * GetUnitAbilityLevelSwapped(039;A000039;, cast) )
// Edit here for how much the caster will regain after every use of the spell
endfunction
function Rot_Timer_End takes nothing returns nothing
local timer t=GetExpiredTimer()
call UnitDamageTarget(GetSpellAbilityUnit(),GetSpellTargetUnit(),damagee(),true, true , ATTACK_TYPE_MAGIC, DAMAGE_TYPE_PLANT,WEAPON_TYPE_WOOD_HEAVY_BASH)
endfunction
function Trig_Rotten_Rots_Actions takes nothing returns nothing
local effect e1
local effect e2
local string sfxx = "Abilities\\Spells\\NightElf\\Rejuvenation\\RejuvenationTarget.mdl"
local string sfx = "Abilities\\Spells\\NightElf\\EntanglingRoots\\EntanglingRootsTarget.mdl"
local unit target = GetSpellTargetUnit()
local unit cast = GetSpellAbilityUnit()
local real x=GetUnitX(target)
local real y=GetUnitY(target)
local timer t = CreateTimer()
local real r = GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellAbilityUnit())
call TimerStart(t,1 ,true,function Rot_Timer_End)
call SetUnitState(cast, UNIT_STATE_LIFE, GetUnitState(cast, UNIT_STATE_LIFE) + refill(cast))
set e1 = AddSpecialEffectTarget ( sfxx,cast,"chest" )
set e2 = AddSpecialEffect( sfx,x,y )
call PauseUnit(target,true)
call TriggerSleepAction(length(cast))
call PauseUnit(target,false)
call PauseTimer(t)
call DestroyTimer(t)
call SetUnitState(cast, UNIT_STATE_LIFE, GetUnitState(cast, UNIT_STATE_LIFE) + refill(cast))
call DestroyEffect(e1)
call DestroyEffect(e2)
set sfx = null
set sfxx = null
set t = null
set cast = null
set target = null
set e1 = null
set e2 = null
endfunction
//===========================================================================
function InitTrig_Rotten_Rots takes nothing returns nothing
set gg_trg_Rotten_Rots = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rotten_Rots, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Rotten_Rots, Condition( function Trig_Rotten_Rots_Conditions ) )
call TriggerAddAction( gg_trg_Rotten_Rots, function Trig_Rotten_Rots_Actions )
endfunction
Random Missile
JASS:
function Trig_Random_Kaboom_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A001039;
endfunction
constant function Ability_RC takes nothing returns integer
return 039;A001039;
//Edit here for your new rawcode
endfunction
constant function Ability_Dummy_RC takes nothing returns integer
return 039;A002039;
// Edit here for the rawcode of your dummy spell
endfunction
function Dummy_Unit takes nothing returns integer
return 039;h000039;
// Edit here for the rawcode of your dummy unit
endfunction
constant function Time takes nothing returns integer
return 20
// every wave of missile has 3 missiles in it
// also there is 0,5 seconds delay between every shot ( or as you select in -
// - delay trigger )
// so you can calculate yourself how long / many missiles
// it will be
endfunction
constant function delay takes nothing returns real
return 0.5
// EDIT HERE FOR THE DELAY BETWEEN MISSILE WAVES
endfunction
function Trig_Random_Kaboom_Actions takes nothing returns nothing
local integer i = 0
local unit d
local unit cast = GetSpellAbilityUnit()
local location castl
local location loc = PolarProjectionBJ( castl, GetRandomReal(0.00, 612.00) , GetRandomReal(0.00, 360.00))
loop
exitwhen(i==Time())
set i= i + 1
set castl = GetUnitLoc(cast)
set d = CreateUnitAtLoc(GetOwningPlayer(cast), Dummy_Unit(), castl,360)
call SetUnitPathing(d,false)
call UnitAddAbility(d, Ability_Dummy_RC())
call SetUnitAbilityLevel(d, Ability_Dummy_RC(),GetUnitAbilityLevel(cast, Ability_RC()))
call UnitApplyTimedLife(d,039;BTLF039;,2)
call IssuePointOrderLoc(d,"clusterrockets",loc)
call RemoveLocation(loc)
set loc = PolarProjectionBJ( castl, GetRandomReal(0.00, 612.00) , GetRandomReal(0.00, 360.00))
call TriggerSleepAction(delay())
call RemoveLocation(castl)
set d = null
endloop
call RemoveLocation(loc)
set loc = null
set d = null
set castl = null
set cast = null
endfunction
//===========================================================================
function InitTrig_Random_Kaboom takes nothing returns nothing
set gg_trg_Random_Kaboom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Random_Kaboom, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Random_Kaboom, Condition( function Trig_Random_Kaboom_Conditions ) )
call TriggerAddAction( gg_trg_Random_Kaboom, function Trig_Random_Kaboom_Actions )
endfunction
Electricity
JASS:
scope Electric
globals
private unit MyUnit
// my first used global <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> (dont touch)
endglobals
function Trig_Electric_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A004039;
//Edit here for orginal rawcode for orginal spell
endfunction
function Spell takes nothing returns integer
return 039;A004039;
// You must edit this AND the one over this , It doesent
// need to be the same if you want the the damage/range to be
// * some other spell
endfunction
function Dummy_Spell takes nothing returns integer
return 039;A005039;
// edit here for your rawcode
endfunction
function Is_Dead_Or_Not takes nothing returns boolean
return (IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD) == false)
// Edit here for the spell to hit dead units or not
endfunction
function Is_Unit_Ally takes unit caster returns boolean
return ( IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(caster)))
// edit here for Allies to be hurt or not
endfunction
function groupFilter takes nothing returns boolean
return Is_Unit_Ally(GetTriggerUnit()) and Is_Dead_Or_Not()
// Dont edit this
endfunction
function Buff takes nothing returns integer
return 039;BPSE039;
// Edit here for the Wait Until Condition buff
endfunction
function Unit_Has_Buff takes nothing returns boolean
return UnitHasBuffBJ(GetSpellTargetUnit(),Buff()) == true
// Dont edit this
endfunction
constant function Wait_For_ConD takes nothing returns real
return 0.27
// Edit here for the checking between intervals
endfunction
function Dummy takes nothing returns integer
return 039;h000039;
//Edit here for your dummy unit
endfunction
constant function Dummy_Life_Time takes nothing returns real
return 2.00
// This is how long the dummies will live
endfunction
function Spell_Effect takes nothing returns string
return "slow"
//This is the order ID for the spell the dummy will cast upon the targets
endfunction
function Spell_Thingy takes nothing returns nothing
local location temp_point = GetUnitLoc(GetEnumUnit())
local location cast_loc = GetUnitLoc(MyUnit)
local unit unit2
//------------- This you can edit -------------------------
local real Mana = GetUnitState(GetEnumUnit(),UNIT_STATE_MANA)
local real Remove = 50*GetUnitAbilityLevel(MyUnit,Spell())
local real ManaRemove = Mana - Remove
//-----------------------------------------------------
set unit2 = CreateUnitAtLoc(GetOwningPlayer(MyUnit),Dummy(),cast_loc,GetRandomReal(1,360))
call RemoveLocation(temp_point)
call UnitApplyTimedLife(unit2,039;BTLF039;,Dummy_Life_Time())
call UnitAddAbility(unit2,Dummy_Spell())
call SetUnitAbilityLevel(unit2,Dummy_Spell(),GetUnitAbilityLevel(GetTriggerUnit(),Spell()))
call IssueTargetOrder(unit2,Spell_Effect(),GetEnumUnit())
// Edit this for the damage (the 70) --------------------------------------------------------------------------------------------------------------------------------------------
call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),70*GetUnitAbilityLevel(GetTriggerUnit(),Spell()),true,true,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_LIGHTNING,WEAPON_TYPE_WHOKNOWS)
// ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
call SetUnitState(GetEnumUnit(),UNIT_STATE_MANA,ManaRemove)
//------------- N U L L I N G ---------
set temp_point = null
set cast_loc = null
set unit2 = null
//---------------------------------------
endfunction
function Trig_Electric_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
local location loc = GetUnitLoc(target)
local group Group = CreateGroup()
loop
exitwhen((GetUnitAbilityLevel(target, Buff()) > 0))
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, Wait_For_ConD()))
endloop
set MyUnit = target
set Group = GetUnitsInRangeOfLocMatching(150*(GetUnitAbilityLevel(caster,Spell())),loc,Condition(function groupFilter))
call ForGroup(Group,function Spell_Thingy)
//------------- N U L L I N G ---------
set caster = null
set target = null
call RemoveLocation(loc)
set loc = null
call DestroyGroup(Group)
set Group = null
//---------------------------------------
endfunction
//===========================================================================
function InitTrig_Electric takes nothing returns nothing
set gg_trg_Electric = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Electric, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Electric, Condition( function Trig_Electric_Conditions ) )
call TriggerAddAction( gg_trg_Electric, function Trig_Electric_Actions )
endfunction
endscope