Govic Posted July 4, 2016 Share Posted July 4, 2016 So I think I have my code right? How would I go about adding it to the game? http://pastebin.com/c7j0mwd1 Link to comment Share on other sites More sharing options...
schwanz9000 Posted July 4, 2016 Share Posted July 4, 2016 So I think I have my code right? How would I go about adding it to the game? http://pastebin.com/c7j0mwd1 I have not tested this, but you'll need to add an if statement somewhere under the if starts with "/" section in Hook.cs Example: if (_message == "StartShutdown") //This will be your chat forward slash command name. { if (ShutDownWorld.IsEnabled) [indent]{[/indent] [indent][indent]ShutDownWorld.Start;[/indent] [/indent] [indent]}[/indent] else [indent]{[/indent] [indent][indent]_cInfo.SendPackage(new NetPackageGameMessage(EnumGameMessages.Chat, string.Format("{0}Shutdown is not enabled.[-]", CustomCommands.ChatColor), "Server", false, "", false));[/indent] [/indent] [indent]}[/indent] [indent]return false;[/indent] } You'll also need to add the IsEnabled code to LoadConfig.cs I might be missing something, but that should get you started down the rabbit hole. Link to comment Share on other sites More sharing options...
open6l Posted July 5, 2016 Share Posted July 5, 2016 How about adding an option to call /home whatever you wish ie /home2 or /base2 (so that you can run it along side CBSM and have 2 homes available) Link to comment Share on other sites More sharing options...
schwanz9000 Posted July 5, 2016 Share Posted July 5, 2016 How about adding an option to call /home whatever you wish ie /home2 or /base2 (so that you can run it along side CBSM and have 2 homes available) I wouldn't recommend running both at the same time due to potential conflicts, but you can download a copy of the source code from dmustanger's github and rename /home fairly easily if you'd like. Look in Hook.cs. In CBSM, can't you just setup a zGate for multiple "homes"? Link to comment Share on other sites More sharing options...
Govic Posted July 6, 2016 Share Posted July 6, 2016 Isn't hook.cs for chat commands ingame like /help? If so do i need to add it there if I want it to be automated like the save world command or do I it to loadconfig.es like you also said? Link to comment Share on other sites More sharing options...
schwanz9000 Posted July 6, 2016 Share Posted July 6, 2016 Oh yeah! Duh! I guess you wouldn't want to give everyone on the server the ability to shutdown the server via chat. You could add code to check admin permission. Examples are in the AdminChatCommands section. LoadConfig.cs reads the ServerToolsConfig.xml. You'll need to add the Enabled lines to be able to turn it on and off. Sorry, but I'm not sure how to add it as a console command. Automated how? Like every 24 hours or something? Link to comment Share on other sites More sharing options...
Govic Posted July 7, 2016 Share Posted July 7, 2016 (edited) Yea, so i took the save world command that runs automatically and modified it to be a shutdown one. I'm having trouble locating the servertoolsconfig.xml, but I managed to find Servertools.csproj and added a line below <Compile Include="src\AutoSaveWorld\AutoSaveWorld.cs" /> as <Compile Include="src\AutoRestart\AutoRestart.cs" /> Is this the file you were refering to? Also are the config files generated from the .cs files from within the src folder or is that something else I need to change? Edited July 7, 2016 by Govic (see edit history) Link to comment Share on other sites More sharing options...
Govic Posted July 9, 2016 Share Posted July 9, 2016 Also how do I go about compiling these files into the final format? Link to comment Share on other sites More sharing options...
schwanz9000 Posted July 10, 2016 Share Posted July 10, 2016 Govic, I looked into the code you posted and found a few things that needed to be fixed. Here is a link to my version of the shutdown timer function added to ServerTools 3.2 compiled and ready to go. https://github.com/schwanz9000/ServerTools3.2withShutdownTimer/releases This will check admin permissions which must be level 0 for the /shutdown command to start. Once started, it will start a 10 minute timer counting off each minute and then the last 30, 10, 5, 4, 3, 2, 1, seconds. NOTE TO ALL: If you have a rented Blue Fang Solutions dedicated server, they already have a server side script that automatically restarts the server. If you want to stop the server for a period of time, you must use their dashboard stop button. Also how do I go about compiling these files into the final format? These files are written and compiled in Microsoft Visual Studio. You can get a free fully functional version for private use here. Link to comment Share on other sites More sharing options...
Govic Posted July 10, 2016 Share Posted July 10, 2016 I appreciate the work you did, but I was wanting a feature to automate this shutdown command like the auto save command that Auto saves the world every x amount of minutes adjustable via config. That was what I was trying to create although the ability to shutdown via chat is also helpful. Link to comment Share on other sites More sharing options...
rm304 Posted July 12, 2016 Share Posted July 12, 2016 With the mod installed in the Mod folder and the server running, go to /saves/ServerTools and enable custom commands in the ServerToolsConfig.xml. Then you can setup the commands in CustomChatCommands.xml to teleport to x,y,z. Once setup, you can use /whateveryourcommandis. Use -1 as the Y coord so you don't fall through the world. It will place you on the top most block. For that, I either make a platform/area just for the landing or an air shaft with a wall and spikes at the surface to land in underground establishments. Basically don't have any blocks above wherever you want to land. You can setup as many of these as you'd like and can set a timer for how long between ports. Example: <Command Command="arena" Response="tele {EntityId} 1000 -1 1000" /> As far as zgates and a coin system, there isn't anything for that. I just need it to have an economy mod for shop and link commands to it. So if wanted to charge for a command. Also need the ability to link multiple commands. Ex: /fixleg - debuff sprainedLeg; debuff brokenLeg; say "be careful"; pay 100 coins. Other features would be nice too: - Live Poll - Custom chat colors - Event timers - Area triggers; going to certain location triggers a command or event. - Events with prizes, race, PvP arena, scavenger hunt. Link to comment Share on other sites More sharing options...
Govic Posted July 19, 2016 Share Posted July 19, 2016 In addition to my request of a scheduled shutdown command a user of my server has brought to my attention that a vote kick feature would be extremely valuable. Would this be hard to implement? Link to comment Share on other sites More sharing options...
Blight Posted July 23, 2016 Share Posted July 23, 2016 First... i love it, works really great and that without telnet =). Thanks! i use coppi's mod -> https://7daystodie.com/forums/showthread.php?44835-Coppi-MOD-New-features there is a command to change that chat color for a specific player. can you write a fix, for your mod to ignore the "[colorcode]" (for gimme and other commands)? sorry for my english. here is a picture (i think it is better to understand ^^): http://fs5.directupload.net/images/160723/g3qt45oy.png Link to comment Share on other sites More sharing options...
schwanz9000 Posted July 24, 2016 Share Posted July 24, 2016 First... i love it, works really great and that without telnet =). Thanks! i use coppi's mod -> https://7daystodie.com/forums/showthread.php?44835-Coppi-MOD-New-features there is a command to change that chat color for a specific player. can you write a fix, for your mod to ignore the "[colorcode]" (for gimme and other commands)? sorry for my english. here is a picture (i think it is better to understand ^^): http://fs5.directupload.net/images/160723/g3qt45oy.png Try my modded files... https://7daystodie.com/forums/showthread.php?44916-Coppi-s-Additions-and-ServerTools-fighting-for-Chat-Hook Link to comment Share on other sites More sharing options...
Govic Posted July 28, 2016 Share Posted July 28, 2016 Okay i was playing around and working with visual studio, but i still was unable to find the location where the servertoolsconfig.xml is generated from. I would like to add my automatic restart as something that can be enabled/disabled. Does it generate the config based on the files it has and i dont need to do anything? Also it is the .sln that i should have open correct, and when i get it to the stage to try it i build it? Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 28, 2016 Share Posted July 28, 2016 great mod - love it. any way to support Giveto commands for admins like "GiveTo 171 Stone Axe 600 1 (player ID, item, quality, quantity) also can /gimme support giving xp like "giveselfskillxp Mining Tools 10000" Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 28, 2016 Share Posted July 28, 2016 so how does the Ban or kick players for invalid items/blocks in their inventory work? I gave myself 500 concreteblockr (re-enforced) and it did nothing. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 28, 2016 Share Posted July 28, 2016 FEATURE request - Teleport - can you add it? so we can teleport to friends Link to comment Share on other sites More sharing options...
schwanz9000 Posted July 29, 2016 Share Posted July 29, 2016 Okay i was playing around and working with visual studio, but i still was unable to find the location where the servertoolsconfig.xml is generated from. servertoolsconfig.xml is created in the LoadConfig.cs I would like to add my automatic restart as something that can be enabled/disabled. Does it generate the config based on the files it has and i dont need to do anything? Also it is the .sln that i should have open correct, and when i get it to the stage to try it i build it? You need to add a line to the UpdateConfig method in LoadConfig.cs. Yes. The .sln is the project AKA solution. Build - Build ServerTools will make the .dll. The new .dll is located in the (your folder)ServerTools\obj\Debug or (your folder)ServerTools\obj\Release depending on the Solution Configurations. great mod - love it. any way to support Giveto commands for admins like "GiveTo 171 Stone Axe 600 1 (player ID, item, quality, quantity) also can /gimme support giving xp like "giveselfskillxp Mining Tools 10000" Give and Give XP are part of Alloc's Server Fixes. so how does the Ban or kick players for invalid items/blocks in their inventory work? I gave myself 500 concreteblockr (re-enforced) and it did nothing. RconcreteBlock is not a default invalid item. Look at InvalidItems.xml for a list of items or add the items you want. FEATURE request - Teleport - can you add it? so we can teleport to friends You can set custom commands to teleport to your friends bases if that helps. dmustanger - I hope you don't mind me answering all these questions for you. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 29, 2016 Share Posted July 29, 2016 thank you for the answers, can you provide me with a custom command example for teleport? I am thinking of a teleport to a City or a central safe area. Link to comment Share on other sites More sharing options...
open6l Posted July 29, 2016 Share Posted July 29, 2016 <Command Command="hubcity" Response="tele {EntityId} 0 -1 0" DelayBetweenUses="30" /> That's a basic one that should teleport you to coords 0,0 at the surface when you type /hubcity in chat (with a 30 second cooldown). Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 30, 2016 Share Posted July 30, 2016 what is the <Tool Name="Day7" Enable="False" /> do in the Servertoolsconfig.xml? Link to comment Share on other sites More sharing options...
open6l Posted July 30, 2016 Share Posted July 30, 2016 what is the <Tool Name="Day7" Enable="False" /> do in the Servertoolsconfig.xml? Day7 announces when the next day 7 horde is. Change enable to True and type /day7 for it to display how many days before the next day 7 horde. Link to comment Share on other sites More sharing options...
dmustanger Posted July 30, 2016 Author Share Posted July 30, 2016 dmustanger - I hope you don't mind me answering all these questions for you. your good i have been super busy lately Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted July 30, 2016 Share Posted July 30, 2016 so how do you tell what the E/W/N/S when I enter 854 -0 1653 I end up somewhere but not at what my map says. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now