Spellpack Juxtapose, Life Steal & Death Ritual

waaaks!

Zinctified
Reaction score
256
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,053

--Thanatos--

New Member
Reaction score
33

waaaks!

Zinctified
Reaction score
256
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
256
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
256
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
256
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
256
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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top