|
You last visited: Today at 07:25
Advertisement
/allto me command
Discussion on /allto me command within the CO2 Private Server forum part of the Conquer Online 2 category.
01/13/2009, 01:20
|
#1
|
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
|
/allto me command
Umm i give credits to blackwall , this command /allto is from his source
but he didnt have /allto me so i would like to add that...
Quote:
if (Splitter[0] == "/allto")
{
if (Splitter[1] == "me")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Char.MyClient.Online)
{
Char.Teleport(MyChar.LocMap, MyChar.LocX, MyChar.LocY);
}
}
}
)
|
as i say again this command /allto is from blackwall but the command
/allto ME
is not , so i release it, i coded this command /allto me , myself
NO I DONT THINK HIS SOURCE WILL EVER BE RELEASED NOR WILL I EVER RELEASE IT AS IT IS HIS SOURCE ( BLACKWALL ) AND ONLY HIS. WE WHO USE IT , SAY WE " USE IT " NOT OWN IT , ONLY BLACKWALL OWNS IT
PRESS THANKS IF THIS HELPED YOU!!!!
|
|
|
01/13/2009, 07:08
|
#2
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
Quote:
if (Splitter[0] == "/getall")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Players = (Character)DE.Value;
Players.Teleport(MyChar.LocMap, MyChar.LocX, MyChar.LocY);
}
}
|
Me like more (Y)
|
|
|
01/13/2009, 11:51
|
#3
|
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
|
oh woah thanks emme =]]
*edit i see what you did
lol no after this command i made a few more like allto gw arena that kind of things
your command is just for /getall  but still nice =]
|
|
|
01/13/2009, 15:49
|
#4
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
Im not trying to look better than you, but this code might be better then yours?
Command : /getall
If you do not have any other numbers/letters behind /getall, all players will teleport to your location. Else, if your command is /getall 1002 350 350 , all players online will teleport to 1002, 350, 350. Its simple and yeah its well coded.
Quote:
if (Splitter[0] == "/getall")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Players = (Character)DE.Value;
if (Splitter[1] == null)
Players.Teleport(MyChar.LocMap, MyChar.LocX, MyChar.LocY);
else
Players.Teleport(Convert.ToByte(Splitter[1]), Convert.ToByte(Splitter[2]), Convert.ToByte(Splitter[3]));
}
}
|
|
|
|
01/13/2009, 16:00
|
#5
|
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
|
Convert to byte ? It'll throw you and error if the mapid is over 256.  unsigned short ftw in this
|
|
|
01/13/2009, 18:44
|
#6
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
My bad! ROflmao.
|
|
|
01/13/2009, 21:01
|
#7
|
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
|
oo nice thx
|
|
|
01/13/2009, 22:22
|
#8
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Btw, splitter[1] won't ever be null(in the code you're using)
|
|
|
01/13/2009, 22:45
|
#9
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
How is that? If you just type /getall, shouldnt spitter1 be null?
|
|
|
01/13/2009, 22:55
|
#10
|
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
|
im still learning but how about if in
Quote:
if (Splitter[0] == "/getall")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Players = (Character)DE.Value;
if (Splitter[1] == null)
Players.Teleport(MyChar.LocMap, MyChar.LocX, MyChar.LocY);
else
Players.Teleport(Convert.ToByte(Splitter[1]), Convert.ToByte(Splitter[2]), Convert.ToByte(Splitter[3]));
}
}
|
you change it to
Quote:
if (Splitter[0] == "/getall")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Players = (Character)DE.Value;
Players.Teleport(MyChar.LocMap, MyChar.LocX, MyChar.LocY);
else
Players.Teleport(Convert.ToByte(Splitter[1]), Convert.ToByte(Splitter[2]), Convert.ToByte(Splitter[3]));
}
}
|
|
|
|
01/13/2009, 22:55
|
#11
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by EmmeTheCoder
How is that? If you just type /getall, shouldnt spitter1 be null?
|
C# will throw an index out of range exception, because the array only contains one element.
In C++, you get a memory leak.(I think)
|
|
|
01/13/2009, 22:56
|
#12
|
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
|
so could i do what i wrote the page before?
|
|
|
01/13/2009, 22:57
|
#13
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Quote:
Originally Posted by TruthCo
so could i do what i wrote the page before?
|
you can't have an else without an if....
also wrong.
|
|
|
01/13/2009, 23:04
|
#14
|
elite*gold: 0
Join Date: Jan 2009
Posts: 94
Received Thanks: 19
|
how about
Quote:
if (Splitter[0] == "getall")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Playesr = (Character)De.Value;
if (Char.MyClient.Online)
{
Players.Teleport(MyChar.LocMap, MyChar.LocX, MyChar.LocY);
}
}
}
|
its kind of a mixed from mine and emmes
will that work?
|
|
|
01/13/2009, 23:14
|
#15
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Char isn't defined..... It will go to System.Char, which I don't think you want.
Also, you don't need to check if Char.MyClient.Online, because if they're not online, they won't be in World.AllChars.
|
|
|
 |
|
Similar Threads
|
/get command
06/15/2010 - Kal Online - 6 Replies
is there a way to figure out the /get command for a server?
|
GM command-s
04/06/2010 - SRO Private Server - 8 Replies
Please start I Silkroad server 1.236 (CRSEMU) how to fix that I am GM and what are the command-s to spawn the NPC-s and MOB-s and ITEM-s and GOLD please help, give me command-s, ty
|
i need GM command
12/29/2008 - Dekaron Private Server - 7 Replies
i open server and i need GM command. thx!
|
o:- can't do both of that command plz some help ...
02/13/2008 - Kal Online - 9 Replies
hi u guys , sup every ?? hope all fine
i have some problem .. i'm a gm in private server and when i type /moveto name of player none moving from my place it's mean not work so any 1 can just say me what can i do ?? 2 get place's player
2nd problem i can't attacking moobs while away from them i should get close enough like normal player ??
i need some help plz
3rd how i can get stuff mixing Demon Blood ?? or should admin make it 4 me
4th why i can't upgrade it egg's 4 ppl or me ?? or same...
|
All times are GMT +1. The time now is 07:25.
|
|