HuntRPG

Moved

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

5/5, 73 likes
  1. Happens if you translate the HuntPlugin.en.json
    Had the same problem, I will translate it now row by row and tell you which one it is later ;)
    [DOUBLEPOST=1462388599][/DOUBLEPOST]@KondziU this happens if you destroy the code... for ex i put a </code> behind the "text blabla",

    Check your file, I am pretty sure you will find something like that, too ;)
     
  2. How to reduce time of crafting to 0, and make instacraft at 20 lvl?
     
  3. Any plans of adding a fishing skill to the game? Maybe of 5 or so so that we have (instead of a 10% chance) increasing it by 5-10% each strike?
     
  4. Maybe you can use this until then ;)
    Fishing | Page 3 | Oxide
     
  5. Im trying to add a UI button that opens "ProfileGUI" for ease of my players. I have created all the elements and the button appears for BasePlayers just fine. However, despite many attempts the button command execution throws a casting error: "Failed to call hook 'cmdHuntGui' on plugin 'HuntPlugin v1.5.5' (InvalidCastException: Cannot cast from source type to destination type.)". I've never had this issue before and I can't for the life of me see what I am doing wrong. I'd love to get this working!
    Code:
    void HuntGuiButton(BasePlayer player)
            {
                CuiHelper.DestroyUi(player, ProfileGuiButton);
                var element = UI.CreateElementContainer(ProfileGuiButton, "0.9 0.9 0.9 0.0", "0.88 0.16", "0.97 0.19", false);
                UI.CreateButton(ref element, ProfileGuiButton, "0.0 0.0 0.0 0.0", "Hunt Profile", 20, "0.0 0.0", "1.0 1.0", "UI_HuntGui", "");
                CuiHelper.AddUi(player, element);
            }
    Code:
    [ConsoleCommand("UI_HuntGui")]
            private void cmdHuntGui(ConsoleSystem.Arg arg)
            {
                var player = arg.connection.player as BasePlayer;
                if (player == null)
                    return;
                ProfileGui(player, true);
            }
    Code:
            private void ProfileGui(BasePlayer player, bool repaint = false)
            {
                if (player == null) return;
                var rpgInfo = FindRpgInfo(player);
                GUIInfo guiInfo;
                if (!GUIInfo.TryGetValue(player.userID, out guiInfo))
                    GUIInfo[player.userID] = guiInfo = new GUIInfo();
                else
                    DestroyUi(player, guiInfo.LastContent);            var skills = SkillTable.Where(skill => skill.Value.Enabled).ToArray();
                var height = 1f / (9.5f + skills.Length) - .002f;            var elements = new CuiElementContainer();
                if (!repaint || string.IsNullOrEmpty(guiInfo.LastMain))
                {
                    guiInfo.LastMain = elements.Add(new CuiPanel
                    {
                        Image =
                        {
                            Color = "0.1 0.1 0.1 0.8"
                        },
                        RectTransform =
                        {
                            AnchorMin = "0.8 0.25",
                            AnchorMax = "0.995 0.845"
                        },
                        CursorEnabled = true
                    });
                    elements.Add(new CuiButton
                    {
                        Button =
                    {
                        Close = guiInfo.LastMain,
                        Color = "0.8 0.8 0.8 0.2"
                    },
                        RectTransform =
                    {
                        AnchorMin = "0.86 0.93",
                        AnchorMax = "0.97 0.99"
                    },
                        Text =
                    {
                        Text = "X",
                        FontSize = 20,
                        Align = TextAnchor.MiddleCenter
                    }
                    }, guiInfo.LastMain);
                    elements.Add(CreateLabel(rpgInfo.SteamName, 1, height, TextAnchor.MiddleLeft, 18, "0.06", "0.85"), guiInfo.LastMain);
                    var buttonsName = elements.Add(CreatePanel("0.86 0", "0.97 0.925"), guiInfo.LastMain);
                    elements.Add(CreateButton("hunt.cmd statset agi 1", 6, height), buttonsName);
                    elements.Add(CreateButton("hunt.cmd statset str 1", 7, height), buttonsName);
                    elements.Add(CreateButton("hunt.cmd statset int 1", 8, height), buttonsName);
                    var i = 9;
                    foreach (var skill in skills)
                    {
                        int level;
                        rpgInfo.Skills.TryGetValue(skill.Key, out level);
                        elements.Add(CreateButton($"hunt.cmd skillset {skill.Key} 1", i++, height), buttonsName);
                    }
                    if (!AdminReset || player.IsAdmin())
                    {
                        elements.Add(CreateButton("hunt.cmd statreset", i++, height, 15, "R"), buttonsName);
                        elements.Add(CreateButton("hunt.cmd skillreset", i, height, 15, "R"), buttonsName);
                    }
                }
                var contentName = guiInfo.LastContent = elements.Add(CreatePanel("0.06 0", "0.85 0.925"), guiInfo.LastMain);
                elements.Add(CreateLabel(_(HMK.Level, player, rpgInfo.Level), 1, height), contentName);
                elements.Add(CreateLabel(_(HMK.DamageBlock, player, rpgInfo.GetBlock()), 2, height), contentName);
                elements.Add(CreateLabel(_(HMK.EvasionChance, player, rpgInfo.GetEvasion()), 3, height), contentName);
                elements.Add(CreateLabel(_(HMK.CraftingReducer, player, rpgInfo.GetCraftingReducer()), 4, height), contentName);
                elements.Add(CreateLabel(XPProgression(player, rpgInfo), 5, height), contentName);
                elements.Add(CreateLabel(_(HMK.Agi, player, $"{rpgInfo.Agility} ({rpgInfo.GetStatPointsCost(HRK.Agi)})"), 6, height), contentName);
                elements.Add(CreateLabel(_(HMK.Str, player, $"{rpgInfo.Strength} ({rpgInfo.GetStatPointsCost(HRK.Str)})"), 7, height), contentName);
                elements.Add(CreateLabel(_(HMK.Int, player, $"{rpgInfo.Intelligence} ({rpgInfo.GetStatPointsCost(HRK.Int)})"), 8, height), contentName);
                var j = 9;
                foreach (var skill in skills)
                {
                    int level;
                    rpgInfo.Skills.TryGetValue(skill.Key, out level);
                    elements.Add(CreateLabel($"{skill.Value.Name}: {level}/{skill.Value.MaxLevel} ({rpgInfo.GetSkillPointsCostNext(skill.Value)})", j++, height), contentName);
                }
                elements.Add(CreateLabel(_(HMK.StatPoints, player, rpgInfo.StatsPoints), j++, height), contentName);
                elements.Add(CreateLabel(_(HMK.SkillPoints, player, rpgInfo.SkillPoints), j, height), contentName);
                CuiHelper.AddUi(player, elements);
            }
    upload_2016-5-16_15-44-4.png
     
  6. bind h hgui
    writecfg
    ))) something like that
     
  7. please removing the exp from building, just leave the upgrade xp
     
  8. why when im trying to get a skill like miner its tell me that this skill requiered the level 0
     
  9. how can i make the pets and the hunt rpg work together because the skill tamer is useless cause i can tame an animal without the skills
     
  10. Nogrod updated Hunt RPG with a new update entry:

    1.5.6

     
  11. Don't give permissions with pet plugin ;)
    HuntRPG will handle it then
     
  12. Could you make a top option to help with info panel compatability
     
  13. That is a great idea and what im looking for would be nice to be sorta like Quest GuI. So you would do /Hunt and a quest like GUI opens and then you can see your profile and click on the different stats and they would upgrade/update. Is this possible?
     
  14. Yah sounds cool.
     
  15. On my plugin I actually abandoned the buttons, they are a pain in the rear because they get in the way of the UI.

    It is best to bind the menu to a key.

    For example, on Factions it is bound to "N"....

    Just my two cents!
     
  16. Edit: coder has uploaded a fix so my quick fix now removed
     
    Last edited by a moderator: Jul 9, 2016
  17. Nogrod updated Hunt RPG with a new update entry:

    1.5.7

     
  18. Can someone help me with the XP. Needs the name changed I want them to know it is huntxp aswell as rustxp.
    Edited.jpg
     
  19. hey is it possible to let players reset their own stats and skills?
     
  20. i copied the .cs folder restarted and i don't thinl it's working i used the /hunt and it doesn't work in chat and as a command it says command not found