elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   CO2 PServer Guides & Releases (https://www.elitepvpers.com/forum/co2-pserver-guides-releases/)
-   -   [Release]/commands for 5165 (https://www.elitepvpers.com/forum/co2-pserver-guides-releases/446658-release-commands-5165-a.html)

paralyzer2 02/02/2010 22:08

[Release]/commands for 5165
 
Hello all,

I have noticed that the /arrest command for 5165 didnt work... and I found out how to make a /revive playername command work so here it goes, the /arrest did begin off with someone off 4botters made it but it did NOT work and it made them like level 1 with no gold or silvers so I made it better,

For the /revive playername command it is
Code:

if (Cmd[0] == "/revive")
                            {
                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null && C != GC.MyChar)
                                    C.Ghost = false;
                                C.BlueName = false;
                                C.CurHP = (ushort)GC.MyChar.MaxHP;
                                C.CurMP = (ushort)GC.MyChar.MaxMP;
                                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);
                            }

Be easy on me if it is not that good but it works so... I have made a /revive that works but it will revive you were you are without having to wait for the countdown but thats for another day.

Here is the /arrest command
Code:

                            if (Cmd[0] == "/arrest")
                            {
                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null && C != GC.MyChar)
                                C.Teleport(6000, 032, 072);
                                C.PKPoints = 200;
                                C.Trading = false;
                                C.CurHP = 1;
                                C.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);
                            }

Yes it is very diffrent what it does is instead of just leaving them there for some days by a timer it makes there PKPoints 200 so they can wait in Jail for it to run out.

Thanks these are MY first commands so please dont be mean, I just started coding 2 days ago so....

I thought u might share with you a usefull command that make your Strength, Vit, Agi, Spi all 1000 in just one command :D

Here is the code ( Put it in the Chat.cs )
Code:

if (Cmd[0] == "/maxstat")
                            {
                                GC.MyChar.Str = 1000;
                                GC.MyChar.Vit = 1000;
                                GC.MyChar.Agi = 1000;
                                GC.MyChar.Spi = 1000;
                                GC.MyChar.StatPoints = byte.Parse(Cmd[1]);
                            }

Well as you can see it said if command /maxstat make the Str, Vit, Agi Spi 1000 so... Yer I like it but that's me its just a usefull command I think.

Hello, this has been released many times im sure but I added a few things, such as /jail and /gwp and I saw not one release had /jail and /gwp in so... I added the /clearinv I saw that there were npc codes to do this but not any guides to add the command so I added that to.

Here is the code ( add into the Chat.cs )
Code:

if (Cmd[0] == "/tc")
                            {
                                GC.MyChar.Teleport(1002, 429, 378);
                            }
                            if (Cmd[0] == "/pc")
                            {
                                GC.MyChar.Teleport(1011, 232, 260);
                            }
                            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);
                            }

And well not much more to say about that code.

Here is the code for /clearinv ( also put into your Chat.cs )
Code:

if (Cmd[0] == "/clearinv")
                            {
                                foreach (Game.Item I in GC.MyChar.Inventory)
                                    GC.AddSend(Packets.ItemPacket(I.UID, 0, 3));
                                GC.MyChar.Inventory = new ArrayList(40);
                            }

Well not much to say about this command aswell, lol

I have coded some command such as /life gives u mana and hp and stamina and /hp gives hp on its own /mana gives mana on its own /stamina gives stamina on its own and once again most likely released many times,

For the /life the command is: ### Credits goto MoD4fuk4 for this command I did have it but it didnt check if the player was blessed so he added that for me, Thanks bro.
Code:

                        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;
                            }
                        }

As I said gives full stamina/hp/mana,

Here is the code for /hp:
Code:

if (Cmd[0] == "/hp")
                            GC.MyChar.CurHP = (ushort)GC.MyChar.MaxHP;

Gives full hp.

Here is the code for /mana:
Code:

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

Gives full mana lol

Here is a code for the /recall playername ( WORKING ) I did not see ANY guides that had released this so I released it took me a LONG time ( 45mins ) to code...

Here is the code ( add to the Chat.cs NOTE: there will allready be a command in there called /recall ignore it DO NOT REMOVE IT just add this code in there aswell )
Code:

                        if (Cmd[0] == "/recall")
                        {
                            if (GC.AuthInfo.Status == "[GM]")
                            {

                                Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                                if (C != null)
                                    C.Teleport(GC.MyChar.Loc.Map, GC.MyChar.Loc.X, GC.MyChar.Loc.Y);
                            }
                        }

NOTE: will only work for people with the nametag [GM] xD

Yes these commands are easy to code but I released them anyway for the people who are new to coding, noobies etc... etc... Yes I did code all these my self, so im happy with them seeing as I have only been coding for 2 days...

Jedex 02/02/2010 22:10

Very good release!

paralyzer2 02/02/2010 22:15

Thanks, its my first!

NukingFuts 02/02/2010 22:16

lol easy and nice good job :)

iRook 02/02/2010 22:22

Nice, as you said it has been released many times. (Fancy seeing you here)

paralyzer2 02/02/2010 22:23

Thanks.

Korvacs 02/02/2010 22:42

Merged, please dont make multiple threads, you can simply create one for many releases.

paralyzer2 02/02/2010 22:55

Oh sorry, Thanks. :P

.Ocularis 02/03/2010 13:28

Nice! I may add the /cleaninv for the server I'm working on since the players are too lazy to find the damn escort dude -.-


+thanks

w.maatman 02/03/2010 15:31

could u make on for /recall (player) :$

paralyzer2 02/03/2010 17:30

Yes I will try im working on that atm lol

paralyzer2 02/03/2010 18:59

I have added the /recall playname command.

MoD4fuk4 02/03/2010 19:26

Your code for recovering HP, MP and Stamina is missing something. It doesnt check if the player is blessed, which means the stamina won't recover fully if the player is blessed, so I'll share my code for that:

Code:

                        if (Cmd[0] == "/mh")
                        {
                            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;
                            }
                        }

Btw, I dont use the word "life" I use "mh" which stands for Mana and Health plus its faster to type at first time. But you can change it to whatever you want.

paralyzer2 02/03/2010 19:31

Thank you, I will add that now, I will leave credits for you.

MoD4fuk4 02/04/2010 00:53

Ok ;) thx


All times are GMT +2. The time now is 14:28.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.