AntiOfflineRaid

Moved

Total Downloads: 6,123 - First Release: Nov 17, 2015 - Last Update: Mar 1, 2018

5/5, 32 likes
  1. Calytic

    Calytic Community Admin Community Mod

    Calytic submitted a new resource:

    AntiOfflineRaid - reduces damage done to your base depending on how long you are afk/offline

    Read more about this resource...
     
  2. Calytic

    Calytic Community Admin Community Mod

    Calytic updated AntiOfflineRaid with a new update entry:

    0.0.2

     
  3. Hey there.
    I dont know if you included this or not as I am not available to test this on my server But I think you should include an exception.
    What I mean is say for example you become unraidable after 10 minutes of being logged off, then if someone was to start raiding at 9 minutes then it should reset the timer, this way people don't blow down 1 wall and then cant do anything.

    Im not sure how you would implement it, but for balancing and to stop people from just hitting it with a rock to reset the timer you could use a add function to the timer and make it proportionate to the damage so the damage of a rock only adds 1 second while the damage from a c4 adds 1 minute, as an example.
     
  4. I see a possible concept that will not work with this plugin, when groups work this out they will use alt accounts to do the building and then simply just move to main accounts for the rest of the wipe cycle to have it shown as offline the whole time for the bonus.

    What have you got in place to counteract this ?
    [DOUBLEPOST=1447730921][/DOUBLEPOST]My suggestion would be to use door toggle as a trigger.
     
  5. My recomendation to that, as I had the same thought to use. is to set a limit, so if the house owner hasnt logged in for x days (as set in config) then the protection will disable
     
  6. Hi, nice idea, nice plugin... thanks.. i testing in my server.. Feedback posted tommorow.. but.. small question...

    Code:
    [11/18/2015 1:44:58 AM] [Oxide] 1:44 AM [Debug]   at Oxide.Plugins.AntiOfflineRaid.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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 hookname, System.Object[] args) [0x00000] in <filename unknown>:0 
    Code:
    [11/18/2015 1:44:58 AM] [Oxide] 1:44 AM [Error] Failed to call hook 'OnPlayerConnected' on plugin 'AntiOfflineRaid v0.0.2' (InvalidCastException: Cannot cast from source type to destination type.)
     
  7. With the alt account thing a suggestion is to allow better protection for the longer you have been logged in over the last X Hours. Eg. 48 hours

    Logged in for 1 hour less protection than a person logged in for 8 hours
    If someone logs in for 5 minutes their protection is very low and for a very short time.

    EDIT : Suggest AFK doesn't count towards online time
     
  8. That suggestion does sound like a cool idea, the draw back that I see for that is possible more resources would be used than what is worth, if you have many players on it would spend alot of time tracking and calculating that information, not just that but also the fact that then it has to make sure that doesn't get altered when player is offline, also meaning if someone normally players everyday for 3 hours but on day only comes on for 5 minutes his protection would be weak and he would be penalized just cause for example he had a internet connection that day.
    Also if they did have an alt account, then they would probably just have that left on for the set time to get the best protection and then log off after.

    Having a read of the mod page my understanding now is that it can be raided for first 10 minutes, then becomes invunerable then over time you can start doing more damage.

    Is this correct?
     
  9. There is already a mod that tracks online and afk times.
    If that was utilised it would save doing it in this plugin.

    The whole idea of tracking online time with no AFK added to it would be to stop the ALT account being used as just sitting in game.
    If someone gets on for 5 minutes 1 day and the setting is for total time over X hours, it is up to the server admin to make it total online hours over X amount of time.
    Eg. could be online for 8 hours over 120 hours means max protection or 8 hours over 48 hours means max protection. That can be left up to the admin.
     
  10. This mod already counts afk as being offline so that combats that, and you can even set it to something like 1 min if you want to be harsh.
    What I understood on your last comment was if someone played for only 5 minutes in the last 2 day then they get almost no protection, that part I was saying is very hard to do as you would need to log and track every player constantly for a 48 hour span (very resource intensive for a game).
    how every if you where to base it on just there total time that would be more effective (as per what I believe you are saying in this comment).
    I do also know about these player info DB mods as I have one or two currently installed in my own personal server. I have been running a NZ server for 3 months now, I just haven't advertised it here.
     
  11. Yeah that is what I mean. Only count active online time, then compare it to a number of total hours set by a variable set by admin for total hours.
    Eg. 6 hours in 72 hours gets full while 3 in 72 hours gets half
    Leaving the X variables on all settings up to the server admin means he/she can set it up however they want as well.
     
  12. yeah, implementing something like that could work, but then that would mean someone who just joined and played for 30 minutes on your server would be penalize and raiders could abuse that to get cheap resources.
     
  13. It is like that now.
    Just means the players who put the effort in time on your server get an advantage.
    Nothing will be a perfect solution.
     
  14. Dont take it in a bad way, Possible a setting like that may just need to be toggable, reason a small server that is trying to keep new players would want to help them and something like that could have a negative effect, while bigger servers could indeed benefit from that alteration
     
  15. Code:
    8:55 AM [Error] Failed to call hook 'OnPlayerConnected' on plugin 'AntiOfflineRaid v0.0.2' (InvalidCastException: Cannot cast from source type to destination type.)
    8:55 AM [Debug]   at Oxide.Plugins.AntiOfflineRaid.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo 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 hookname, System.Object[] args) [0x00000] in <filename unknown>:0
    8:55 AM [Info] [Notifications] [FEAR] Andrea joined the server.
     
  16. Hi. I have been testing this plugin, and cant get it to work on doors! Is there something im missing
     
  17. any idea for this problem ?
     
  18. Beginning on line 251 in AntiOfflineRaid.cs it says:
    Code:
      void OnPlayerConnected(BasePlayer player)
      {
      UpdateLastOnline(player);
      }
    But, as we can read in the docs there is no parameter (BasePlayer player) for OnPlayerConnected. Also this player hook "OnPlayerConnected" is called before the player object is created and so we can not use it.

    You can read about that here: -> Oxide API for Rust

    To get this working we must work with "OnPlayerInit":

    Just change the following Code beginning on line 251 in AntiOfflineRaid from:
    Code:
      void OnPlayerConnected(BasePlayer player)
      {
      UpdateLastOnline(player);
      }
    to this:
    Code:
      void OnPlayerInit(BasePlayer player)
      {
      UpdateLastOnline(player);
      }
    This should work.

    The other part "OnPlayerDisconnected" on line 246 should be fine and working with (BasePlayer player) and not be a problem. Just "OnPlayerConnected" should not work and that´s why you get this error message.
     
  19. Calytic

    Calytic Community Admin Community Mod

    Calytic updated AntiOfflineRaid with a new update entry:

    0.0.3


    [DOUBLEPOST=1448090869][/DOUBLEPOST]Ugh, sorry for the delay. Wasn't watching the thread again.
     
  20. Is the buildings only binded to the player thats created it, so if 5 people make and house, it wont work `?
    [DOUBLEPOST=1448100021][/DOUBLEPOST]Still wont work on doors! Im a noob in this, but walls worked fine. Any thought
    [DOUBLEPOST=1448100398][/DOUBLEPOST]Seem like the doorframe works now. Thats new, but no doors