Spellpack Juxtapose, Life Steal & Death Ritual

waaaks!

Zinctified
Reaction score
255
System: Caster System
Spell: JASS
Spell: MUI
Spell: not JESP
Import: Average

Juxtapose: (DotA Spell) Each attack has a chance to create a heros image.
3%|6%|9%
juxtaposeep7.jpg

JASS:
constant function buffid takes nothing returns integer
 return 'B000' // buff id for juxtapose
endfunction

constant function juxtapose takes nothing returns integer
 return 'A007' //raw code data for juxtapose
endfunction

constant function illusion takes nothing returns integer
 return 'A008' //raw code data for illusion item ability
endfunction

constant function percent takes nothing returns integer
 return 3 // percent used to summon illusion
endfunction

function Trig_Juxtapose_Conditions takes nothing returns boolean
    return ( UnitHasBuffBJ(GetAttacker(), buffid()) == true )
endfunction

function Trig_Juxtapose_Actions takes nothing returns nothing
    local unit d = GetAttacker() //Attacking unit
    local integer l
    local integer i
    set l = GetUnitAbilityLevel( d, juxtapose())
    set i = l*percent()
    if ( GetRandomInt(1, 100) <= i ) then
    call CasterCastAbility(GetOwningPlayer(d), illusion(), "852274", d, false)
    else
    endif
    set d = null    
endfunction

//===========================================================================
function InitTrig_Juxtapose takes nothing returns nothing
    set gg_trg_Juxtapose = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Juxtapose, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( gg_trg_Juxtapose, Condition( function Trig_Juxtapose_Conditions ) )
    call TriggerAddAction( gg_trg_Juxtapose, function Trig_Juxtapose_Actions )
endfunction


Life Steal: The hero steals life on his target, followed by a minor life steal per second.
100 life stolen, 20 life stolen per second
200 life stolen, 40 life stolen per second
300 life stolen, 60 life stolen per second
lifestealvc7.jpg

JASS:
constant function rawcode takes nothing returns integer
 //rawcode of spell used
 return 'A009' 
endfunction

constant function actions takes nothing returns string
 //change the words inside "" to your actions
 return "Life_Steal_Actions"
endfunction

constant function heal1 takes nothing returns integer
 //the value healed the hero formula: value x level of ability
 return 100
endfunction

constant function heal2 takes nothing returns integer
 //the heal and damage value in the loops
 return 20
endfunction

constant function speed takes nothing returns integer
 //change this value to the missile speed of your spell
 return 1000
endfunction

constant function delay takes nothing returns real
 //dealy on how long the loop recycles
 return 0.75
endfunction

constant function sfx takes nothing returns string
 //special effect in damaging and healing you
 return "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl"
endfunction

function InitTrig_Life_Steal takes nothing returns nothing
    call OnAbilityEffect( rawcode(), actions() )
endfunction

function Life_Steal_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()     // Triggering unit
    local unit t = GetSpellTargetUnit() // Target unit of spell
    local location loc1 = GetUnitLoc(u) // position of triggering unit
    local location loc2 = GetUnitLoc(t) // position of target
    local integer dmg1
    local integer dmg2
    local integer l
    local integer n
    local real i
    local real wait
    set l = GetUnitAbilityLevel( u, rawcode())
    set dmg1 = l*heal1()
    set wait = DistanceBetweenPoints( loc1, loc2) / speed()
    call PolledWait(wait)
    call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, u) + dmg1 ) )
    set i = 0
    set n = 10 // how many times the loops recycle
    call RemoveLocation(loc1)
    call RemoveLocation(loc2)
    loop
        exitwhen i>n
        set dmg2 = l*heal2()
        set loc1 = GetUnitLoc(u)
        set loc2 = GetUnitLoc(t)
        call DestroyEffect( AddSpecialEffectLoc( sfx(), loc1 ))
        call DestroyEffect( AddSpecialEffectLoc( sfx(), loc2 ))
        call SetUnitLifeBJ( u, ( GetUnitStateSwap(UNIT_STATE_LIFE, u) + dmg2 ) )
        call DamageUnitByTypes( u, t, dmg2, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
        if ( IsUnitDeadBJ(t) == true ) then
        set i = i+10
        else
        set i = i+1
        endif
        call RemoveLocation(loc1)
        call RemoveLocation(loc2)
        call PolledWait(delay())
    endloop   
    set loc1 = null
    set loc2 = null
    set u = null
    set t = null
endfunction


Death Ritual: The hero cast death rituals on the target location, enemy units affected by the radius shall be burned, whenever a burned unit dies, a Doom Guard is summoned from the dead body.
1000 cast range 100 radius
1150 cast range 200 radius
1300 cast range 300 radius
it is hard to get the screenshot right
deathritualcw4.jpg

JASS:
constant function ritualcode takes nothing returns integer
 //raw code for spell used
 return 'A00B'
endfunction

constant function ritualrad takes nothing returns integer
 //unit affected radius
 return 100 // 100 x level of ability
endfunction

constant function ritualanim takes nothing returns string
 //animation you want to do when casters cast this
 return "attack"
endfunction

constant function ritualsfx takes nothing returns string
 //special effect missile used
 return "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilMissile.mdl"
endfunction

constant function ritualspeed takes nothing returns integer
 //speed of the special effect thrown
 return 1000
endfunction

constant function ritualarc takes nothing returns real
 //arc of the missile works like editor
 return 0.05
endfunction

constant function ritualz1 takes nothing returns real
 //starting height of the missile when cast
 return 60.0
endfunction

constant function ritualz2 takes nothing returns real
 //end height of the missile
 return 0.0
endfunction

constant function ritualdamage takes nothing returns real
 //damage dealt to units when the missile reaches the destination
 return 0.0
endfunction

constant function ritualdoom takes nothing returns integer
 //rawcode of the spell casted on enemy units
 return 'A00C'
endfunction

constant function ritualdoomid takes nothing returns string
 //order string of the spell used by the dummy
 return "doom"
endfunction

function Trig_Ritual_Conditions takes nothing returns boolean
 return ( GetSpellAbilityId() == ritualcode() )
endfunction

function Ritual_NoTrig takes nothing returns boolean
 return (GetTriggerUnit() != GetFilterUnit())
endfunction

globals
 boolexpr Ritual_Filter = null
endglobals

function Trig_Ritual_Actions takes nothing returns nothing
 local group g = CreateGroup()
 local unit u = GetTriggerUnit()
 local location start = GetUnitLoc(u)
 local location tar = GetSpellTargetLoc()
 local real x = GetLocationX(tar)
 local real y = GetLocationY(tar)
 local integer dopt
 local real wait
 local integer lvl1
 local real lvl2
 set lvl1 = GetUnitAbilityLevel( u, ritualcode() )
 set lvl2 = lvl1*ritualrad()
 set dopt = DamageTypes(ATTACK_TYPE_SIEGE,DAMAGE_TYPE_FORCE)
 set dopt = dopt + DamageOnlyTo(UNIT_TYPE_GROUND) + DamageOnlyVisibles()
 call SetUnitAnimation(u, ritualanim())
 call DamagingProjectileLaunchAOELoc( u, ritualsfx(), ritualspeed(), ritualarc(), start, ritualz1(), tar, ritualz2(), lvl2, ritualdamage(), false, dopt ) 
 set wait = DistanceBetweenPoints( start, tar ) / ritualspeed()
 call PolledWait(wait)
 call CS_EnumUnitsInAOE(g, x, y, lvl2, Ritual_Filter)
 call CasterCastAbilityGroup( GetOwningPlayer(u), ritualdoom(), ritualdoomid(), g, false)
 call DestroyGroup(g)
 call RemoveLocation(start)
 call RemoveLocation(tar)
 set start = null
 set tar = null
 set g = null
 set u = null  
endfunction

//===========================================================================
function InitTrig_Ritual takes nothing returns nothing
 set Ritual_Filter = Condition(function Ritual_NoTrig)
 set gg_trg_Ritual = CreateTrigger(  )
 call TriggerRegisterAnyUnitEventBJ( gg_trg_Ritual, EVENT_PLAYER_UNIT_SPELL_EFFECT )
 call TriggerAddCondition( gg_trg_Ritual, Condition( function Trig_Ritual_Conditions ) )
 call TriggerAddAction( gg_trg_Ritual, function Trig_Ritual_Actions )
endfunction


EDIT: Update 1 finish

EDIT: Update 2 finish

feedbacks are welcome
 

Attachments

  • waaaks! CS spells v2.w3x
    162 KB · Views: 1,051

--Thanatos--

New Member
Reaction score
33

waaaks!

Zinctified
Reaction score
255
why does it leak?

if it does thanks...

i dont really rely on JASS, because i got that functions only by converting GUI to custom scripts, there i get my functions on JASS...

OFFTOPIC: hey ---Thanatos--- do u have a relation to the last thanatos i known, hes name was like @Thanatos@ and he keeps on helping me on my project thread...i wondered where is he know?
 

--Thanatos--

New Member
Reaction score
33
It doesn't leak, but I think we can remove those stupid BJs. ;)

OFFTOPIC: hey ---Thanatos--- do u have a relation to the last thanatos i known, hes name was like @Thanatos@ and he keeps on helping me on my project thread...i wondered where is he know?

Dunno. I am not. :rolleyes:
 

waaaks!

Zinctified
Reaction score
255
It doesn't leak, but I think we can remove those stupid BJs
ahh...

i see you are good in JASS, did u start JASS rather than GUI?
because i started GUI rather than JASS, now my head is so messed up with triggers...
 

--Thanatos--

New Member
Reaction score
33
i see you are good in JASS, did u start JASS rather than GUI?
because i started GUI rather than JASS, now my head is so messed up with triggers...

No. I start with GUI and I give up so freaking much time to study Jass. But I finally succeeded. :D But finally I fall to like Jass. :D Rarely uses GUI.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Spell: not MUI

Waits don't mean a spell isn't MUI anymore. Your spells use local variables only, and so they are MUI.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
it is?

sorry but i cant read MUI...
:p

Yes, waits with globals means that it is not MUI. So it is either one or the other but not both. ^^

Good job on the spells and nice use of constants, but the units do NOT need to be set to variables!! It isn't more efficient, it is the same... :)

Your spells you made recently, could become JESP I think, but your variable's (sometimes your function names are inspecific too) names are waayy to inspecific, which is extremely easy to fix. I don't see why you don't give it a try. ;)
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
I just wonder why my spells don't have much feedbacks. :rolleyes:

BTW you used a hacked WE ?

Cuz you didn't post screenies, which attract people. :rolleyes:

He didn't use a hacked WE A.F.A.I.K....

I think he used JASSNewGen and CS...

Besides, hacking WE would probably mean hacking the hardcodes and into WE. Making your own functions to use by editing WE's strings are simple and it isn't technically hacking it.

In fact, someone made a great tutorial about it... :p
 

waaaks!

Zinctified
Reaction score
255
BTW you used a hacked WE ?
i used JASS new gen pack so that i can use caster system and cs_cache

Good job on the spells and nice use of constants, but the units do NOT need to be set to variables!! It isn't more efficient, it is the same...
i only use variables for them, so that i dont waste time on typing GetTriggerUnit() GetSpellTargetUnit()

Your spells you made recently, could become JESP I think, but your variable's (sometimes your function names are inspecific too) names are waayy to inspecific, which is extremely easy to fix. I don't see why you don't give it a try.
ill study more of that, can you make one of my spells JESP? so that i can compare it with non JESP and i can use it soon...
 

waaaks!

Zinctified
Reaction score
255
oh yeah...but i thought people can recognize it already, sorry my bad...ill edit it now...thanks
 

Sim

Forum Administrator
Staff member
Reaction score
534
> but the units do NOT need to be set to variables!! It isn't more efficient, it is the same... :)

If you're going to use "GetTriggerUnit()" alot in your trigger you're better off with a variable. Saves some function calls.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
> but the units do NOT need to be set to variables!! It isn't more efficient, it is the same... :)

If you're going to use "GetTriggerUnit()" alot in your trigger you're better off with a variable. Saves some function calls.

True, but isn't there no efficiency differences except that setting it to a variable is faster if the name is small?
 

waaaks!

Zinctified
Reaction score
255
more feedbacks anyone?, for bugs, glitches, so that i can update it quickly...thanks...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top