Register for your free account! | Forgot your password?

You last visited: Today at 22:26

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

Advertisement



[Release] a new command

Discussion on [Release] a new command within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
[Release] /pet command

ok this is the /pet command ok its not hard to do and i thank it will only work if u have the summon guard working becaz i us its atk type or u can edit it if u want but ul hafe to fix it up so it wont atk its self if u do that well any way here u go

find wear u put commands in and put this
Code:
                                        if (Splitter[0] == "/pet")
                                        {
                                            // /pet HP atk name mech lvl
                                            uint hp = 0;
                                            uint atk = 0;
                                            int mech = 0;
                                            short lvl = 0;
                                            hp = (uint.Parse(Splitter[1]));
                                            atk = (uint.Parse(Splitter[2]));
                                            string name = Splitter[3];
                                            mech = (int.Parse(Splitter[4]));
                                            lvl = (short.Parse(Splitter[5]));
                                            Mobs.newpet(Convert.ToInt16(MyChar.LocX), Convert.ToInt16(MyChar.LocY), Convert.ToInt16(MyChar.LocMap), hp, atk, name, mech, lvl, MyChar.UID);
                                        }
ok u got that now in Entities.cs find
Code:
public static void NewRBGuard(short x, short y, short map, uint owner,short glvl)
under that in a new void add

Code:
public static void newpet(short x, short y, short map, uint hp, uint atk, string name, int mech, short lvl, uint owner)
        {
            try
            {
                uint UID = (uint)General.Rand.Next(400000, 500000);
                while (AllMobs.Contains(UID))
                {
                    UID = (uint)General.Rand.Next(400000, 500000);
                }
                SingleMob Mob = new SingleMob(x, y, map, hp, hp, atk, atk, UID, name, mech, lvl, (byte)General.Rand.Next(8), 7, owner, false);
                AllMobs.Add(UID, Mob);
                Other.Charowner(owner).Guard = Mob;
                World.SpawnMobForPlayers(Mob, true);

            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
ok i thak thats all fo rthe command it will be /pet HP atk name mech lvl
a exp will be /pet 200 200 test 111 255
tell me if thar are any problem and yes i codded this my self xD with the help of the summon guard skill

if u like press thanks
taylor2846 is offline  
Thanks
1 User
Old 02/08/2009, 00:28   #2
 
Hoven's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 456
Received Thanks: 128
nice xD

AcidCo used 2 have this haha was always a fun command
Hoven is offline  
Old 02/08/2009, 00:37   #3
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
how can i summon this while summoning guard
PeTe Ninja is offline  
Old 02/08/2009, 01:11   #4
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
u can us this to summon as much pets as u want xD so u can have 100 tatins atk your targit with tornado xd
taylor2846 is offline  
Old 02/08/2009, 01:24   #5
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
Quote:
if (Splitter[0] == "/pet")
{
// /pet HP atk name mech lvl
uint hp = 0;
uint atk = 0;
int mech = 0;
short lvl = 0;
hp = (uint.Parse(Splitter[1]));
atk = (uint.Parse(Splitter[2]));
string name = Splitter[3];
mech = (int.Parse(Splitter[4]));
lvl = (short.Parse(Splitter[5]));
Mobs.newpet(Convert.ToInt16(MyChar.LocX), Convert.ToInt16(MyChar.LocY), Convert.ToInt16(MyChar.LocMap), hp, atk, name, mech, lvl, MyChar.UID);
}
if (Splitter[0] == "/pet")
{
Mobs.newpet(Convert.ToInt16(MyChar.LocX), Convert.ToInt16(MyChar.LocY), Convert.ToInt16(MyChar.LocMap), uint.Parse(Splitter[1]), uint.Parse(Splitter[2]), Splitter[3], int.Parse(Splitter[4]), short.Parse(Splitter[5), MyChar.UID);
}
_Emme_ is offline  
Old 02/08/2009, 02:03   #6
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by EmmeTheCoder View Post
if (Splitter[0] == "/pet")
{
Mobs.newpet(Convert.ToInt16(MyChar.LocX), Convert.ToInt16(MyChar.LocY), Convert.ToInt16(MyChar.LocMap), uint.Parse(Splitter[1]), uint.Parse(Splitter[2]), Splitter[3], int.Parse(Splitter[4]), short.Parse(Splitter[5), MyChar.UID);
}
no he had the right idea

T.Parse() is faster than Convert.ToT()
InfamousNoone is offline  
Thanks
1 User
Old 02/08/2009, 02:06   #7
 
justprownage's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 203
Received Thanks: 87
How do you make it so it attacks the monster your character attacks?
justprownage is offline  
Old 02/08/2009, 05:44   #8
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
it will if u have it so guard do to becaaz it us atk type 7 so if u have summon guard it will work
taylor2846 is offline  
Old 07/16/2009, 23:04   #9
 
Pyro-G's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 25
Received Thanks: 10
I get errors Oo
Pyro-G is offline  
Reply


Similar Threads Similar Threads
[Release] Top Effect Add and Command!
08/30/2010 - CO2 PServer Guides & Releases - 29 Replies
Hello! Today im gonna show you how to add the Top Effects into a old Client and we will make a command for these Effects! Im working with a 5017 Client because i love it to add new things there :D and I show you now how to add the Effects into your 5017 Client (working with other Clients also) 1. Add the Effect-Files
[Release]Botjail Command
03/11/2009 - CO2 PServer Guides & Releases - 7 Replies
Hello this is my first release so this might be nooby but it works.. This is for LOTF based servers but here is the command I coded this myself: if (Splitter == "/botjail") { foreach (DictionaryEntry DE in World.AllChars) { Character Char = (Character)DE.Value; ...
[Release]-- New Command --
12/10/2008 - CO2 PServer Guides & Releases - 7 Replies
GOT That Damianpesta _1_



All times are GMT +1. The time now is 22:27.


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.