HuntRPG

Moved

Total Downloads: 16,958 - First Release: Mar 15, 2015 - Last Update: Jul 30, 2018

5/5, 73 likes
  1. Good to see someone working on this again.
    Ive done changes myself a while ago for my server, but as the code is written pretty complicated, we did throw it out at some day.
    ill keep an eye on this thread and help when i can :p Loved this plugin back then.

    Btw,- as you changed the commands, remember to change the ingame plugin-chat messages aswell as it still said "use /hgui" ;)
     
  2. Was going to be updating the Lang in the plugin in the next upcoming days.
    Apologies for not applying it haha.
     
  3. XDefaultX updated Hunt RPG with a new update entry:

    1.5.65

     
  4. Hi!
    That was a good idea to see if the message reciever isn't an NPC, but... what if it's an npc created by Human NPC - Core
    Here is the function that I'm using (if you need it ofc =P):
    Code:
            private bool IsNPC(BasePlayer player)
            {
                //BotSpawn
                if (player is NPCPlayer)
                    return true;
                //HumanNPC
                if (!(player.userID >= 76560000000000000L || player.userID <= 0L))
                    return true;
                return false;
            }
     
  5. The way that it’s setup has no errors with BotSpawn, which was the entire intention of redoing the entire hook.
    I’ll attempt your fix at it, but I can’t be sure it will work with BotSpawn, unless you’ve already tried it haha
    [DOUBLEPOST=1519744301][/DOUBLEPOST]
    Oh, I see it's a different hook.
    Should be good then, let me go ahead and update it quickly.
     
  6. XDefaultX updated Hunt RPG with a new update entry:

    1.5.7

     
  7. Hook? o_O
    This is not a hook =)
    This is a small function that just checks the BasePlayer for being both - in-game NPC and handmade by the HumanNPC plugin =)
     
  8. Bah, my apologies. Just woke up haha.
    Should all be good then.
     
  9. Dude. You've done literraly nothing in this update =D
    You just added this function to the code and never called it =))
    So - if you want to use it - call it on line 155, in the OnEntityTakeDamage insted of just if (player is NPCPlayer)
    If you would take a closer look to my func - you would see that this check is already done in there....
     
  10. My apologies, I woke up not too long ago. Brain doesn't want to work.
    Gimme a minute.
    [DOUBLEPOST=1519745576][/DOUBLEPOST]
    Code:
    void OnEntityTakeDamage(BasePlayer player, HitInfo hitInfo)
            {
                if (player is NPCPlayer) return;
                if (!(player.userID >= 76560000000000000L || player.userID <= 0L)) return;
                var rpgInfo = FindRpgInfo(player);
                if (rpgInfo == null) return;
                var victim = hitInfo.Initiator;
                if (victim is BasePlayer)
                {
                   
                    if (Random.Range(0f, 1f) <= rpgInfo.GetEvasion())
                    {
                        ChatMessage(player, HMK.Dodged);
                        if (!(victim is NPCPlayer))
                        {
                            ChatMessage(victim, HMK.TargetDodged);
                        }
                        hitInfo.damageTypes.ScaleAll(0);
                    }
                }
                if (rpgInfo.GetBlock() <= 1 && rpgInfo.GetBlock() >= 0)
                {
                    hitInfo.damageTypes.ScaleAll(1 - rpgInfo.GetBlock());
                }
            }
    
    Got it haha, huge apologies.
     
  11. Apologise for what? This is not crusual change =)
    Dude, why did you copy the code of the function to the OnEntity..., you could've just call it.... nvrmind, this is your code, I just gave you a suggestion ;)
     
  12. "You just added this function to the code and never called it"
    Weird, it works though.
    Thanks for the help.
     
  13. XDefaultX updated Hunt RPG with a new update entry:

    1.5.71

     
  14. getting this -
    Code:
    Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)
    at Oxide.Plugins.HuntRPG+<OnStructureUpgrade>c__AnonStorey1.<>m__0 () [0x00000] in <filename unknown>:0
    at Oxide.Core.OxideMod.OnFrame (Single delta) [0x00000] in <filename unknown>:0
    (11:54:06) | Exception while calling NextTick callback (NullReferenceException: Object reference not set to an instance of an object)
    at Oxide.Plugins.HuntRPG+<OnStructureUpgrade>c__AnonStorey1.<>m__0 () [0x00000] in <filename unknown>:0
    at Oxide.Core.OxideMod.OnFrame (Single delta) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Mar 5, 2018
  15. Still trying to hunt that down. If you could keep an eye of when it happens, that'd be great.
     
  16. It happens when players are building and upgrading building parts but tbh it doesn't happen every time its kinda random.
     
  17. Yeah, that’s the part I don’t understand about it.
     
  18. The only other thing i can think of is another plugin conflicting with it sometimes i use a plugin (skinperks) that basically adds legendary items to the loot drops and you can get a hammer that reduces the amount of resources required to upgrade building tier and some of the errors we see in Hunt are building upgrade error related but i saw the errors on as player while building without and legendary items on him ? not sure maybe this will help hopefully good work man glad your keeping it alive :)
     
  19. I own SkinPerks, haven’t used it yet.
    I’ll see what I can do, otherwise it might be an incompatible plugin.
    I’ll probably add a plugin check.
     
  20. I've just tested, I see no errors when using the plugin.
    If you're talking about this
    Code:
    Exception while calling NextTick callback
    That will happen regardless of having the plugin or not. I'm still trying to pinpoint the cause of it.