Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 03:45

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Could Anyone please help me with this code? >.<

Discussion on Could Anyone please help me with this code? >.< within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Could Anyone please help me with this code? >.<

PHP Code:
if (Cmd[0] == "/bringtome")
                        {
                            if (
GC.AuthInfo.Status == "[PM]" || GC.AuthInfo.Status == "[GM]")
                            {

                                
Game.Character C Game.World.CharacterFromName(Cmd[1]);
                                if (
!= null && C!= GC.MyChar)
                                    
C.Teleport(GC.MyChar.Loc.MapGC.MyChar.Loc.XGC.MyChar.Loc.Y);
                            } 
Just Wondering what's wrong with this code? Cause I can use it only on GM/PM's =/ Doesn't work on normal players. like if I do /bringtome test123[PM] He teleports to me.. but if i try to use it on example.. /bringtome LolliPoP Nothing happens.
Secrets-man is offline  
Old 02/26/2010, 05:50   #2
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
if (Cmd[0] == "/bringtome")
{

Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if (C != null && C!= GC.MyChar)
C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
}
Arcо is offline  
Thanks
1 User
Old 02/26/2010, 06:00   #3
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Quote:
Originally Posted by .Arco View Post
if (Cmd[0] == "/bringtome")
{

Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if (C != null && C!= GC.MyChar)
C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
}
Kinda shoulda knew that >.< Thanks once again .Arco <3
Secrets-man is offline  
Old 02/26/2010, 06:14   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by Secrets-man View Post
Kinda shoulda knew that >.< Thanks once again .Arco <3
No problem.
Is it okay if we request close?
Arcо is offline  
Old 02/26/2010, 07:04   #5
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Quote:
Originally Posted by .Arco View Post
No problem.
Is it okay if we request close?
Its still not working though =/ works still only on PM/GM chars.. >.<
Secrets-man is offline  
Old 02/26/2010, 07:11   #6
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Code:
                        if (Cmd[0] == "/bringme")
                        {
                            if (Cmd[1] != "all")
                            {
                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null && C != GC.MyChar)
                                    C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);

                            }
                            else
                            {
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                            }
                        }
Arcо is offline  
Old 02/26/2010, 07:34   #7
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Still ain't working >.<
Secrets-man is offline  
Old 02/26/2010, 07:49   #8
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by Secrets-man View Post
Still ain't working >.<
Then its your Chat.cs
You must have something fuh'd up cuz that code works perfectly for me lol.
Arcо is offline  
Old 02/26/2010, 07:58   #9
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Quote:
Originally Posted by .Arco View Post
Then its your Chat.cs
You must have something fuh'd up cuz that code works perfectly for me lol.
I wonder what Have I done wrong then o.O mmm

Code:
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;

namespace NewestCOServer.PacketHandling
{
    public class Chat
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {
            MemoryStream MS = new MemoryStream(Data);
            BinaryReader BR = new BinaryReader(MS);
            BR.ReadBytes(8);
            ushort ChatType = (ushort)BR.ReadUInt32();
            BR.ReadBytes(13);
            string From = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
            string To = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
            BR.ReadByte();
            string Message = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
            BR.Close();
            MS.Close();
            #region BadWords
            Message = Message.Replace("damn", "****");
            Message = Message.Replace("fuck", "****");
            Message = Message.Replace("shit", "****");
            Message = Message.Replace("stupid", "******");
            Message = Message.Replace("wtf", "***");
            Message = Message.Replace("idiot", "*****");
            Message = Message.Replace("fucker", "******");
            #endregion
            if (ChatType == 2104 && GC.MyChar.MyShop != null)
                GC.MyChar.MyShop.Hawk = Message;
            try
            {
                if (Message[0] == '/')
                {
                    string[] Cmd = Message.Split(' ');
                    if (Cmd[0] == "/dc")
                    {
                        GC.Disconnect();
                        return;
                    }


                    if (Cmd[0] == "/players")
                    {
                        GC.LocalMessage(2000, "Players Online: " + Game.World.H_Chars.Count);
                        string eMsg = "";
                        foreach (Game.Character C in Game.World.H_Chars.Values)
                            eMsg += C.Name + ", ";
                        if (eMsg.Length > 1)
                            eMsg = eMsg.Remove(eMsg.Length - 2, 2);
                        GC.LocalMessage(2000, eMsg);
                    }
                    if (Cmd[0] == "/forcerevive")
                    {
                        if (!GC.MyChar.Alive)
                        {
                            if (DateTime.Now > GC.MyChar.DeathHit.AddSeconds(20))
                            {
                                GC.MyChar.Ghost = false;
                                GC.MyChar.BlueName = false;
                                GC.MyChar.CurHP = (ushort)GC.MyChar.MaxHP;
                                GC.MyChar.Alive = true;
                                GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                GC.MyChar.Body = GC.MyChar.Body;
                                GC.MyChar.Hair = GC.MyChar.Hair;
                                GC.MyChar.Equips.Send(GC, false);

                                if (GC.MyChar.Loc.Map == 1038 && Features.GuildWars.War)
                                    GC.MyChar.Teleport(6001, 32, 72);
                                else
                                {
                                    if (GC.MyChar.PKPoints >= 100)
                                        GC.MyChar.Teleport(6000, 32, 72);
                                    else
                                    {
                                        foreach (ushort[] Point in Database.RevPoints)
                                            if (Point[0] == GC.MyChar.Loc.Map)
                                            {
                                                GC.MyChar.Teleport(Point[1], Point[2], Point[3]);
                                                break;
                                            }
                                    }
                                }
                            }
                        }
                    }

                    if (Cmd[0] == "/makehouse")
                    {
                        ushort staticmapid = 1098;
                        ushort genmapid = 10000;

                        bool Success = DMaps.CreateDynamicMap(genmapid, staticmapid, GC.MyChar.EntityID);
                        if (!Success)
                            GC.LocalMessage(2000, "You already have a house.");
                        else
                            DMaps.Save();
                    }
                    if (Cmd[0] == "/home")
                    {
                        ushort HouseId = DMaps.GetHouseID(GC.MyChar.EntityID);
                        if (HouseId > 0)
                        {
                            ushort House_x = 33;
                            ushort House_y = 40;
                            if (DMaps.HouseUpgrade(HouseId))
                            {
                                House_x = 51;
                                House_y = 80;
                            }

                            GC.MyChar.Teleport(HouseId, House_x, House_y);
                        }
                        else
                            GC.LocalMessage(2000, "You do not have a house.");
                    }
                    if (Cmd[0] == "/upgradehouse")
                    {
                        ushort stmapid = 1099;
                        ushort gmapid = 10000;

                        ushort HId = DMaps.GetHouseID(GC.MyChar.EntityID);
                        if (HId > 0)
                        {
                            bool OK = DMaps.DeleteDynamicMap(HId, GC.MyChar.EntityID);
                            if (OK)
                            {
                                OK = DMaps.CreateDynamicMap(gmapid, stmapid, GC.MyChar.EntityID);
                                if (!OK)
                                    GC.LocalMessage(2000, "You already have an upgraded house.");
                                else
                                    DMaps.Save();
                            }
                        }
                        else
                            GC.LocalMessage(2000, "You do not have a house.");
                    }

                    if (Cmd[0] == "/awardtoptrojan")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopTrojan);
                        #endregion
                    if (Cmd[0] == "/awardtopwarrior")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopWarrior);
                        #endregion
                    if (Cmd[0] == "/awardtopninja")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopNinja);
                        #endregion
                    if (Cmd[0] == "/awardtoparcher")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopArcher);
                        #endregion
                    if (Cmd[0] == "/awardtopfiretaoist")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopFireTaoist);
                        #endregion
                    if (Cmd[0] == "/awardtopwatertaoist")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopWaterTaoist);
                        #endregion
                    if (Cmd[0] == "/awardweeklypkchampion")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.WeeklyPKChampion);
                        #endregion
                    if (Cmd[0] == "/awardtopguildleader")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopGuildLeader);
                        #endregion
                    if (Cmd[0] == "/awardtopdeputyleader")
                        #region Players
                        foreach (Game.Character Player in Game.World.H_Chars.Values)
                            Player.StatEff.Add(NewestCOServer.Game.StatusEffectEn.TopDeputyLeader);
                        #endregion

                    else if (Cmd[0] == "/pkt")
                    {
                        if (GC.GM)
                        {
                            if (NewestCOServer.Features.PKTournament.Stage == NewestCOServer.Features.PKTournamentStage.None)
                            {
                                NewestCOServer.Features.PKTournament.StartTournament();
                                Console.WriteLine("PK Tournament started!");
                            }
                            else
                            {
                                Console.WriteLine("PK Tournament is already in progress!");
                            }
                        }
                    }
                    if (Cmd[0] == "/resurrection")
                    {
                        if (!GC.MyChar.Alive)
                        {
                            if (DateTime.Now > GC.MyChar.DeathHit.AddSeconds(0))
                            {
                                if (GC.MyChar.BlessingLasts > 0)
                                {
                                    GC.MyChar.Ghost = false;
                                    GC.MyChar.BlueName = false;
                                    GC.MyChar.CurHP = (ushort)GC.MyChar.MaxHP;
                                    GC.MyChar.Alive = true;
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                    GC.MyChar.Body = GC.MyChar.Body;
                                    GC.MyChar.Hair = GC.MyChar.Hair;
                                    GC.MyChar.Equips.Send(GC, false);

                                    if (GC.MyChar.Loc.Map == 1038)
                                        if (Features.GuildWars.War)
                                        {
                                            GC.LocalMessage(2005, "You cant revive here while guild war is on.");
                                        }
                                        else
                                        {
                                            GC.MyChar.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                                        }
                                }
                            }
                        }
                    }
                    if (Cmd[0] == "/rev")
                    {
                        if (!GC.MyChar.Alive)
                        {
                            if (DateTime.Now > GC.MyChar.DeathHit.AddSeconds(0))
                            {
                                if (GC.MyChar.BlessingLasts > 0)
                                {
                                    GC.MyChar.Ghost = false;
                                    GC.MyChar.BlueName = false;
                                    GC.MyChar.CurHP = (ushort)GC.MyChar.MaxHP;
                                    GC.MyChar.Alive = true;
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                    GC.MyChar.Body = GC.MyChar.Body;
                                    GC.MyChar.Hair = GC.MyChar.Hair;
                                    GC.MyChar.Equips.Send(GC, false);

                                    if (GC.MyChar.Loc.Map == 1038)
                                        if (Features.GuildWars.War)
                                        {
                                            GC.LocalMessage(2005, "You cant revive here while guild war is on.");
                                        }
                                        else
                                        {
                                            GC.MyChar.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                                        }
                                }
                            }
                        }
                    }
                    if (Cmd[0] == "/model")
                    {
                        if (Cmd[1] == "smale")
                            GC.MyChar.Body = 1003;
                        else if (Cmd[1] == "lmale")
                            GC.MyChar.Body = 1004;
                        else if (Cmd[1] == "sfemale")
                            GC.MyChar.Body = 2001;
                        else if (Cmd[1] == "lfemale")
                            GC.MyChar.Body = 2002;
                    }

                    if (Cmd[0] == "/sandraider")
                    {
                        GC.MyChar.AddItem(183305 - 12 - 7 - 255 - 13 - 13);//SandRaider
                    }
                    if (Cmd[0] == "/ninj")
                    {
                        GC.MyChar.AddItem(123109 - 12 - 7 - 255 - 13 - 13);//HeadGear
                        GC.MyChar.AddItem(601339 - 12 - 7 - 255 - 13 - 13);//Katana
                        GC.MyChar.AddItem(601339 - 12 - 7 - 255 - 13 - 13);//Katana
                        GC.MyChar.AddItem(120249 - 12 - 7 - 255 - 13 - 13);//Necklace
                        GC.MyChar.AddItem(150249 - 12 - 7 - 255 - 13 - 13);//Ring
                        GC.MyChar.AddItem(160249 - 12 - 7 - 255 - 13 - 13);//Boots
                        GC.MyChar.AddItem(135109 - 12 - 7 - 255 - 13 - 13);//Armor
                        GC.MyChar.AddItem(201009 - 12 - 1 - 255 - 123 - 123);//HeavenFan
                        GC.MyChar.AddItem(202009 - 12 - 1 - 255 - 103 - 103);//StarTower
                    }
                    if (Cmd[0] == "/troj")
                    {
                        GC.MyChar.AddItem(118109 - 12 - 7 - 255 - 13 - 13);//Head Gear
                        GC.MyChar.AddItem(480339 - 12 - 7 - 255 - 13 - 13);//Club
                        GC.MyChar.AddItem(410339 - 12 - 7 - 255 - 13 - 13);//Blade
                        GC.MyChar.AddItem(420339 - 12 - 7 - 255 - 13 - 13);//Sword
                        GC.MyChar.AddItem(120249 - 12 - 7 - 255 - 13 - 13);//Necklace
                        GC.MyChar.AddItem(150249 - 12 - 7 - 255 - 13 - 13);//Ring
                        GC.MyChar.AddItem(160249 - 12 - 7 - 255 - 13 - 13);//Boots
                        GC.MyChar.AddItem(130109 - 12 - 7 - 255 - 13 - 13);//Armor
                        GC.MyChar.AddItem(201009 - 12 - 1 - 0 - 123 - 123);//HeavenFan
                        GC.MyChar.AddItem(202009 - 12 - 1 - 0 - 103 - 103);//StarTower
                    }
                    if (Cmd[0] == "/warr")
                    {
                        GC.MyChar.AddItem(141109 - 12 - 7 - 255 - 13 - 13);//Head Gear
                        GC.MyChar.AddItem(480339 - 12 - 7 - 255 - 13 - 13);//Club
                        GC.MyChar.AddItem(410339 - 12 - 7 - 255 - 13 - 13);//Blade
                        GC.MyChar.AddItem(420339 - 12 - 7 - 255 - 13 - 13);//Sword
                        GC.MyChar.AddItem(900109 - 12 - 7 - 255 - 13 - 13);//Shield
                        GC.MyChar.AddItem(120249 - 12 - 7 - 255 - 13 - 13);//Necklace
                        GC.MyChar.AddItem(150249 - 12 - 7 - 255 - 13 - 13);//Ring
                        GC.MyChar.AddItem(160249 - 12 - 7 - 255 - 13 - 13);//Boots
                        GC.MyChar.AddItem(131109 - 12 - 7 - 255 - 13 - 13);//Armor
                        GC.MyChar.AddItem(201009 - 12 - 1 - 0 - 123 - 123);//HeavenFan
                        GC.MyChar.AddItem(202009 - 12 - 1 - 0 - 103 - 103);//StarTower
                    }
                    if (Cmd[0] == "/arche")
                    {
                        GC.MyChar.AddItem(142109 - 12 - 7 - 255 - 13 - 13);//Head Gear
                        GC.MyChar.AddItem(500329 - 12 - 7 - 255 - 13 - 13);//Bow
                        GC.MyChar.AddItem(120249 - 12 - 7 - 255 - 13 - 13);//Necklace
                        GC.MyChar.AddItem(150249 - 12 - 7 - 255 - 13 - 13);//Ring
                        GC.MyChar.AddItem(160249 - 12 - 7 - 255 - 13 - 13);//Boots
                        GC.MyChar.AddItem(133109 - 12 - 7 - 255 - 13 - 13);//Armor
                        GC.MyChar.AddItem(201009 - 12 - 1 - 0 - 123 - 123);//HeavenFan
                        GC.MyChar.AddItem(202009 - 12 - 1 - 0 - 103 - 103);//StarTower
                    }
                    if (Cmd[0] == "/taoi")
                    {
                        GC.MyChar.AddItem(114109 - 12 - 7 - 255 - 3 - 3);//Head Gear
                        GC.MyChar.AddItem(421339 - 12 - 7 - 255 - 3 - 3);//BackSword
                        GC.MyChar.AddItem(120249 - 12 - 7 - 255 - 3 - 3);//Necklace
                        GC.MyChar.AddItem(150249 - 12 - 7 - 255 - 3 - 3);//Ring
                        GC.MyChar.AddItem(160249 - 12 - 7 - 255 - 3 - 3);//Boots
                        GC.MyChar.AddItem(134109 - 12 - 7 - 255 - 3 - 3);//Armor
                        GC.MyChar.AddItem(201009 - 12 - 1 - 0 - 123 - 123);//HeavenFan
                        GC.MyChar.AddItem(202009 - 12 - 1 - 0 - 103 - 103);//StarTower
                    }
                    if (Cmd[0] == "/weapset")
                    {
                        GC.MyChar.AddItem(601339 - 12 - 7 - 255 - 13 - 13);//Katana
                        GC.MyChar.AddItem(421339 - 12 - 7 - 255 - 3 - 3);//BackSword
                        GC.MyChar.AddItem(500329 - 12 - 7 - 255 - 13 - 13);//Bow
                        GC.MyChar.AddItem(480339 - 12 - 7 - 255 - 13 - 13);//Club
                        GC.MyChar.AddItem(410339 - 12 - 7 - 255 - 13 - 13);//Blade
                        GC.MyChar.AddItem(420339 - 12 - 7 - 255 - 13 - 13);//Sword
                        GC.MyChar.AddItem(490339 - 12 - 7 - 255 - 13 - 13);//Dagger
                        GC.MyChar.AddItem(430339 - 12 - 7 - 255 - 13 - 13);//Hook
                        GC.MyChar.AddItem(450339 - 12 - 7 - 255 - 13 - 13);//Axe
                        GC.MyChar.AddItem(460339 - 12 - 7 - 255 - 13 - 13);//Hammer
                        GC.MyChar.AddItem(440339 - 12 - 7 - 255 - 13 - 13);//Whip
                        GC.MyChar.AddItem(481339 - 12 - 7 - 255 - 13 - 13);//Scepter
                        GC.MyChar.AddItem(560339 - 12 - 7 - 255 - 13 - 13);//Spear
                        GC.MyChar.AddItem(561339 - 12 - 7 - 255 - 13 - 13);//Wand
                        GC.MyChar.AddItem(510339 - 12 - 7 - 255 - 13 - 13);//Glaive
                        GC.MyChar.AddItem(530339 - 12 - 7 - 255 - 13 - 13);//Poleaxe
                        GC.MyChar.AddItem(580339 - 12 - 7 - 255 - 13 - 13);//Halbert
                    }

                    if (Cmd[0] == "/stats")
                    {
                        GC.MyChar.Str = +1000;
                        GC.MyChar.Agi = +1000;
                        GC.MyChar.Spi = +1000;
                        GC.MyChar.Vit = +1000;
                    }

                    if (Cmd[0] == "/mana")
                        GC.MyChar.CurMP = (ushort)GC.MyChar.MaxMP;

                    if (Cmd[0] == "/life")
                    {
                        if (GC.MyChar.BlessingLasts == 0)
                        {
                            GC.MyChar.CurHP = /*(ushort)*/GC.MyChar.MaxHP;
                            GC.MyChar.CurMP = /*(ushort)*/GC.MyChar.MaxMP;
                            GC.MyChar.Stamina = 100;
                        }
                        else
                        {
                            GC.MyChar.CurHP = /*(ushort)*/GC.MyChar.MaxHP;
                            GC.MyChar.CurMP = /*(ushort)*/GC.MyChar.MaxMP;
                            GC.MyChar.Stamina = 150;
                        }
                    }

                    

                    if (Cmd[0] == "/revivehere" || Cmd[0] == "/rh")
                    {
                        if (!GC.MyChar.Alive)
                        {
                            if (DateTime.Now > GC.MyChar.DeathHit.AddSeconds(20))
                            {
                                if (GC.MyChar.BlessingLasts > 0)
                                {
                                    GC.MyChar.Ghost = false;
                                    GC.MyChar.BlueName = false;
                                    GC.MyChar.CurHP = (ushort)GC.MyChar.MaxHP;
                                    GC.MyChar.Alive = true;
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                    GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                    GC.MyChar.Body = GC.MyChar.Body;
                                    GC.MyChar.Hair = GC.MyChar.Hair;
                                    GC.MyChar.Equips.Send(GC, false);

                                    if (GC.MyChar.Loc.Map == 1038)
                                        if (Features.GuildWars.War)
                                        {
                                            GC.LocalMessage(2005, "You cant revive here while guild war is on.");
                                        }
                                        else
                                        {
                                            GC.MyChar.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                                        }
                                }
                            }
                        }
                    }
                    else if (GC.MyChar.Loc.Map == 1730)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while TopPkTrojan run.");
                    }
                    else if (GC.MyChar.Loc.Map == 1731)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while TopPkWarrior run.");
                    }
                    else if (GC.MyChar.Loc.Map == 1732)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while TopPkNinja run.");
                    }
                    else if (GC.MyChar.Loc.Map == 1733)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while TopPkTaroistWater run.");
                    }
                    else if (GC.MyChar.Loc.Map == 1734)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while TopPkFireWater run.");
                    }
                    else if (GC.MyChar.Loc.Map == 1735)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while TopPkArcher run.");
                    }
                    else if (GC.MyChar.Loc.Map == 1736)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here.");
                    }
                    else if (GC.MyChar.Loc.Map == 1737)
                    {
                        GC.MyChar.Teleport(1002, 429, 378);
                        GC.LocalMessage(2005, "You cant revive here while WeeklyPKChampion run.");
                    }  
                    if (GC.AuthInfo.Status == "[GM]" || GC.AuthInfo.Status == "[PM]")
                    {
                        if (GC.AuthInfo.Status == "[PM]")
                        {
                            if (Cmd[0] == "/day")
                            {
                                Game.World.ScreenColor = 0;
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    try
                                    {
                                        C.MyClient.AddSend(Packets.GeneralData(C.EntityID, Game.World.ScreenColor, 0, 0, 104));
                                        GC.LocalMessage(2011, "Day has arrived.  Good morning everyone");
                                    }
                                    catch { }
                            }
                            if (Cmd[0] == "/night")
                            {
                                Game.World.ScreenColor = 5855577;
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    try
                                    {
                                        C.MyClient.AddSend(Packets.GeneralData(C.EntityID, Game.World.ScreenColor, 0, 0, 104));
                                        GC.LocalMessage(2011,"Night has arrived.  Good night everyone ");
                                    }
                                    catch { }
                            } if (Cmd[0] == "/tc")
                            {
                                GC.MyChar.Teleport(1002, 429, 378);
                            }
                            if (Cmd[0] == "/sc")
                            {
                                GC.MyChar.Teleport(1077, 435, 337);
                            }
                            if (Cmd[0] == "/house")
                            {
                                GC.MyChar.Teleport(1099, 44, 40);
                            }
                            if (Cmd[0] == "/moon")
                            {
                                GC.MyChar.Teleport(1100, 077, 059);
                            }
                            if (Cmd[0] == "/love")
                            {
                                GC.MyChar.Teleport(1615, 20, 20);
                            }
                            if (Cmd[0] == "/sky")
                            {
                                GC.MyChar.Teleport(1040, 392, 565);
                            }
                            if (Cmd[0] == "/bv")
                            {
                                GC.MyChar.Teleport(1010, 89, 53);
                            }
                            if (Cmd[0] == "/ma")
                            {
                                GC.MyChar.Teleport(1036, 211, 196);
                            }
                            if (Cmd[0] == "/vip")
                            {
                                GC.MyChar.Teleport(1511, 51, 66);
                            }
                            if (Cmd[0] == "/pc")
                            {
                                GC.MyChar.Teleport(1011, 232, 260);
                            }
                            if (Cmd[0] == "/pka")
                            {
                                GC.MyChar.Teleport(1005, 51, 51);
                            }
                            if (Cmd[0] == "/bi")
                            {
                                GC.MyChar.Teleport(1015, 717, 576);
                            }
                            if (Cmd[0] == "/des")
                            {
                                GC.MyChar.Teleport(1000, 499, 650);
                            }
                            if (Cmd[0] == "/am")
                            {
                                GC.MyChar.Teleport(1020, 567, 568);
                            }
                            if (Cmd[0] == "/gwp")
                            {
                                GC.MyChar.Teleport(1038, 088, 102);
                            }
                            if (Cmd[0] == "/jail")
                            {
                                GC.MyChar.Teleport(6000, 032, 072);
                            }

                            if (Cmd[0] == "/night1")
                            {
                                Game.World.ScreenColor = 5355577;
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    try
                                    {
                                        C.MyClient.AddSend(Packets.GeneralData(C.EntityID, Game.World.ScreenColor, 0, 0, 104));
                                    }
                                    catch { }
                            }
                            if (Cmd[0] == "/night2")
                            {
                                Game.World.ScreenColor = 6908265;
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    try
                                    {
                                        C.MyClient.AddSend(Packets.GeneralData(C.EntityID, Game.World.ScreenColor, 0, 0, 104));
                                    }
                                    catch { }
                            }
                        }
                        if (GC.AuthInfo.Status == "[PM]")
                        {
                            if (Cmd[0] == "/closeserver")
                            {

                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    try
                                    {
                                        C.MyClient.LogOff(true);
                                    }
                                    catch { continue; }
                                Database.SaveKOs();
                                Features.Guilds.SaveGuilds();
                                DMaps.Save();
                                DMaps.Save();
                                Features.SkillsClass.Save();
                                Environment.Exit(0);
                                System.Diagnostics.Process.Start("NewestCOServer.exe");
                            }
                            if (Cmd[0] == "/restart")
                            {
                                
                                NewestCOServer.Main.AuthWorker.Listener.Close();
                                NewestCOServer.Main.GameWorker.Listener.Close();
                                try
                                {
                                    foreach (Game.Character C in Game.World.H_Chars.Values)
                                    {
                                        try
                                        {
                                            C.MyClient.Disconnect();
                                            Console.WriteLine(C.Name + " has logged off successfuly.");
                                        }
                                        catch { continue; }
                                    }
                                }
                                catch { }
                                Database.SaveKOs();
                                Console.WriteLine("KOs saved.");
                                Database.SaveEmpire();
                                Console.WriteLine("Empire saved.");
                                Features.Guilds.SaveGuilds();
                                Console.WriteLine("Guilds saved.");
                                DMaps.Save();
                                DMaps.Save();
                                DMaps.Save();
                                Features.SkillsClass.Save();
                                Console.WriteLine("Skills saved.");
                                Console.WriteLine("Database disposed.");
                                Console.WriteLine("Write /exit or click X to close the window.");
                                System.Diagnostics.Process.Start("NewestCOServer.exe");
                                Environment.Exit(0);
                            }
                            if (Cmd[0] == "/lucky")
                                GC.LocalMessage(2000, "Lucky time: " + GC.MyChar.LuckyTime);
                            if (Cmd[0] == "/dropevent")
                            {
                                try
                                {
                                    if (Program.DropEventTimer == null)
                                    {
                                        bool start = true;
                                        if (Cmd[1].ToLower() == "dragonball")
                                        {
                                            Program.DropEventType = "dragonball";
                                            Program.SaveOldRate = DropRates.DragonBall;
                                            DropRates.DragonBall = (DropRates.DragonBall * int.Parse(Cmd[3]));
                                        }
                                        else if (Cmd[1].ToLower() == "meteor")
                                        {
                                            Program.DropEventType = "meteor";
                                            Program.SaveOldRate = DropRates.Meteor;
                                            DropRates.Meteor = (DropRates.Meteor * int.Parse(Cmd[3]));
                                        }
                                        else if (Cmd[1].ToLower() == "minicpbag")
                                        {
                                            Program.DropEventType = "minicpbag";
                                            Program.SaveOldRate = DropRates.CPMiniBag;
                                            DropRates.CPMiniBag = (DropRates.CPMiniBag == 0 ? 1 : DropRates.CPMiniBag * int.Parse(Cmd[3]));
                                        }
                                        else if (Cmd[1].ToLower() == "cpbag")
                                        {
                                            Program.DropEventType = "cpbag";
                                            Program.SaveOldRate = DropRates.CPBag;
                                            DropRates.CPBag = (DropRates.CPBag == 0 ? 1 : DropRates.CPBag * int.Parse(Cmd[3]));
                                        }
                                        else
                                            start = false;

                                        if (start)
                                        {
                                            Program.DropEventTimer = new System.Timers.Timer();
                                            Program.DropEventTimer.Interval = (int.Parse(Cmd[2]) * 60000);
                                            Program.DropEventTimer.Elapsed += new System.Timers.ElapsedEventHandler(Program.QuestDropDone);
                                            Program.DropEventTimer.Start();
                                            Game.World.SendMsgToAll("Server", "[Event] Server will drop " + Cmd[1] + "s " + Cmd[3] + "x for " + Cmd[2] + " minutes.", 2011, 0);
                                        }
                                        else
                                            GC.LocalMessage(2001, "Item name is not a dropevent!");
                                    }
                                    else
                                        GC.LocalMessage(2001, "There is a running event, you must wait it end to start a new!");
                                }
                                catch { GC.LocalMessage(2001, "Wrongs values!"); GC.LocalMessage(2001, "Format: /questdrop ItemName Minutes Timers"); GC.LocalMessage(2001, "Example: /questdrop dragonball 15 1000    its in up the rates to 1000x in 15 minutos."); }
                            }
                            if (Cmd[0] == "/itemtest")
                            {
                                Game.Item I = new NewestCOServer.Game.Item();
                                I.Effect = NewestCOServer.Game.Item.RebornEffect.Shield;
                                I.ID = 410329;
                                I.Plus = 12;
                                I.Soc1 = NewestCOServer.Game.Item.Gem.SuperDragonGem;
                                I.Soc2 = NewestCOServer.Game.Item.Gem.SuperRainbowGem;
                                I.Bless = 5;
                                I.Enchant = 200;
                                I.UID = (uint)Program.Rnd.Next(10000000);
                                GC.AddSend(Packets.AddItem(I, 0));
                            }
                            if (Cmd[0] == "/drop")
                            {
                                uint DropID = 0;

                                Random Rnd = new Random();
                                string DropWhat = Cmd[1].ToLower();
                                byte HowMany = (byte)Math.Min(ushort.Parse(Cmd[2]), (ushort)255);
                                switch (DropWhat)
                                {
                                    case "dragonball": DropID = 1088000; break;
                                    case "meteor": DropID = 1088001; break;
                                    case "pointcard": DropID = 780000; break;
                                    case "moonbox": DropID = 721080; break;
                                    case "bag": DropID = 729910; break;
                                    case "ball": DropID = 723834; break;
                                }
                                Game.DroppedItem DI = new Game.DroppedItem();
                                DI.DropTime = DateTime.Now;
                                DI.UID = (uint)Rnd.Next(10000000);
                                DI.Loc = new Game.Location();

                                DI.Loc.Map = GC.MyChar.Loc.Map;
                                DI.Info = new Game.Item();
                                DI.Info.ID = DropID;
                                DI.Info.UID = (uint)Rnd.Next(10000000);
                                for (int x = 0; x < HowMany; x++)
                                {
                                    DI.Loc.X = (ushort)(GC.MyChar.Loc.X + Rnd.Next(15) - Rnd.Next(15));
                                    DI.Loc.Y = (ushort)(GC.MyChar.Loc.Y + Rnd.Next(15) - Rnd.Next(15));
                                    if (!DI.FindPlace((Hashtable)Game.World.H_Items[GC.MyChar.Loc.Map])) continue;
                                    DI.Drop();
                                }
                            }

                            if (Cmd[0] == "/robot")
                            {
                                string Account = "";
                                string Name = Cmd[1];

                                if (Game.World.CharacterFromName(Name) == null)
                                {
                                    Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                                    if (R != null)
                                        R.Init(Account);
                                }
                            }
                        }
                        if (Cmd[0] == "/robot1")
                            {
                                string Account = "";
                                string Name = Cmd[1];

                               Game.Robot R = Database.LoadAsRobot(Name, ref Account);
                                if (R != null)
                                 R.Init(Account);
                                
                            }
                        
                        if (Cmd[0] == "/reborn")
                        {
                            GC.MyChar.Reborns = byte.Parse(Cmd[1]);
                        }
                        if (Cmd[0] == "/gw" && !Features.GuildWars.War)
                            Features.GuildWars.StartWar();
                        if (Cmd[0] == "/gems")
                        {
                            if (GC.MyChar.Inventory.Count <= 32)
                            {
                                GC.MyChar.AddItem(700001);
                                GC.MyChar.AddItem(700011);
                                GC.MyChar.AddItem(700021);
                                GC.MyChar.AddItem(700031);
                                GC.MyChar.AddItem(700041);
                                GC.MyChar.AddItem(700051);
                                GC.MyChar.AddItem(700061);
                                GC.MyChar.AddItem(700071);
                                GC.MyChar.AddItem(700101);
                                GC.MyChar.AddItem(700121);
                            }
                        }
                        if (Cmd[0] == "/eqlow")
                        {
                            for (byte i = 1; i < 9; i++)
                                if (i != 7)
                                {
                                    Game.Item I = GC.MyChar.Equips.Get(i);
                                    if (I.ID != 0)
                                    {
                                        Game.ItemIDManipulation IDM = new NewestCOServer.Game.ItemIDManipulation(I.ID);
                                        IDM.LowestLevel(i);
                                        I.ID = IDM.ToID();
                                        GC.AddSend(Packets.AddItem(I, i));
                                    }
                                }
                        }
                        if (Cmd[0] == "/allskills")
                        {
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1045, Lvl = 4, Exp = 0 }); // Fast Blade (Blade)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 6003, Lvl = 4, Exp = 0 }); //Counter-Kill
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1046, Lvl = 4, Exp = 0 }); // Scent Sword (Sword)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 5030, Lvl = 9, Exp = 0 }); // Phoenix (Sword)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7020, Lvl = 9, Exp = 0 }); // Rage (Club)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7030, Lvl = 9, Exp = 0 }); // Celestial (scepter)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1290, Lvl = 9, Exp = 0 }); // Penetration (dagger)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7000, Lvl = 9, Exp = 0 }); // Seizer (hook)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7010, Lvl = 9, Exp = 0 }); // Earthquake (axe)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7040, Lvl = 9, Exp = 0 }); // Roamer (whip)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 5040, Lvl = 9, Exp = 0 }); // Boom (hammer)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1115, Lvl = 4, Exp = 0 }); // Hercules
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1051, Lvl = 0, Exp = 0 }); // Dash (shield)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 6000, Lvl = 4, Exp = 0 }); // TwinFoldBlades (katana)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1260, Lvl = 9, Exp = 0 }); // SpeedGun (spear)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1250, Lvl = 9, Exp = 0 }); // WideStrike (glaive)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1300, Lvl = 9, Exp = 0 }); // Halt (longhammer)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 5010, Lvl = 9, Exp = 0 }); // Snow (wand)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 5020, Lvl = 9, Exp = 0 }); // StrandedMonster (halberd)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 5050, Lvl = 9, Exp = 0 }); // Boreas (poleaxe)
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1195, Lvl = 2, Exp = 0 }); // Meditation
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1100, Lvl = 0, Exp = 0 }); // Pray/Revive
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1002, Lvl = 3, Exp = 0 }); // Tornado
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1175, Lvl = 4, Exp = 0 }); // AdvancedCure
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1000, Lvl = 4, Exp = 0 }); // Thunder
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1001, Lvl = 3, Exp = 0 }); // Fire
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1005, Lvl = 4, Exp = 0 }); // Cure
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1015, Lvl = 4, Exp = 0 }); // Accuracy
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1055, Lvl = 4, Exp = 0 }); // HealingRain
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1075, Lvl = 4, Exp = 0 }); // Invisibility
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1085, Lvl = 4, Exp = 0 }); // StarofAccuracy
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1090, Lvl = 4, Exp = 0 }); // MagicShield
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1095, Lvl = 4, Exp = 0 }); // Stigma
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1120, Lvl = 3, Exp = 0 }); // FireCircle
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1125, Lvl = 3, Exp = 0 }); // Volcano
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1150, Lvl = 7, Exp = 0 }); // FireBall/FireRing
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1160, Lvl = 3, Exp = 0 }); // Bomb
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1165, Lvl = 3, Exp = 0 }); // FireofHell
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1170, Lvl = 4, Exp = 0 }); // Nectar
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1180, Lvl = 7, Exp = 0 }); // FireMeteor
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1190, Lvl = 2, Exp = 0 }); // SpiritHealing
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 3090, Lvl = 5, Exp = 0 }); // Pervade
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 8000, Lvl = 5, Exp = 0 }); // RapidFire
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 8001, Lvl = 5, Exp = 0 }); // Scatter
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 8002, Lvl = 0, Exp = 0 }); // XP Fly
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 8003, Lvl = 1, Exp = 0 }); // AdvancedFly
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 8030, Lvl = 0, Exp = 0 }); // ArrowRain
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 9000, Lvl = 3, Exp = 0 }); // Intensify
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7000, Lvl = 0, Exp = 0 }); // Riding
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7001, Lvl = 0, Exp = 0 }); // Spook
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 7002, Lvl = 0, Exp = 0 }); // Warcry
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1025, Lvl = 0, Exp = 0 }); // Superman 
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1020, Lvl = 0, Exp = 0 }); // XP Shield
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1110, Lvl = 0, Exp = 0 }); // Cyclone
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1040, Lvl = 0, Exp = 0 }); // Roar
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1270, Lvl = 7, Exp = 0 }); // Golem
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1280, Lvl = 8, Exp = 0 }); // WaterElf
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1350, Lvl = 4, Exp = 0 }); // DivineHare
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1360, Lvl = 4, Exp = 0 }); // NightDevil
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1320, Lvl = 2, Exp = 0 }); // FlyingMoon
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1010, Lvl = 0, Exp = 0 }); // Lightning
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1050, Lvl = 0, Exp = 0 }); // XP Revive
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 5001, Lvl = 0, Exp = 0 }); // SpeedLightning
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4000, Lvl = 3, Exp = 0 }); // SummonGuard
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4010, Lvl = 0, Exp = 0 }); // SummonBat
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4020, Lvl = 0, Exp = 0 }); // SummonBatBoss
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4030, Lvl = 0, Exp = 0 }); // StandinBat
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4050, Lvl = 0, Exp = 0 }); // BloodyBat
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4060, Lvl = 0, Exp = 0 }); // FireEvil
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 4070, Lvl = 0, Exp = 0 }); // Skeleton
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 3050, Lvl = 0, Exp = 0 }); // CruelShade
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 3060, Lvl = 0, Exp = 0 }); // Reflect
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 3080, Lvl = 0, Exp = 0 }); // Dodge
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1380, Lvl = 0, Exp = 0 }); // Dance2
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1385, Lvl = 0, Exp = 0 }); // Dance3
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1390, Lvl = 0, Exp = 0 }); // Dance4
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1395, Lvl = 0, Exp = 0 }); // Dance5
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1400, Lvl = 0, Exp = 0 }); // Dance6
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1405, Lvl = 0, Exp = 0 }); // Dance7
                            GC.MyChar.RWSkill(new Game.Skill() { ID = 1410, Lvl = 0, Exp = 0 }); // Dance8
                            {
                                GC.AddSend(Packets.NPCSay("Congratulations, you have learned all skills.)"));
                                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                GC.AddSend(Packets.NPCSetFace(55));
                                GC.AddSend(Packets.NPCFinish());
                            }
                        }
                        if (Cmd[0] == "/allprofs")
                        {
                            GC.MyChar.RWProf(new Game.Prof() { ID = 410, Lvl = 12, Exp = 0 }); // Blade
                            GC.MyChar.RWProf(new Game.Prof() { ID = 420, Lvl = 12, Exp = 0 }); // Sword
                            GC.MyChar.RWProf(new Game.Prof() { ID = 421, Lvl = 12, Exp = 0 }); // Backsword
                            GC.MyChar.RWProf(new Game.Prof() { ID = 430, Lvl = 12, Exp = 0 }); // Hook
                            GC.MyChar.RWProf(new Game.Prof() { ID = 440, Lvl = 12, Exp = 0 }); // Whip
                            GC.MyChar.RWProf(new Game.Prof() { ID = 450, Lvl = 12, Exp = 0 }); // Axe 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 460, Lvl = 12, Exp = 0 }); // Hammer
                            GC.MyChar.RWProf(new Game.Prof() { ID = 480, Lvl = 12, Exp = 0 }); // Club 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 481, Lvl = 12, Exp = 0 }); // Scepter 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 490, Lvl = 12, Exp = 0 }); // Dagger
                            GC.MyChar.RWProf(new Game.Prof() { ID = 601, Lvl = 12, Exp = 0 }); // Katana
                            GC.MyChar.RWProf(new Game.Prof() { ID = 510, Lvl = 12, Exp = 0 }); // Glaive
                            GC.MyChar.RWProf(new Game.Prof() { ID = 530, Lvl = 12, Exp = 0 }); // Poleaxe 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 540, Lvl = 12, Exp = 0 }); // LongHammer 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 550, Lvl = 12, Exp = 0 }); // Scythe 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 560, Lvl = 12, Exp = 0 }); // Spear
                            GC.MyChar.RWProf(new Game.Prof() { ID = 562, Lvl = 12, Exp = 0 }); // Pickaxe
                            GC.MyChar.RWProf(new Game.Prof() { ID = 580, Lvl = 12, Exp = 0 }); // Halberd 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 561, Lvl = 12, Exp = 0 }); // Wand 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 500, Lvl = 12, Exp = 0 }); // Bow
                            GC.MyChar.RWProf(new Game.Prof() { ID = 900, Lvl = 12, Exp = 0 }); // Shield
                            GC.MyChar.RWProf(new Game.Prof() { ID = 422, Lvl = 12, Exp = 0 }); // Other 
                            GC.MyChar.RWProf(new Game.Prof() { ID = 000, Lvl = 12, Exp = 0 }); // Boxing
                            {
                                GC.AddSend(Packets.NPCSay("Congratulations, your weapon proficiencies are all now at level 12.)"));
                                GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                GC.AddSend(Packets.NPCSetFace(55));
                                GC.AddSend(Packets.NPCFinish());
                            }
                        }
                        if(Cmd[0] == "/appr")
                            GC.AddSend(Packets.MentorApprenticePacket(GC.MyChar.EntityID, (uint)Program.Rnd.Next(1000001, 19999999), Cmd[1], byte.Parse(Cmd[2]), 1));
                        if (Cmd[0] == "/effect")
                            GC.AddSend(Packets.String(GC.MyChar.EntityID, 10, Cmd[1]));
                        if (Cmd[0] == "/exp")
                            GC.MyChar.Experience = ulong.Parse(Cmd[1]);
                        if (Cmd[0] == "/pkp")
                            GC.MyChar.PKPoints = ushort.Parse(Cmd[1]);
                        if (Cmd[0] == "/atk")
                            GC.AddSend(Packets.AttackPacket(GC.MyChar.EntityID, GC.MyChar.EntityID, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, 9999, byte.Parse(Cmd[1])));
                        if (Cmd[0] == "/recall")
                        {
                            if (Cmd[1] != "all")
                            {
                                if (GC.AuthInfo.Status == "[PM]")
                                {
                                    Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                    if (C != null && C != GC.MyChar)
                                        C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                                }
                            }
                            else
                            {
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                            }
                        }
                        if (Cmd[0] == "/bringtome")
                        {
                            if (Cmd[1] != "all")
                            {
                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null && C != GC.MyChar)
                                    C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);

                            }
                            else
                            {
                                foreach (Game.Character C in Game.World.H_Chars.Values)
                                    C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                            }
                        }
                        if (Cmd[0] == "/c")
                        {
                            Game.World.SendMsgToAll(GC.MyChar.Name, GC.MyChar.Name + ": " + Message.Remove(0, 3), 2011, 0);
                        }
                        if (Cmd[0] == "/try")
                        {
                            GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 1, GC.MyChar.Loc.X, GC.MyChar.Loc.Y, byte.Parse(Cmd[1])));
                        }
                        if (Cmd[0] == "/steed")
                        {
                            Game.Item I = new NewestCOServer.Game.Item();
                            I.ID = 300000;
                            I.Plus = byte.Parse(Cmd[1]);
                            I.MaxDur = I.DBInfo.Durability;
                            I.CurDur = I.MaxDur;
                            I.Effect = NewestCOServer.Game.Item.RebornEffect.Horsie;
                            I.TalismanProgress = BitConverter.ToUInt32(new byte[4] {byte.Parse(Cmd[4]), byte.Parse(Cmd[3]), byte.Parse(Cmd[2]),0},0);
                            I.UID = (uint)Program.Rnd.Next(10000000);
                            GC.MyChar.AddItem(I);
                        }
                        if (Cmd[0] == "/find")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                GC.MyChar.Teleport(C.Loc.Map, C.Loc.X, C.Loc.Y);
                        }
                        if (Cmd[0] == "/seff")
                            GC.AddSend(Packets.Status(GC.MyChar.EntityID, Game.Status.Effect, ulong.Parse(Cmd[1])));
                        
                        if (Cmd[0] == "/vip")
                        {
                            GC.MyChar.VipLevel = byte.Parse(Cmd[1]); 
                            GC.AddSend(Packets.ChatMessage(0, "SYSTEM", GC.MyChar.Name, "Congratulations! Your vip level is " + GC.MyChar.VipLevel +". Thank you for donating.", 2001, 0));
                        }
                        if (Cmd[0] == "/spawn")
                        {
                            if (Cmd.Length == 3)
                            {
                                GC.SpawnOnHold = !GC.SpawnOnHold;
                                if (GC.SpawnOnHold)
                                {
                                    GC.SpawnXStart = GC.MyChar.Loc.X;
                                    GC.SpawnYStart = GC.MyChar.Loc.Y;
                                    GC.LocalMessage(2000, "Starting to create spawn; Spawn starts: " + GC.SpawnXStart + ", " + GC.SpawnYStart);
                                }
                                else
                                {
                                    GC.LocalMessage(2000, "Ending the spawn.");
                                    StreamWriter SW = new StreamWriter(@"C:\OldCODB\MobSpawns.txt", true);
                                    SW.WriteLine(Cmd[1] + " " + Cmd[2] + " " + GC.MyChar.Loc.Map + " " + GC.SpawnXStart + " " + GC.SpawnYStart + " " + GC.MyChar.Loc.X + " " + GC.MyChar.Loc.Y);
                                    SW.Flush();
                                    SW.Close();
                                }
                            }
                        }

                        if (Cmd[0] == "/try")
                            GC.AddSend(Packets.GeneralData(GC.MyChar.EntityID, 0, 0, 0, byte.Parse(Cmd[1])));
                        if (Cmd[0] == "/shopflag")
                        {
                            Game.NPC N = new NewestCOServer.Game.NPC(1234.ToString() + ' ' + 1080 + ' ' + 16 + ' ' + 6 + ' ' + 0 + ' ' + GC.MyChar.Loc.Map + ' ' + GC.MyChar.Loc.X + ' ' + GC.MyChar.Loc.Y);
                            Game.World.Spawn(N);
                        }
                        if (Cmd[0] == "/guard")
                        {
                            StreamWriter SW = new StreamWriter(@"C:\OldCODB\MobSpawns.txt", true);
                            SW.WriteLine(97 + " " + 1 + " " + GC.MyChar.Loc.Map + " " + GC.MyChar.Loc.X + " " + GC.MyChar.Loc.Y + " " + GC.MyChar.Loc.X + " " + GC.MyChar.Loc.Y);
                            SW.Flush();
                            SW.Close();
                        }
                        if (Cmd[0] == "/addnpc")
                        {//uid type flags avatar
                            //StreamWriter SW = new StreamWriter(@"C:\OldCODB\NPCs.txt", true);
                            //SW.WriteLine(Cmd[1] + ' ' + Cmd[2] + ' ' + Cmd[3] + ' ' + GC.MyChar.Direction + ' ' + Cmd[4] + ' ' + GC.MyChar.Loc.Map + ' ' + GC.MyChar.Loc.X + ' ' + GC.MyChar.Loc.Y);
                            //SW.Flush();
                            //SW.Close();
                            Game.NPC N = new NewestCOServer.Game.NPC(Cmd[1] + ' ' + Cmd[2] + ' ' + Cmd[3] + ' ' + GC.MyChar.Direction + ' ' + Cmd[4] + ' ' + GC.MyChar.Loc.Map + ' ' + GC.MyChar.Loc.X + ' ' + GC.MyChar.Loc.Y);
                            //Game.World.H_NPCs.Add(N.EntityID, N);
                            Game.World.Spawn(N);
                        }
                        if (Cmd[0] == "/quiz")
                            if (!Features.QuizShow.QuizON)
                                Features.QuizShow.Start();
                        if (Cmd[0] == "/mb")
                            GC.MyChar.AddItem(721080);
                        if (Cmd[0] == "/status")
                            GC.AddSend(Packets.Status(GC.MyChar.EntityID, (NewestCOServer.Game.Status)byte.Parse(Cmd[1]), ulong.Parse(Cmd[2])));
                        if (Cmd[0] == "/xp")
                        {
                            GC.MyChar.StatEff.Add(NewestCOServer.Game.StatusEffectEn.XPStart);
                            GC.MyChar.Buffs.Add(new Game.Buff() { StEff = NewestCOServer.Game.StatusEffectEn.XPStart, Lasts = 20, Started = DateTime.Now, Eff = NewestCOServer.Features.SkillsClass.ExtraEffect.None });
                        }
                        if (Cmd[0] == "/mana")
                            GC.MyChar.CurMP = (ushort)GC.MyChar.MaxMP;
                        if (Cmd[0] == "/newguild")
                        {
                            if (GC.MyChar.MyGuild == null)
                            {
                                try
                                {
                                    ushort NewGuildID = (ushort)Program.Rnd.Next(ushort.MaxValue);
                                    while (Features.Guilds.AllTheGuilds.Contains(NewGuildID))
                                        NewGuildID = (ushort)Program.Rnd.Next(ushort.MaxValue);
                                    Features.Guilds.CreateNewGuild(Cmd[1], NewGuildID, GC.MyChar);
                                    Game.World.Spawn(GC.MyChar, false);
                                    
                                    GC.AddSend(Packets.GuildInfo(GC.MyChar.MyGuild, GC.MyChar));
                                    GC.AddSend(Packets.String(GC.MyChar.MyGuild.GuildID, (byte)Game.StringType.GuildName, GC.MyChar.MyGuild.GuildName));
                                }
                                catch (Exception Exc) { Program.WriteLine(Exc); }
                            }
                        }
                        
                        if (Cmd[0] == "/tryatk")
                            GC.AddSend(Packets.AttackPacket(GC.MyChar.EntityID,GC.MyChar.EntityID,GC.MyChar.Loc.X,GC.MyChar.Loc.Y,300,byte.Parse(Cmd[1])));
                        if (Cmd[0] == "/skill")
                            GC.MyChar.RWSkill(new Game.Skill() { ID = ushort.Parse(Cmd[1]), Lvl = byte.Parse(Cmd[2]), Exp = 0 });
                        if (Cmd[0] == "/prof")
                            GC.MyChar.RWProf(new Game.Prof() { ID = ushort.Parse(Cmd[1]), Lvl = byte.Parse(Cmd[2]), Exp = 0 });
                        if (Cmd[0] == "/blue")
                            GC.MyChar.BlueName = !GC.MyChar.BlueName;
                        if (Cmd[0] == "/level")
                        {
                            GC.MyChar.Experience = 0;
                            GC.MyChar.Level = byte.Parse(Cmd[1]);
                        } 
                        
                        if (Cmd[0] == "/kick")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.MyClient.Disconnect();
                        }
                        if (Cmd[0] == "/arrest")
                        {

                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null && C != GC.MyChar)
                                C.Teleport(1615, 20, 20);
                            C.Silvers = 0;
                            C.CPs = 0;
                            C.Level = 1;
                            C.Job = 0;
                            C.PKPoints = 999;
                            C.Trading = false;
                            GC.MyChar.CurHP = 1;
                            GC.MyChar.Stamina = 0;
                            Game.World.SendMsgToAll("+ C.Name + ", "I'm a Biggest Idiot and I win 200pkp And im send to jail.[GM] " + GC.MyChar.Name + "Thanks.", 2011, 0);
                        }
                        if (Cmd[0] == "/mob")
                            GC.AddSend(Packets.SpawnEntity(ushort.Parse(Cmd[1]), "FuckFace" + Cmd[1], GC.MyChar.Loc));
                        if (Cmd[0] == "/vp")
                            GC.LocalMessage(2000, "You have " + GC.MyChar.VP + " virtue points.");
                        if (Cmd[0] == "/map")
                            GC.LocalMessage(2000, "The ID of the map you are on is " + GC.MyChar.Loc.Map);
                        if (Cmd[0] == "/job")
                            GC.MyChar.Job = byte.Parse(Cmd[1]);
                        if (Cmd[0] == "/silvers")
                            GC.MyChar.Silvers = uint.Parse(Cmd[1]);
                        if (Cmd[0] == "/cps")
                            GC.MyChar.CPs = uint.Parse(Cmd[1]);
                        if (Cmd[0] == "/tele")
                            GC.MyChar.Teleport(ushort.Parse(Cmd[1]), ushort.Parse(Cmd[2]), ushort.Parse(Cmd[3]));
                        if (Cmd[0] == "/item")
                        {
                            uint ID = 0;
                            foreach (DatabaseItem DI in Database.DatabaseItems.Values)
                                if (DI.Name == Cmd[1])
                                {
                                    ID = DI.ID;
                                    Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
                                    Game.Item.ItemQuality Quality = e.Quality;
                                    
                                    if (Cmd[2].ToLower() == "refined") Quality = Game.Item.ItemQuality.Refined;
                                    else if (Cmd[2].ToLower() == "unique") Quality = Game.Item.ItemQuality.Unique;
                                    else if (Cmd[2].ToLower() == "elite") Quality = Game.Item.ItemQuality.Elite;
                                    else if (Cmd[2].ToLower() == "super") Quality = Game.Item.ItemQuality.Super;
                                    else if (Cmd[2].ToLower() == "simple") Quality = Game.Item.ItemQuality.Simple;
                                    else if (Cmd[2].ToLower() == "fixed") Quality = Game.Item.ItemQuality.Fixed;
                                    else if (Cmd[2].ToLower() == "poor") Quality = Game.Item.ItemQuality.Poor;
                                    else if (Cmd[2].ToLower() == "normal") Quality = Game.Item.ItemQuality.Normal;
                                    if (e.Quality == Quality)
                                        break;
                                }
                            if (ID != 0 && GC.MyChar.Inventory.Count < 40)
                            {
                                Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
                                Game.Item.ItemQuality Quality = e.Quality;
                                bool change = true;
                                if (Cmd[2].ToLower() == "refined") Quality = Game.Item.ItemQuality.Refined;
                                else if (Cmd[2].ToLower() == "unique") Quality = Game.Item.ItemQuality.Unique;
                                else if (Cmd[2].ToLower() == "elite") Quality = Game.Item.ItemQuality.Elite;
                                else if (Cmd[2].ToLower() == "super") Quality = Game.Item.ItemQuality.Super;
                                else if (Cmd[2].ToLower() == "simple") Quality = Game.Item.ItemQuality.Simple;
                                else if (Cmd[2].ToLower() == "fixed") Quality = Game.Item.ItemQuality.Fixed;
                                else if (Cmd[2].ToLower() == "poor") Quality = Game.Item.ItemQuality.Poor;
                                else if (Cmd[2].ToLower() == "normal") Quality = Game.Item.ItemQuality.Normal;
                                else change = false;
                                if (change)
                                    e.QualityChange(Quality);
                                ID = e.ToID();
                                if (!Database.DatabaseItems.ContainsKey(ID))
                                {
                                    return;
                                }
                                Game.Item I = new NewestCOServer.Game.Item();
                                if (e.Part(0, 2) == 11 || e.Part(0, 2) == 13 || e.Part(0, 3) == 123 || e.Part(0, 3) == 141 || e.Part(0, 3) == 142)
                                    I.Color = NewestCOServer.Game.Item.ArmorColor.Orange;
                                //I.FreeItem = true;
                                I.ID = ID;
                                I.UID = (uint)Program.Rnd.Next(10000000);
                                try
                                {
                                    I.MaxDur = I.DBInfo.Durability;
                                    I.CurDur = I.MaxDur;
                                }
                                catch (Exception Exc) { Program.WriteLine(Exc); }
                                try
                                {
                                    I.Plus = byte.Parse(Cmd[3]);
                                }
                                catch { }
                                try
                                {
                                    I.Bless = byte.Parse(Cmd[4]);
                                }
                                catch { }
                                try
                                {
                                    I.Enchant = byte.Parse(Cmd[5]);
                                }
                                catch { }
                                try
                                {
                                    I.Soc1 = (Game.Item.Gem)byte.Parse(Cmd[6]);
                                }
                                catch { }
                                try
                                {
                                    I.Soc2 = (Game.Item.Gem)byte.Parse(Cmd[7]);
                                }
                                catch { }
                                I.Effect = NewestCOServer.Game.Item.RebornEffect.None;

                                GC.MyChar.AddItem(I);
                            }
                        }
                    }

                }
                else
                    Game.World.Chat(GC.MyChar, ChatType, From, To, Message);
            }
            catch { }
        }
    }
}
There's my whole Chat.cs o.o
Secrets-man is offline  
Old 02/26/2010, 08:02   #10
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
if (GC.AuthInfo.Status == "[PM]")
{
Take out that and its closing bracket.
Arcо is offline  
Old 02/26/2010, 08:22   #11
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
I took it off.. still nothing =x Just wondering what's wrong with it. I deleted that Gc.AuthInfo.Status == "[PM]") Thingie.. still wont let me do it on normal players x.x
Secrets-man is offline  
Old 02/26/2010, 08:32   #12
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by Secrets-man View Post
I took it off.. still nothing =x Just wondering what's wrong with it. I deleted that Gc.AuthInfo.Status == "[PM]") Thingie.. still wont let me do it on normal players x.x
Wait what are you trying to do, recall a player?
Or use the command as a normal player?
Arcо is offline  
Old 02/26/2010, 08:41   #13
 
elite*gold: 0
Join Date: Apr 2007
Posts: 142
Received Thanks: 15
Quote:
Originally Posted by .Arco View Post
Wait what are you trying to do, recall a player?
Or use the command as a normal player?
I'm trying to do /bringtome "playername" and tried to do /recall playername also , but didnt work x.x as a PM

Think I should try some other source? x.x But its weird that it ain't working.
Secrets-man is offline  
Reply


Similar Threads Similar Threads
B> DriftCity CBS Code | S> War Rock Code / Bounty Bay Code etc.
10/05/2010 - Trading - 1 Replies
Hi, wie schon im Titel beschrieben. In der CBS vom November gab es Bonusodes für mehrere Spiele. Ich benötige DriftCity Codes. Kann sonst für alle anderen Spiele die Codes biten, einige auch doppelt. Hier eine Liste der Spiele und Bonusaktionen: - (2x) War Rock - (2x) War of Titans - (2x) World of Warcraft - (1x) Warhammer Online - (1x) Bounty Bay online
WTB: Japanischer/Chinesicher Guild Wars Trial-Code und EoTn Code
02/08/2010 - Guild Wars Trading - 5 Replies
Hallo, Wie schon oben in der beschreibung steht suche ich Japanischer/Chinesicher Trial-Code + EoTn oder die einzelnen Codes! Ich würde in Platin/Ektos/ZkeYs zahlen (allerdings nur mit Treuhandhändler), man weiss ja nie was einem Verkauft wird :P. Bitte so schnell wie möglich melden, wen einer es haben sollte.



All times are GMT +1. The time now is 03:45.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.