Magic Hammer

Hit stuff with the hammer and do things

Total Downloads: 4,319 - First Release: Oct 8, 2015 - Last Update: Apr 13, 2017

5/5, 5 likes
  1. daily Server restart will reload :-/

    and it doesent work for my friend after i gave him permission and dont reload the plugin. it said mode enabled and if he wants to hint something it insta diabled
     
    Last edited by a moderator: Jan 9, 2018
  2. If it's disabling, you didn't configure it properly
     
  3. i did :) so what could happened ?
     
  4. upload your config and we'll see
     
  5. Can't get this to work now? I have last oxide.
     

    Attached Files:

  6. I loaded the cs file, set the mode to 2 in the config, and reloaded the mod.
    I gave the admin group permissions for it.
    /mh enabled
    /mh mode 2
    It said enabled and destroy mode.
    Then I tap a wall I own and:
    17:42:48Loaded plugin MagicHammer v0.5.2 by Norn/Werkrat
    17:42:55Failed to call hook 'OnStructureRepair' on plugin 'MagicHammer v0.5.2' (NullReferenceException: Object reference not set to an instance of an object)
    17:42:55at Oxide.Plugins.MagicHammer.hasTotalAccess (.BasePlayer player) [0x00000] in <filename unknown>:0
    17:42:55at Oxide.Plugins.MagicHammer.OnStructureRepairEx (.BaseCombatEntity entity, .BasePlayer player) [0x00000] in <filename unknown>:0
    17:42:55at Oxide.Plugins.MagicHammer.OnStructureRepair (.BaseCombatEntity entity, .BasePlayer player) [0x00000] in <filename unknown>:0
    17:42:55at Oxide.Plugins.MagicHammer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    17:42:55at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
    17:42:55at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    17:42:55at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  7. Kind of new to plugins. Where do you put the following code at? Thanks in advance!

    magichammer.allowed
    grant user "Name" magichammer.allowed
     
  8. I just updated the command to include the o. prefix, but anyway, you type the command in rcon/console. If you want everyone to have access, simply use
    Code:
    o.grant group default magichammer.allowed
     
  9. Hi please can you help, I have loaded the config file in oxide :
    },
    "MagicHammer":{
    "bChargeForRepairs": true,
    "bDestroyCupboardCheck": false,
    "bMessagesEnabled": true,
    "bUsePopupNotifications": false,
    "iProtocol": 1949,
    "nModesEnabled(1=repair only, 2=destroy only, 3=both enabled)": 3,
    "nTimeSinceAttacked": 8,
    "tHammerEnabled": "Status: {hammer_status}.",
    "tHammerMode": "You have switched to: {hammer_mode} mode.",
    "tHammerModeText": "Choose your mode: 1 = <color=#2EFE64>repair</color>, 2 = <color=#FF4000>destroy</color>.",
    "tMessageDestroyed": "Entity: <color=#F2F5A9>{entity_name}</color> <color=#FF4000>destroyed</color>.",
    "tMessageModeDisabled": "{disabled_mode} mode is currently <color=#FF4000>disabled</color>",
    "tMessageRepaired": "Entity: <color=#F2F5A9>{entity_name}</color> health <color=#2EFE64>updated</color> from <color=#FF4000>{current_hp}</color>/<color=#2EFE64>{new_hp}</color>.",
    "tMessageUsage": "/mh <enabled/mode>.",
    "tNoAccessCupboard": "You <color=#FF4000>don't</color> have access to all the tool cupboards around you."
    }

    I have saved the following to the server.cfg file : (No errors or messages, group is default on oxide)

    magichammer.allowed
    o.grant group default magichammer.allowed

    In Game I type :

    mh/ enable
    mh/mode 2

    The game tells me the hammer is set to destroy but when you make the first strike the next line says :
    [MagicHammer] destroy mode is currently disabled
    [MagicHammer] status:disabled

    Any ideas, thanks.
     
  10. It doesn't go in your server.cfg. A config file is generated when you load the plugin, it will be in your /config folder. Modify that file then reload the plugin after saving your changes.
     
  11. Thank you will , will try and advise, I am a noob at this, have the server for 5 days ><
     
  12. I removed the code from the oxide.config.json file and found the magichammer.json file.
    I made the changes in the magichammer.json file.

    IN GAME I used the following commands before trying the hammer.
    I restarted the magichammer addon and then in the game chat typed :

    magichammer.allowed
    o.grant group default magichammer.allowed

    Nothing happened ?
     
  13. Did you type "/mh enable" in chat?
     
  14. I set the magichammer.enable and o.grant group default magichammer.allowed in the server.cfg file which now automatically enables and gives permission, however if Iselect mode 2 the message says "Destroy Mode" but when I hit a wall nothing happens. Will it work on existing structures or only going forward ?
     
  15. Here is the error from the log file :

    (18:20:12) | Failed to call hook 'OnStructureRepair' on plugin 'MagicHammer v0.5.2' (NullReferenceException: Object reference not set to an instance of an object)

    at Oxide.Plugins.MagicHammer.hasTotalAccess (.BasePlayer player) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.MagicHammer.OnStructureRepairEx (.BaseCombatEntity entity, .BasePlayer player) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.MagicHammer.OnStructureRepair (.BaseCombatEntity entity, .BasePlayer player) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.MagicHammer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0

    at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  16. Destroy mode not working, gets disabled instantly.

    Yes, i've changed the config to both "2" and "3", reloaded x amount of times, granted and regranted oxide permissions to the admin group, removed and readded the addon a couple of times.

    Pleeeeease fix <3
     
  17. @Wulf I’ve stepped away from Rust and will no longer be able to maintain this plugin. If you could, please hand it off to someone who wants it
     
  18. can help a program here and bring the tool back to the current state that it runs with the new oxide version