[question/help]Using .bat

06/16/2010 22:29 Knight^Hawk#1
would using a .bat to turn off your servers and turn on your servers ruin the servers?

also how do i make a .bat to do that?
06/16/2010 22:42 lukonhabr#2
Well folks, I developed a very useful way to automatically restart the server, but for me the main advantage of this method in addition to being automatic, is the speed as it is restarted.

Well we already know a. Bat then it is easier to work we go ..


1 If you do not have shortcuts accountserver, MsgServer and npc in your Desktop so you must create.
the shortcut will call accountesever AccountServer
msg shortcut the server will be called MsgServer
the shortcut will be named NPC NPC

2 Create a file on your Desktop ResetServer.bat
it add the following codes:

Quote:
@echo off
echo Seu servidor esta sendo reiniciado
taskkill /f /im "AccountServer Version 6.127-1.exe"
taskkill /f /im "MsgServer2.700.exe"
taskkill /f /im "NPC.exe"
ping -n 5 localhost>nul
Start AccountServer
Start MsgServer
Start NPC
NOTE: MAKE SURE YOUR IN DB IF YOUR NAME "AccountServer Version 6127-1.exe", "MsgServer2.700.exe" E "NPC.exe" THESE REALLY ARE, IF NOT THE RIGHT TO MODIFY FILE RESETSERVER. BAT.

Then you can use Windows to manage it in the file where msm Hour Everyday =)
Start Menu -> All oriented program -> Accessories -> System Tools -> Scheduled Tasks
After that you create. After you finish and can edit it as you want to put to Start and All Days 06:00 Etc. I Made this on my server very good.


Credit : to Rezende and Kabuto :handsdown:
06/16/2010 22:49 Knight^Hawk#3
does it ruin the servers, such as does everything save?
06/16/2010 22:54 lukonhabr#4
Not spoiled so far. Use it to 15 days =)
06/17/2010 00:30 Knight^Hawk#5
Code:
@echo off
echo Seu servidor esta sendo reiniciado
taskkill /f /im "AccountServer Version 6.127-1.exe"
taskkill /f /im "MsgServer2.700.exe"
taskkill /f /im "NPC.exe"
ping -n 5 localhost>nul
Start ACCT
ping -n 5 localhost>nul
Start 2MSG
ping -n 20 localhost>nul
Start NPC

lets each server open b4 the next opens