HuntRPG

Moved

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

5/5, 73 likes
  1. Code:
    [Oxide] 8:12 PM [Error] Failed to call hook 'cmdHuntShortcut' on plugin 'Hunt RPG' (ArgumentException: The requested value 'hunt' was not found.)
    [Oxide] 8:12 PM [Debug]   at System.Enum.Parse (System.Type enumType, System.String value, Boolean ignoreCase) [0x00000] in <filename unknown>:0
      at Hunt.RPG.HuntRPG.SetSkillsCommand (.BasePlayer player, System.String[] args, Hunt.RPG.RPGInfo rpgInfo) [0x00000] in <filename unknown>:0
      at Hunt.RPG.HuntRPG.HandleChatCommand (.BasePlayer player, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HuntPlugin.cmdHuntShortcut (.BasePlayer player, System.String command, System.String[] args) [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=1438971873][/DOUBLEPOST]Now, for the construction of experience points are not going. And i don't see any pluses. See screenshot

    And one mode question. How to remove blinkarrow.
     

    Attached Files:

  2. For the cursor reset i have already a fix, i'll post it later.

    I'll check that error.
    Blinkarrow? Tried config?
     
  3. For Nogrod:
    This will fix EXP gain for construction

    Replace these 2
    Code:
            [HookMethod("OnBuildingBlockDoUpgradeToGrade")]
            object OnBuildingBlockUpgrade(BuildingBlock buildingBlock, BaseEntity.RPCMessage message, BuildingGrade.Enum grade)
            {
                HuntRPGInstance.OnBuildingBlockUpgrade(message.player, buildingBlock, grade);
                return null;
            }        public void OnBuildingBlockUpgrade(BasePlayer player, BuildingBlock buildingBlock, BuildingGrade.Enum grade)
            {
                var items = buildingBlock.blockDefinition.grades[(int) grade].costToBuild;
                int total = items.Sum(item => (int) item.amount);
                int experience = (int) Math.Ceiling(UpgradeBuildingTable[grade]*total);
                ExpGain(RPGInfo(player), experience, player);
            }
    With these 2:
    Code:
            [HookMethod("OnStructureUpgrade")]
            object OnStructureUpgrade(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum grade)
            {
                HuntRPGInstance.OnStructureUpgrade(buildingBlock, player, grade);
                return null;
            }        public void OnStructureUpgrade(BuildingBlock buildingBlock, BasePlayer player, BuildingGrade.Enum grade)
            {
                var items = buildingBlock.blockDefinition.grades[(int) grade].costToBuild;
                int total = items.Sum(item => (int) item.amount);
                int experience = (int) Math.Ceiling(UpgradeBuildingTable[grade]*total);
                ExpGain(RPGInfo(player), experience, player);
            }
     
    Last edited by a moderator: Aug 7, 2015
  4. It's disabled in config. But in GUI it shows to player.
    Code:
        "blinkarrow": {
          "Name": "blinkarrow",
          "Enabled": false,
          "Description": "This skill allows you to blink to your arrow destination from time to time. Each level deacreases the cooldown in 2 minutes.",
          "Usage": "Just shoot an Arrow at desired blink location. To toogle this skill type \"/h ba\" . To change the auto toggle for this skill type \"/h aba\"",
          "RequiredLevel": 150,
          "MaxPoints": 5,
          "RequiredSkills": {},
          "Modifiers": {
            "cooldown": {
              "Identifier": "cooldown",
              "Args": [
                9,
                2
              ]
            }
          },
    [DOUBLEPOST=1438978929][/DOUBLEPOST]
    Code:
    [Oxide] 11:21 PM [Error] Failed to call hook 'cmdHuntShortcut' on plugin 'Hunt RPG' (ArgumentException: The requested value 'str' was not found.)
    [Oxide] 11:21 PM [Debug]   at System.Enum.Parse (System.Type enumType, System.String value, Boolean ignoreCase) [0x00000] in <filename unknown>:0
      at Hunt.RPG.HuntRPG.SetSkillsCommand (.BasePlayer player, System.String[] args, Hunt.RPG.RPGInfo rpgInfo) [0x00000] in <filename unknown>:0
      at Hunt.RPG.HuntRPG.HandleChatCommand (.BasePlayer player, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HuntPlugin.cmdHuntShortcut (.BasePlayer player, System.String command, System.String[] args) [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 
     
  5. Plugin parses all the skills, including and disabling. I tried to set only desired, but I was unable to to configure display the current and maximum level.

    If skills were are listed as characteristics, it would be cool!

    Code:
                elements.Add(CreateLabel($"Level: {rpgInfo.Level}", i++), mainName);
                elements.Add(CreateLabel($"Damage Block: {RPGHelper.GetBlock(rpgInfo, MaxStatsTable[HRK.str_block_percent_gain]):P}", i++), mainName);
                elements.Add(CreateLabel($"Evasion Chance: {RPGHelper.GetEvasion(rpgInfo, MaxStatsTable[HRK.agi_evasion_percent_gain]):P}", i++), mainName);
                elements.Add(CreateLabel($"Crafting Reducer: {RPGHelper.GetCraftingReducer(rpgInfo, MaxStatsTable[HRK.int_crafting_reducer_percent]):P}", i++), mainName);
                elements.Add(CreateLabel(XPProgression(rpgInfo), i++), mainName);
                elements.Add(CreateLabel($"Agi: {rpgInfo.Agility}", i), mainName);
                elements.Add(CreateButton("hunt.cmd statset agi 1", i++), mainName);
                elements.Add(CreateLabel($"Str: {rpgInfo.Strength}", i), mainName);
                elements.Add(CreateButton("hunt.cmd statset str 1", i++), mainName);
                elements.Add(CreateLabel($"Int: {rpgInfo.Intelligence}", i), mainName);
                elements.Add(CreateButton("hunt.cmd statset int 1", i++), mainName);
                foreach (var skill in SkillTable)
                {
                    int level;
                    rpgInfo.Skills.TryGetValue(skill.Key, out level);
                    elements.Add(CreateLabel($"{skill.Key}: {level}/{skill.Value.MaxPoints}", i), mainName);
                    elements.Add(CreateButton($"hunt.cmd skillset {skill.Key} 1", i++), mainName);
                }
                elements.Add(CreateLabel($"Stat Points: {rpgInfo.StatsPoints}", i++), mainName);
                elements.Add(CreateLabel($"Skill Points: {rpgInfo.SkillPoints}", i), mainName);
                CuiHelper.AddUi(player, elements);
    Sometimes get this error:
    Code:
    [Oxide] 3:04 AM [Error] Failed to call hook 'OnConsumeFuel' on plugin 'Hunt RPG' (InvalidOperationException: Collection was modified; enumeration operation may not execute.)
    [Oxide] 3:04 AM [Debug]   at System.Collections.Generic.List`1+Enumerator[Item].VerifyState () [0x00000] in <filename unknown>:0
      at System.Collections.Generic.List`1+Enumerator[Item].MoveNext () [0x00000] in <filename unknown>:0
      at Hunt.RPG.HuntRPG.OnConsumeFuel (.BaseOven oven, .Item fuel, .ItemModBurnable burnable) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HuntPlugin.OnConsumeFuel (.BaseOven oven, .Item fuel, .ItemModBurnable burnable) [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 
     
    Last edited by a moderator: Aug 8, 2015
  6. thanks i'll change it

    I change the gui to only show enabled skills and that error i'll look into
     
  7. Skilllist doesn't show information.
    [DOUBLEPOST=1439024550][/DOUBLEPOST]And one more:
    Code:
    [Oxide] 12:00 PM [Error] Failed to call hook 'OnConsumeFuel' on plugin 'Hunt RPG' (InvalidOperationException: Collection was modified; enumeration operation may not execute.)
    [Oxide] 12:00 PM [Debug]   at System.Collections.Generic.List`1+Enumerator[Item].VerifyState () [0x00000] in <filename unknown>:0
      at System.Collections.Generic.List`1+Enumerator[Item].MoveNext () [0x00000] in <filename unknown>:0
      at Hunt.RPG.HuntRPG.OnConsumeFuel (.BaseOven oven, .Item fuel, .ItemModBurnable burnable) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.HuntPlugin.OnConsumeFuel (.BaseOven oven, .Item fuel, .ItemModBurnable burnable) [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 
     
  8. Remade your plugin and all works well.
    But I had to remove the unused skills.
    Translated into Russian.
     

    Attached Files:

  9. Can you give your HuntPlugin ?
     
  10. RustClient 2015-08-08 14-36-12-917.jpg How to add another block to the description of skills and the like
    [DOUBLEPOST=1439052755][/DOUBLEPOST]
    Sorry, but I do not want to give an unfinished plugin
     
  11. Nogrod updated Hunt RPG with a new update entry:

    1.3.0

     
  12. No exp for the gathering resources.
    And now logs looks like:

    Code:
    [Oxide] 8:36 PM [Info] Добыто: stones 51 - 153
    [Oxide] 8:36 PM [Info] Добыто: stones 58 - 174
    [Oxide] 8:36 PM [Info] Добыто: metal.ore 58 - 174
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: metal.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: metal.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: metal.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: metal.ore 42 - 135
    [Oxide] 8:36 PM [Info] Добыто: metal.ore 2 - 5
    [Oxide] 8:36 PM [Info] Добыто: hq.metal.ore 1 - 4
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 35 - 113
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: sulfur.ore 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    [Oxide] 8:36 PM [Info] Добыто: stones 38 - 122
    [Oxide] 8:36 PM [Info] Добыто: stones 8 - 20
    
     
  13. Nogrod updated Hunt RPG with a new update entry:

    1.3.1


    [DOUBLEPOST=1439056339][/DOUBLEPOST]
    getting exp for gathering, no issue here
     
  14. Can you say what to change to delete debug output. Because after update i should translate plugin from the begining
    [DOUBLEPOST=1439056534][/DOUBLEPOST]And how to change gathering multiplayer for resources ?
    Because default is very small ?
    Sorry for my bad english
     
  15. Remove line #773 & #807 "Interface.Oxide.LogInfo..."
     
  16. Thnx a lot.
     
  17. Okay i'll fix that the nickname is not updated...

    Something like a tooltip is not possible with the current CUI implementation, but you could display a panel via button.
     
  18. BaK

    BaK

    I think you forgot to update the version line, I'm using the latest download but updater is saying its out of date.
     
  19. Wulf

    Wulf Community Admin

    Update caches for a period.