1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

[v1.15] VSSystem - PvP Commands

Discussion in 'Unsupported / Outdated Plugins' started by Enerdy, Mar 16, 2014.

  1. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Versus System
    Customizable PvP Commands with various effects

    ApiVersion: 1.15
    Terraria Version: 1.2.3.1
    Plugin Version: 1.2.2 (and changing)

    Author: Enerdy
    DISCLAIMER: This plugin is still under active development. It is functional as of now, and may be used, but beware that config / db formats may change over the course of updating, breaking your current custom commands. It it recommended not to add many custom commands for now.

    Features:
    • PvP Commands with varying damage, healing, buffs and debuffs.
    • Special states affecting the multitude of commands - Boost, Shield, Barrier and Locus - which can be set with the specific commands, or user-defined ones!
    • Each cooldown can have its own cooldown, which saves between logins - no log-off abuse!
    • Damage Equalizer which can be turned on in the config to balance out damage dealt based on the target's maximum health - a target with 250 hp (hypothetical number just for the example) will only take 50% of the damage while this is active.
    • PvP-only can be disabled in the config - if you feel like having hardcore tension on your server.
    Permissions:
    • vs.help - allows the use of /vshelp
    • vs.list - allows the use of /vslist
    • vs.reload - allows the use of /vsreload
    • vs.ignore.cooldown - ignores cooldowns when using a PvP Command
    • vs.commands.X - allows the use of /X command (replace X with the command alias). If vs.commands.* is given, the user gets access to the whole list of commands.
    Commands:
    • /help <command> - Every command has its own /help - even user-defined ones (Usage info in this case)
    • /vshelp <command> - The plugin's own help command, shows a descriptive file about the command, including Full Name (may vary from the alias), Damage/Heal and usage.
    • /vslist - Lists all currently available PvP Commands for the user, based on their permissions.
    • /vscommand - To use every PvP Command: replace vscommand with the command alias. Syntax may vary, use /help or /vshelp to check it out.
    Config:
    Code:
    {
      "PvPOnly": true,
      "Cooldowns": true,
      "Equalizer": false,
      "StabCooldown": 240,
      "DedgeCooldown": 360,
      "TickleCooldown": 300,
      "FsightCooldown": 240,
      "DrainCooldown": 156,
      "SilenceCooldown": 210,
      "WishCooldown": 144,
      "HwishCooldown": 300,
      "ChillCooldown": 195,
      "FlareCooldown": 250,
      "DoomCooldown": 384,
      "RakeCooldown": 270
      "Commands": [ ]
    }
    

    • PvPOnly: <true/false>
      • If true, PvP Commands can only target players who have their pvp status on.
      • If false, PvP Commands may be used against any player.
    • Cooldowns: <true/false>
      • If true, Cooldowns will be taken into account when using a command, unless the user has the vs.ignore.cooldown permission.
      • if false, Cooldowns will not be taken into account - it will be a command spam frenzy! That, of course, if you don't use plugins like Wolfje's CmdAlias to give commands a cost.
    • Equalizer: <true/false>
      • If true, damage will take into account the target's max hp for balance purposes. The Equalizer formula is the following: damage = base damage * (TargetMaxHP / 500)
      • If false, damage will proceed as intended (only take target's defense into account).
    • StabCooldown (and others):<number>
      • Sets the cooldown for built-in PvP Commands. Be aware that this might change in the future, where every command (including default ones) will be fully configurable.
    • Commands:<command format>
      • Adds a command to the PvP Command list. You can find two command examples that come with the config below. It's kinda complicated at the moment, so you may simply copy-paste one of those and then edit as you please.
    Code:
    "Commands": [
        {
          "Alias": "smash",
          "Name": "Smash",
          "Damage": 150.0,
          "DamageToSelf": 0.0,
          "Offensive": true,
          "Description": [
            {
              "Text": "Smashes target player, dealing pvp damage.",
              "Color": {
                "R": 255,
                "G": 255,
                "B": 0,
                "A": 255,
                "PackedValue": 4278255615
              },
              "InitMsg": null,
              "MidMsg": null,
              "EndMsg": null,
              "UsePlr1": false,
              "UsePlr2": false
            },
            {
              "Text": "Usage: /smash <player>",
              "Color": {
                "R": 255,
                "G": 255,
                "B": 0,
                "A": 255,
                "PackedValue": 4278255615
              },
              "InitMsg": null,
              "MidMsg": null,
              "EndMsg": null,
              "UsePlr1": false,
              "UsePlr2": false
            }
          ],
          "Effect": null,
          "UseSelf": true,
          "Cooldown": 120,
          "Counter": 0,
          "Timer": {
            "AutoReset": true,
            "Enabled": false,
            "Interval": 1.0,
            "Site": null,
            "SynchronizingObject": null,
            "Container": null
          },
          "MsgSelf": null,
          "MsgPlayer": null,
          "MsgAll": {
            "Text": null,
            "Color": {
              "R": 255,
              "G": 255,
              "B": 240,
              "A": 255,
              "PackedValue": 4293984255
            },
            "InitMsg": "",
            "MidMsg": " just smashed ",
            "EndMsg": "!",
            "UsePlr1": true,
            "UsePlr2": true
          },
          "Permission": "smash",
          "BypassPvp": false,
          "User": null,
          "Target": null
        },
        {
          "Alias": "knuckle",
          "Name": "Burning Knuckle",
          "Damage": 120.0,
          "DamageToSelf": 0.0,
          "Offensive": true,
          "Description": [
            {
              "Text": "Punches target player with flare fists, burning them for 15 seconds.",
              "Color": {
                "R": 178,
                "G": 34,
                "B": 34,
                "A": 255,
                "PackedValue": 4280427186
              },
              "InitMsg": null,
              "MidMsg": null,
              "EndMsg": null,
              "UsePlr1": false,
              "UsePlr2": false
            },
            {
              "Text": "Usage: /knuckle <player>",
              "Color": {
                "R": 255,
                "G": 255,
                "B": 0,
                "A": 255,
                "PackedValue": 4278255615
              },
              "InitMsg": null,
              "MidMsg": null,
              "EndMsg": null,
              "UsePlr1": false,
              "UsePlr2": false
            }
          ],
          "Effect": {
            "Type": "buff",
    [INDENT=1]"Parameter": 24[/INDENT]
            "Parameter2": 15
          },
          "UseSelf": 0,
          "Cooldown": 180,
          "Counter": 0,
          "Timer": {
            "AutoReset": true,
            "Enabled": false,
            "Interval": 1.0,
            "Site": null,
            "SynchronizingObject": null,
            "Container": null
          },
          "MsgSelf": null,
          "MsgPlayer": null,
          "MsgAll": {
            "Text": null,
            "Color": {
              "R": 178,
              "G": 34,
              "B": 34,
              "A": 255,
              "PackedValue": 4280427186
            },
            "InitMsg": "",
            "MidMsg": " hits ",
            "EndMsg": " with his Burning Knuckle!",
            "UsePlr1": true,
            "UsePlr2": true
          },
          "Permission": "knuckle",
          "BypassPvp": false,
          "User": null,
          "Target": null
        }
      ]
    

    You can find the VSConfig.cs file with explaining nodes here

    Changelog:
    1.2.4
    • Developer Note: Improved Effects and States by using Enums.
    1.2.3
    • Fixed OnLeave console spam.
    1.2.2
    • Released to tshock.co
    A commit-based change log can be found here

    Links:
     
  2. Kjkillercom

    Kjkillercom Level 8

    Joined:
    Oct 18, 2013
    Messages:
    247
    Cool, maybe we can fix the many flaws in Terrari's PVP and make it fun for once. lol
     
  3. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    I don't think of this as a replacement. Unless people get keybinds for commands, it is kinda hard to use commands while fighting the opponent directly, don't you think?
     
    • Like Like x 1
  4. IcyPhoenix

    TShock Contributor

    Joined:
    Jul 27, 2012
    Messages:
    367
    With mine, I just bind all commands to their weapons.
     
  5. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Would require a system where the target is who you hit with the weapon, or so.
     
  6. IcyPhoenix

    TShock Contributor

    Joined:
    Jul 27, 2012
    Messages:
    367
    Pretty much how it works.
     
  7. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    Updated page. Fixed the console spam, which should be returning unhandled exceptions if you use Terraria-Servers or other type of website which runs connection attempts to your server.
    >>> Change Log and GitHub​
     
    • Like Like x 1
  8. popstarfreas

    Plugin Developer

    Joined:
    Feb 27, 2012
    Messages:
    357
    Few things:
    Code:
     [PvP] Error: More than one player matched! Matches: TShockAPI.TSPlayer, TShockAPI.TSPlayer
    Code:
    2014-04-08 09:25:08 - Commands: INFO: Rofl executed: /wish.
    2014-04-08 09:25:09 - Commands: ERROR: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
    at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
    at PvPCommands.VSSystem.DoCommand(CommandArgs args)
    at TShockAPI.Command.Run(String msg, TSPlayer ply, List`1 parms)
    - Fixed after "/login"
    No death messages if you kill someone using one of the commands?
    And also, what about also another option for needing to have PvP Enabled to use the command?
     
  9. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    The first one was my bad. I forgot to add in the .Name, it seems.

    Second one needs to be looked up. It gets fixed after /login, you say? You need to be logged in to use commands, though?

    The third one - my UsePvP option will now require the user to have PvP On as well. Thanks for the nice suggestion.

    Oh, and if you kill someone with the commands, you get a standard blank (PlayerName in red) death message. I still haven't figured the packet to modify that. Looking at how /killr works should allow me to add custom death messages soon.
     
  10. Commaster

    Banned

    Joined:
    Oct 3, 2012
    Messages:
    149
    LanguageControl Deathtext filtering *hint hint hint*
     
  11. popstarfreas

    Plugin Developer

    Joined:
    Feb 27, 2012
    Messages:
    357
    I mean as in, once it says that, generally you can just re-/login to fix it. You're already logged-in yes, but its just re-logging in.