Simple Server Restart Text Command

Posts 1–15 of 18 · Page 1 of 2
Simple Server Restart Text Command
Just a quick and simple command, for those of you who host servers with a large amount of people.


Basically what is does is when an Admin types the command "SvrRestart", An announcement text comes up saying


"Server restarting soon. Please be ready to disconnect. Estimated server down time: 30 Seconds - 1 Minute"


Just copy + paste this in to Player.Chat.cs

And, no, this does not restart the server. It's just a quicker way to say "server restarting"

Example:

Code:
else if (cmd.Equals("SvrRestart", StringComparison.OrdinalIgnoreCase) && CmdReqAdmin())
            {

                foreach (var i in RealmManager.Clients.Values)
                {
                    i.SendPacket(new TextPacket()
                    {
                        BubbleTime = 0,
                        Stars = -1,
                        Name = "@Announcement",
                        Text = "Server restarting soon. Please be ready to disconnect.                               Estimated server down time: 30 Seconds - 1 Minute"
                    });
                }
            }
Please Post the Bes,nut,geb behaviors PLEASEEEE
Btw nice command Gonna use it
I'm only gonna release it when I finish them
Finish the Geb, Nut And Bes Behaviors faster pls!
^^ Dude,I love his work he done already, and if he gonna release geb and all, that would be just awesome, but is not easy too,
I can't code behaviours at all, I can do stuff like that, but for doing that dude, your the best.
Quote Originally Posted by Schev View Post
^^ Dude,I love his work he done already, and if he gonna release geb and all, that would be just awesome, but is not easy too,
I can't code behaviours at all, I can do stuff like that, but for doing that dude, your the best.
EHM EHM.
</3
Quote Originally Posted by Trapped View Post
EHM EHM.
</3
I love work you done with ur git hub as well.
<3 ya @Trapped thanks for helping with all problems I ran in to
C453 Can ya release the Behaviours for Geb and all?
Can't Find Player.Chat.cs where is it Located???
If you're using my server restarter, you can add a 30 second thread sleep to this command and the call to exit the app and my restarter will start it again.
Pretty much a true restart.

---------- Post added 06-01-2013 at 12:27 AM ---------- Previous post was 05-31-2013 at 11:15 PM ----------

Is there a more efficient way of doing this?:
Code:
foreach (var i in RealmManager.Clients.Values)
                {
                    i.SendPacket(new TextPacket()
                    {
I can't imagine Kabam does it the same way - looping through all the objects
Quote Originally Posted by krazyshank View Post
If you're using my server restarter, you can add a 30 second thread sleep to this command and the call to exit the app and my restarter will start it again.
Pretty much a true restart.

---------- Post added 06-01-2013 at 12:27 AM ---------- Previous post was 05-31-2013 at 11:15 PM ----------

Is there a more efficient way of doing this?:
Code:
foreach (var i in RealmManager.Clients.Values)
                {
                    i.SendPacket(new TextPacket()
                    {
I can't imagine Kabam does it the same way - looping through all the objects
Indeed it is not the best method. Creepylava had an interserver communication channel, for announces, guild chat, etc. Too bad he deleted his repo (I have a mirror copy tho).
Found it! Thanks!

----EDIT----

uhh.. men... it didn't work for me again. T_T
I tried making sure if it worked so i change -(cmd.Equals("tutorial"....))- to -(cmd.Equals("titorial"....))-
after doing so. I typed /titorial after that Unknown Command. so i tried /tutorial but then It still worked even i changed it. T_T help please....
Quote Originally Posted by jlr2_08 View Post
Found it! Thanks!

----EDIT----

uhh.. men... it didn't work for me again. T_T
I tried making sure if it worked so i change -(cmd.Equals("tutorial"....))- to -(cmd.Equals("titorial"....))-
after doing so. I typed /titorial after that Unknown Command. so i tried /tutorial but then It still worked even i changed it. T_T help please....
You have to rebuild the project now.
@Trapped Thank you Very Much! but why is it that when i rebuild wServer i get this...
also .nuget is unavailable.
i already know the "package" ... but the two Warnings and 2 Errors, I still dont get it
do you know how to fix this???
Posts 1–15 of 18 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?