Register for your free account! | Forgot your password?

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

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

Advertisement



I Need help creating a command.

Discussion on I Need help creating a command. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
xXxTwiztedKidxXx's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 178
Received Thanks: 9
I Need help creating a command.

Ok im useing 5165 and i need to know how to create a command to give cps to others and display a message. If you can help me that would be great.
xXxTwiztedKidxXx is offline  
Old 08/03/2010, 22:47   #2
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
I will not show you how to do this but I will point you in the right direction. I will show you some things from a 5165 source and hopefully you will be able to work at it and get the command right. This is not be being nasty, this is me helping you to learn.

Take this as an example.
Code:
if (Cmd[0] == "/ctele" && GC.AuthInfo.Status == "[PM]")
                        {
                            Game.Character C = Game.World.CharacterFromName(Cmd[1]);
                            if (C != null)
                                GC.MyChar.Teleport(C.Loc.Map, C.Loc.X, C.Loc.Y);
                        }
Then also take this as an example.
Code:
if (Cmd[0] == "/cps")
                            GC.MyChar.CPs = uint.Parse(Cmd[1]);
Using these two examples you should be able to create a command that will award a player CPs.

hint:
if (Cmd[0] == "/cps" && GC.AuthInfo.Status == "[PM]")
{
}


Hope this helps.
Add me on msn if you truly cant figure this out and I will help you some more
.Beatz is offline  
Old 08/03/2010, 22:50   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Phone net so can't write it fully..


If(cmd[0] == "givecp")
{
//foreach loop throuugh your dict or hashtable of connected clients. Our loop will be 'chr'
if(chr.value.name == cmd[1])
{
Chr.value.cps += cmd[2];
Chr.value.send(//chat packet with what's happenned);
break;
}
}
pro4never is offline  
Old 08/03/2010, 22:59   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
so
Code:
if (Cmd[0] == "/cps && GC.AuthInfo.Status == "[PM]")
{
foreach(Game.Character Server in Game.World.H_Chars.Values)
{
int CPs = Int.Parse(Cmd[1])
SendMsgToAll(2011, "You all get + " CPs + " cps free.");
Server.CPs += mehmehmeh
}
}
Kinda did it all for you there, but theres **** you needa change
_DreadNought_ is offline  
Old 08/03/2010, 23:23   #5
 
xXxTwiztedKidxXx's Avatar
 
elite*gold: 0
Join Date: Jul 2009
Posts: 178
Received Thanks: 9
Im trying to come up with one that give 1 person cps and it says something like "soandso got "the amount given" for recuiting people."
xXxTwiztedKidxXx is offline  
Old 08/03/2010, 23:36   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
Code:
if (Cmd[0] == "/givecps")
{
foreach(Game.Character C in Game.World.H_Chars.Values)
{
if (Cmd[1] == C.Name)
{
C.CPs += uint.Parse(Cmd[2]);
World.SendMsgToAll(2011, C.Name + "have got CPs from " + GC.MyChar.Name);
}
}
}
ex.
Quote:
/givecps testaccount 1000000
Fish* is offline  
Old 08/04/2010, 02:33   #7
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
Quote:
Originally Posted by grillmad View Post
Code:
if (Cmd[0] == "/givecps")
{
foreach(Game.Character C in Game.World.H_Chars.Values)
{
if (Cmd[1] == C.Name)
{
C.CPs += uint.Parse(Cmd[2]);
World.SendMsgToAll(2011, C.Name + "have got CPs from " + GC.MyChar.Name);
}
}
}
ex.
The hell?
Do what matty did and do the char from name.

if (Cmd[0] == "/givecp")
{
Game.Character C = Game.World.CharacterFromName(Cmd[1]);
if(C != null)
{
C.Cps += uint.Parse(Cmd[2]);
C.MyClient.LocalMessage(2005, "You have recieved "+ Cmd[2] +" Cps from the GM.");
}
}

So

/givecp Arco 220
Arcо is offline  
Thanks
1 User
Old 08/04/2010, 17:47   #8
 
Zkiller110's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 276
Received Thanks: 99
ahaaha there r so many ways to do this you got to be very specific on what you want the command to do and what you want the player to type for the command
Zkiller110 is offline  
Reply


Similar Threads Similar Threads
.c3 creating
08/18/2010 - CO2 Weapon, Armor, Effects & Interface edits - 1 Replies
First sorry if i can`t post questions here . I wanna know how to create a new weap for example i already have 3ds max 7 and dbc editor but i wanna know how do i import or create one in 3dsmax 7. anyone knows?
[HELP] Creating a Command
06/20/2010 - EO PServer Hosting - 7 Replies
Hi, i wanted to ask you how to create a command for a EOPserver. Actually it should be 5 Commands 1. Mute for 1 Day 2. Mute for 2 Days 3. Mute for 4 Days 4. Mute for 8 Days 5. Mute for 16 Days i would really appreciate if someone could help me :) Maybe someone could also post a tutorial for creating commands
Creating a C++ GUI
06/30/2006 - Conquer Online 2 - 4 Replies
First of all, sorry to bother putting up a wasteful post. I have searched google for creating a C++ GUI but everything ends up going to creating multi-threading for a process. Maybe I just am not using the correct search terms but I have run out of narrowing keywords and anything too specific gives me no results. Through reading most articles a few articles in the MSDN library, I found nothing useful that could help me. I did learn that I could use C# for this task, but I really want to...
creating own bot
06/16/2005 - General Coding - 4 Replies
what would i need to create my own bot and were would i start in the crteation of a bot. thanx
Creating Lag?
05/31/2005 - Conquer Online 2 - 5 Replies
what would be a good program to create lag, that allows u to gain faster exp.



All times are GMT +1. The time now is 21:02.


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.