Cleric Spells

*Created by Piysta on the RealmCrafter: Community Edition forum.*

Found a ton of old scripts I made a long time ago. Here are for a healer class I was making. Enjoy. Most should work, if not all of them work I think...

## Touch of Light (Resurrection Spell)

```
Using "RC_Core.rcm"

; Shards of Antharia

; Date/Time: 2:37:57 PM on 2/11/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

THeal = MaxAttribute(Target, "Health")

THealth = Attribute(Target, "Health")

TMana = MaxAttribute(Target, "Mana")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

Effect5 = ActorHasEffect(Target, "Dead")

Cost = Mana * .25

Item = HasItem(Player, "Stone of Returning", >=1)

Does = THeal * .40

Does2 = TMana * .40

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Item = 0

    Output(Player, "Missing regeant: Stone of Returning")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

ElseIf Effect5 = 0

    Output(Player, "Target is not dead.")

    Return

Else

    If Target = 0

        Output(Player, "You have to target something to cast this spell.")

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 60

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    THealth = Attribute(Target, "Health")

                    TMana = Attribute(Target, "Mana")

                    Zone$ = ActorZone(Player)

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    GiveItem(Player, "Stone of Returning", -1)

                    SetAttribute(Target, "Health", Does)

                    SetAttribute(Target, "Mana", Does2)

                    Warp(Target, Zone$, "ReviveSpawn")

                    MoveActor(Target, X#, Y#, Z#)

                    CreateFloatingNumber(Target, Does, 0, 255, 0)

                    CreateFloatingNumber(Target, Does2, 0, 0, 255)

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Soul Renewal (Heal Over Time Spell)

```
Using "RC_Core.rcm"

; Shards of Antharia

; Date/Time: 10:23:23 PM on 2/10/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

Effect5 = ActorHasEffect(Player, "Soul Renewal")

Effect6 = ActorHasEffect(Target, "Soul Renewal")

If Level < 30

    Cost = 25

    Does = 4 + Boost

ElseIf Level >= 30

    If Level < 38

        Cost = 34

        Does = 12 + Boost

    EndIf

ElseIf Level >= 38

    IF Level < 42

        Cost = 43

        Does = 20 + Boost

    EndIf

ElseIf Level >= 42

    If Level < 50

        Cost = 52

        Does = 28 + Boost

    EndIf

ElseIf Level = 50

    Cost = 61

    Does = 36 + Boost

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

ElseIf Effect5 = 1

    Output(Player, "You already have that spell on you.")

    Return

ElseIf Effect6 = 1

    Output(Player, "Your target already has that spell on them.")

    Return

Else

    If Target = 0

        If Mana >= Cost

            Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 6, 0, "Casting: Soul Renewal")

            Clicks = 0

            X# = ActorX(Player)

            Y# = ActorY(Player)

            Z# = ActorZ(Player)

            Repeat

                Clicks = Clicks + 1

                DoEvents(250)

                NewX# = ActorX(Player)

                NewY# = ActorY(Player)

                NewZ# = ActorZ(Player)

                Health = Attribute(Player, "Health")

                Mana = Attribute(Player, "Mana")

                SetAttribute(Player, "Casting", 1)

                If NewX# <> X#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewY# <> Y#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewZ# <> Z#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Health <= 0

                    DeleteProgressBar(Player, Bar)

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Mana < Cost

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Not enough Mana.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                UpdateProgressBar(Player, Bar, Clicks)

            Until Clicks = 6

            DeleteProgressBar(Player, Bar)

            Mana = Attribute(Player, "Mana")

            SetAttribute(Player, "Mana", Mana - Cost)

            SetAttribute(Player, "Casting", 0)

            AddActorEffect(Player, "Soul Renewal", "Health", 0, 6, 1)

            DOT = 0

            Repeat

                DOT = DOT + 1

                Heal = Does

                HealthMax = MaxAttribute(Player, "Health")

                Health = Attribute(Player, "Health")

                HLTemp = Heal + Health

                DoEvents(2000)

                If HLTemp > HealthMax

                    SetAttribute(Player, "Health", HealthMax)

                    CreateFloatingNumber(Player, Heal, 0, 255, 0)

                Else

                    SetAttribute(Player, "Health", Health + Heal)

                    CreateFloatingNumber(Player, Heal, 0, 255, 0)

                EndIf

            Until DOT = 3

            Return

        Else

            Output(Player, "Not enough Mana.")

            Return

        EndIf

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 30

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 6, 0, "Casting: Soul Renewal")

                    Clicks = 0

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    R2# = ActorDistance(Player, Target)

                    Repeat

                        Clicks = Clicks + 1

                        DoEvents(250)

                        NewX# = ActorX(Player)

                        NewY# = ActorY(Player)

                        NewZ# = ActorZ(Player)

                        NewRange# = ActorDistance(Player, Target)

                        Health = Attribute(Player, "Health")

                        Mana = Attribute(Player, "Mana")

                        TargetHealthMax = MaxAttribute(Target, "Health")

                        TargetHealth = Attribute(Target, "Health")

                        SetAttribute(Player, "Casting", 1)

                        If NewX# <> X#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewY# <> Y#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewZ# <> Z#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Health <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If TargetHealth <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target has died.")

                            Return

                        EndIf

                        If NewRange# > 40

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target is out of range.")

                            Return

                        EndIf

                        If Mana < Cost

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Not enough Mana.")

                            Return

                        EndIf

                        UpdateProgressBar(Player, Bar, Clicks)

                    Until Clicks = 6

                    DeleteProgressBar(Player, Bar)

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    Heal = Does

                    TargetHealthMax = MaxAttribute(Target, "Health")

                    TargetHealth = Attribute(Target, "Health")

                    HLTemp = Heal + TargetHealth

                    SetAttribute(Player, "Casting", 0)

                    AddActorEffect(Player, "Soul Renewal", "Health", 0, 6, 1)

                    DOT = 0

                    Repeat

                        DOT = DOT + 1

                        Heal = Does

                        HealthMax = MaxAttribute(Player, "Health")

                        Health = Attribute(Player, "Health")

                        HLTemp = Heal + Health

                        DoEvents(2000)

                        If HLTemp > HealthMax

                            SetAttribute(Player, "Health", HealthMax)

                            CreateFloatingNumber(Player, Heal, 0, 255, 0)

                        Else

                            SetAttribute(Player, "Health", Health + Heal)

                            CreateFloatingNumber(Player, Heal, 0, 255, 0)

                        EndIf

                    Until DOT = 3

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Revive

```
Using "RC_Core.rcm"

; Shards of Antharia

; Date/Time: 2:20:42 PM on 2/11/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

THeal = MaxAttribute(Target, "Health")

THealth = Attribute(Target, "Health")

TMana = MaxAttribute(Target, "Mana")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

Effect5 = ActorHasEffect(Target, "Dead")

Cost = Mana * .15

Does = THeal * .20

Does2 = TMana * .20

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

ElseIf Effect5 = 0

    Output(Player, "Target is not dead.")

    Return

Else

    If Target = 0

        Output(Player, "You have to target something to cast this spell.")

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 60

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 40, 0, "Casting: Revive")

                    Clicks = 0

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    R2# = ActorDistance(Player, Target)

                    Repeat

                        Clicks = Clicks + 1

                        DoEvents(250)

                        NewX# = ActorX(Player)

                        NewY# = ActorY(Player)

                        NewZ# = ActorZ(Player)

                        Health = Attribute(Player, "Health")

                        Mana = Attribute(Player, "Mana")

                        TargetHealthMax = MaxAttribute(Target, "Health")

                        TargetHealth = Attribute(Target, "Health")

                        SetAttribute(Player, "Casting", 1)

                        If NewX# <> X#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewY# <> Y#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewZ# <> Z#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Health <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If TargetHealth > 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target has already been revived.")

                            Return

                        EndIf

                        If Mana < Cost

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Not enough Mana.")

                            Return

                        EndIf

                        UpdateProgressBar(Player, Bar, Clicks)

                    Until Clicks = 40

                    DeleteProgressBar(Player, Bar)

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    SetAttribute(Player, "Casting", 0)

                    THealth = Attribute(Target, "Health")

                    TMana = Attribute(Target, "Mana")

                    Zone$ = ActorZone(Player)

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    SetAttribute(Target, "Health", Does)

                    SetAttribute(Target, "Mana", Does2)

                    Warp(Target, Zone$, "ReviveSpawn")

                    MoveActor(Target, X#, Y#, Z#)

                    CreateFloatingNumber(Target, Does, 0, 255, 0)

                    CreateFloatingNumber(Target, Does2, 0, 0, 255)

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Life Sacrifice (Deals your HP to heal another player)

```
Using "RC_Core.rcm"

; Ithis Online

; Date/Time: 11:01:28 PM on 2/3/2012

; By Dillan Cobb on COBB-PC

Function Main()

;unables: Silenced / Arcane Morphed / Stunned / Incapacitated

;boost: Spell Damage

Player = Actor()

Target = ContextActor()

Health = Attribute(Player, "Health")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

If Level < 6

    Cost = 35

    Does = Rand(40, 50) + Boost

ElseIf Level >= 18

    If Level < 30

        Cost = 57

        Does = Rand(72, 82) + Boost

    EndIf

ElseIf Level >= 30

    IF Level < 42

        Cost = 83

        Does = Rand(98, 108) + Boost

    EndIf

ElseIf Level >= 42

    If Level < 48

        Cost = 104

        Does = Rand(139, 149) + Boost

    EndIf

ElseIf Level <= 48

    Cost = 122

    Does = Rand(167, 177) + Boost

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

Else

    If Target = 0

        Output(Player, "Unable to target self.")

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 40

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Health >= Cost

                    Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 8, 0, "Casting: Life Sacrifice")

                    Clicks = 0

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    R2# = ActorDistance(Player, Target)

                    Repeat

                        Clicks = Clicks + 1

                        DoEvents(250)

                        NewX# = ActorX(Player)

                        NewY# = ActorY(Player)

                        NewZ# = ActorZ(Player)

                        NewRange# = ActorDistance(Player, Target)

                        Health = Attribute(Player, "Health")

                        Mana = Attribute(Player, "Mana")

                        TargetHealthMax = MaxAttribute(Target, "Health")

                        TargetHealth = Attribute(Target, "Health")

                        SetAttribute(Player, "Casting", 1)

                        If NewX# <> X#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewY# <> Y#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewZ# <> Z#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Health <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If TargetHealth <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target has died.")

                            Return

                        EndIf

                        If NewRange# > 40

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target is out of range.")

                            Return

                        EndIf

                        If Health < Cost

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Not enough Health.")

                            Return

                        EndIf

                        UpdateProgressBar(Player, Bar, Clicks)

                    Until Clicks = 8

                    DeleteProgressBar(Player, Bar)

                    Health = Attribute(Player, "Health")

                    SetAttribute(Player, "Health", Health - Cost)

                    Heal = Does

                    TargetHealthMax = MaxAttribute(Target, "Health")

                    TargetHealth = Attribute(Target, "Health")

                    HLTemp = Heal + TargetHealth

                    SetAttribute(Player, "Casting", 0)

                    If HLTemp > TargetHealthMax

                        SetAttribute(Target, "Health", TargetHealthMax)

                    Else

                        SetAttribute(Target, "Health", TargetHealth + Heal)

                    EndIf

                    CreateFloatingNumber(Target, Heal, 0, 255, 0)

                    Return

                Else

                    Output(Player, "Not enough Health.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Lesser Heal

```
Using "RC_Core.rcm"

; Ithis Online

; Date/Time: 7:54:17 PM on 2/3/2012

; By Dillan Cobb on COBB-PC

Function Main()

;unables: Silenced / Arcane Morphed / Stunned / Incapacitated

;boost: Spell Damage

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

If Level < 12

    Cost = 8

    Does = Rand(10, 20) + Boost

ElseIf Level >= 12

    If Level < 26

        Cost = 16

        Does = Rand(18, 28) + Boost

    EndIf

ElseIf Level >= 26

    IF Level < 40

        Cost = 24

        Does = Rand(26, 36) + Boost

    EndIf

ElseIf Level >= 40

    If Level < 50

        Cost = 32

        Does = Rand(35, 45) + Boost

    EndIf

ElseIf Level = 50

    Cost = 40

    Does = Rand(42, 52) + Boost

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

Else

    If Target = 0

        If Mana >= Cost

            Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 6, 0, "Casting: Lesser Heal")

            Clicks = 0

            X# = ActorX(Player)

            Y# = ActorY(Player)

            Z# = ActorZ(Player)

            Repeat

                Clicks = Clicks + 1

                DoEvents(250)

                NewX# = ActorX(Player)

                NewY# = ActorY(Player)

                NewZ# = ActorZ(Player)

                Health = Attribute(Player, "Health")

                Mana = Attribute(Player, "Mana")

                SetAttribute(Player, "Casting", 1)

                If NewX# <> X#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewY# <> Y#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewZ# <> Z#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Health <= 0

                    DeleteProgressBar(Player, Bar)

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Mana < Cost

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Not enough Mana.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                UpdateProgressBar(Player, Bar, Clicks)

            Until Clicks = 6

            DeleteProgressBar(Player, Bar)

            Mana = Attribute(Player, "Mana")

            SetAttribute(Player, "Mana", Mana - Cost)

            Heal = Does

            HealthMax = MaxAttribute(Player, "Health")

            Health = Attribute(Player, "Health")

            HLTemp = Heal + Health

            SetAttribute(Player, "Casting", 0)

            If HLTemp > HealthMax

                SetAttribute(Player, "Health", HealthMax)

            Else

                SetAttribute(Player, "Health", Health + Heal)

            EndIf

            CreateFloatingNumber(Player, Heal, 0, 255, 0)

            Return

        Else

            Output(Player, "Not enough Mana.")

            Return

        EndIf

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 40

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 6, 0, "Casting: Lesser Heal")

                    Clicks = 0

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    R2# = ActorDistance(Player, Target)

                    Repeat

                        Clicks = Clicks + 1

                        DoEvents(250)

                        NewX# = ActorX(Player)

                        NewY# = ActorY(Player)

                        NewZ# = ActorZ(Player)

                        NewRange# = ActorDistance(Player, Target)

                        Health = Attribute(Player, "Health")

                        Mana = Attribute(Player, "Mana")

                        TargetHealthMax = MaxAttribute(Target, "Health")

                        TargetHealth = Attribute(Target, "Health")

                        SetAttribute(Player, "Casting", 1)

                        If NewX# <> X#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewY# <> Y#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewZ# <> Z#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Health <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If TargetHealth <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target has died.")

                            Return

                        EndIf

                        If NewRange# > 40

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Target is out of range.")

                            Return

                        EndIf

                        If Mana < Cost

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Not enough Mana.")

                            Return

                        EndIf

                        UpdateProgressBar(Player, Bar, Clicks)

                    Until Clicks = 6

                    DeleteProgressBar(Player, Bar)

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    Heal = Does

                    TargetHealthMax = MaxAttribute(Target, "Health")

                    TargetHealth = Attribute(Target, "Health")

                    HLTemp = Heal + TargetHealth

                    SetAttribute(Player, "Casting", 0)

                    If HLTemp > TargetHealthMax

                        SetAttribute(Target, "Health", TargetHealthMax)

                    Else

                        SetAttribute(Target, "Health", TargetHealth + Heal)

                    EndIf

                    CreateFloatingNumber(Target, Heal, 0, 255, 0)

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Greater Heal

```
Using "RC_Core.rcm"

; Ithis Online

; Date/Time: 9:58:01 PM on 2/3/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

If Level < 14

    Cost = 28

    Does = Rand(36, 46) + Boost

ElseIf Level >= 14

    If Level < 22

        Cost = 40

        Does = Rand(59, 69) + Boost

    EndIf

ElseIf Level >= 22

    IF Level < 34

        Cost = 52

        Does = Rand(81, 91) + Boost

    EndIf

ElseIf Level >= 34

    If Level < 44

        Cost = 64

        Does = Rand(95, 105) + Boost

    EndIf

ElseIf Level = 50

    Cost = 76

    Does = Rand(122, 132) + Boost

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

Else

    If Target = 0

        If Mana >= Cost

            Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 12, 0, "Casting: Greater Heal")

            Clicks = 0

            X# = ActorX(Player)

            Y# = ActorY(Player)

            Z# = ActorZ(Player)

            Repeat

                Clicks = Clicks + 1

                DoEvents(250)

                NewX# = ActorX(Player)

                NewY# = ActorY(Player)

                NewZ# = ActorZ(Player)

                Health = Attribute(Player, "Health")

                Mana = Attribute(Player, "Mana")

                SetAttribute(Player, "Casting", 1)

                If NewX# <> X#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewY# <> Y#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewZ# <> Z#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Health <= 0

                    DeleteProgressBar(Player, Bar)

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Mana < Cost

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Not enough Mana.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                UpdateProgressBar(Player, Bar, Clicks)

            Until Clicks = 12

            DeleteProgressBar(Player, Bar)

            Mana = Attribute(Player, "Mana")

            SetAttribute(Player, "Mana", Mana - Cost)

            Heal = Does

            HealthMax = MaxAttribute(Player, "Health")

            Health = Attribute(Player, "Health")

            HLTemp = Heal + Health

            SetAttribute(Player, "Casting", 0)

            If HLTemp > HealthMax

                SetAttribute(Player, "Health", HealthMax)

            Else

                SetAttribute(Player, "Health", Health + Heal)

            EndIf

            CreateFloatingNumber(Player, Heal, 0, 255, 0)

            Return

        Else

            Output(Player, "Not enough Mana.")

            Return

        EndIf

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 40

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 12, 0, "Casting: Greater Heal")

                    Clicks = 0

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    R2# = ActorDistance(Player, Target)

                    Repeat

                        Clicks = Clicks + 1

                        DoEvents(250)

                        NewX# = ActorX(Player)

                        NewY# = ActorY(Player)

                        NewZ# = ActorZ(Player)

                        NewRange# = ActorDistance(Player, Target)

                        Health = Attribute(Player, "Health")

                        Mana = Attribute(Player, "Mana")

                        TargetHealthMax = MaxAttribute(Target, "Health")

                        TargetHealth = Attribute(Target, "Health")

                        SetAttribute(Player, "Casting", 1)

                        If NewX# <> X#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewY# <> Y#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewZ# <> Z#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Health <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If TargetHealth <= 0

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Target has died.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewRange# > 40

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Target is out of range.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Mana < Cost

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Not enough Mana.")

                            Return

                        EndIf

                        UpdateProgressBar(Player, Bar, Clicks)

                    Until Clicks = 12

                    DeleteProgressBar(Player, Bar)

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    Heal = Does

                    TargetHealthMax = MaxAttribute(Target, "Health")

                    TargetHealth = Attribute(Target, "Health")

                    HLTemp = Heal + TargetHealth

                    SetAttribute(Player, "Casting", 0)

                    If HLTemp > TargetHealthMax

                        SetAttribute(Target, "Health", TargetHealthMax)

                    Else

                        SetAttribute(Target, "Health", TargetHealth + Heal)

                    EndIf

                    CreateFloatingNumber(Target, Heal, 0, 255, 0)

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Full Heal

```
Using "RC_Core.rcm"

; Ithis Online

; Date/Time: 10:49:23 PM on 2/3/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

MaxMana = MaxAttribute(Player, "Mana")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

TotalCost1 = Mana * .65

If Level >= 24

    If Level < 48

    Cost = MaxMana * .65

ElseIf Level >= 48

    Cost = MaxMana * .45

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

Else

    If Target = 0

        If Mana >= Cost

            Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 24, 0, "Casting: Full Heal")

            Clicks = 0

            X# = ActorX(Player)

            Y# = ActorY(Player)

            Z# = ActorZ(Player)

            Repeat

                Clicks = Clicks + 1

                DoEvents(250)

                NewX# = ActorX(Player)

                NewY# = ActorY(Player)

                NewZ# = ActorZ(Player)

                Health = Attribute(Player, "Health")

                Mana = Attribute(Player, "Mana")

                SetAttribute(Player, "Casting", 1)

                If NewX# <> X#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewY# <> Y#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewZ# <> Z#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Health <= 0

                    DeleteProgressBar(Player, Bar)

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Mana < Cost

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Not enough Mana.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                UpdateProgressBar(Player, Bar, Clicks)

            Until Clicks = 24

            DeleteProgressBar(Player, Bar)

            Mana = Attribute(Player, "Mana")

            SetAttribute(Player, "Mana", Mana - Cost)

            Health = Attribute(Player, "Health")

            MaxHealth = Attribute(Player, "Health")

            SetAttribute(Player, Health, MaxHealth)

            SetAttribute(Player, "Casting", 0)

            CreateFloatingNumber(Player, MaxHealth, 0, 255, 0)

            Return

        Else

            Output(Player, "Not enough Mana.")

            Return

        EndIf

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 20

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 25, 0, "Casting: Full Heal")

                    Clicks = 0

                    X# = ActorX(Player)

                    Y# = ActorY(Player)

                    Z# = ActorZ(Player)

                    R2# = ActorDistance(Player, Target)

                    Repeat

                        Clicks = Clicks + 1

                        DoEvents(250)

                        NewX# = ActorX(Player)

                        NewY# = ActorY(Player)

                        NewZ# = ActorZ(Player)

                        NewRange# = ActorDistance(Player, Target)

                        Health = Attribute(Player, "Health")

                        Mana = Attribute(Player, "Mana")

                        TargetHealthMax = MaxAttribute(Target, "Health")

                        TargetHealth = Attribute(Target, "Health")

                        SetAttribute(Player, "Casting", 1)

                        If NewX# <> X#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewY# <> Y#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewZ# <> Z#

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Spell canceled.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Health <= 0

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If TargetHealth <= 0

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Target has died.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If NewRange# > 20

                            DeleteProgressBar(Player, Bar)

                            Output(Player, "Target is out of range.")

                            SetAttribute(Player, "Casting", 0)

                            Return

                        EndIf

                        If Mana < Cost

                            DeleteProgressBar(Player, Bar)

                            SetAttribute(Player, "Casting", 0)

                            Output(Player, "Not enough Mana.")

                            Return

                        EndIf

                        UpdateProgressBar(Player, Bar, Clicks)

                    Until Clicks = 25

                    DeleteProgressBar(Player, Bar)

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    TargetHealth = Attribute(Target, "Health")

                    MaxHealth = Attribute(Target, "Health")

                    SetAttribute(Target, TargetHealth, TargetMaxHealth)

                    SetAttribute(Player, "Casting", 0)

                    CreateFloatingNumber(Player, MaxHealth, 0, 255, 0)

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Divine Protection (Adds buff to a target so that they don't take damage)

```
Using "RC_Core.rcm"

; Shards of Antharia

; Date/Time: 2:02:25 PM on 2/11/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Level = ActorLevel(Player)

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

Effect5 = ActorHasEffect(Player, "Divine Protection 1")

Effect6 = ActorHasEffect(Player, "Divine Protection 2")

Effect7 = ActorHasEffect(Player, "Divine Protection 3")

Effect8 = ActorHasEffect(Target, "Divine Protection 1")

Effect9 = ActorHasEffect(Target, "Divine Protection 2")

Effect10 = ActorHasEffect(Target, "Divine Protection 3")

If Level < 26

    Cost = Mana * .25

    Rank = 1

ElseIf Level >= 26

    If Level < 38

        Cost = Mana * .15

        Rank = 2

    EndIf

ElseIf Level >= 38

    Cost = Mana * .5

    Rank = 3

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

ElseIf Effect5 = 1

    Output(Player, "You already have that spell on you.")

    Return

ElseIf Effect6 = 1

    Output(Player, "You already have that spell on you.")

    Return

ElseIf Effect7 = 1

    Output(Player, "You already have that spell on you.")

    Return

ElseIf Effect8 = 1

    Output(Player, "Target already has that spell on you.")

    Return

ElseIf Effect9 = 1

    Output(Player, "Target already has that spell on you.")

    Return

ElseIf Effect10 = 1

    Output(Player, "Target already has that spell on you.")

    Return

Else

    If Target = 0

        If Mana >= Cost

            Mana = Attribute(Player, "Mana")

            SetAttribute(Player, "Mana", Mana - Cost)

            If Rank = 1

                AddActorEffect(Player, "Divine Protection 1", "Health", 0, 10, 1)

            ElseIf Rank = 2

                AddActorEffect(Player, "Divine Protection 2", "Health", 0, 10, 1)

            ElseIf Rank = 3

                AddActorEffect(Player, "Divine Protection 3", "Health", 0, 10, 1)

            EndIf

            Return

        Else

            Output(Player, "Not enough Mana.")

            Return

        EndIf

        Return

    Else

        TargetFaction$ = HomeFaction(Target)

        Faction$ = HomeFaction(Player)

        Rating# = FactionRating(Player, TargetFaction)

        If Range# > 40

            Output(Player, "Target is out of range.")

            Return

        Else

            If Faction <> TargetFaction

                Output(Player, "Can not target enemy faction.")

                Return

            Else

                If Mana >= Cost

                    Mana = Attribute(Player, "Mana")

                    SetAttribute(Player, "Mana", Mana - Cost)

                    If Rank = 1

                        AddActorEffect(Target, "Divine Protection 1", "Health", 0, 10, 1)

                    ElseIf Rank = 2

                        AddActorEffect(Target, "Divine Protection 2", "Health", 0, 10, 1)

                    ElseIf Rank = 3

                        AddActorEffect(Target, "Divine Protection 3", "Health", 0, 10, 1)

                    EndIf

                    Return

                Else

                    Output(Player, "Not enough Mana.")

                    Return

                EndIf

                Return

            EndIf

        EndIf

    EndIf

EndIf

Return

End Function

```

## Circle Of Life (AOE Heal)

```
Using "RC_Core.rcm"

; Shards of Antharia

; Date/Time: 2:47:47 PM on 2/11/2012

; By Dillan Cobb on COBB-PC

Function Main()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

If Level < 26

    Cost = 22

    Does = Rand(13, 23) + Boost

ElseIf Level >= 26

    If Level < 38

        Cost = 29

        Does = Rand(22, 32) + Boost

    EndIf

ElseIf Level >= 38

    IF Level < 44

        Cost = 36

        Does = Rand(31, 41) + Boost

    EndIf

ElseIf Level >= 44

    If Level < 50

        Cost = 43

        Does = Rand(40, 50) + Boost

    EndIf

ElseIf Level = 50

    Cost = 50

    Does = Rand(49, 59) + Boost

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

Else

    If Mana < Cost

        Output(Player, "Not enough mana.")

    Else

        SetAttribute(Player, "Mana", Mana - Cost)

        Health = Attribute(Player, "Health")

        MaxHP = MaxAttribute(Player, "Health")

        Heal = Health + Does

        If Heal > Health

            SetAttribute(Player, "Health", MaxHP

            CreateFloatingNumber(Player, Does, 0, 255, 0)

            Return

        Else

            SetAttribute(Player, "Health", Heal)

            CreateFloatingNumber(Player, Does, 0, 255, 0)

        EndIf

        Zone$ = ActorZone(Player)

        First$ = FirstActorInZone(Zone$, 0)

        Range# = ActorDistance(Player, First$)

        FirstHP = Attribute(First$, "Health")

        FirstMAXHP = MaxAttribute(First$, "Health")

        FirstHeal = FirstHP + Does

        If Range <= 20

            If FirstHeal > FirstMAXHP

                SetAttribute(First$, "Health", FirstMAXHP)

                CreateFloatingNumber(First$, Does, 0, 255, 0)

            Else

                SetAttribute(First$, "Health", FirstHeal)

                CreateFloatingNumber(First$, Does, 0, 255, 0)

            EndIf

            Target = NextActorInZone(First$)

            Cast = 0

            Repeat

                TargetHP = Attribute(Target, "Health")

                TargetMAXHP = MaxAttribute(Target, "Health")

                TargetHeal = TargetHP + Does

                Range# = ActorDistance(Player, Target)

                If Range <= 20

                    If TargetHeal > TargetMAXHP

                        SetAttribute(Target, "Health", TargetMAXHP)

                        CreateFloatingNumber(Target, Does, 0, 255, 0)

                    Else

                        SetAttribute(Target, "Health", TargetHeal)

                        CreateFloatingNumber(Target, Does, 0, 255, 0)

                    EndIf

                EndIf

                Target = NextActorInZone(Target)

                TargetHP = Attribute(Target, "Health")

                TargetMAXHP = MaxAttribute(Target, "Health")

                TargetHeal = TargetHP + Does

            Until Cast = 40

            Return

        EndIf

    EndIf

EndIf

Return

End Function

```

## Chalice Of Life (Clone of the Lightwell spell in Vanilla WoW)

```
Using "RC_Core.rcm"

; Ithis Online

; Date/Time: 10:32:27 PM on 2/3/2012

; By Dillan Cobb on COBB-PC

Function Main()

;unables: Silenced / Arcane Morphed / Stunned / Incapacitated

;boost: Spell Damage

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Boost = Attribute(Player, "Spell Damage")

Level = ActorLevel(Player)

Cast = Attribute(Player, "Casting")

Effect1 = ActorHasEffect(Player, "Silenced")

Effect2 = ActorHasEffect(Player, "Arcane Morphed")

Effect3 = ActorHasEffect(Player, "Stunned")

Effect4 = ActorHasEffect(Player, "Incapacitated")

If Level < 18

    Cost = 32

    Rank = 1

ElseIf Level >= 32

    If Level < 46

        Cost = 40

        Rank = 2

    EndIf

ElseIf Level = 46

        Cost = 48

        Rank = 3

EndIf

If Cast = 1

    Output(Player, "You are already casting a spell.")

    Return

EndIf

If Effect1 = 1

    Output(Player, "You are silenced.")

    Return

ElseIf Effect2 = 1

    Output(Player, "You are morphed.")

    Return

ElseIf Effect3 = 1

    Output(Player, "You are stunned.")

    Return

ElseIf Effect4 = 1

    Output(Player, "You are incapacitated.")

    Return

Else

    If HasItem(Player, "Holy Chalice", >=1)

        If Mana >= Cost

            Bar = CreateProgressBar(Player, 0, 0, 255, 0.4, 0.7, 0.2, 0.025, 16, 0, "Casting: Chalice of Light")

            Clicks = 0

            X# = ActorX(Player)

            Y# = ActorY(Player)

            Z# = ActorZ(Player)

            Repeat

                Clicks = Clicks + 1

                DoEvents(250)

                NewX# = ActorX(Player)

                NewY# = ActorY(Player)

                NewZ# = ActorZ(Player)

                Health = Attribute(Player, "Health")

                Mana = Attribute(Player, "Mana")

                SetAttribute(Player, "Casting", 1)

                If NewX# <> X#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewY# <> Y#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If NewZ# <> Z#

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Spell canceled.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Health <= 0

                    DeleteProgressBar(Player, Bar)

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                If Mana < Cost

                    DeleteProgressBar(Player, Bar)

                    Output(Player, "Not enough Mana.")

                    SetAttribute(Player, "Casting", 0)

                    Return

                EndIf

                UpdateProgressBar(Player, Bar, Clicks)

            Until Clicks = 16

            DeleteProgressBar(Player, Bar)

            Mana = Attribute(Player, "Mana")

            SetAttribute(Player, "Mana", Mana - Cost)

            SetAttribute(Player, "Casting", 0)

            GiveItem(Player, "Holy Chalice", -1)

            If Rank = 1

                ID = ActorId("Cleric", "CoL1")

                COL = Spawn(ID, ActorZone(Player, NewX, NewY, NewZ, "CHALICEOFLIGHT")

                PName$ = Name(Player)

                SetName(COL, "Chalice of Light")

                SetTag(COL, PName + "'s Chalice of Light")

            ElseIf Rank = 2

                ID = ActorId("Cleric", "CoL2")

                COL = Spawn(ID, ActorZone(Player, NewX, NewY, NewZ, "CHALICEOFLIGHT")

                PName$ = Name(Player)

                SetName(COL, "Chalice of Light")

                SetTag(COL, PName + "'s Chalice of Light")

            ElseIf

                ID = ActorId("Cleric", "CoL3")

                COL = Spawn(ID, ActorZone(Player, NewX, NewY, NewZ, "CHALICEOFLIGHT")

                PName$ = Name(Player)

                SetName(COL, "Chalice of Light")

                SetTag(COL, PName + "'s Chalice of Light")

            EndIf

            Return

        Else

            Output(Player, "Not enough Mana.")

            Return

        EndIf

    Else

        Output(Player, "You do not have required regeants.")

    EndIf

Return

End Function

```

## Preacher's Voice (Removes the silenced debuff)

```
Using "RC_Core.rcm"

; Ithis Online

; Date/Time: 9:59:26 AM on 1/11/2011

; By Dillan Cobb on COBB-PC

Function Main()

;-Removes Silence

;-Cast time: instant

;-obtainable at: 22

;-costs: 25 mana

;-range: 40

End Function

Function Rank1()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Faction$ = HomeFaction(Player)

TargetFaction$ = HomeFaction(Target)

Silence = ActorHasEffect(Player, "Silence")

If Silence = 0

    If Target = 0

        If Mana > 25

            SetAttribute(Player, "Mana", Mana - 25)

            DeleteActorEffect(Player, "Silenced")

            Return

        Else

            Output(Player, "Not enough mana.")

            Return

        EndIf

    Else

        If Range < 40

            If Faction = TargetFaction

                If Mana > 25

                    SetAttribute(Player, "Mana", Mana - 25)

                    DeleteActorEffect(Target, "Silenced")

                    Return)

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            Else

                If Mana > 25

                    SetAttribute(Player, "Mana", Mana - 25)

                    DeleteActorEffect(Player, "Silenced")

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            EndIf

        Else

            Output(Player, "Target is out of range.")

            Return

        EndIf

    EndIf

Else

    Output(Player, "Unable to cast.")

    Return

EndIf

Return

End Function

```

## Divine Mage (Boosts a player's magic damage)

```
Using "RC_Core.rcm"

```

```
; Ithis Online

; Date/Time: 10:09:08 AM on 1/11/2011

; By Dillan Cobb on COBB-PC

Function Main()

;-Increases magic damage

;-Cast time: instant

;-Obtainable at: 16/24/32/40/48

;-Costs: 21/27/33/39/45

;-Does: +3/6/9/12/15

;-Range: 40

End Function

Function Rank1()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Faction$ = HomeFaction(Player)

TargetFaction$ = HomeFaction(Target)

Silence = ActorHasEffect(Player, "Silence")

Effect2 = ActorHasEffect(Player, "Divine Magic - Rank 2")

Effect3 = ActorHasEffect(Player, "Divine Magic - Rank 3")

Effect4 = ActorHasEffect(Player, "Divine Magic - Rank 4")

Effect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

TEffect2 = ActorHasEffect(Player, "Divine Magic - Rank 2")

TEffect3 = ActorHasEffect(Player, "Divine Magic - Rank 3")

TEffect4 = ActorHasEffect(Player, "Divine Magic - Rank 4")

TEffect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

CheckEffect = ActorHasEffect(Player, "Divine Magic - Rank 1")

TCheckEffect = ActorHasEffect(Target, "Divine Magic - Rank 1")

If Silence = 0

    If Target = 0

        If Effect2 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        ElseIf Effect3 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        ElseIf Effect4 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        ElseIf Effect5 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        Else

            If EffectCheck = 0

                If Mana > 21

                    SetAttribute(Player, "Mana", Mana - 21)

                    AddActorEffect(Player, "Divine Magic - Rank 1", "Magic Boost", +3, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            Else

                If Mana > 21

                    SetAttribute(Player, "Mana", Mana - 21)

                    DeleteActorEffect(Player, "Divine Magic - Rank 1")

                    AddActorEffect(Player, "Divine Magic - Rank 1"), "Magic Boost", +3, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            EndIf

        EndIf

    Else

        If Range < 40

            If Faction = TargetFaction

                If TEffect2 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                ElseIf TEffect3 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                ElseIf TEffect4 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                ElseIf TEffect5 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                Else

                    If TEffectCheck = 0

                        If Mana > 21

                            SetAttribute(Player, "Mana", Mana - 21)

                            AddActorEffect(Target, "Divine Magic - Rank 1", "Magic Boost", +3, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    Else

                        If Mana > 21

                            SetAttribute(Player, "Mana", Mana - 21)

                            DeleteActorEffect(Target, "Divine Magic - Rank 1")

                            AddActorEffect(Target, "Divine Magic - Rank 1"), "Magic Boost", +3, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    EndIf

                    Else

                        Output(Player, "Can not cast this at target faction.")

                        Return

                    EndIf

                Else

                    Output(Player, "Target is out of range.")

                    Return

                EndIf

            EndIf

Else

    Output(Player, "Unable to cast.")

    Return

EndIf

Return

End Function

Function Rank2()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Faction$ = HomeFaction(Player)

TargetFaction$ = HomeFaction(Target)

Silence = ActorHasEffect(Player, "Silence")

Effect3 = ActorHasEffect(Player, "Divine Magic - Rank 3")

Effect4 = ActorHasEffect(Player, "Divine Magic - Rank 4")

Effect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

TEffect3 = ActorHasEffect(Player, "Divine Magic - Rank 3")

TEffect4 = ActorHasEffect(Player, "Divine Magic - Rank 4")

TEffect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

CheckEffect = ActorHasEffect(Player, "Divine Magic - Rank 2")

TCheckEffect = ActorHasEffect(Target, "Divine Magic - Rank 2")

If Silence = 0

    If Target = 0

        If Effect3 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        ElseIf Effect4 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        ElseIf Effect5 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        Else

            If EffectCheck = 0

                If Mana > 27

                    SetAttribute(Player, "Mana", Mana - 27)

                    AddActorEffect(Player, "Divine Magic - Rank 2", "Magic Boost", +6, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            Else

                If Mana > 27

                    SetAttribute(Player, "Mana", Mana - 27)

                    DeleteActorEffect(Player, "Divine Magic - Rank 2")

                    AddActorEffect(Player, "Divine Magic - Rank 2"), "Magic Boost", +6, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            EndIf

        EndIf

    Else

        If Range < 40

            If Faction = TargetFaction

                If TEffect3 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                ElseIf TEffect4 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                ElseIf TEffect5 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                Else

                    If TEffectCheck = 0

                        If Mana > 27

                            SetAttribute(Player, "Mana", Mana - 27)

                            AddActorEffect(Target, "Divine Magic - Rank 2", "Magic Boost", +6, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    Else

                        If Mana > 27

                            SetAttribute(Player, "Mana", Mana - 27)

                            DeleteActorEffect(Target, "Divine Magic - Rank 2")

                            AddActorEffect(Target, "Divine Magic - Rank 2"), "Magic Boost", +6, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    EndIf

                    Else

                        Output(Player, "Can not cast this at target faction.")

                        Return

                    EndIf

                Else

                    Output(Player, "Target is out of range.")

                    Return

                EndIf

            EndIf

Else

    Output(Player, "Unable to cast.")

    Return

EndIf

Return

End Function

Function Rank3()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Faction$ = HomeFaction(Player)

TargetFaction$ = HomeFaction(Target)

Silence = ActorHasEffect(Player, "Silence")

Effect4 = ActorHasEffect(Player, "Divine Magic - Rank 4")

Effect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

TEffect4 = ActorHasEffect(Player, "Divine Magic - Rank 4")

TEffect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

CheckEffect = ActorHasEffect(Player, "Divine Magic - Rank 3")

TCheckEffect = ActorHasEffect(Target, "Divine Magic - Rank 3")

If Silence = 0

    If Target = 0

        If Effect2 = 1

        If Effect4 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        ElseIf Effect5 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        Else

            If EffectCheck = 0

                If Mana > 33

                    SetAttribute(Player, "Mana", Mana - 33)

                    AddActorEffect(Player, "Divine Magic - Rank 3", "Magic Boost", +9, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            Else

                If Mana > 33

                    SetAttribute(Player, "Mana", Mana - 33)

                    DeleteActorEffect(Player, "Divine Magic - Rank 3")

                    AddActorEffect(Player, "Divine Magic - Rank 3"), "Magic Boost", +9, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            EndIf

        EndIf

    Else

        If Range < 40

            If Faction = TargetFaction

                If TEffect4 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                ElseIf TEffect5 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                Else

                    If TEffectCheck = 0

                        If Mana > 33

                            SetAttribute(Player, "Mana", Mana - 33)

                            AddActorEffect(Target, "Divine Magic - Rank 3", "Magic Boost", +9, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    Else

                        If Mana > 33

                            SetAttribute(Player, "Mana", Mana - 33)

                            DeleteActorEffect(Target, "Divine Magic - Rank 3")

                            AddActorEffect(Target, "Divine Magic - Rank 3"), "Magic Boost", +9, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    EndIf

                    Else

                        Output(Player, "Can not cast this at target faction.")

                        Return

                    EndIf

                Else

                    Output(Player, "Target is out of range.")

                    Return

                EndIf

            EndIf

Else

    Output(Player, "Unable to cast.")

    Return

EndIf

Return

End Function

Function Rank4()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Faction$ = HomeFaction(Player)

TargetFaction$ = HomeFaction(Target)

Silence = ActorHasEffect(Player, "Silence")

Effect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

TEffect5 = ActorHasEffect(Player, "Divine Magic - Rank 5")

CheckEffect = ActorHasEffect(Player, "Divine Magic - Rank 4")

TCheckEffect = ActorHasEffect(Target, "Divine Magic - Rank 4")

If Silence = 0

    If Target = 0

        If Effect5 = 1

            Output(Player, "You have a more powerful version currently on you.")

            Return

        Else

            If EffectCheck = 0

                If Mana > 27

                    SetAttribute(Player, "Mana", Mana - 39)

                    AddActorEffect(Player, "Divine Magic - Rank 4", "Magic Boost", +12, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            Else

                If Mana > 27

                    SetAttribute(Player, "Mana", Mana - 39)

                    DeleteActorEffect(Player, "Divine Magic - Rank 4")

                    AddActorEffect(Player, "Divine Magic - Rank 4"), "Magic Boost", +12, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            EndIf

        EndIf

    Else

        If Range < 40

            If Faction = TargetFaction

                If TEffect5 = 1

                    Output(Player, "Target has a more powerful version currently on him/her.")

                    Return

                Else

                    If TEffectCheck = 0

                        If Mana > 39

                            SetAttribute(Player, "Mana", Mana - 39)

                            AddActorEffect(Target, "Divine Magic - Rank 4", "Magic Boost", +12, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    Else

                        If Mana > 39

                            SetAttribute(Player, "Mana", Mana - 39)

                            DeleteActorEffect(Target, "Divine Magic - Rank 4")

                            AddActorEffect(Target, "Divine Magic - Rank 4"), "Magic Boost", +12, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    EndIf

                    Else

                        Output(Player, "Can not cast this at target faction.")

                        Return

                    EndIf

                Else

                    Output(Player, "Target is out of range.")

                    Return

                EndIf

            EndIf

Else

    Output(Player, "Unable to cast.")

    Return

EndIf

Return

End Function

Function Rank5()

Player = Actor()

Target = ContextActor()

Mana = Attribute(Player, "Mana")

Range# = ActorDistance(Player, Target)

Faction$ = HomeFaction(Player)

TargetFaction$ = HomeFaction(Target)

Silence = ActorHasEffect(Player, "Silence")

CheckEffect = ActorHasEffect(Player, "Divine Magic - Rank 5")

TCheckEffect = ActorHasEffect(Target, "Divine Magic - Rank 5")

If Silence = 0

    If Target = 0

            If EffectCheck = 0

                If Mana > 45

                    SetAttribute(Player, "Mana", Mana - 45)

                    AddActorEffect(Player, "Divine Magic - Rank 5", "Magic Boost", +15, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            Else

                If Mana > 27

                    SetAttribute(Player, "Mana", Mana - 45)

                    DeleteActorEffect(Player, "Divine Magic - Rank 5")

                    AddActorEffect(Player, "Divine Magic - Rank 5"), "Magic Boost", +15, 600, 1)

                    Return

                Else

                    Output(Player, "Not enough mana.")

                    Return

                EndIf

            EndIf

    Else

        If Range < 40

            If Faction = TargetFaction

                    If TEffectCheck = 0

                        If Mana > 45

                            SetAttribute(Player, "Mana", Mana - 45)

                            AddActorEffect(Target, "Divine Magic - Rank 5", "Magic Boost", +15, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

                    Else

                        If Mana > 45

                            SetAttribute(Player, "Mana", Mana - 45)

                            DeleteActorEffect(Target, "Divine Magic - Rank 5")

                            AddActorEffect(Target, "Divine Magic - Rank 5"), "Magic Boost", +15, 600, 1)

                            Return

                        Else

                            Output(Player, "Not enough mana.")

                            Return

                        EndIf

            Else

                Output(Player, "Can not cast this at target faction.")

                Return

            EndIf

        Else

            Output(Player, "Target is out of range.")

            Return

        EndIf

    EndIf

Else

    Output(Player, "Unable to cast.")

    Return

EndIf

Return

End Function

```