UO-Dev Arama

 




Paylaş

İçerde : 2 misafir, 0 üye : --- Sayfalar: 1
Yazar

alonerapper


UO-Dev Üyesi
Skill Title: Apprentice
Online durumu
Toplam Mesaj: 55
Oyun Tarzı: Rp
Emulatör: RunUO
Tecrübe: Scripter
Yaş: 23
Karma:   0   Level 0
Messenger: Msn iletişim
Mesaj #54576   19-12-2011 18:49 GMT    
        
Runuoexe. dosyasına tıkladığımızda karşımıza çıkan konsola çeşitli komutlar yazarak sunucuya girmemize hiç gerek kalmadan bazı işlerimizi halletmemizi sağlar.

Kullanılabilen Komutlar ve ne işe yaradıkları :

save : Sunucunun save almasını (kayıt etmesini) sağlar.
shutdown : Sunucuyu kapatmaya yarar (Merak etmeyin tamamen kapatma değil istediğinizde tekrar açabilirsiniz )
shutdown nosave : Sunucuyu kapatır ve save almaz.
restart : Sunucuya restart atar ve save alır.
restart nosave : Sunucuya restart atar ve ''save almaz'' .
online : Sunucuda aktif olan tüm üyeleri gösterir.
Broadcast ve Staff : Broadcast ve Staff komutları aynı işlevi görür Broadcast ve staff yazdıktan sonra bi yazı yazarsınız ve bunu sunucudaki herkes görür.

BUYRUN SCRİPT

Kod:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Server;
using System.Threading;
using Server.Commands;
using System.Diagnostics;
using Server.Gumps;
using Server.Network;
using Server.Mobiles;
using Server.Accounting;

namespace Server.Misc
{
    class ServerConsole
    {
        private static bool Hearconsole;
        private static ArrayList m_ConsoleHear = new ArrayList();
        public static void Initialize()
        {
            EventSink.ServerStarted += new ServerStartedEventHandler(EventSink_ServerStarted);
            EventSink.Speech += new SpeechEventHandler(OnSpeech);
        }
        public static void EventSink_ServerStarted()
        {
            new Thread(new ThreadStart(ConsoleListen)).Start();
            Console.WriteLine("CC initialized...");
        }
        private static void OnSpeech(SpeechEventArgs args)
        {
            if (args.Mobile != null)
            {
                try
                {
                    string msg;
                    if (args.Mobile.Region.Name.Length > 0)
                        msg = String.Format("{0} ({1}): {2}", args.Mobile.Name, args.Mobile.Region.Name, args.Speech);
                    else
                        msg = String.Format("{0}: {1}", args.Mobile.Name, args.Speech);
                    if (Hearconsole)
                        Console.WriteLine(msg);
                }
                catch { }
            }
        }
        public static void ConsoleListen()
        {
            string input = Console.ReadLine();
            Next(input);
        }
        public static void PBroadCast()
        {
            string input = Console.ReadLine();
            BroadcastMessage(AccessLevel.Player, 0x35, String.Format("[Admin] {0}", input));
            Console.WriteLine("Players will see: {0}", input);
        }
        public static void SBroadCast()
        {
            string input = Console.ReadLine();
            BroadcastMessage(AccessLevel.Counselor, 0x35, String.Format("[Admin] {0}", input));
            Console.WriteLine("Staff will see: {0}", input);
        }
        public static void BroadcastMessage(AccessLevel ac, int hue, string message)
        {
            foreach (NetState state in NetState.Instances)
            {
                Mobile m = state.Mobile;

                if (m != null && m.AccessLevel >= ac)
                    m.SendMessage(hue, message);
            }
        }
        public static void Next(string input)
        {
            switch (input.ToLower())
            {
                case "shutdown":
                    {
                        World.Save();
                        Core.Process.Kill();
                        break;
                    }
                case "shutdown nosave":
                    {
                        Core.Process.Kill();
                        break;
                    }
                case "restart":
                    {
                        BroadcastMessage(AccessLevel.Player, 0x35, String.Format("[Server] We are restarting..."));
                        World.Save();
                        Process.Start(Core.ExePath);
                        Core.Process.Kill();
                        break;
                    }
                case "restart nosave":
                    {
                        Process.Start(Core.ExePath);
                        Core.Process.Kill();
                        break;
                    }
                case "broadcast":
                    {
                        Console.WriteLine("What would you like to say to everyone?");
                        new Thread(new ThreadStart(PBroadCast)).Start();
                        break;
                    }
                case "online":
                    {
                        ArrayList list = new ArrayList();
                        List<NetState> states = NetState.Instances;
                        if (states.Count == 0)
                        { Console.WriteLine("There are no users online at this time."); }
                        for (int i = 0; i < states.Count; ++i)
                        {
                            Account a = states[i].Account as Account;
                            if (a == null)
                                continue;
                            Mobile m = states[i].Mobile;
                            if (m != null)
                                Console.WriteLine("- Account: {0}, Name: {1}, IP: {2}", a.Username, m.Name, states[i]);
                        }
                        break;
                    }
                case "help":
                case "list": //Credit to HomeDaddy for this wonderful list!
                    {
                        Console.WriteLine(" ");
                        Console.WriteLine("Commands:");
                        Console.WriteLine("save -            Performs a forced save.");
                        Console.WriteLine("shutdown -        Performs a forced save then shuts down the server.");
                        Console.WriteLine("shutdown nosave - Shuts down the server without saving.");
                        Console.WriteLine("restart -         Sends a message to players informing them that the server is");
                        Console.WriteLine("                      restarting, performs a forced save, then shuts down and");
                        Console.WriteLine("                      restarts the server.");
                        Console.WriteLine("restart nosave -  Restarts the server without saving.");
                        Console.WriteLine("online -          Shows a list of every person online:");
                        Console.WriteLine("                      Account, Char Name, IP.");
                        Console.WriteLine("broadcast -       Type this command, then you will be prompted for a message");
                        Console.WriteLine("                      to send. The message will then be relayed to all players.");
                        Console.WriteLine("Staff -           Type this command, then you will be prompted for a message");
                        Console.WriteLine("                      to send.  The message will then be relayed to all staff.");
                        Console.WriteLine("consolehear -     Copies all local speech to this console:");
                        Console.WriteLine("                      Char Name (Region name): Speech.");
                        Console.WriteLine("list or help -    Shows this list.");
                        Console.WriteLine(" ");
                        break;
                    }
                case "save":
                    {
                        World.Save();
                        break;
                    }
                case "staff":
                    {
                        Console.WriteLine("What would you like to say to your staff?");
                        new Thread(new ThreadStart(SBroadCast)).Start();
                        break;
                    }
                case "consolehear"://credit to Zippy for the HearAll script!
                    {
                        Hearconsole = !Hearconsole;
                        if (Hearconsole)
                            Console.WriteLine("Now sending all speech to the console.");
                        else
                            Console.WriteLine("No longer sending speech to the console.");
                        break;
                    }
                default:
                    {
                        Console.WriteLine(" ");
                        Console.WriteLine("Commands:");
                        Console.WriteLine("save -            Performs a forced save.");
                        Console.WriteLine("shutdown -        Performs a forced save then shuts down the server.");
                        Console.WriteLine("shutdown nosave - Shuts down the server without saving.");
                        Console.WriteLine("restart -         Sends a message to players informing them that the server is");
                        Console.WriteLine("                      restarting, performs a forced save, then shuts down and");
                        Console.WriteLine("                      restarts the server.");
                        Console.WriteLine("restart nosave -  Restarts the server without saving.");
                        Console.WriteLine("online -          Shows a list of every person online:");
                        Console.WriteLine("                      Account, Char Name, IP.");
                        Console.WriteLine("broadcast -       Type this command, then you will be prompted for a message");
                        Console.WriteLine("                      to send. The message will then be relayed to all players.");
                        Console.WriteLine("Staff -           Type this command, then you will be prompted for a message");
                        Console.WriteLine("                      to send.  The message will then be relayed to all staff.");
                        Console.WriteLine("consolehear -     Copies all local speech to this console:");
                        Console.WriteLine("                      Char Name (Region name): Speech.");
                        Console.WriteLine("list or help -    Shows this list.");
                        Console.WriteLine(" ");
                        break;
                    }
            }
            new Thread(new ThreadStart(ConsoleListen)).Start();
        }
    }
}


Yardımcı olabildiysem teşekkürü esirgemeyin



Sayfalar: 1



Benzer Konular

KonularMesajlarSon gönderenTarih
RunUo Sunucuları3RYRZ23-05-2012
Legendofuo runuo 2.2 sunucu Açıldı3Amanorman03-04-2012
[RunUO 2.x] StaffOnline komutu5alonerapper02-04-2012
RunUo oynamak5alonerapper31-03-2012
ULTİMAYA VEDA [RUNUO]3dipnot29-03-2012


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,