FANDOM


Created by Taz.

Using "RC_Core.rcm"
; testingrc1 1.26
; Date/Time: 7:55:52 PM on 7/9/2009
; By Tazco on NADDAZ
;use same bones in all drops, set as right click script for bones in the inv.
;using prayer maxattribute for prayer level

Function Main()
Player = Actor()
Prayerlvl% = MaxAttribute(Player, "Prayer") ;player prayer total level
hasbones% = HasItem(Player, "Bones") ;item in gue named bones
Plvl% = ActorLevel(Player) ;player level used in xp count

        If (ActorHasEffect(Player, "Burrying")) 
            OutPut(Player, "You are already burring something", 255, 100, 100)
            Return
        EndIf
 
 AddActorEffect(Player, "Burrying", "", 0, 3, 23) ;change to bones texture
 
 DoEvents(2000)
 If (hasbones = 1) ;if player has bones in there inv do this
  AnimateActor(Player, "Sit", 1) ;animation for now
 GiveItem(Player, "Bones", -1) ; take a bone from the player.
 OutPut(Player, "You have buryed some bones", 125, 75, 45) ;tell player they have buryed a bone
 
  ;--------------------------------------------------------------------------------------------------------------------
  ;get melee xp, add new xp and ccheck if player has a melee level              
        MeleeXp% = Split(ActorGlobal(Player, 2), 1, "|")
        RangingXp% = Split(ActorGlobal(Player, 2), 2, "|")
        MagicXp% = Split(ActorGlobal(Player, 2), 3, "|")
        AlchemyXp% = Split(ActorGlobal(Player, 2), 4, "|")
        CraftingXp% = Split(ActorGlobal(Player, 2), 5, "|")
        HerbingXp% = Split(ActorGlobal(Player, 2), 6, "|")
        MiningXp% = Split(ActorGlobal(Player, 2), 7, "|")
        PrayerXp% = Split(ActorGlobal(Player, 2), 8, "|")
        SmeltingXp% = Split(ActorGlobal(Player, 2), 9, "|")
        WoodCuttingXp% = Split(ActorGlobal(Player, 2), 10, "|")
        DodgeXp% = Split(ActorGlobal(Player, 2), 11, "|")
        DexXp% = Split(ActorGlobal(Player, 2), 12, "|")
        ;extra skills for easy adding later.
        NewSkillXp1% = Split(ActorGlobal(Player, 2), 13, "|")
        NewSkillXp2% = Split(ActorGlobal(Player, 2), 14, "|")
        NewskillXp3% = Split(ActorGlobal(Player, 2), 15, "|")
        NewskillXp4% = Split(ActorGlobal(Player, 2), 16, "|")
        NewskillXp5% = Split(ActorGlobal(Player, 2), 17, "|")
        NewskillXp5% = Split(ActorGlobal(Player, 2), 18, "|")
 
  
             If (Prayerlvl > 30) ;if player prayer level is greater then 30 go to 1) if less goto 2).
                ; 1) more xp if prayer level is above 30
                TotalPrayerxp% = PrayerXp + Plvl + Rand(75, 95)
            Else
                ; 2) give normal prayer xp if under 30
                TotalPrayerxp% = PrayerXp + Plvl + Rand(25, 35) 
            EndIf
 
  		
             ;Send to levelup if Prayer level should be given.
            
              If (TotalPrayerxp >= Prayerlvl * 750) ;if player has amount of xp need to level send them to level up

                ThreadExecute("LevelUp", "Main", Player, Target, 12)	;parameter for Prayer = 12 
                TotalPrayerxp% = 0
              EndIf
              
               SkillXPToStore$ = MeleeXp + "|" + RangingXp + "|" + MagicXp + "|" + AlchemyXp + "|" +  CraftingXp + "|" + HerbingXp + "|" + MiningXp + "|" + TotalPrayerxp + "|" + SmeltingXp + "|" + WoodCuttingXp + "|" + DodgeXp + "|" + DexXp + "|" + NewSkillXp1 + "|" + NewSkillXp2 + "|" + NewSkillXp3 + "|" + NewSkillXp4 + "|" + NewSkillXp5 + "|" + NewSkillXp6
  
      SetActorGlobal(Player, 2, SkillXPToStore) ;set dilimiter to actor global 2 with new melee xp amount
 ;-------------------------------------------------------------------------------------------------------------------- 
 DoEvents(6000) ;wait before player is able to bury another bone.
 Return 
 EndIf
 
 
                      




End Function