1. Greetings,

    Our server currently has both WarTime and WarTracker running. WarTime is supposed to be providing the block protection and allowing Admins to approve wars so we can moderate them. Currently, we are having an issue with siege damage. Ballista Bolts will do damage and report in chat, but I understand Trebs are still not doing so. At the moment, the Ballista seems to do 100 damage per shot, however the Treb damage widely varies. Even with WarTime set to Peace, Trebs are doing damage.

    I am not sure if these plugins might be conflicting with one another or if it could be something else. Has anyone seen a similar issue?
     
  2. The plugins are not working properly, i'm quite sure of it.
     
  3. We have had some strange issues. Unloading both plugins would still not permit damage. Sometimes you could do siege damage, and then it would suddenly stop working.

    I removed WarTracker entirely and it seems that /wartime is doing some of what I had hoped. Right now it does prevent Ballista damage, announce it in chat, and permit it when toggled to war.

    Trebuchets are still not announced at all and are able to do damage in peace or war. It also seems to be doing a considerable amount. 1 Trebuchet Stone will do 30,000 - 50,000 damage no matter what. I know it can/will do splash damage and impact multiple blocks, but that seems rather high indeed.
     
    Last edited by a moderator: Jul 20, 2015
  4. are you using Grand Exchange?
    I remember there being a problem with that plugin causing trebs to not damage.

    However that could of been fixed. Still a good idea to check the support forum for the plugins in questions.
     
  5. Fraccas has apparently stopped supporting WarTime it would seem. I did some reading on Grand Exchange that suggested it might limit or prevent Treb damage, but my problem really is that I have no way of preventing Treb damage. It always seems to work, no matter what. I did remove Grand Exchange entirely thinking maybe that would help, but it did not. I actually removed all of our plugins except WarTime and rebooted the server. Same problem. Removed WarTime and reinstalled a clear version. Same problem.

    The Logs plugin seems to not pick up Treb damage either apparently, at least some people on that thread seem to be having that issue anyway. I am just wondering if CodeHatch changed something about the Treb that means the line of code that is supposed to be catching it needs to be updated.
    [DOUBLEPOST=1437505487,1437479853][/DOUBLEPOST]
    Code:
    void OnCubeTakeDamage(CubeDamageEvent e) {
    try {
    if (keysMatched && e != null) { 
    {if (waron)
    {if (e.Damage.Amount > 50) 
    { if (e.Damage.DamageSource.Owner is Player && e.Entity.Owner is Player) 
    { bool treb = e.Damage.Damager.name.ToString().Contains("Trebuchet"); 
    bool ballista = e.Damage.Damager.name.ToString().Contains("Ballista");
    if (treb || ballista)
    { if (offlineSiege)
    { if (announceSiegeInChat)
    { message = e.Damage.DamageSource.Owner.Name + " has done " + e.Damage.Amount.ToString() + " to someone's property with a " + e.Damage.Damager.name.ToString() + "!"; 
    This is the section in WarTime that most interests me. It DOES work for a Ballista just like it says. If War is on, the damage amount is more than 50, the damage source and entity owner is the player, offline siege is on, and if siege announce is on then it says in chat that "Player Name has done 100 dmg to someone's property with a Ballista".

    However, the Treb portion of the section does not work and will not announce the damage. Similarly, the Treb portion of the no damage outside of War section does not work and will allow damage regardless. That section is here I believe:

    Code:
    } else { bool treb = e.Damage.Damager.name.ToString().Contains("Trebuchet");
    if (treb) {  Puts("A base was attacked with a " + e.Damage.Damager.name.ToString());       
    Puts("It is peace time so the treb stone did zero damage!");                                    
    e.Damage.Amount = 0; }    } } 
    My first thought is that something changed in how the Treb is listed so <e.Damage.Damager.name.ToString().Contains("Trebuchet")> is no longer working and thus not announcing or preventing damage because the plugin is searching for a Damager that does not exist; this seems to work for the Ballista as-is which made me think something had possibly changed.

    The interesting side is that Logs seems to record both such as:

    Code:
    Cubes: Sharpstar has done 0.1039088 [OutOfBounds, Siege] damage points to a cube with a [Entity] Explosion Trebuchet (900) at [-280,145,852].
    Cubes: Sharpstar has done 100 [Siege] damage points to a cube with a [Entity] Ballista Bolt at [-282,145,862].
    
    Now, the damage amount is wrong on the Treb and I am not sure what the OutOfBounds means, but it is an entity attached to the player name doing damage and containing the word Trebuchet. Changing Trebuchet to Explosion Trebuchet did not resolve the issue. Changing the Damage threshold from > 50 to > 0 or > -1 did not work either, although the Ballista was still working just fine.

    Just to further cloud the question, the Pwn plugin seems to amplify the damage of a Treb if you have it on when you shoot. I was looking at that code trying to figure out how it might be identifying the Treb and if I could modify that code somewhat and use it in WarTime to pick up the Treb again. That code is here:

    Code:
    void OnCubeTakeDamage(CubeDamageEvent e) {             
    Player damager = e.Damage.DamageSource.Owner;
    if (!pwn) return;            
    if (!damager.HasPermission("admin")) return;
    if(e.Damage.Amount < 0) {
    e.Damage.Amount = pwnRepair;
    PrintToChat(damager, "PWN repair! healing " + pwnRepair.ToString() + " damage.");
    return;
    }
    PrintToChat(damager, "PWN hit! dealing " + pwnDMG.ToString() + " damage.");   
    e.Damage.Amount = pwnDMG;                       
            }
    }
    
    Pwn seems to say that 'damager' is <e.Damage.DamageSource.Owner;> and that if Pwn is on, the user has permission for it, and the damage amount is < 0 it heals or > 0 it does damage. That works just fine and it amplifies the Treb's damage as well. So, I assume I am showing up as the 'damager' or <e.Damage.DamageSource.Owner;> for the damage done by the Treb, which makes me think that I am missing something somewhere.

    Thoughts?
     
  6. Did a quick test and this worked at nullifying only treb damage.

    Code:
    using System;
    using System.Collections.Generic;using CodeHatch.Build;
    using CodeHatch.Engine.Networking;using CodeHatch.Engine.Core.Networking;
    using CodeHatch.Blocks;
    using CodeHatch.Blocks.Networking.Events;
    using CodeHatch.Networking.Events.Entities;
    using CodeHatch.Networking.Events.Entities.Players;
    using CodeHatch.Networking.Events.Players;
    using CodeHatch.Networking.Events.Social;namespace Oxide.Plugins
    {
        [Info("Damager", "SweetLouHD", "0.0.1")]
        public class Damager : ReignOfKingsPlugin
        {
            void OnCubeTakeDamage(CubeDamageEvent e) {
                bool treb = e.Damage.Damager.name.ToString().Contains("Trebuchet");
                if(treb)
                {
                    e.Damage.Amount = 0;
                    PrintToChat("Damage was nullified.");
                } else {
                    PrintToChat("Damage was delt from something else.");
                }
            }
        }
    }
     
  7. I have resolved the issue. The current version of WarTracker does not provide block protection, so it was not that. The current version of WarTime doesn't either, but a little playing with it will make sure it at least kicks or bans people. We actually had an updated paid version of WarTime that was meant to control block damage by siege weapons and also make crests immune among other features. Once we threw that code into an editor, we realized it had a great many errors and that it would not really be worth our time to try and resolve them all.

    We ended up just starting fresh with a blank page and coded our own War plugin and were able to get it to prevent block damage from any siege engine outside of war and announce it all through chat. We also managed to get crest protection in there as well.

    We are finally back in a good spot xD