Vamp Fly Ability Script

*Created by Taz*

```
Using "RC_Core.rcm"
; Morgance Online 0.1
; Date/Time: 9:28:37 PM on 7/18/2012
; By Dan Seguin on TAZCO-PC

Function Main()
Player = Actor()
ActorZoneCheck$ = ActorZone(Player)
Vampfly% = ActorId("Vampire Flying", "Form")
Vamp% = ActorId("Vampire", "Form")
Human% = ActorId("Human", "")
;IsVamp% = ActorHasEffect(Player, "Vampirism")
IsVampfly% = ActorHasEffect(Player, "Vampire Fly")

  	; If (IsVamp = 0)
        ;If (IsVampfly = 0)
       ;     OutPUt(Player, "You can not fly, unless you are in vampire form.")
      ;      Return
     ;   Endif
     ; Endif
 ;--------------------------------Vampire Check----------------------------------------------------------------------------------
 ;If vamp dont tell player they cant use a pet in this form
                IsVamp% = ActorId("Vampire", "Form")
                PRace$ = Race(Player)
                PClass$ = Class(Player)
                PlayerID% =ActorID(PRace, PClass)

                            If (IsVampfly = 1) ; if vamp flying allow ability couse they are still a vampire.
                                PlayerID% = ActorId("Vampire", "Form")
                            EndIf

                If Not (IsVamp = PlayerID) ;if player is not a vampire
                    ;check what form they are in.
                IsSaber% = ActorHasEffect(Player, "Saber")
                IsSAberCat% = ActorHasEffect(Player, "Saber Cat")

                    If (IsSaber = 1) ;in saber form tell player.
                    ;player is in saber form used in speed check

                    OutPut(Player, "You can not use a vampire abiility in saber form.", 255, 34, 12)
                    Return
                    ElseIf (IsSAberCat = 1)
                        ;player is in saber cat form used in speed check

                        OutPut(Player, "You can not use a vampire abiility in saber cat form.", 255, 34, 12)
                        Return
                    Else ;until other fors are added player must be human so tell them.

                            OutPut(Player, "You can not use a vampire abiility in human form.", 255, 34, 12)
                            Return
                    EndIf

                EndIf
;----------------------------End Vampire Check----------------------------------------------------------------------------------

VampBlood% = Attribute(Player, "Blood")
AbilityCost% = 65

TotBloodCost% = VampBlood - AbilityCost

 If(IsVampfly = 0) ;Output(Player, "U are now in vampire form.")

      If (VampBlood < 45)
        OutPut(Player, "You do not have enough blood to fly")
        Return
      EndIf

     DeleteActorEffect(Player, "Vampirism")
	AddActorEffect(Player, "Vampire Fly", "", 0, 0, 522)
	ChangeActor(Player, Vampfly)

     PlayerX% = ActorX(Player)
    PlayerY% = ActorY(PLayer) + 1
    PlayerZ% = ActorZ(Player)

 ;-----------------------------------------------------------------------------------------------------------
    ;Set changes to delimiter for zone entry

             HealthStat% = Split(ActorGlobal(Player, 3), 1, "|")
            ManaStat% = Split(ActorGlobal(Player, 3), 2, "|")
            StrStat% = Split(ActorGlobal(Player, 3), 3, "|")
            TouStat% = Split(ActorGlobal(Player, 3), 4, "|")
            DefStat% = Split(ActorGlobal(Player, 3), 5, "|")
            AgiStat% = Split(ActorGlobal(Player, 3), 6, "|")
            WizStat% = Split(ActorGlobal(Player, 3), 7, "|")
            StatsCurr% = Split(ActorGlobal(Player, 3), 8, "|")
            StBak% = Split(ActorGlobal(Player, 3), 9, "|")
            RepCurr% = Split(ActorGlobal(Player, 3), 10, "|")     ;player rep
            Gamble% = Split(ActorGlobal(Player, 3), 11, "|")      ;used in gambling
            ClassStored% = Split(ActorGlobal(Player, 3), 12, "|") ;stores melee, ranging and magic
            InOutCombat% = Split(ActorGlobal(Player, 3), 13, "|")  ;use in tracker in and out of combat
            ;extra delimters for things that mybe needed later.
            Extra1% = Split(ActorGlobal(Player, 3), 14, "|")
            Extra2% = Split(ActorGlobal(Player, 3), 15, "|")
            Extra3% = Split(ActorGlobal(Player, 3), 16, "|")
            Extra4% = 5 ;Using to check if trasmorming for entry scripts. if = to 5 then dont run zone entery
            Extra5% = Split(ActorGlobal(Player, 3), 18, "|")
            Extra6% = Split(ActorGlobal(Player, 3), 19, "|")
            Extra7% = Split(ActorGlobal(Player, 3), 20, "|")
            Extra8% = Split(ActorGlobal(Player, 3), 21, "|")

        SetActorGlobal(Player, 3, OtherThingsToStore) ;set dilimiter to actor global 3

  ;-----------------------------------------------------------------------------------------------------------

    Warp(Player, ActorZoneCheck, "", 0)
    MoveActor(Player, PlayerX, PlayerY, PlayerZ, "False")

     DoEvents(2000)
    SetAttribute(Player, "Blood", TotBloodCost) ;cost to fly
EndIf

If (IsVampfly = 1) ;OutPut(Player, "U are now in human form.")
    DeleteActorEffect(Player, "Vampire Fly")
    AddActorEffect(Player, "Vampirism", "", 0, 0, 522)

                     IfVisable% = ActorClothes(Player)

                        If (IfVisable = 5)
                            SetActorClothes(Player, 1) ;make vamp visable again
                        EndIf

 ;If Its night time take night bonus away
        IsItNight% = ActorGlobal(Player, 0)

             If (IsItNight = 100)

             EndIf

	ChangeActor(Player, Vamp)

    PlayerX% = ActorX(Player)
    PlayerY% = ActorY(PLayer) + 4
    PlayerZ% = ActorZ(Player)

 ;-----------------------------------------------------------------------------------------------------------
    ;Set changes to delimiter for zone entry

             HealthStat% = Split(ActorGlobal(Player, 3), 1, "|")
            ManaStat% = Split(ActorGlobal(Player, 3), 2, "|")
            StrStat% = Split(ActorGlobal(Player, 3), 3, "|")
            TouStat% = Split(ActorGlobal(Player, 3), 4, "|")
            DefStat% = Split(ActorGlobal(Player, 3), 5, "|")
            AgiStat% = Split(ActorGlobal(Player, 3), 6, "|")
            WizStat% = Split(ActorGlobal(Player, 3), 7, "|")
            StatsCurr% = Split(ActorGlobal(Player, 3), 8, "|")
            StBak% = Split(ActorGlobal(Player, 3), 9, "|")
            RepCurr% = Split(ActorGlobal(Player, 3), 10, "|")     ;player rep
            Gamble% = Split(ActorGlobal(Player, 3), 11, "|")      ;used in gambling
            ClassStored% = Split(ActorGlobal(Player, 3), 12, "|") ;stores melee, ranging and magic
            InOutCombat% = Split(ActorGlobal(Player, 3), 13, "|")  ;use in tracker in and out of combat
            ;extra delimters for things that mybe needed later.
            Extra1% = Split(ActorGlobal(Player, 3), 14, "|")
            Extra2% = Split(ActorGlobal(Player, 3), 15, "|")
            Extra3% = Split(ActorGlobal(Player, 3), 16, "|")
            Extra4% = 5 ;Using to check if trasmorming for entry scripts. if = to 5 then dont run zone entery
            Extra5% = Split(ActorGlobal(Player, 3), 18, "|")
            Extra6% = Split(ActorGlobal(Player, 3), 19, "|")
            Extra7% = Split(ActorGlobal(Player, 3), 20, "|")
            Extra8% = Split(ActorGlobal(Player, 3), 21, "|")

        SetActorGlobal(Player, 3, OtherThingsToStore) ;set dilimiter to actor global 3

  ;-----------------------------------------------------------------------------------------------------------
    Warp(Player, ActorZoneCheck, "", 0)
    MoveActor(Player, PlayerX, PlayerY, PlayerZ, "False")
       DoEvents(2000)

 EndIf

 ;-----------------------------------------------------------------------------------------------------------
    ;Set changes to delimiter for zone entry

             HealthStat% = Split(ActorGlobal(Player, 3), 1, "|")
            ManaStat% = Split(ActorGlobal(Player, 3), 2, "|")
            StrStat% = Split(ActorGlobal(Player, 3), 3, "|")
            TouStat% = Split(ActorGlobal(Player, 3), 4, "|")
            DefStat% = Split(ActorGlobal(Player, 3), 5, "|")
            AgiStat% = Split(ActorGlobal(Player, 3), 6, "|")
            WizStat% = Split(ActorGlobal(Player, 3), 7, "|")
            StatsCurr% = Split(ActorGlobal(Player, 3), 8, "|")
            StBak% = Split(ActorGlobal(Player, 3), 9, "|")
            RepCurr% = Split(ActorGlobal(Player, 3), 10, "|")     ;player rep
            Gamble% = Split(ActorGlobal(Player, 3), 11, "|")      ;used in gambling
            ClassStored% = Split(ActorGlobal(Player, 3), 12, "|") ;stores melee, ranging and magic
            InOutCombat% = Split(ActorGlobal(Player, 3), 13, "|")  ;use in tracker in and out of combat
            ;extra delimters for things that mybe needed later.
            Extra1% = Split(ActorGlobal(Player, 3), 14, "|")
            Extra2% = Split(ActorGlobal(Player, 3), 15, "|")
            Extra3% = Split(ActorGlobal(Player, 3), 16, "|")
            Extra4% = 0 ;Using to check if trasmorming for entry scripts. if = to 5 then dont run zone entery
            Extra5% = Split(ActorGlobal(Player, 3), 18, "|")
            Extra6% = Split(ActorGlobal(Player, 3), 19, "|")
            Extra7% = Split(ActorGlobal(Player, 3), 20, "|")
            Extra8% = Split(ActorGlobal(Player, 3), 21, "|")

        SetActorGlobal(Player, 3, OtherThingsToStore) ;set dilimiter to actor global 3

  ;-----------------------------------------------------------------------------------------------------------

Return
End Function

```