HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell Need Help Please

06-28-2005, 08:25 PM#1
hellzfire74
Hello Lord Vexorian and Staff. I do not know if this is the right place to post this and please correct me if it isn't but I need help with a Spell. Do you know a spell called omnislash in dota?? thats the spell i want to make but i do not know how to make it. If you could please reply and tell me how to make it or make it and let me please import it ^ ^. If you don't know what omnislash is then, the spell I want is like your spell called Cold Slash in spellmap III but I want the damage to be your base damage and that it is not a frost chain but you blink to them and atk them one by one. Like the art of the caster is a blink and he blinks to the people and attacks them. Also it hits one person several times if there is only one person there, ex. level 1 hits 3 people, if one person hits him 3 times, if 2 people hits one person twice and the other once, if 3 people then its random who it hits.

Thank you alot for all of your help, and please reply to hellzfire74/ reply to this thread/ send this to my message box.
06-29-2005, 12:36 AM#2
volatile
This is Lord Vexorians "Cold Slash" Ability. I modified the damage so it is no longer "DAMAGE_TYPE_COLD." You can modify this to do exactly what you want.
Obviously you have to install the caster system to use this ability, if you don't know how to install it, download his map and read the "readme" in the triggers. It's as simple as copying the custom text from one place to the other and changing the rawcode (code in object editor) of the dummy caster.

Look below at the code and see how Lord Vexorian made it "user" friendly by adding places you can just change values... for example:

constant function Coldslash_TotalHits takes integer level returns integer
return 1+level*2 //// The total number of hits formula <-------Change hits?
endfunction


Code:
//***************************************************************************************************
//*
//*  Cold Slash
//*
//*  Requires:
//*      - The Caster System *
//*      - The Coldslash Ability
//*      - This Trigger (Make sure the Configuration section has your map's rawcodes)
//*
//*  Note: To Change the art, use the Object editor and edit these fields of the ability:
//*      - Caster Art = The Effect to attach to the hands of the hero
//*      - Target Art = The hit art that appears on the target
//*      - Special Art = Appears below the hero before hiting a new target-
//*
//***************************************************************************************************

//===================================================================================================
// Cold Slash Spell Configuration:
//
constant function Coldslash_SpellId takes nothing returns integer
    return 'A00A' //// The spell id for the Coldslash ability (its rawcode after copying to your map)
 ////(Custom Abilities\orc\heroes\)
endfunction

constant function Coldslash_TotalHits takes integer level returns integer
    return 1+level*2 //// The total number of hits formula
endfunction

constant function Coldslash_Area takes integer level returns integer
    return 350+level*10 //// The Area of effect formula (the distance for acquiring new targets)
endfunction

constant function Coldslash_MainDamage takes integer level returns integer
    return 75+level*50 //// The damage for the first hit
endfunction

constant function Coldslash_DamageFactor takes integer level returns real
    return 0.7 //// the damage factor per hit (it is 1.0 at this moment so it always do the same
               //// damage, change it to 0.5 if you want the damage halved like chain lightning.
endfunction

function ColdSlash_DamageOptions takes integer level returns integer
 return  DamageTypes(ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL) + DamageException(UNIT_TYPE_STRUCTURE,0) + DamageOnlyTo(UNIT_TYPE_GROUND)
 // Will Do Normal spell damage, won't affect buildings nor Flying units
 // See the caster system readme for more info.
endfunction

//===================================================================================================
function Trig_Cold_Slash_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == Coldslash_SpellId()
endfunction

function Trig_Cold_Slash_Actions takes nothing returns nothing
 local unit u=GetTriggerUnit()
 local integer s= GetSpellAbilityId()
 local integer l=GetUnitAbilityLevel( u,s )
 local group targetlog=CreateGroup()
 local group inrange=CreateGroup()
 local integer i=Coldslash_TotalHits(l)
 local unit target=GetSpellTargetUnit()
 local unit picked
 local unit other=GetSpellTargetUnit()
 local real grad=GetUnitX( u)
 local real damage=Coldslash_MainDamage(l)
 local effect fx1=AddSpellEffectTargetById(s, EFFECT_TYPE_CASTER, u, "hand left" )
 local effect fx2=AddSpellEffectTargetById(s, EFFECT_TYPE_CASTER, u, "hand right" )
 local real fct

    call PauseUnit(u, true)
    call SetUnitPathing(u,false)
    loop
        call GroupAddUnit( targetlog,target)
        set grad=Atan2BJ( GetUnitY(target) - GetUnitY(u), GetUnitX(target) - GetUnitX(u) )
        call DestroyEffect( AddSpellEffectById(s, EFFECT_TYPE_SPECIAL, GetUnitX(u), GetUnitY(u) ) )
        call SetUnitFacing( u, grad )
        call SetUnitAnimation( u, "attack slam")
        call PolledWait(0.25)
        call SetUnitPosition( u, GetUnitX(target)+100*CosBJ(grad), GetUnitY(target)+100*SinBJ(grad) )
        call DamageUnitByOptions(u,target, damage, ColdSlash_DamageOptions(l))
        call DestroyEffect( AddSpellEffectTargetById(s, EFFECT_TYPE_TARGET, target, "origin" ) )
        call PolledWait(0.25)
        set i=i-1
        set damage=damage*Coldslash_DamageFactor(l)
        exitwhen i==0 or IsUnitDeadBJ(u)
        call GroupClear(inrange)
        call GroupEnumUnitsInRange(inrange, GetUnitX(target), GetUnitY(target) , Coldslash_Area(l) , null)
        set target=null
        set other=null
        set grad=1000000
        loop
            set picked=FirstOfGroup(inrange)
            exitwhen picked==null
            if IsUnitEnemy(picked, GetOwningPlayer(u) ) and IsUnitAliveBJ(picked) then
                set fct=GetDamageFactorByOptions(u,picked,ColdSlash_DamageOptions(l))
            else
                set fct=0
            endif
            if fct!=0 then
                if not( IsUnitInGroup(picked,targetlog) ) and SquareRoot( Pow(GetUnitX(u)-GetUnitX(picked),2) + Pow(GetUnitY(u)-GetUnitY(picked),2) ) <= grad then
                    set grad=SquareRoot( Pow(GetUnitX(u)-GetUnitX(picked),2) + Pow(GetUnitY(u)-GetUnitY(picked),2) )
                    set target=picked
                endif
                set other=picked
            endif
            call GroupRemoveUnit(inrange,picked)
        endloop
        if target==null then
            set target=other
        endif
        exitwhen target==null        
    endloop
    call DestroyEffect( AddSpellEffectTargetById(s, EFFECT_TYPE_SPECIAL, u, "origin" ) )
    call PauseUnit(u,false)
    call SetUnitPathing(u,true)
    call SetUnitPosition(u, GetUnitX(u), GetUnitY(u) )
 call DestroyEffect(fx1)
 call DestroyEffect(fx2)
 set fx1=null
 set fx2=null
 set u=null
 call DestroyGroup(targetlog)
 set targetlog=null
 call DestroyGroup(inrange)
 set inrange=null
 set target=null
 set other=null
endfunction

//===================================================================================================
function InitTrig_Cold_Slash_Copy takes nothing returns nothing
    set gg_trg_Cold_Slash_Copy = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Cold_Slash_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Cold_Slash_Copy, Condition( function Trig_Cold_Slash_Conditions ) )
    call TriggerAddAction( gg_trg_Cold_Slash_Copy, function Trig_Cold_Slash_Actions )
endfunction


Hope this helps you :D I think a lot of people just check out his spellmaps and never realize how to implement the spells into their maps. It's VERY easy. Go ahead :D
06-29-2005, 11:19 PM#3
hellzfire74
Ok, like 1/4 way through that message my brain combusted from complicated mathimatical functions. I thank you alot for your help, but would it be too much to ask if you could make then spell for me because I do not have the genius intelligentce that you have to create this kind of spell. See I can get parts of it but not enough to make the spell. If you could do this for me I will TOTALY credit this spell to you.

Thanks for your time.
From: Hellzfire74
06-30-2005, 12:57 AM#4
hellzfire74
Testing if i am logged on
07-04-2005, 11:17 AM#5
Guest
this is vexorians spell, just copied
07-04-2005, 11:34 AM#6
Tim.
Ahem...That comment wasn't really needed...
Quote:
Originally Posted by volatile
This is Lord Vexorians "Cold Slash" Ability. I modified the damage so it is no longer "DAMAGE_TYPE_COLD." You can modify this to do exactly what you want.