Register for your free account! | Forgot your password?

You last visited: Today at 19:07

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

Advertisement



Commands

Discussion on Commands within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Zkiller110's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 276
Received Thanks: 99
Commands

I'm working on a new set of commands for my server and may be releasing them them not sure yet but, I need a little help with a small problem.

This is what i got for my revive command:
Code:
                        #region Revive

                        if (Cmd[0] == "/Revive" || Cmd[0] == "/revive")
                        {
                            if (GC.GM || GC.PM)
                            {
                                if (C == null)
                                {
                                    if (!GC.MyChar.Alive)
                                    {
                                        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);
                                    }
                                    else
                                        GC.LocalMessage(2000, "Your not dead.");
                                }

                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null)
                                {
                                    if (!C.Alive)
                                    {
                                        C.Ghost = false;
                                        C.BlueName = false;
                                        C.CurHP = (ushort)GC.MyChar.MaxHP;
                                        C.Alive = true;
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                        C.Body = GC.MyChar.Body;
                                        C.Hair = GC.MyChar.Hair;
                                        C.Equips.Send(GC, false);
                                        C.MyClient.LocalMessage(2000, GC.MyChar.Name + " has revived you.");
                                    }
                                    else
                                        GC.LocalMessage(2000, C.Name + " is not dead.");
                                }
                            }
                            else
                                GC.LocalMessage(2000, "You not a [GM] or [PM].");
                        }

                        #endregion
/* fixed
Now this all works fine just that if i want to revive myself i have to put a space after "/revive", how would I go about making this command the same just not having to put a space after "/revive" to revive myself. fixed */

sorry that was the wrong question to ask that problem was an easy fix and i feel like and idiot but i fixed my last problem and now when i use the command "/revive test[PM]" it goes through the first section of code and revives myself then i get a message that says "test is not dead" so it also goes through the second section of code -.- anyone wanna help
Zkiller110 is offline  
Old 08/01/2010, 17:49   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Well, this code ur making here, is for reviving others.
Code:
                        #region Revive

                        if (Cmd[0] == "/Revive" || Cmd[0] == "/revive")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (GC.GM || GC.PM)
                            {
                                if (C == null)
                                {
                                    if (!GC.MyChar.Alive)
                                    {
                                        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);
                                    }
                                    else
                                        GC.LocalMessage(2000, "Your not dead.");
                                }

                                if (C != null)
                                {
                                    if (!C.Alive)
                                    {
                                        C.Ghost = false;
                                        C.BlueName = false;
                                        C.CurHP = (ushort)GC.MyChar.MaxHP;
                                        C.Alive = true;
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                        C.Body = GC.MyChar.Body;
                                        C.Hair = GC.MyChar.Hair;
                                        C.Equips.Send(GC, false);
                                        C.MyClient.LocalMessage(2000, GC.MyChar.Name + " has revived you.");
                                    }
                                    else
                                        GC.LocalMessage(2000, C.Name + " is not dead.");
                                }
                            }
                            else
                                GC.LocalMessage(2000, "You not a [GM] or [PM].");
                        }

                        #endregion
and this for revive ur self
Code:
                        #region Revive

                        if (Cmd[0] == "/Revive" || Cmd[0] == "/revive")
                        {
                            if (GC.GM || GC.PM)
                            {
                                if (C == null)
                                {
                                    if (!GC.MyChar.Alive)
                                    {
                                        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);
                                    }
                                    else
                                        GC.LocalMessage(2000, "Your not dead.");
                                }

                                if (C != null)
                                {
                                    if (!C.Alive)
                                    {
                                        C.Ghost = false;
                                        C.BlueName = false;
                                        C.CurHP = (ushort)GC.MyChar.MaxHP;
                                        C.Alive = true;
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                        C.Body = GC.MyChar.Body;
                                        C.Hair = GC.MyChar.Hair;
                                        C.Equips.Send(GC, false);
                                        C.MyClient.LocalMessage(2000, GC.MyChar.Name + " has revived you.");
                                    }
                                    else
                                        GC.LocalMessage(2000, C.Name + " is not dead.");
                                }
                            }
                            else
                                GC.LocalMessage(2000, "You not a [GM] or [PM].");
                        }

                        #endregion
what did I do?
Removed:
Code:
Game.Character C = Game.World.CharacterFromName(Cmd[1]);
Fish* is offline  
Old 08/01/2010, 17:50   #3
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
Code:
                        #region Revive

                        if (Cmd[0] == "/Revive" || Cmd[0] == "/revive")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (GC.GM || GC.PM)
                            {
                                if (Cmd.Length == 1)
                                {
                                    if (!GC.MyChar.Alive)
                                    {
                                        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);
                                    }
                                    else
                                        GC.LocalMessage(2000, "Your not dead.");
                                }
                                else if (C != null)
                                {
                                    if (!C.Alive)
                                    {
                                        C.Ghost = false;
                                        C.BlueName = false;
                                        C.CurHP = (ushort)GC.MyChar.MaxHP;
                                        C.Alive = true;
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                        C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                        C.Body = GC.MyChar.Body;
                                        C.Hair = GC.MyChar.Hair;
                                        C.Equips.Send(GC, false);
                                        C.MyClient.LocalMessage(2000, GC.MyChar.Name + " has revived you.");
                                    }
                                    else
                                        GC.LocalMessage(2000, C.Name + " is not dead.");
                                }
                            }
                            else
                                GC.LocalMessage(2000, "You not a [GM] or [PM].");
                        }

                        #endregion
_tao4229_ is offline  
Thanks
2 Users
Old 08/01/2010, 18:04   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Quote:
Originally Posted by _tao4229_ View Post
Code:
                The code
lol,I see what I did wrong
Fish* is offline  
Old 08/01/2010, 18:44   #5
 
Zkiller110's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 276
Received Thanks: 99
thanks tao4229 i see whats wrong with it now

i just tried it with the cmd.length == 1 and it works for reviving by the players name but it doesnt work like "/revive" the code you put up has the Game.Character C = Game.World.CharacterFromName(Cmd[1]); in the wrong spot

should look like:
Code:
                        #region Revive

                        if (Cmd[0] == "/Revive" || Cmd[0] == "/revive")
                        {
                            if (Cmd.Length == 1)
                            {
                                if (!GC.MyChar.Alive)
                                {
                                    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);
                                }
                                else
                                    GC.LocalMessage(2000, "Your not dead.");
                            }
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                            {
                                if (!C.Alive)
                                {
                                    C.Ghost = false;
                                    C.BlueName = false;
                                    C.CurHP = (ushort)GC.MyChar.MaxHP;
                                    C.Alive = true;
                                    C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Dead);
                                    C.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.BlueName);
                                    C.Body = GC.MyChar.Body;
                                    C.Hair = GC.MyChar.Hair;
                                    C.Equips.Send(GC, false);
                                    C.MyClient.LocalMessage(2000, GC.MyChar.Name + " has revived you.");
                                }
                                else
                                    GC.LocalMessage(2000, C.Name + " is not dead.");
                            }
                        }

                        #endregion
but thanks again for telling me about cmd.length
Zkiller110 is offline  
Reply


Similar Threads Similar Threads
RF Up5 GM Commands
10/30/2010 - RFO Hacks, Bots, Cheats, Exploits & Guides - 49 Replies
For who know how to do GM commands w/o be a GM (not like me :( ) or for owner of server //E2P1G5 Updated RF GM commands ALT+B (Opens observer menu which enables fly/noclip mode.) /add <USERNAME> (Add the user to your player list, only usable in observer mode, must have player targeted when you do it.) /remove <USERNAME> (Remove player from observer list.) /add (Use this command to add a...
GM Commands
07/03/2010 - General Gaming Discussion - 6 Replies
Was wondering if anyone would be kind enough to leak the GM commands??? Or provide any insight on how to find them. If so pls post or PM. TY
[Key Commands] Default Key Commands for the beginners
10/01/2008 - General Gaming Releases - 0 Replies
Default keybindings: Abilities Window V Backpack Window: B Career Window: K Character Window: C Battlegroup Window: Left Alt + R Developer Window: ; Guild Window: G Help Window: H
new GM Commands,most of EO
05/06/2008 - EO PServer Hosting - 6 Replies
There is some new gamemaster commands. set to gm, type follow your player name, like youname. You can link to 天晴魔域技术论坛 - - powered by bbsmax for more help of Chinese The text "未知" is unknow in english. :eek: /amount_limit 未知 /attach ?查询奖品 /auto_pathfind 未知 /awardattrib1info 未知
/commands
12/18/2007 - Conquer Online 2 - 6 Replies
Does anyone know how to get the /look commands to work for the new patch, any help would be much apreciated. Chem.



All times are GMT +1. The time now is 19:08.


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.