Register for your free account! | Forgot your password?

You last visited: Today at 02:40

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

Advertisement



few question

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

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 113
Received Thanks: 0
few question

hello i make a comand but i want you guys to help me little bit on it..

to remove spell from player..
case "spell":
Client.RemoveSpell(new Spell(true)(Data[3]) });

---------------------------
and i want you to help me to change this... so if , it only show [GM]hello / not [gm] yosif[gm] : my word


and thnx for your help
yosif is offline  
Old 02/20/2013, 19:25   #2
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
u have to show us the the RemoveSpell Void Codes ... i guess the Paramter represent the Spell ID that u would like to remove so ...
Client.RemoveSpell(ushort.Parse(Data[1]));
shadowman123 is offline  
Thanks
1 User
Old 02/20/2013, 19:28   #3
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
that's so fucked up , umm well here
at Client.RemoveSpell(new Spell(true)(Data[3]) });
the "Client" is the client that sends this command not the player client
so to get to the player client you need to do something like this

Code:
                                    foreach (var pClient in ServerBase.Kernel.GamePool.Values)
                                    {
                                        if (pClient.Entity.Name.ToLower().Contains(Data[1]))
                                        {
/* you need here to remove it from that pclient you mentioned his name at the command but you first should check if he got the spell or not before removing it , else enjoy a cute error on console */
                                        }
                                    }
and just before you ask , to use this you should add his name at the second word in the command , ex: @RemoveSpell Playername SpellID

and at the ann
im speechless , you need to study c# before you even work on a source but ill still help you anyway

for example at
ServerBase.Kernel.SendWorldMessage(new Message("" + client.Entity.Name + " Message : " + Mess.Remove(0, 3), System.Drawing.Color.Green, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);

that
"" + client.Entity.Name + " Message : "
is a string
and basically a string is an array of characters or in easy words it's a sentence
that + sign add more words to that string
that "" is empty string which is useless and could be removed
this client.Entity.Name is your client entity name o-0 lol
and this " Message : " is another string
it add all of them to be "Yourname Message : "
you can simply edit that to whatever you want
forexample
if you want it to display "yosif[gm] Message : "
you should do this
Code:
case "ann":
{
ServerBase.Kernel.SendWorldMessage(new Message("yosif[gm] Message : " + Mess.Remove(0, 3), System.Drawing.Color.Green, Network.GamePackets.Message.Center), ServerBase.Kernel.GamePool.Values);
ServerBase.Kernel.SendWorldMessage(new Message("yosif[gm] Message : " + Mess.Remove(0, 3), System.Drawing.Color.Green, Network.GamePackets.Message.World), ServerBase.Kernel.GamePool.Values);
break;
my advice to you is here
go for it is offline  
Old 02/20/2013, 19:29   #4
 
elite*gold: 0
Join Date: Jul 2009
Posts: 113
Received Thanks: 0
thnx but can you chk to me the other one if you can help me on it please..

well Go_For_It .... i think you didnt understand what iam saying.. so here..

when i use @ann hello all
is show [gm]my name and my massge.
and i want , when i i use it , it show @ann hello all
show like this [GM]hello all
yosif is offline  
Old 02/20/2013, 19:32   #5
 
elite*gold: 0
Join Date: Sep 2012
Posts: 775
Received Thanks: 329
Quote:
to remove spell from player..
do you mean by that making the player pm then log it on and then remove it with the command ?
or just remove it by using your pm account from some player ?
go for it is offline  
Old 02/20/2013, 19:33   #6
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
i didnt understand what u would like to do
shadowman123 is offline  
Old 02/21/2013, 06:48   #7
 
~Crystaline's Avatar
 
elite*gold: 0
Join Date: Jun 2012
Posts: 179
Received Thanks: 55
He just don't like his character name being shown to the client when he use the @ann command.
~Crystaline is offline  
Old 02/21/2013, 10:09   #8
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
PHP Code:
case "ann":
{
ServerBase.Kernel.SendWorldMessage(new Message("Server Announce : " Data[1], System.Drawing.Color.GreenNetwork.GamePackets.Message.Center), Kernel.GamePool.Values);
break;

shadowman123 is offline  
Thanks
1 User
Old 02/26/2013, 20:33   #9
 
elite*gold: 0
Join Date: Jul 2009
Posts: 113
Received Thanks: 0
Quote:
Originally Posted by go for it View Post
do you mean by that making the player pm then log it on and then remove it with the command ?
or just remove it by using your pm account from some player ?
i want to use the comand to remove the spell from player without login on it..

ex : @give yosif spell- 1000 this would remove thunder spell from him...
or you make new comand for it thnx alot all... and sorry becose i didnt rply fast i took time cose i have exam every week... couldnt login forum.. sorry

and thnx again for helping me
yosif is offline  
Old 02/27/2013, 00:24   #10
 
shadowman123's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
i wont spoodfeed u .. try to understand how database delete , insert , update, select data into / from Tables , Rows , Columns then u will know how to handle it
shadowman123 is offline  
Reply




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


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.