Giter Site home page Giter Site logo

pryaxis / tshock Goto Github PK

View Code? Open in Web Editor NEW
2.4K 2.4K 378.0 52.5 MB

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.

License: GNU General Public License v3.0

C# 98.62% Python 1.28% Dockerfile 0.10%
c-sharp otapi terraria terraria-api terraria-server terraria-servers tsapi tshock

tshock's People

Contributors

agaspace avatar allcontributors[bot] avatar arthri avatar axeelander avatar axiskriel avatar bartico6 avatar cardinal-system avatar codercow avatar darky2k1 avatar dogoofalchion avatar drunderscore avatar hakusaro avatar ivanbiljan avatar marioe avatar mistzzt avatar mmavipc avatar moisterrific avatar olink avatar patrikkk avatar punchready avatar quicm avatar renovate[bot] avatar rjhazelwood avatar sgkoishi avatar signaturebeef avatar stevenh avatar tylerjwatson avatar whitexz avatar zeuno8 avatar zidonuke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tshock's Issues

Lag gets people banned for KT abuse

You get banned for using Dirt Wand as it uses Place Tile so it trips the distance check.
You can get banned for using purification powder.

Time command

/noon
/dawn
/dusk
/midnight
For Administrators

making myself admin

Hey I need help with making myself admin. iv'e pput both my internal and external ip's in the admins.txt files and I still dont have access to all of the commands. Thanks for the help in advance!

Revert kill tile changes - bugs

  • Liquids act weird, as if there were no tiles.
  • Things like chairs and such are not reverted.
  • Revertion is only done to a certain point. Might miss a couple of blocks.

Chests

Chests are unbreakable.

P.S. Also add an unban command.

BanExplosives has no effect

{
  "InvasionMultiplier": 40,
  "DefaultMaximumSpawns": 3,
  "DefaultSpawnRate": 400,
  "ServerPort": 7777,
  "EnableWhitelist": false,
  "InfiniteInvasion": false,
  "AlwaysPvP": false,
  "KickCheaters": false,
  "BanCheaters": false,
  "KickGriefers": true,
  "BanGriefers": true,
  "BanKillTileAbusers": false,
  "KickKillTileAbusers": true,
  "BanExplosives": true,
  "KickExplosives": true,
  "SpawnProtection": true,
  "SpawnProtectionRadius": 5,
  "DistributationAgent": "facepunch"
}

Show configuration command

Can you add the show-config command. Here is the patch of what I have been using.

diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs
index f9829ee..d62a5ed 100644
--- a/TShockAPI/Commands.cs
+++ b/TShockAPI/Commands.cs
@@ -29,6 +29,8 @@ namespace TShockAPI
             TShock.admincommandList.Add("kick", new CommandDelegate(Kick));
             TShock.admincommandList.Add("ban", new CommandDelegate(Ban));
             TShock.admincommandList.Add("off", new CommandDelegate(Off));
+            TShock.admincommandList.Add("off-nosave", new CommandDelegate(OffNoSave));
+            TShock.admincommandList.Add("show-config", new CommandDelegate(ShowConfig));
             TShock.admincommandList.Add("reload", new CommandDelegate(Reload));
             TShock.admincommandList.Add("dropmeteor", new CommandDelegate(DropMeteor));
             TShock.admincommandList.Add("star", new CommandDelegate(Star));
@@ -54,7 +56,6 @@ namespace TShockAPI
             TShock.admincommandList.Add("kill", new CommandDelegate(Kill));
             TShock.admincommandList.Add("help", new CommandDelegate(Help));
             TShock.admincommandList.Add("slap", new CommandDelegate(Slap));
-            TShock.admincommandList.Add("off-nosave", new CommandDelegate(OffNoSave));
             TShock.commandList.Add("help", new CommandDelegate(Help));
             TShock.commandList.Add("kill", new CommandDelegate(Kill));
         }
@@ -111,6 +112,27 @@ namespace TShockAPI
             Netplay.disconnect = true;
         }

+        public static void ShowConfig(CommandArgs args)
+        {
+            int ply = args.PlayerID;
+            var commands = TShock.commandList;
+            if (TShock.players[ply].IsAdmin())
+                commands = TShock.admincommandList;
+            Tools.SendMessage(ply, "TShock Config:");
+            string lineOne = "";
+            lineOne += "KickCheater : " + ConfigurationManager.kickCheater + ", ";
+            lineOne += "BanCheater : " + ConfigurationManager.banCheater + ", ";
+            lineOne += "KickGriefer : " + ConfigurationManager.kickGriefer + ", ";
+            lineOne += "BanGriefer : " + ConfigurationManager.banGriefer;
+            Tools.SendMessage(ply, lineOne, new float[] { 255f, 255f, 0f });
+            string lineTwo = "";
+            lineTwo += "BanTnt : " + ConfigurationManager.banTnt + ", ";
+            lineTwo += "KickTnt : " + ConfigurationManager.kickTnt + ", ";
+            lineTwo += "BanBoom : " + ConfigurationManager.banBoom + ", ";
+            lineTwo += "KickBoom : " + ConfigurationManager.kickBoom;
+            Tools.SendMessage(ply, lineTwo, new float[] { 255f, 255f, 0f });
+        }
+
         public static void Reload(CommandArgs args)
         {
             FileTools.SetupConfig();

Goblin invasions

Goblin invasions don't work, you can start an invasion but the goblins never come...

Teleport and cheaters check not working in latest

Get the following errors during cheater check (no one but admins are allowed to join if check is enabled) and teleport.

System.NullReferenceException: Object reference not set to an instance of an object.
at TShockAPI.Tools.HandleCheater(Int32 ply)
at TShockAPI.TShock.GetData(GetDataEventArgs e)

System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Terraria.NetMessage.SendData(Int32 msgType, Int32 remoteClient, Int32 ignoreClient, String text, Int32 number, Single number2, Single number3, Single number4)
at TShockAPI.TShock.Teleport(Int32 ply, Single x, Single y)
at TShockAPI.Commands.TPHere(CommandArgs args)
at TShockAPI.TShock.OnChat(Int32 ply, String msg, HandledEventArgs handler)

Help not showing all commands

Help output seems to miss 6th, 11th and 16-20th command of the page.

Below is the to should only 15 per page and not miss the 6th and 11th command of the page.

public static void Help(CommandArgs args)
        {
            int ply = args.PlayerID;
            var commands = TShock.commandList;
            if (TShock.players[ply].IsAdmin())
                commands = TShock.admincommandList;
            Tools.SendMessage(ply, "TShock Commands:");
            int h = 1;
            int i = 0;
            string tempstring = "";
            int page = 1;
            if (args.Message.Split(' ').Length == 2)
                int.TryParse(args.Message.Split(' ')[1], out page);
            if (commands.Count > (15 * (page - 1)))
            {
                for (int j = (15 * (page - 1)); j < commands.Count; j++)
                {
                    if (i == 3) break;
                    if (j == commands.Count - 1)
                    {
                        tempstring += "/" + commands.Keys.ElementAt(j) + ", ";
                        Tools.SendMessage(ply, tempstring.TrimEnd(new char[] { ' ', ',' }), new float[] { 255f, 255f, 0f });
                    }
                    if ((h - 1) % 5 == 0 && (h - 1) != 0)
                    {
                        Tools.SendMessage(ply, tempstring.TrimEnd(new char[] { ' ', ',' }), new float[] { 255f, 255f, 0f });
                        tempstring = "/" + commands.Keys.ElementAt(j) + ", ";
                        i++;
                        h++;
                    }
                    else
                    {
                        tempstring += "/" + commands.Keys.ElementAt(j) + ", ";
                        h++;
                    }
                }
            }
            if (commands.Count > (15 * page))
            { Tools.SendMessage(ply, "Type /help " + (page + 1).ToString() + " for more commands.", new float[] { 255f, 0f, 255f }); }
            Tools.SendMessage(ply, "Terraria commands:");
            Tools.SendMessage(ply, "/playing, /p, /me", new float[] { 255f, 255f, 0f });
        }

Revert kill tile changes - bugs

  • Liquids act weird, as if there were no tiles.
  • Things like chairs and such are not reverted.
  • Revertion is only done to a certain point. Might miss a couple of blocks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.