Invulnerable Sleepers

Make sleepers invulnerable after a set amount of time.

Total Downloads: 736 - First Release: May 25, 2015 - Last Update: Jun 2, 2015

5/5, 3 likes
  1. Mughisi submitted a new resource:

    Invulnerable Sleepers - Make sleepers invulnerable after a set amount of time.

    Read more about this resource...
     
  2. its nothing making a config file when i load in the plugin
     
  3. I wonder, could you make a version of this, but make the invulnerability a timed thing?

    Say, player falls asleep, after 30 seconds they go invulnerable, but it only lasts 20 minutes?
     
  4. I was receiving errors with this currently and it seemingly wasn't functioning.
    Code:
    9:47 PM [Error] Failed to call hook 'OnPlayerDisconnected' on plugin 'Invulnerable Sleepers' (NullReferenceException: Object reference not set to an instance of an object)
    9:47 PM [Debug]   at Oxide.Plugins.InvulnerableSleepers+Sleeper..ctor (CodeHatch.Engine.Networking.Player player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.InvulnerableSleepers.OnPlayerDisconnected (CodeHatch.Engine.Networking.Player player) [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. Me the file Sleepers.json creat to /oxyde/data, it's not this the problem ?
     
  6. Wulf

    Wulf Community Admin

    That's where it stores sleeper information, not the configuration. You should see a Sleepers.json config file under oxide/config.
     
  7. no file sleeper.json or InvulnerableSleepers.json create under /oxyde/config
    sorry for my little explication i'm french i not speak english and i'm not dev just user to script.
     
  8. I have a problem. Do not Fail InvulnerableSleepers.json created. How to fix it?
     
  9. Ye, no file in /oxide/config
     
  10. Yes. He was not there.
     
  11. Is it possible to update the script to the problem of fichier.json that is not created?
    Thank you in advance, this script is a good idea
     
  12. It should be created automatically actually, do you have this issue with other plugins as well or only this one?
     
  13. Google Translate sorry for my english:
    The problem is that with this plugin. I tried with a new installation, only with this plugin. The result is the same.
    I installed my other plugins without any worries then with this installation.
    The method used is to install official oxide (http://oxidemod.org/downloads/oxide-for-reign-of-kings.950/) and copy / paste my plugins in "save / oxide / plugin"
    What can I give you to help resolve this concern?

    I also tried with snapshot version (https://github.com/OxideMod/Snapshots/blob/master/Oxide-ReignOfKings.zip) same result.
    I have forgotten something?
     
  14. Is it possible to give control of the times?

    Example: Player crashes due to the awfulness of Alpha 14. They receive 60 or 120 seconds of invulnerability, then become vulnerable again.

    This would prevent a lot of needless death due to a flaw in Alpha 14 that crashes players constantly.
     
  15. Mughisi updated Invulnerable Sleepers with a new update entry:

    Bug fix and added grace period

     
  16. can the different config options be explained? Possibly a short definition of what each of these means?

    It's obvious for NotifyAttacker and Time Between but not sure about the first 2.

    Code:
    "Options": {
        "AttackablePeriodInSeconds": 120,
        "GracePeriodInSeconds": 15,
        "NotifyAttacker": true,
        "TimeBetweenNotificationsInSeconds": 30
      }
    -------------------------------------------------------------------------------------------------------------------

    I may have answered my own question:

    AttackablePeriodInSeconds: After X seconds passes the sleeper is no longer attackable
    GracePeriodIn Secons: During the initial X seconds the sleeper is also not attackable.

    Example using the values above: Player logs off and is immediately invulnerable for 15 seconds. Once the 15th second passes the sleeper is now vulnerable for 105 more seconds. After which the sleeper is invulnerable again?

    Please correct me if I am wrong.
     
    Last edited by a moderator: Jun 3, 2015
  17. No, i think its like that:
    Player logs off and is still killable for the next 120 seconds. After he logs back in he is still unkillable for the first 15 seconds
     
  18. You are correct, if you don't want the initial invulnerability you can just set the grace period to 0. This was just added per request by Andrew
     
  19. So the grace period eats into the attackable period or does it extend the over all time.

    eg. 120 seconds total (including the initial grace period) or 135 seconds (15 second grace + 120 second vulnerable)

    Sorry I just want to be sure what will happen.
     
  20. It currently uses a part of the attackable period, I should've actually extended it now that you mention it