HuntRPG

Moved

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

5/5, 73 likes
  1. How to change the boost to the level of 10% instead of 50% for example.
    I write instead:
    public const float LevelMultiplier = 1.105f;
    is:
    public const float LevelMultiplier = 1.505f;
    but the plug-in stops working!
     
  2. Hi there,

    i am not sure what to do exactly.

    i was looking for the line. but it is the line about Dogeing. Should i just remove that line or should i replace it by your code snippet?

    The code i found is:

    Code:
           public bool OnAttacked(BasePlayer player, HitInfo hitInfo)
            {
                var baseNpc = hitInfo.Initiator as BaseNPC;
                var basePlayer = hitInfo.Initiator as BasePlayer;
                bool canEvade = baseNpc != null || basePlayer != null && player.userID != basePlayer.userID;
                if (!canEvade) return false;
                var randomFloat = Random(0, 1);
                RPGInfo rpgInfo = RPGInfo(player);
                var evasion = RPGHelper.GetEvasion(rpgInfo, MaxStatsTable[HRK.AgiEvasionGain]);
                bool evaded = randomFloat <= evasion;
                if (evaded)
                {
                    ChatMessage(player, "Dodged!");
                    return true;
                }
                var blockPercent = RPGHelper.GetBlock(rpgInfo, MaxStatsTable[HRK.StrBlockGain]);
                //var total = hitInfo.damageTypes.Total();
                float[] array = hitInfo.damageTypes.types;
                for (int index = 0; index < array.Length; index++)
                {
                    var damage = array[index];
                    damage = damage - (damage * blockPercent);
                    hitInfo.damageTypes.Set((DamageType)index, damage);
                }
                //var blocked = hitInfo.damageTypes.Total();
                //ChatMessage(player, String.Format("Blocked {0:F1}/{1}", total-blocked, total));
                return false;
            }
    Please let me know what to do. Thank you!
     
  3. Hm, you use latest version?

    You dont need to delete this, you must find code block

    Code:
    public ItemCraftTask OnItemCraft(ItemCraftTask item)
    {
    .............
    }
    
    and rewrite this code block by my block.



    UPD: oh I see.. My bad.. Near 620 string :)

    And yes, check my 1st msg - i updated this with fix 2
    [DOUBLEPOST=1435183446][/DOUBLEPOST]
    stop server, backup and delete /oxide/config/HunterPlugin.json and start after change value. But be careful, plugin cant use values more then 2 000 000 000 in exp.
     
  4. FYI, the following error:
    Code:
    6:37 AM [Error] Failed to call hook 'OnPlayerAttack' on plugin 'Hunt RPG' (NullReferenceException: Object reference not set to an instance of an object)
    6:37 AM [Debug]   at Hunt.RPG.HuntRPG.OnPlayerAttack (.BasePlayer player, .HitInfo hitInfo) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HuntPlugin.OnPlayerAttack (.BasePlayer player, .HitInfo hitInfo) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    is created each time a 'stone spear' is thrown. try it.
     
  5. Pets is updated with taming horses. Please update HuntRPG.
    [DOUBLEPOST=1435214842][/DOUBLEPOST]Are furnaces resetet after map wipe?
     
  6. Where the variable factor that is responsible for the extraction of resources?
    [DOUBLEPOST=1435238530][/DOUBLEPOST]I myself found
     
  7. How do I turn on and change the percentage of xp for night bonus?
     
  8. Code:
            private void ExpGain(RPGInfo rpgInfo, int experience, BasePlayer player)
            {
                var steamId = RPGHelper.SteamId(player);
                if (IsNight())
                    experience *= 2;
                if (rpgInfo.AddExperience(experience, RequiredExperience(rpgInfo.Level)))
                {
                    NotifyLevelUp(player, rpgInfo);
                    PlayerLastPercentChange[steamId] = 0;
                }
                else
                {
                    var currentPercent = CurrentPercent(rpgInfo);
                    if (!PlayerLastPercentChange.ContainsKey(steamId))
                        PlayerLastPercentChange.Add(steamId, currentPercent);
                    var lastPercent = PlayerLastPercentChange[steamId];
                    var requiredPercentChange = rpgInfo.Preferences.ShowXPMessagePercent;
                    float percentChange = currentPercent - lastPercent;
                    if (percentChange < requiredPercentChange) return;
                    ChatMessage(player, XPProgression(rpgInfo));
                    PlayerLastPercentChange[steamId] = currentPercent;
                }
                   
            }
    
    experience *= 2; change on what you need
     
  9. Thanks man Nice fast response!
     
  10. darn, beat me to it

    it's line 694 btw.
     
  11. after the last update this plugin no longer work properly... /hunt skilllist clears the chat window again
     
  12. Wulf

    Wulf Community Admin

    If you are referring to the whole icons only view, that's a Rust client/Unity bug.
     
  13. "/hunt skilllist" works for me.

    everything is there for me "chat", scrolling up i see it. what's this whole icon only view?
     
  14. AH dang I have everyone complaining about it.. guess I'll give them the bad news
     
  15. Wulf

    Wulf Community Admin

    It's a client issue, restarting their client would fix it. It happens when there's too much text on their screen or something like that.
     
  16. yup it works now
     
  17. GetOwnerItem - null!
    [Oxide] 10:39 PM [Error] Failed to call hook 'OnPlayerAttack' on plugin 'Hunt RPG' (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 10:39 PM [Debug] at Hunt.RPG.HuntRPG.OnPlayerAttack (.BasePlayer player, .HitInfo hitInfo) [0x00000] in <filename unknown>:0 at Oxide.Plugins.HuntPlugin.OnPlayerAttack (.BasePlayer player, .HitInfo hitInfo) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
    [DOUBLEPOST=1435402316,1435347362][/DOUBLEPOST]How to turn off the skill?
    Researcher
    BlinkToArrow
    [DOUBLEPOST=1435411892][/DOUBLEPOST]You can make a top 10 at lvl?
     
  18. I added this plugin to my server via clanforge (they had the latest version), and i get in game and it doesn't work, it isn't active at all, /h or /hunt do nothing, and gathering nothing comes up. Any ideas ?
     
  19. @Dune, you mean they had the latest version of the Rust server? if that is what you meant, if you added the HuntPlugin.cs file to the oxide\plugins\ folder, you need to reload the plugin after transferring it there. no need to restart the server, just "oxide.reload HuntPlugin" in console
    [DOUBLEPOST=1435424310][/DOUBLEPOST]@maksiyshuk that error is when someone throws a stone spear at anything. not sure why it's kicking that out.

    as far as turning off the Researcher and BlinkToArrow skills, open up the HuntPlugin.json found in "oxide\config\" in Notepad++ or another code editing program, and go to line 1319 and set true to false to disable the researcher skill.

    blinktoarrow is disabled on default, but if it got enabled by someone, again, go to the HuntPlugin.json in the "oxide\config\" folder and go to line 1240 and change true to false.

    After you disable this skills in the config, copy the file back and either restart server, or simply enter "oxide.reload HuntPlugin" into the rcon console. It will take the changes. Hope this helps.
    [DOUBLEPOST=1435441094,1435423953][/DOUBLEPOST]@PedraozauM I think todays update broke at least the blacksmith skill. please update if possible, thank you!
    [DOUBLEPOST=1435457719][/DOUBLEPOST]is blacksmith working for anyone?
     
  20. Hi yes that work for me but i must say one time from an old update i got the same issue of you for now that not happen to me cause i'm not reset my hunt parameter skills. I ask that because i can confirm when that issue come to me my friend (who been already have skill in blacksmith) don't have this problem then i can only say maybe you have to wait a bit :/ or if you can try to restore some skills settings hunt?