FANDOM


Created by Taz.

Using "RC_Core.rcm"
; Morgance Online 0.1
; Date/Time: 4:00:18 AM on 7/30/2012
; By Dan Seguin on TAZCO-PC
; Keep track of pvp kills, will have this keep track of over all kills as well.
Function Main()
Player = Actor()
Target = Parameter(1)
PvpZone$ = "pvp zone"
PvpZoneHolFlag$ = "PvpHoldFlag"
PZone$ = ActorZone(Player)
Doevents(1000)
;OutPut(Player, "Running PvP Kill tracker")
;check if player is in battale ground


 IfHumanTar% = ActorIsHuman(Target)
 If (IfHumanTar = 1)
          
        ;Add 1 kill to total amount of pvp kills
TotPvpkills% = Split(ActorGlobal(Player, 3), 19, "|") ;players total kill amount
AddKillPvp% = TotPvpkills + 1

       
 DoEvents(2000)
 
        If (PZone = PvpZone)
            PvpBgKill% = Split(ActorGlobal(Player, 3), 20, "|")
            AddKillBg% = PvpBgKill% + 1
    
         Endif
 
        If (PZone = PvpZoneHolFlag)
            PvpBgKill% = Split(ActorGlobal(Player, 3), 20, "|")
            AddKillBg% = PvpBgKill% + 1        

        Endif
 ;-----------------------------------------------------------------------------------------------------------    
    ;Set changes to delimiter
    
             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% = Split(ActorGlobal(Player, 3), 17, "|")
            Extra5% = Split(ActorGlobal(Player, 3), 18, "|")
            Extra6% = AddKillPvp
            If (PZone = PvpZone) ;if in pvp zone set this aswell
                Extra7% = AddKillBg
            Else ;not in pvp zone keep it current
                Extra7% = Split(ActorGlobal(Player, 3), 20, "|")
            Endif
            Extra8% = Split(ActorGlobal(Player, 3), 21, "|")
            
     
     OtherThingsToStore$ = HealthStat + "|" + ManaStat + "|" + StrStat + "|" + TouStat + "|" +  DefStat + "|" + AgiStat + "|" + WizStat + "|" + StatsCurr + "|" + StBak + "|" + RepCurr + "|" + Gamble + "|" + ClassStored + "|" + InOutCombat + "|" + Extra1 + "|" + Extra2 + "|" + Extra3 + "|" + Extra4 + "|" + Extra5 + "|" + Extra6 + "|" + Extra7 + "|" + Extra8

        SetActorGlobal(Player, 3, OtherThingsToStore) ;set dilimiter to actor global 3
    
     
                 OutPut(Player, "You have " + Extra6 + " Total PvP kills.")
 ;-----------------------------------------------------------------------------------------------------------   

Endif
Return
End Function