[Contest] Holy Spells Contest!

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
You gave up on the spell... because it lags?
 
G

Goauld

Guest
I actually made a holy spell recently but it's for my hero in the rpg I'm making. Can I post it here or is using it in the map prohibited although the map isn't even near publishing?
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
I actually made a holy spell recently but it's for my hero in the rpg I'm making. Can I post it here or is using it in the map prohibited although the map isn't even near publishing?
If you hadn't told us, we would have had no idea.
 

Squll2

je'ne sais pas
Reaction score
76
>UberPlayer

Dude just submit your spell it might just be you that lags, come on i wanna see it ^^ im sure everyone else does too!
 
Reaction score
456
I shall submit is at it is currently. I have no reason to work on it anymore.

I submit it later to today, it's not for rating.
 

emjlr3

Change can be a good thing
Reaction score
395
ug, I just cannot get the bugs out of my spell for the life of me, looks like it may be a no show for me
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
I'm updating my spell and changing its title soon.

Bug fixes FTW.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
I'm done with it
JASS:
//****************************************************************************************************|      
//                                             Field of Sin                                           |  
//                                                  by                                                |  
//                                                ~Gals~                                              |  
//****************************************************************************************************|                                   
// To Implement:                                                                                      |                           
//                                                                                                    |
//    1. Copy the dummy unit "DummyClapper" into your map.                                            |
//    2. Copy the spell "Field of Sin" into your map.                                                 |
//    3. Copy the dummy spell "Dummy Clap" into your map.                                             |
//    4. Copy the buff "Field of Sin" into your map.                                                  | 
//    5. Copy this trigger into your map.                                                             |
//    6. Copy the model "HolySpiral.mdx" and "Nebula.mdx" into your map (Export and Import).          |  
//    7. *Optional* Copy the icon "BTN_CR_Rebirth.blp" and "DISBTN_CR_Rebirth.blp" into your map.     |  
//                                                                                                    |  
// Credits to:                                                                                        |  
//                                                                                                    |
//    1.Crazyrussian for the spell's icon.                                                            |  
//    2.WILL's nebula model.                                                                          |
//    3.Daxtreme&#039;s implementing method <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue    :p" loading="lazy" data-shortname=":p" />                                                            |
//----------------------------------------------------------------------------------------------------- 

globals
    unit                Caster
    group               UnitInRange
    trigger             SlowTrg 
    trigger             EndTrg
    trigger             Sudden
    trigger             Effe
    lightning array     CLightning
    lightning array     CLightningz 
    timer               TimeEnd 
    integer             Rotate           = 0
    integer             Count            = 0
    location            CastLoc
endglobals

//------------------------------------------All Constant functions------------------------------------//

constant function RawBuff takes nothing returns integer
return &#039;B000&#039;     //rawcode of SlowingBuff
endfunction

constant function RawFoS takes nothing returns integer
return &#039;A000&#039;     //rawcode of Field of Sin
endfunction

constant function RawLight takes nothing returns string
return &quot;HWSB&quot;    //rawcode of the healing lightning
endfunction

constant function DummyID takes nothing returns integer
return &#039;h001&#039;     //rawcode of the dummyclapper
endfunction

constant function DummyClap takes nothing returns integer
return &#039;A001&#039;     //rawcode of the dummyclap
endfunction

constant function duration takes nothing returns integer
return 15 //duration of the spell takes
endfunction

constant function Mulx takes nothing returns integer
return 5 //How much damage dealt and hp heal? (Level of Ability * &lt;Value&gt;)
endfunction

constant function Rad takes nothing returns integer
return 500         //Radius of the spell
endfunction

constant function WantSurrucEffe takes nothing returns boolean
return true        //Do you want the effect that appear when the casting of the spell?
endfunction

constant function WantAngelEffe takes nothing returns boolean
return true        //Do you want the angel effect at the end of the spell? 
endfunction

constant function EffePerio takes nothing returns real
return 0.05        //How fast you want the triangle to spin? (The less number you put, the faster it spins)
endfunction
//-----------------------------------------End of all CONSTANT FUNCTION------------------------------------//


//---------------------------------User Defined Function-------------------------------------//
function GetLoc takes location source1, real dist1, real angle1 returns location
    local real x2 = GetLocationX(source1) + dist1 * Cos(angle1 * bj_DEGTORAD)
    local real y2 = GetLocationY(source1) + dist1 * Sin(angle1 * bj_DEGTORAD)
    return Location(x2, y2)
endfunction
//---------------------------------User Defined Function End---------------------------------//


//-----------------------------------------------Trigger SlowTrg Start----------------------------------------------//
function SlowCond takes nothing returns boolean //the condition of picking units
return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) &gt; 0==true
endfunction                        //Picked unit is not a structure and it is Alive

function ForSlowCond takes nothing returns nothing
local unit cr //local a unit variable with name &quot;cr&quot;
    if IsUnitInRangeLoc(GetEnumUnit(),CastLoc, Rad()) == true then  //If the picked unit is within  range of the caster then
        if IsUnitAlly(GetEnumUnit(),GetOwningPlayer(Caster))==false then  //If the unit is an enemy of the caster then
            set cr = CreateUnit(GetOwningPlayer(Caster), DummyID(), GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()), 270) //Create a dummy and set it to the unit variable we localed just now (cr)
            call UnitAddAbility(cr, DummyClap()) //Add dummyclap to cr
            call SetUnitAbilityLevel(cr, DummyClap(), GetUnitAbilityLevel(Caster, RawFoS())) //Set the level of dummy clap equal to the level of Fields of Sin of the caster
            call UnitApplyTimedLife(cr, &#039;BTLF&#039;, 2) //We add 2 seconds expiration timer to cr (BTLF is the &quot;Generic Expiration&quot; time for the unit)
            call IssueImmediateOrder(cr, &quot;thunderclap&quot;) //Order cr to cast Dummyclap (Which is based on thunderclap ability)
            call DestroyEffect(AddSpecialEffectTarget(&quot;Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl&quot;,GetEnumUnit(),&quot;origin&quot;)) //Create an awesome special effect on the targeted unit
            call UnitDamageTarget(Caster, GetEnumUnit(), GetUnitAbilityLevel(Caster,RawFoS())*Mulx(),true,false,ATTACK_TYPE_MAGIC,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS) //Dealt damage to the targeted unit (Level of Field of Sin of the caster * 5)
        elseif IsUnitAlly(GetEnumUnit(),GetOwningPlayer(Caster)) == true then //Else if the Unit is an ally of the caster then
            call DestroyEffect(AddSpecialEffectTarget(&quot;HolySpiral.mdl&quot;,GetEnumUnit(),&quot;overhead&quot;)) //Create an awesome special effect around
            call SetUnitState(GetEnumUnit(),UNIT_STATE_LIFE,GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+(GetUnitAbilityLevel(Caster,RawFoS())*Mulx()))//Increase the hp of the ally (Regen Level of FOS of caster * 5 hp per 0.5 seconds)
        endif //closing IF    
    elseif IsUnitInRangeLoc(GetEnumUnit(),CastLoc, Rad()) == false then //Else if the picked unit is Not within range of the caster then
        call UnitRemoveAbility(GetEnumUnit(),RawBuff()) //Remove the Slowing buff from the picked unit
    endif //closing another IF
set cr = null  //Nulling cr because it is not used anymore
endfunction

function SlowAct takes nothing returns nothing  //This is the main action of SlowTrg
set UnitInRange = CreateGroup() //We create a group with a name &quot;UnitInRange&quot;
call GroupEnumUnitsInRange(UnitInRange, GetLocationX(CastLoc), GetLocationY(CastLoc),1000, Condition(function SlowCond)) //We pick units into the last created group (Unit within 1000 range is being picked and it conditions are at Function SlowCond)
call ForGroup(UnitInRange, function ForSlowCond) //We starts the loop action of the group (Using function ForSlowCond)
call DestroyGroup(UnitInRange) //Destroy UnitInRange to prevent future leaks
endfunction
//-----------------------------------------------Trigger SlowTrg End----------------------------------------------//


//-----------------------------------------------Trigger EndTrg Start---------------------------------------------//
//This trigger is clearing all those messy things in the end...it triggers when the timer expired
function ForClearBuff takes nothing returns nothing
call UnitRemoveAbility(GetEnumUnit(),RawBuff())
endfunction

function EndTrgAct takes nothing returns nothing
local location circle
local integer loop1 = 1
local integer loop2 = 36                //localinzing variable
local group all = CreateGroup()
local integer start = 1
local integer end = 50
call DestroyTimer(TimeEnd) //Destroy the expired timer to prevent leaks
call GroupEnumUnitsInRange(all, GetLocationX(CastLoc), GetLocationY(CastLoc),2000, Condition(function SlowCond)) //pick every unit in 2000 range from the caster into group &quot;all&quot;....condition are using function SlowCond
call ForGroup(all, function ForClearBuff) //loop of the group starts (code from function ForClearBuff)
    call DestroyLightning(CLightningz[1])
    call DestroyLightning(CLightningz[2])
    call DestroyLightning(CLightningz[3])  //Destroy all those create lightning
    call DestroyLightning(CLightningz[4])
    call DestroyLightning(CLightningz[5])
    call DestroyLightning(CLightningz[6])
    //-------------------------------Awesome Special Effects Starts-------------------------------------//
        if WantAngelEffe() == true then
            loop
                    exitwhen loop1&gt;loop2
                set circle = GetLoc(CastLoc, Rad(), loop1*10)
                call DestroyEffect(AddSpecialEffectLoc(&quot;Abilities\\Spells\\Human\\Resurrect\\ResurrectCaster.mdl&quot;,circle))
                call RemoveLocation(circle)
                set loop1 = loop1+1
            endloop
        endif
    //-------------------------------Awesome Special Effects Ends-------------------------------------//
call RemoveLocation(CastLoc) //Remove location to prevent leaks (location removed is CastLoc)
    loop
    exitwhen start&gt;end
    call DestroyLightning(CLightning[start]) //Destroy the circle lightning
    set start = start+1
    endloop
call DisableTrigger(Effe) //Disable Trigger (Effe)
call DestroyTrigger(Effe) //Destroy Trigger (Effe)
call DestroyTrigger(GetTriggeringTrigger()) //Destroy Trigger (This trigger)
call DestroyTrigger(SlowTrg) //Destroy Trigger (SlowTrg)
call DestroyTrigger(Sudden)  //Destroy Trigger (Sudden)
call DestroyGroup(all)    //Destroy the group localed in this trigger (all)
set all = null  //null it to prevent leaks
set circle = null //Nulling circle
endfunction
//-----------------------------------------------Trigger EndTrg End---------------------------------------------//


//-------------------------------------------------Trigger Effe Start---------------------------------------------------//
//This trigger is the system that makes the triangle inside the circles turns...it is hard to modify...it is not recomend to modify it
//JASS newbie might had trouble modifying this...though
function EffeAct takes nothing returns nothing
local location circle 
local location circle2      //Localizing all variable
local integer loop1 = 1
local integer loop2 = 36
//==================Checking system Start================//
//(Better Not to modify this unless you know what you are doing)
set Count = Count +1              //These lines are a lightning checking system which prevent crashes between lightning effect
            if Count &gt;=2 then       //Same as last line
    call DestroyLightning(CLightningz[1])
    call DestroyLightning(CLightningz[2])
    call DestroyLightning(CLightningz[3])
    call DestroyLightning(CLightningz[4])
    call DestroyLightning(CLightningz[5])
    call DestroyLightning(CLightningz[6])
    set Count = 1
            endif
//==================Checking system End=================//
            //---------Triangle 1-----------//
            set circle = GetLoc(CastLoc, Rad()-50, 45+Rotate) //Top Right Position
            set circle2 = GetLoc(CastLoc, Rad()-50, 90+45+Rotate) //Top Left Position
            set CLightningz[Count]=AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2))
            call RemoveLocation(circle)
            call RemoveLocation(circle2)
            set Count = Count +1
            set circle = GetLoc(CastLoc, Rad()-50, 90+45+Rotate) //Top Left Postition
            set circle2 = GetLoc(CastLoc, Rad()-50, 90+180+Rotate) //Bottom Position
            set CLightningz[Count]=AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2))
            call RemoveLocation(circle)
            call RemoveLocation(circle2)
            set Count = Count +1
            set circle = GetLoc(CastLoc, Rad()-50, 90+180+Rotate) //Bottom
            set circle2 = GetLoc(CastLoc, Rad()-50, 45+Rotate) //Top Right
            set CLightningz[Count]=AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2))
            call RemoveLocation(circle)
            call RemoveLocation(circle2)
            set Count = Count +1
            //----------Triangle 1 End------//
            //----------Triangle 2----------//
            set circle = GetLoc(CastLoc,Rad()-50, 180+45-Rotate) //Bottom Left
            set circle2 = GetLoc(CastLoc,Rad()-50, 270+45-Rotate) //Bottom Right
            set CLightningz[Count]=AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2))
            call RemoveLocation(circle)
            call RemoveLocation(circle2)
            set Count = Count +1
            set circle = GetLoc(CastLoc, Rad()-50, 270+45-Rotate) //Bottom Right
            set circle2 = GetLoc(CastLoc, Rad()-50, 90-Rotate) //Top
            set CLightningz[Count]=AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2))
            call RemoveLocation(circle)
            call RemoveLocation(circle2)
            set Count = Count +1
            set circle = GetLoc(CastLoc,Rad()-50, 90-Rotate) //Top
            set circle2 = GetLoc(CastLoc,Rad()-50, 180+45-Rotate) //Bottom Left
            set CLightningz[Count]=AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2))
            call RemoveLocation(circle)
            call RemoveLocation(circle2)
            set Count = Count +1
            //--------Triangle 2 End------------//
  set Rotate = Rotate +10
endfunction
//-------------------------------------------------Trigger Effe End---------------------------------------------------//


//-----------------------Main Trigger Starts (This trigger&#039;s configuration)-------------------------//
function Trig_HolyFieldSet_Conditions takes nothing returns boolean // &lt;------ The Condition of this Trigger
return GetSpellAbilityId() == RawFoS()  //Ability being casted == Field of Sin
endfunction

function Trig_HolyFieldSet_Actions takes nothing returns nothing
    local location circle
    local location circle2  //Localizing all thoses variable
    local integer loop1 =1
    local integer loop2 =0
 set Sudden = CreateTrigger() 
 set EndTrg = CreateTrigger()       //Creating neccesaries trigger (Sudden,EndTrg,SlowTrg,Effe)
 set SlowTrg = CreateTrigger()
 set Effe = CreateTrigger()
 set TimeEnd = CreateTimer() //Create a Timer
 
 //================================Trigger Registration Start==================================//
    call TriggerRegisterTimerEvent(Effe,EffePerio(),true) //Add event to Effe
    call TriggerAddAction( Effe, function EffeAct ) //Add action function to Effe (EffeAct)
    call DisableTrigger(Effe)                        //Disable this trigger
 call TriggerRegisterAnyUnitEventBJ(Sudden, EVENT_PLAYER_UNIT_SPELL_ENDCAST)        //Add event to Sudden(Unit finish casting a spell)
                                                                                    //When the unit suddenly moved ...stunned...or anything...it will straight cancel the action he was doing
 call TriggerAddCondition(Sudden, Condition(function Trig_HolyFieldSet_Conditions))//Add condition to this trigger (Using the same condition as HolyFieldSet)
 call TriggerAddAction(Sudden, function EndTrgAct)                                  //Add action to Sudden (EndTrgAct)
   call TriggerRegisterTimerEvent(SlowTrg,.5,true)  //Add event to SlowTrg (Every 0.50 seconds)
   call TriggerAddAction(SlowTrg, function SlowAct)//Add action to it (SlowAct)
   call DisableTrigger(SlowTrg)                     //Disable this trigger
//================================Trigger Registration End==================================//

set Caster = GetSpellAbilityUnit()  //set Caster = the ability caster
set CastLoc =  GetUnitLoc(Caster)   //set CastLoc = the position of the caster
    //=================================Circle Creation Start=====================================//
    set loop2 = 36    //the loop2 represent degree (i uses 10*loop2 later)
        loop   //We will start a loop
        exitwhen loop1&gt;loop2  //The exit condition of this loop (When loop1 is bigger than loop2
        set circle = GetLoc(CastLoc, Rad(), loop1*10) //set circle to 1st position (CastLoc offset by x range towards loop1*10 degree
        set circle2 = GetLoc(CastLoc, Rad(), (loop1*10)+10) //set circle2 to 2nd position (CastLoc offset by x range towards loop1*10+10 degree
        set CLightning[loop1] = AddLightningEx(RawLight(), true, GetLocationX(circle), GetLocationY(circle), GetLocationZ(circle), GetLocationX(circle2), GetLocationY(circle2), GetLocationZ(circle2)) //We connection the 2 points by a lightning effect
            if WantSurrucEffe() == true then
                call DestroyEffect(AddSpecialEffectLoc(&quot;Abilities\\Spells\\Orc\\Reincarnation\\ReincarnationTarget.mdl&quot;,circle)) //we create a awesome special effect at the same time
            endif
        call RemoveLocation(circle) //Remove located location to prevent leaks (location being removed is circle)
        call RemoveLocation(circle2)//same as last line...(location being removed is circle2)
        set loop1 = loop1+1 //set loop1 = loop1+1...increase the integer of loop1 to make it reach the condition to exit this loop
        endloop
    //=================================Circle Creation End=======================================//
call EnableTrigger(SlowTrg) //enable SlowTrg
call EnableTrigger(Effe)    //enable Effe
call TimerStart(TimeEnd, I2R(duration()), false, null) //Start Timer(Timer being started is TimeEnd and the duration is stated at top....the constant function area
call TriggerRegisterTimerExpireEvent(EndTrg, TimeEnd)  //Add event to EndTrg (Event is when TimeEnd expired
call TriggerAddAction(EndTrg, function EndTrgAct)      //Add action to EndTrg (EndTrgAct)
set circle = null        //null circle...since we are not using it from now on
set circle2 = null       //same as last line
endfunction
//-----------------------Main Trigger Ends (This trigger&#039;s configuration)-------------------------//

//===========================================================================
function InitTrig_FieldofSinSet takes nothing returns nothing
    set gg_trg_FieldofSinSet = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_FieldofSinSet, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_FieldofSinSet, Condition( function Trig_HolyFieldSet_Conditions ) )
    call TriggerAddAction( gg_trg_FieldofSinSet, function Trig_HolyFieldSet_Actions )
endfunction

View attachment 11081
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
Put the damn spell in a scope.

And prefix your fucking functions.
 
M

Master Mazer

Guest
Ill give it a try... my first contest to enter :D it wont be good... but ill try to find somthing :D ioll edit this post if i decide not to.


EDIT

i cant... i didnt think i would have to "code" iun order to do what i wanted but it doesnt worky =( o well good luck every1 that trys!
 

Darkchaoself

What is this i dont even
Reaction score
106
Well your better work fast, got til Saturday. Im just here to motivate people. I neve finish contest things. I want Ghan to slap me next i time i enter a contest. Wooo go people.
 
M

Master Mazer

Guest
ive never coded before so i cant... i was going to do somthing called Invicable Heal. It heals a area of 1500 aroudn you of allied units, and puts them all invurnable for 5 seconds+ adding 10% damage. If i was able to work it i would but idk how to code. O well... ill stick on trying what i got
 

Sevion

The DIY Ninja
Reaction score
413
Doesn't sound so hard or bad. You could do it :p Just add a few SE and you'd be set.
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
I have updated my spell.

Chains of Solidarity v1.10
(That's "solidarity", not "solitude")


ChainsofSolidarity.jpg

The Spell said:
BTNReplenishMana.jpg
— Chains of Solidarity

Links the caster and target unit together with a bond of immeasureable energy from their own life-forces. All units in the path of this link will constantly be healed for a small amount.

Level 1 - Heals 35 health per second, lasts 11 seconds.
Level 2 - Heals 50 health per second, lasts 12 seconds.
Level 3 - Heals 65 health per second, lasts 13 seconds.

Because I use Mac OS X, my code tends to get fucked up when looked at in the World Editor. To rectify this, simply use the code in the attached text file instead of that in the map trigger or use the below code. (Note: vBulletin has been known to screw with JASS tags, so please quote this post and get the correct code from there)
JASS:
//*****************************************************************************************\\
//                            Spell Name: Chains of Solidarity                             \\
//                                 Spell Author: Pyrogasm                                  \\
//                                                                                         \\
//                                Follows the JESP Standard                                \\
//*****************************************************************************************\\

constant function CoS_AbilityId takes nothing returns integer
    return &#039;A000&#039; //Rawcode of the spell itself
endfunction

constant function CoS_DummyUnitId takes nothing returns integer
    return &#039;h000&#039; //This unit MUST have a &quot;cast backswing point&quot; of 0.00
endfunction       //And CANNOT have negative regeneration

constant function CoS_DummyLightningSpellId takes nothing returns integer
    return &#039;A001&#039; //The &quot;CoS Dummy Lightning spell&quot; determines the lightning effect
endfunction

constant function CoS_DummyBuffSpellId takes nothing returns integer
    return &#039;A002&#039; //The &quot;CoS Dummy Buff Spell&quot; spell
endfunction

constant function CoS_BuffId takes nothing returns integer
    return &#039;B000&#039; //The &quot;Chains of Solidarity (Buff)&quot; buff
endfunction

constant function CoS_CrowFormAbilityId takes nothing returns integer
    return &#039;Amrf&#039; //Medivh&#039;s Crow form ability; you don&#039;t need to change this rawcode unless
endfunction       //you modified it in your map. If you have, copy it, reset the copied one,
                  //and use its rawcode here.

constant function CoS_BreakDistance takes integer Level returns real
    return 1500.00 //If the two units are farther than this distance apart, the spell
endfunction        //Will end.

constant function CoS_DummyFlyHeight takes integer Level returns real
    return 30.00 //If you want the lightning effect on the caster to be higher or lower.
endfunction      //It will always go directly to the target.

constant function CoS_Duration takes integer Level returns real
    return 10.00 + (1.00*Level) //Duration of the lightning effect is changed in the Object Editor
endfunction

constant function CoS_HealthPerSecond takes integer Level returns real
    return 20.00 + (15.00*Level) //In Health per Second
endfunction

constant function CoS_LineWidth takes integer Level returns real
    return 145.00 //Distance from center to outer edge of line
endfunction

constant function CoS_CircleOptions takes integer Level returns integer
     return 3 //0 = no circles; 1 = only around target; 2 = only around caster; 3 = around both
endfunction

constant function CoS_CircleRadius takes integer Level, integer WhichCircle returns real
     if WhichCircle == 1 then     //Radius of the circle(s) around the caster/target
         return 75.00             //This might conceivably be the same as the LineWidth.
     elseif WhichCircle == 2 then //To make it only affect the caster/target, simply put 10.00
         return 75.00             //Or something.
     endif
     return 0.00                  //Just a safety return; don&#039;t change this
endfunction

constant function CoS_MinHeight takes integer Level returns real
    return 0.00 //No units below this height will be affected
endfunction

constant function CoS_MaxHeight takes integer Level returns real
    return 500.00 //No units above this height will be affected
endfunction

constant function CoS_TimerInterval takes integer Level returns real
    return 0.04 //Interval that the timer runs at; this affects the lightning effect
endfunction

constant function CoS_HealAllies takes integer Level returns boolean
    return true
endfunction

constant function CoS_HealEnemies takes integer Level returns boolean
    return false
endfunction

constant function CoS_HealOnCast takes integer Level returns boolean
    return false
endfunction

constant function CoS_EffectPath takes nothing returns string
    return &quot;Abilities\\Weapons\\WingedSerpentMissile\\WingedSerpentMissile.mdl&quot;
endfunction

constant function CoS_EffectAttach takes nothing returns string
    return &quot;chest&quot;
endfunction

constant function CoS_EffectInterval takes nothing returns real
    return 0.48 //This should probably be a multiple of the timer interval
endfunction



//*****************************************************************************************\\
//                                Start External Functions                                 \\
//*****************************************************************************************\\

//=============================
// Function by grim001
//=============================
function GroupEnumUnitsInQuad takes group g, real x1, real y1, real x2, real y2, real x3, real y3, real x4, real y4, real minHeight, real maxHeight, boolexpr f returns nothing
    local real maxx
    local real minx
    local real maxy
    local real miny
    local unit u
    local real ux
    local real uy

    if x1 &gt;= x2 and x1 &gt;= x3 and x1 &gt;= x4 then
        set maxx = x1
    elseif x2 &gt;= x1 and x2 &gt;= x3 and x2 &gt;= x4 then
        set maxx = x2
    elseif x3 &gt;= x1 and x3 &gt;= x2 and x3 &gt;= x4 then
        set maxx = x3
    else
        set maxx = x4
    endif

    if x1 &lt;= x2 and x1 &lt;= x3 and x1 &lt;= x4 then
        set minx = x1
    elseif x2 &lt;= x1 and x2 &lt;= x3 and x2 &lt;= x4 then
        set minx = x2
    elseif x3 &lt;= x1 and x3 &lt;= x2 and x3 &lt;= x4 then
        set minx = x3
    else
        set minx = x4
    endif

    if y1 &gt;= y2 and y1 &gt;= y3 and y1 &gt;= y4 then
        set maxy = y1
    elseif y2 &gt;= y1 and y2 &gt;= y3 and y2 &gt;= y4 then
        set maxy = y2
    elseif y3 &gt;= y1 and y3 &gt;= y2 and y3 &gt;= y4 then
        set maxy = y3
    else
        set maxy = y4
    endif

    if y1 &lt;= y2 and y1 &lt;= y3 and y1 &lt;= y4 then
        set miny = y1
    elseif y2 &lt;= y1 and y2 &lt;= y3 and y2 &lt;= y4 then
        set miny = y2
    elseif y3 &lt;= y1 and y3 &lt;= y2 and y3 &lt;= y4 then
        set miny = y3
    else
        set miny = y4
    endif

    call SetRect(udg_CoS_Rect, minx, miny, maxx, maxy)
    call GroupEnumUnitsInRect(udg_CoS_Group, udg_CoS_Rect, f)
    loop
        set u = FirstOfGroup(udg_CoS_Group)
        exitwhen u == null
        call GroupRemoveUnit(udg_CoS_Group, u)
        if GetUnitFlyHeight(u) &lt;= maxHeight and GetUnitFlyHeight(u) &gt;= minHeight then
            set ux = GetUnitX(u)
            set uy = GetUnitY(u)
            if (uy - y1)*(x2 - x1) - (ux - x1)*(y2 - y1) &lt;= 0. then
                if (uy - y2)*(x3 - x2) - (ux - x2)*(y3 - y2) &lt;= 0. then
                    if (uy - y3)*(x4 - x3) - (ux - x3)*(y4 - y3) &lt;= 0. then
                        if (uy - y4)*(x1 - x4) - (ux - x4)*(y1 - y4) &lt;= 0. then
                            call GroupAddUnit(g, u)
                        endif
                    endif
                endif
            endif
        endif
    endloop
endfunction
//*****************************************************************************************\\
//                                 End External Functions                                  \\
//*****************************************************************************************\\


function CoS_CastConditions takes nothing returns boolean
    return GetSpellAbilityId() == CoS_AbilityId()
endfunction

function CoS_HealFilter takes nothing returns boolean
    local unit U = GetFilterUnit()
    local boolean Ally = bj_slotControlUsed[95] and IsUnitAlly(U, bj_forceRandomCurrentPick)
    local boolean Enemy = bj_slotControlUsed[96] and IsUnitEnemy(U, bj_forceRandomCurrentPick)
    set U = null
    return Ally or Enemy
endfunction

function CoS_Callback takes nothing returns nothing
    local timer T = GetExpiredTimer()
    local string TTable = GetAttachmentTable(T)
    local unit U = GetTableUnit(TTable, &quot;CoS Caster&quot;)
    local unit U2 = GetTableUnit(TTable, &quot;CoS Target&quot;)
    local integer Level = GetTableInt(TTable, &quot;CoS Level&quot;)
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local real X2 = GetUnitX(U2)
    local real Y2 = GetUnitY(U2)
    local unit Dummy = GetTableUnit(TTable, &quot;CoS Dummy&quot;)
    local real Duration = CoS_Duration(Level)
    local real TimerInterval = CoS_TimerInterval(Level)
    local group G
    local unit U3
    local real HealAmount
    local real Angle = CoS_BreakDistance(Level)
    local real Width
    local string EffectPath
    local string EffectAttach
    local real Elapsed = GetTableReal(TTable, &quot;CoS Elapsed Time&quot;)
    local boolean Effects
    local integer CircleOptions
    local group G2

    local real Side1X
    local real Side1Y
    local real Side2X
    local real Side2Y
    local real RX1
    local real RY1
    local real RX2
    local real RY2
    local real RX3
    local real RY3
    local real RX4
    local real RY4

    if Elapsed &gt; Duration or GetWidgetLife(U) &lt; 0.406 or GetWidgetLife(U2) &lt; 0.406 or (X-X2)*(X-X2)+(Y-Y2)*(Y-Y2) &gt; Angle*Angle then
        set Level = CoS_BuffId()
        call RemoveUnit(Dummy)
        call UnitRemoveAbility(U, Level)
        call UnitRemoveAbility(U2, Level)

        call PauseTimer(T)
        call CleanAttachedVars(T)
        call DestroyTimer(T)
    else
        call SetTableReal(TTable, &quot;CoS Elapsed Time&quot;, Elapsed+TimerInterval)
        set Width = CoS_LineWidth(Level)
        set HealAmount = CoS_HealthPerSecond(Level)/(1.00/TimerInterval)
        set CircleOptions = CoS_CircleOptions(Level)
        set Effects = ModuloReal(Elapsed, CoS_EffectInterval()) &lt;= TimerInterval
        if Effects then
            set EffectPath = CoS_EffectPath()
            set EffectAttach = CoS_EffectAttach()
        endif

        call SetUnitX(Dummy, X)
        call SetUnitY(Dummy, Y)
        set Angle = Atan2((Y2-Y),(X2-X))

        set Side1X = X2 - X
        set Side1Y = Y2 - Y
        set Side2X = Width*Cos(Angle-1.5708)
        set Side2Y = Width*Sin(Angle-1.5708)

        set RX4 = X + Side2X*0.5
        set RY4 = Y + Side2Y*0.5
        set RX3 = RX4 + Side1X
        set RY3 = RY4 + Side1Y
        set RX2 = RX3 - Side2X
        set RY2 = RY3 - Side2Y
        set RX1 = RX2 - Side1X
        set RY1 = RY2 - Side1Y

        set bj_slotControlUsed[95] = CoS_HealAllies(Level)
        set bj_slotControlUsed[96] = CoS_HealEnemies(Level)
        set bj_forceRandomCurrentPick = GetOwningPlayer(U)
        set G = CreateGroup()
        call GroupEnumUnitsInQuad(G, RX1, RY1, RX2, RY2, RX3, RY3, RX4, RY4, CoS_MinHeight(Level), CoS_MaxHeight(Level), Condition(function CoS_HealFilter))

        if CircleOptions &gt; 0 then
            set G2 = CreateGroup()
            set bj_groupAddGroupDest = G
            if CircleOptions == 1 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X2, Y2, CoS_CircleRadius(Level, 1), Condition(function CoS_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
                call GroupClear(G2)
            endif
            if CircleOptions == 2 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X, Y, CoS_CircleRadius(Level, 2), Condition(function CoS_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
            endif
            call DestroyGroup(G2)
            set G2 = null
        endif

        loop
            set U3 = FirstOfGroup(G)
            exitwhen U3 == null

            call SetWidgetLife(U3, GetWidgetLife(U3)+HealAmount)
            if Effects then
                call DestroyEffect(AddSpecialEffectTarget(EffectPath, U3, EffectAttach))
            endif

            call GroupRemoveUnit(G, U3)
        endloop

        call DestroyGroup(G)
        set G = null
    endif

    set U = null
    set U2 = null
    set Dummy = null
endfunction

function CoS_Cast takes nothing returns nothing
    local unit U = GetTriggerUnit()
    local unit U2 = GetSpellTargetUnit()
    local integer Level = GetUnitAbilityLevel(U, CoS_AbilityId())
    local real X = GetUnitX(U)
    local real Y = GetUnitY(U)
    local real X2
    local real Y2
    local integer DummySpellId = CoS_DummyLightningSpellId()
    local unit Dummy
    local real Duration = CoS_Duration(Level)
    local real TimerInterval = CoS_TimerInterval(Level)
    local group G
    local unit U3
    local timer T = CreateTimer()
    local string TTable = GetAttachmentTable(T)
    local real HealAmount
    local real Angle
    local real Width
    local string EffectPath
    local string EffectAttach
    local integer CircleOptions
    local group G2

    local real Side1X
    local real Side1Y
    local real Side2X
    local real Side2Y
    local real RX1
    local real RY1
    local real RX2
    local real RY2
    local real RX3
    local real RY3
    local real RX4
    local real RY4

    set bj_forceRandomCurrentPick = GetOwningPlayer(U)
    set Dummy = CreateUnit(bj_forceRandomCurrentPick, CoS_DummyUnitId(), X, Y, 0.00)
    call UnitAddAbility(Dummy, DummySpellId)
    call SetUnitAbilityLevel(Dummy, DummySpellId, Level)
    call IssueTargetOrder(Dummy, &quot;fingerofdeath&quot;, U2)
    call UnitApplyTimedLife(Dummy, &#039;BTLF&#039;, Duration+TimerInterval)

    call SetTableObject(TTable, &quot;CoS Caster&quot;, U)
    call SetTableObject(TTable, &quot;CoS Target&quot;, U2)
    call SetTableObject(TTable, &quot;CoS Dummy&quot;, Dummy)
    call SetTableInt(TTable, &quot;CoS Level&quot;, Level)

    set DummySpellId = CoS_CrowFormAbilityId()
    call UnitAddAbility(Dummy, DummySpellId)
    call UnitRemoveAbility(Dummy, DummySpellId)
    call SetUnitFlyHeight(Dummy, CoS_DummyFlyHeight(Level), 10000.00)

    set DummySpellId = CoS_DummyBuffSpellId()
    set Dummy = CreateUnit(bj_forceRandomCurrentPick, CoS_DummyUnitId(), X, Y, 0.00)
    call UnitAddAbility(Dummy, DummySpellId)
    call SetUnitAbilityLevel(Dummy, DummySpellId, Level)
    call IssueTargetOrder(Dummy, &quot;unholyfrenzy&quot;, U)
    call IssueTargetOrder(Dummy, &quot;unholyfrenzy&quot;, U2)
    call UnitApplyTimedLife(Dummy, &#039;BTLF&#039;, 1.00)

    if CoS_HealOnCast(Level) then
        set HealAmount = CoS_HealthPerSecond(Level)/(1.00/TimerInterval)
        set Width = CoS_LineWidth(Level)
        set EffectPath = CoS_EffectPath()
        set EffectAttach = CoS_EffectAttach()
        set CircleOptions = CoS_CircleOptions(Level)

        set X2 = GetUnitX(U2)
        set Y2 = GetUnitY(U2)
        set Angle = Atan2((Y2-Y),(X2-X))

        set Side1X = X2 - X
        set Side1Y = Y2 - Y
        set Side2X = Width*Cos(Angle-1.5708)
        set Side2Y = Width*Sin(Angle-1.5708)

        set RX1 = X + Side2X*0.5
        set RY1 = Y + Side2Y*0.5
        set RX2 = RX1 + Side1X
        set RY2 = RY1 + Side1Y
        set RX3 = RX2 - Side2X
        set RY3 = RY2 - Side2Y
        set RX4 = RX3 - Side1X
        set RY4 = RY3 - Side1Y

        set bj_slotControlUsed[95] = CoS_HealAllies(Level)
        set bj_slotControlUsed[96] = CoS_HealEnemies(Level)
        set G = CreateGroup()
        call GroupEnumUnitsInQuad(G, RX1, RY1, RX2, RY2, RX3, RY3, RX4, RY4, CoS_MinHeight(Level), CoS_MaxHeight(Level), Condition(function CoS_HealFilter))

        if CircleOptions &gt; 0 then
            set G2 = CreateGroup()
            set bj_groupAddGroupDest = G
            if CircleOptions == 1 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X2, Y2, CoS_CircleRadius(Level, 1), Condition(function CoS_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
                call GroupClear(G2)
            endif
            if CircleOptions == 2 or CircleOptions == 3 then
                call GroupEnumUnitsInRange(G2, X, Y, CoS_CircleRadius(Level, 2), Condition(function CoS_HealFilter))
                call ForGroup(G2, function GroupAddGroupEnum)
            endif
            call DestroyGroup(G2)
            set G2 = null
        endif

        loop
            set U3 = FirstOfGroup(G)
            exitwhen U3 == null

            call SetWidgetLife(U3, GetWidgetLife(U3)+HealAmount)
            call DestroyEffect(AddSpecialEffectTarget(EffectPath, U3, EffectAttach))

            call GroupRemoveUnit(G, U3)
        endloop

        call DestroyGroup(G)
        set G = null
    endif

    call TimerStart(T, TimerInterval, true, function CoS_Callback)

    set U = null
    set U2 = null
    set Dummy = null
endfunction

function CoS_InitRect takes nothing returns nothing
    local timer T = GetExpiredTimer()                 //For some reason, initializing in the InitTrig
    set udg_CoS_Rect = Rect(0.00, 0.00, 0.00, 0.00)   //Is broken...
    call PauseTimer(T)
    call DestroyTimer(T)
    set T = null
endfunction

//===========================================================================
function InitTrig_Chains_of_Solidarity takes nothing returns nothing
    set gg_trg_Chains_of_Solidarity = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Chains_of_Solidarity, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_Chains_of_Solidarity, Condition(function CoS_CastConditions))
    call TriggerAddAction(gg_trg_Chains_of_Solidarity, function CoS_Cast)

    call Preload(CoS_EffectPath())
    call TimerStart(CreateTimer(), 0.10, false, function CoS_InitRect)
endfunction


The spell download can be found here.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>Put the damn spell in a scope.

And prefix your fucking functions.


Who you are replying...Me?
Then sorry, i dont know how to use scope >.>
 

Ryuu

I am back with Chocolate (:
Reaction score
64
Can you put me on the pending list? I would like to join but I'm afraid I have no time (studies you see, examinations coming) to make the spell - so if the deadline has reached and I still havent submitted you can ignore my name in that list there. ;)

My Spell name will MOST LIKELY be:
1. Holy Circle
2. Spirit of the King
3. Judgement of the King
4. Revival of Death
5. Hail of the King

The answer:
What? Don't ask me, I don't know! I already said:
>My Spell name will MOST LIKELY be! I didn't say 'Which spell name am I going to choose?'
 

FroznYoghurt

New Member
Reaction score
37
Sanctuary of Light

SanctuaryofLight1.jpg


SanctuaryofLight2.jpg


SanctuaryofLight3.jpg




Spell_Holy_DivineIntervention.gif
Sanctuary of Light
Gods hand is felt upon the earth, damaging the enemys of Sage and lowering their attack damage.
With the help of God's touch Sage opens 8 Seals of Purity creating a cleansing sanctuary where the men that fight alongside him will have their armor increased and will heal all units and damage all undead in the sanctuary on death.
In adition, if an enemy unit is slain in the sanctuary the killing unit will gain increased attack speed for a short duration. However, if a seal is destroyed, the godsent sanctuary will be vanquished. 1.5 seconds casting time


LvL 1
- 400 area of effect. 250 damage on summon, 5 point armor increase, lowers enemy attack damage by 20% and increases attack/movement speed by 40/25 on kill. Heals/damages 150/75 on death. Last 20 sec.

LvL 2 - 500 area of effect. 350 damage on summon, 10 point armor increase, lowers enemy attack damage by 30% and increases attack/movement speed by 50/35 on kill. Heals/damages 200/100 on death. Last 25 sec.

LvL 3 - 600 area of effect.450 damage on summon, 20 point armor increase, lowers enemy attack damage by 50% and increases attack/movement speed by 60/45 on kill. Heals/damages 250/125 on death. Last 30 sec.


Cooldown: 80/120/160

I know this looks somewhat like Uareanoobs spell but i assure you that i had thought of this long before he posted his spell. Thanks to ~GaLs~ for tipping me off on the custom value thingie. Thanks to Jontini for beta testing and grammar. Im not that used to jass yet so this thing might as well leak as a kitchen sink, i tried to make two of my loops leakless at lest.

Spell designed and created by FroznYoghurt <o/.
 

Attachments

  • Sanctuary Of Light.w3x
    102.2 KB · Views: 229

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>Thanks to ~GaLs~ for tipping me off on the custom value thingie
well..full credit to tinki3...he though me that..

Well..Nice spell you have...
MUI?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top