|
You last visited: Today at 10:00
Advertisement
[Help] Congratulate code
Discussion on [Help] Congratulate code within the CO2 Private Server forum part of the Conquer Online 2 category.
05/20/2009, 01:50
|
#1
|
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
|
[Help] Congratulate code
I'm not familiar with making commands of this sort..
So could someone edit this and post it back to me?
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("", "", 2011);
}
}
}
I just need it to work this way.. if i type /congratulate vortex.. for example
I want a message to appear (2011) Congratulations to Vortex for wining the event..
Don't flame.. I'll possibly learn from this..
Thanks
Vortex
P.S If your still gonna flame, remember some of you cant even spell congratulate
|
|
|
05/20/2009, 01:54
|
#2
|
elite*gold: 0
Join Date: May 2009
Posts: 74
Received Thanks: 65
|
Congratulate Code Reply
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("Congratulations you won (WhateverHere)!", "SYSTEM", 2011);
}
}
}
Idk if this is what you wanted or not!
|
|
|
05/20/2009, 02:19
|
#3
|
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
|
Nah dude.. Its supposed a multiuser code.. I can type /Congratulate Vortex ( Or anyother user on the server.. So.. That code is a simple one but your completely wrong it should be able to full in the name automatically from the code
LIKE
Code:
World.SendMsgToAll("Congratulations to" Char.Name "for wining the event, "SYSTEM", 2011);
Not sure if that correct but you get the point
|
|
|
05/20/2009, 02:32
|
#4
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
Code:
World.SendMsgToAll("Congratulations to " + Char.Name + " for wining the event", "SYSTEM", 2011);
That's what you needed?
|
|
|
05/20/2009, 02:35
|
#5
|
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
|
Than you sexy
BUT
|
|
|
05/20/2009, 02:43
|
#6
|
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
|
Need a definition for Char.Name..
|
|
|
05/20/2009, 02:45
|
#7
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
You forgot a " at the end. Make sure all your strings end and begin with ".
Also, don't double post, srsly. =P
|
|
|
05/20/2009, 02:46
|
#8
|
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
|
Quote:
Originally Posted by Vortex.
I'm not familiar with making commands of this sort..
So could someone edit this and post it back to me?
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("", "", 2011);
}
}
}
I just need it to work this way.. if i type /congratulate vortex.. for example
I want a message to appear (2011) Congratulations to Vortex for wining the event..
Don't flame.. I'll possibly learn from this..
Thanks
Vortex
P.S If your still gonna flame, remember some of you cant even spell congratulate
|
if u want to send the chat to all online players that would be like that
Code:
if (Splitter[0] == "/congratulate")
{
World.SendMsgToAll([B][U][U]"Congratulation "+ Splitter[1]+" for winning the event" , "From Here <System for ex>"[/U][/U][/B], 2011);
}
and u wont need the foreach statement
but if u want to send the msg to one player then u can use your code editing the message line like that
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsg([B][U]"Congratulation "+ Splitter[1]+" for winning the event" , "From Here <System for ex>"[/U][/B], 2011);
}
}
}
|
|
|
05/20/2009, 02:46
|
#9
|
elite*gold: 0
Join Date: Jan 2009
Posts: 201
Received Thanks: 9
|
why not just after every event do /g Congratulations to *** for winning the event?
|
|
|
05/20/2009, 03:27
|
#10
|
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
|
Yes.. But I have no definition for Name.. Give me one.
|
|
|
05/20/2009, 03:39
|
#11
|
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
|
Quote:
Originally Posted by Vortex.
Yes.. But I have no definition for Name.. Give me one.
|
you already put it in your code at the if statement anyway edit the ".Name" to whatever the Character name your source calls (what source u use ?)
and once again , u need to send the msg to that char or to all online chars ?
|
|
|
05/20/2009, 07:29
|
#12
|
elite*gold: 0
Join Date: Sep 2007
Posts: 370
Received Thanks: 118
|
Quote:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("Congratulations to " + Char.Name + " for wining the event", "SYSTEM", 2011);
}
}
}
|
Here a your command.
|
|
|
05/20/2009, 17:15
|
#13
|
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
|
Quote:
Originally Posted by Vortex.
I'm not familiar with making commands of this sort..
So could someone edit this and post it back to me?
Code:
if (Splitter[0] == "/congratulate")
{
foreach (DictionaryEntry DE in World.AllChars)
{
Character Char = (Character)DE.Value;
if (Splitter[1] == Char.Name)
{
World.SendMsgToAll("", "", 2011);
}
}
}
I just need it to work this way.. if i type /congratulate vortex.. for example
I want a message to appear (2011) Congratulations to Vortex for wining the event..
Don't flame.. I'll possibly learn from this..
Thanks
Vortex
P.S If your still gonna flame, remember some of you cant even spell congratulate
|
isnt it easier to make a good event system once and 4 good?Instead of making useless commands...
|
|
|
05/20/2009, 19:55
|
#14
|
elite*gold: 20
Join Date: Mar 2008
Posts: 958
Received Thanks: 494
|
Quote:
Originally Posted by damianpesta
isnt it easier to make a good event system once and 4 good?Instead of making useless commands...
|
He is preparing The event .. Started with the command !!
|
|
|
05/20/2009, 21:55
|
#15
|
elite*gold: 0
Join Date: Apr 2009
Posts: 275
Received Thanks: 22
|
Useless commands ey? I've never disrespected you.. And I plan for that favour in return.. You seem to be a **** fella? look in your server for usless commands.. Let me do things my way and you do yours your way..
++, My events have been well coded.. Maybe its not fully made by commands.. because some npcs are involved.. I still have a pretty awesome pk event and find event..
The last person in the pkp tourny wins.. I type /startncp and he can claim the price.. also
/nopk on - off Which has been transformed into a start command.. anyway.. Just letting you know.. I got a plan..
|
|
|
Similar Threads
|
B> DriftCity CBS Code | S> War Rock Code / Bounty Bay Code etc.
10/05/2010 - Trading - 1 Replies
Hi,
wie schon im Titel beschrieben. In der CBS vom November gab es Bonusodes für mehrere Spiele. Ich benötige DriftCity Codes. Kann sonst für alle anderen Spiele die Codes biten, einige auch doppelt.
Hier eine Liste der Spiele und Bonusaktionen:
- (2x) War Rock
- (2x) War of Titans
- (2x) World of Warcraft
- (1x) Warhammer Online
- (1x) Bounty Bay online
|
Gebe Vip Hack Suche Storm Code oder 5k Dinar Code
07/25/2010 - WarRock Trading - 4 Replies
blubb
|
[Release] Congratulate code
05/26/2009 - CO2 PServer Guides & Releases - 13 Replies
Yeah whatever.. Just incase you wanted it.. I take no credit other than posting it..
if (Splitter == "/congratulate")
{
World.SendMsgToAll("Congratulations to"+ Splitter+" for winning the event" , "", 2011);
}
Or if you want a foreach statment
if (Splitter == "/congratulate")
|
All times are GMT +2. The time now is 10:00.
|
|