SendAll() public static method

public static SendAll ( byte buff ) : void
buff byte
return void
Beispiel #1
0
        private void doCommand(string command, List <string> parameters)
        {
            try
            {
                Console.WriteLine("[EVENT] Command: {0}, Parameters: {1}", command, listToString(parameters));

                switch (NameToEnum(command))
                {
                case ScriptCommandType.Sleep:
                    Thread.Sleep(Int32.Parse(parameters[0]));
                    break;

                case ScriptCommandType.SpawnUnique:
                    this.SpawnUnique(parameters);
                    break;

                case ScriptCommandType.Notice:
                    Systems.SendAll(Packet.ChatPacket(7, 0, listToString(parameters, false), ""));
                    break;

                case ScriptCommandType.SpawnMob:
                    this.spawnMob(parameters);
                    break;

                default:
                    break;
                }
            }
            catch (Exception)
            {
                Console.WriteLine("exception at handling command: Type = {0} ::: Parameters = {1}", command, listToString(parameters));
            }
        }
Beispiel #2
0
 public static void CERB(object e)
 {
     try
     {
         if (!Cerb)
         {
             obj o = Cerberus[rnd.Next(0, Cerberus.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Cerb = true;
             Console.WriteLine("Cerberus spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #3
0
 public static void IVY(object e)
 {
     try
     {
         if (!Ivy)
         {
             obj o = CapIvy[rnd.Next(0, CapIvy.Count)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Ivy = true;
             Console.WriteLine("Captain ivy spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #4
0
 public static void LORD(object e)
 {
     try
     {
         if (!Lord)
         {
             obj o = LordYarkan[rnd.Next(0, LordYarkan.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Lord = true;
             Console.WriteLine("Lord yarkan spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #5
0
 public static void DEMON(object e)
 {
     try
     {
         if (!Demon)
         {
             obj o = DemonShaitan[rnd.Next(0, DemonShaitan.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Demon = true;
             Console.WriteLine("Demon Shaitan spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #6
0
 public static void ISY(object e)
 {
     try
     {
         if (!Isy)
         {
             obj o = Isytaru[rnd.Next(0, Isytaru.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Isy = true;
             Console.WriteLine("Isytaru spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #7
0
 public static void URI(object e)
 {
     try
     {
         if (!Uri)
         {
             obj o = Urichi[rnd.Next(0, Urichi.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Uri = true;
             Console.WriteLine("Urichi spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #8
0
 public static void TG(object e)
 {
     try
     {
         if (!Tiger)
         {
             obj o = TigerGirl[rnd.Next(0, TigerGirl.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Tiger = true;
             Console.WriteLine("Tiger girl spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Systems.Debugger.Write(ex);
     }
 }
Beispiel #9
0
 public static void MEDUSA_CB(object e)
 {
     try
     {
         if (!Medusa_s)
         {
             obj o = Medusa[rnd.Next(0, Medusa.Count - 1)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Medusa_s = true;
             Console.WriteLine("Medusa spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Medusa spawn error {0}", ex);
     }
 }
Beispiel #10
0
 public static void ROC_CB(object e)
 {
     try
     {
         if (!Roc_s)
         {
             obj o = Roc[rnd.Next(0, Roc.Count)];
             Systems.Objects.Add(o);
             o.SpawnMe();
             Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
             Roc_s = true;
             Console.WriteLine("Roc spawn warp location : {0}{1}, {2}, {3}", o.xSec, o.ySec, o.x, o.y);
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine("Roc spawn error {0}", ex);
     }
 }
Beispiel #11
0
        private void SpawnUnique(List <string> parameters)
        {
            obj o = new obj();

            switch ((Uniques)Int32.Parse(parameters[0]))
            {
            case Uniques.TigerGirl:     // INSERT SPAWN CODE HERE
                o = getMob(1954, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Urichi:
                o = getMob(1982, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Isyutaru:
                o = getMob(2002, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.LordYarkan:
                o = getMob(3810, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.DemonShaitan:
                o = getMob(3875, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Cerberus:
                o = getMob(5871, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.CapIvy:
                o = getMob(14778, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Medusa:
                o = getMob(14839, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Roc:
                o = getMob(3877, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Neith:
                o = getMob(32768, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Isis:
                o = getMob(32770, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;

            case Uniques.Sphinx:
                o = getMob(32752, parameters);
                Systems.Objects.Add(o);
                o.SpawnMe();
                Systems.SendAll(Packet.Unique_Data(5, (int)o.ID, null));
                break;
            }
        }
Beispiel #12
0
        public static void ClearObject(obj o)
        {
            character n = new character();

            try
            {
                switch (o.ID)
                {
                case 1954:
                    Systems.SendAll(Packet.Unique_Data(6, (int)1954, n.Information.Name));
                    Tiger = false;
                    DarkEmu_GameServer.GlobalUnique.StartTGUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn tiger girl
                    break;

                case 1982:
                    Systems.SendAll(Packet.Unique_Data(6, (int)1982, n.Information.Name));
                    Uri = false;
                    DarkEmu_GameServer.GlobalUnique.StartUriUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn urichi
                    break;

                case 2002:
                    Systems.SendAll(Packet.Unique_Data(6, (int)2002, n.Information.Name));
                    Isy = false;
                    DarkEmu_GameServer.GlobalUnique.StartIsyUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn isy
                    break;

                case 3810:
                    Systems.SendAll(Packet.Unique_Data(6, (int)3810, n.Information.Name));
                    Lord = false;
                    DarkEmu_GameServer.GlobalUnique.StartLordUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn lord yarkan
                    break;

                case 3875:
                    Systems.SendAll(Packet.Unique_Data(6, (int)3875, n.Information.Name));
                    Demon = false;
                    DarkEmu_GameServer.GlobalUnique.StartDemonUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn demon shaitan
                    break;

                case 3877:
                    Systems.SendAll(Packet.Unique_Data(6, (int)3877, n.Information.Name));
                    Roc_s = false;
                    DarkEmu_GameServer.GlobalUnique.StartRoc(rnd.Next(10, 20) * 60000, 600);       //Random spawn roc
                    break;

                case 5871:
                    Systems.SendAll(Packet.Unique_Data(6, (int)5871, n.Information.Name));
                    Cerb = false;
                    DarkEmu_GameServer.GlobalUnique.StartCerbUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn cerberus
                    break;

                case 14778:
                    Systems.SendAll(Packet.Unique_Data(6, (int)14538, n.Information.Name));
                    Ivy = false;
                    DarkEmu_GameServer.GlobalUnique.StartIvyUnique(rnd.Next(10, 20) * 60000, 600);       //Random spawn captain ivy
                    break;

                case 14839:
                    Systems.SendAll(Packet.Unique_Data(6, (int)22654, n.Information.Name));
                    Cerb = false;
                    DarkEmu_GameServer.GlobalUnique.StartMedusa(rnd.Next(10, 20) * 90000, 600);       //Random spawn medusa
                    break;

                case 32768:
                    Systems.SendAll(Packet.Unique_Data(6, (int)32768, n.Information.Name));
                    Neith_s = false;
                    DarkEmu_GameServer.GlobalUnique.StartNeith(rnd.Next(10, 20) * 90000, 600);       //Random spawn neith
                    break;

                case 32752:
                    Systems.SendAll(Packet.Unique_Data(6, (int)32752, n.Information.Name));
                    Sphinx_s = false;
                    DarkEmu_GameServer.GlobalUnique.StartSphinx(rnd.Next(10, 20) * 90000, 600);       //Random spawn sphinx
                    break;

                case 32770:
                    Systems.SendAll(Packet.Unique_Data(6, (int)32770, n.Information.Name));
                    Isis_s = false;
                    DarkEmu_GameServer.GlobalUnique.StartIsis(rnd.Next(10, 20) * 90000, 600);       //Random spawn isis
                    break;
                }
            }
            catch (Exception ex)
            {
                Systems.Debugger.Write(ex);
            }
        }