[Commands]

02/22/2010 09:07 Arcо#1
Well I've come across and made some commands that are pretty useful.
Here they are
Code:
                        if (Cmd[0] == "/award")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.CPs += uint.Parse(Cmd[2]);
                        }
                        if (Cmd[0] == "/unaward")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.CPs -= uint.Parse(Cmd[2]);
                        }
                        if (Cmd[0] == "/attr")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.StatPoint += uint.Parse(Cmd[2]);
                        }
                        if (Cmd[0] == "/zebra")
                        {
                            Game.Item I = new NewestCOServer.Game.Item();
                            I.ID = 300000;
                            I.Plus = 12;
                            I.MaxDur = I.DBInfo.Durability;
                            I.CurDur = I.MaxDur;
                            I.Effect = NewestCOServer.Game.Item.RebornEffect.Horsie;
                            I.TalismanProgress = BitConverter.ToUInt32(new byte[4] { 46, 39, 142, 0 }, 0);
                            I.UID = (uint)Program.Rnd.Next(10000000);
                            GC.MyChar.AddItem(I);
                        }
                        if (Cmd[0] == "/screen")
                        {
                            Game.World.ScreenColor = uint.Parse(Cmd[1]);
                            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 { }
                        }
Currently look through right now to see if I have anymore commands.
I'll keep it updated.
Noobish releases I know, but they are useful.
02/22/2010 11:12 Decker_#2
What do they do?
02/22/2010 11:17 Arcо#3
Quote:
Originally Posted by Decker_ View Post
What do they do?
If its not obvious enough...
/award lets you award cps to a character.
/unaward does the opposite
/zebra puts a zebra in your inventory
/attr lets you award attribute points to a character.
02/22/2010 12:35 Decker_#4
Nice good job!
02/22/2010 14:36 koko425#5
nice arco but i have error

Quote:
if (Cmd[0] == "/attr")
{
Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if (C != null)
C.StatPoint += uint.Parse(Cmd[2]);
}
02/22/2010 17:10 [GM]#6
Quote:
Originally Posted by .Arco View Post
If its not obvious enough...
/award lets you award cps to a character.
/unaward does the opposite
/zebra puts a zebra in your inventory
/attr lets you award attribute points to a character.
explain more plz u mean when i type

Example:

/award BlackKnight 500

it will give the char named BlackKnight 500 cps?!

and when i type

/attr BlackKnight Str 500

it will give the char named BlackKnight 500 Str points?!
02/22/2010 17:42 dillhack#7
lol need a definition for statpoint
and i also need a definition for Get

how to make these

Quote:
Error 1 'object' does not contain a definition for 'Get' and no extension method 'Get' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) C:\Weird-CoV2\PacketHandler.cs 48 101 NewestCOServer
Error 2 'NewestCOServer.Game.Character' does not contain a definition for 'StatPoint' and no extension method 'StatPoint' accepting a first argument of type 'NewestCOServer.Game.Character' could be found (are you missing a using directive or an assembly reference?) C:\Weird-CoV2\PacketHandling\Chat.cs 287 39 NewestCOServer
02/22/2010 23:38 walmartboi#8
Quote:
Originally Posted by Decker_ View Post
What do they do?
SERIOUSLY?

IF YOU MUST ASK THIS QUESTION, THEN ASK YOURSELF WHY YOU'RE TRYING TO CODE A PRIVATE SERVER.

:facepalm:
02/23/2010 00:29 PeTe Ninja#9
Quote:
Originally Posted by walmartboi View Post
SERIOUSLY?

IF YOU MUST ASK THIS QUESTION, THEN ASK YOURSELF WHY YOU'RE TRYING TO CODE A PRIVATE SERVER.

:facepalm:
not to take sides here but arco asked questions like this once before and i bet you have too.
02/23/2010 02:37 Secrets-man#10
Quote:
Originally Posted by .Arco View Post
Well I've come across and made some commands that are pretty useful.
Here they are
Code:
                        if (Cmd[0] == "/award")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.CPs += uint.Parse(Cmd[2]);
                        }
                        if (Cmd[0] == "/unaward")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.CPs -= uint.Parse(Cmd[2]);
                        }
                        if (Cmd[0] == "/attr")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                C.StatPoint += uint.Parse(Cmd[2]);
                        }
                        if (Cmd[0] == "/zebra")
                        {
                            Game.Item I = new NewestCOServer.Game.Item();
                            I.ID = 300000;
                            I.Plus = 12;
                            I.MaxDur = I.DBInfo.Durability;
                            I.CurDur = I.MaxDur;
                            I.Effect = NewestCOServer.Game.Item.RebornEffect.Horsie;
                            I.TalismanProgress = BitConverter.ToUInt32(new byte[4] { 46, 39, 142, 0 }, 0);
                            I.UID = (uint)Program.Rnd.Next(10000000);
                            GC.MyChar.AddItem(I);
                        }
                        if (Cmd[0] == "/screen")
                        {
                            Game.World.ScreenColor = uint.Parse(Cmd[1]);
                            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 { }
                        }
Currently look through right now to see if I have anymore commands.
I'll keep it updated.
Noobish releases I know, but they are useful.
Nice Job .Arco =]
02/23/2010 15:25 ~Yuki~#11
Quote:
Originally Posted by PeTe Ninja View Post
not to take sides here but arco asked questions like this once before and i bet you have too.
how true :rolleyes:
01/06/2011 01:09 WH-Man#12
No bumping old threads.
01/06/2011 12:50 Basser#13
[Only registered and activated users can see links. Click Here To Register...]
01/06/2011 16:45 Infictus#14
if u cant read simple code then

/award Charname 500
gives him/her 500 cp

/attr Charname 500
gives him/her 500 atribute points
01/06/2011 18:37 Iron~Man#15
This is a little bit TOO EASY to be done.. anyways good job