[Help] Congratulate code

05/20/2009 01:50 Vortex.#1
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 BasicCoder#2
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 Vortex.#3
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 kinshi88#4
Code:
World.SendMsgToAll("Congratulations to " + Char.Name + " for wining the event", "SYSTEM", 2011);
That's what you needed?
05/20/2009 02:35 Vortex.#5
Than you sexy

BUT
[Only registered and activated users can see links. Click Here To Register...]
05/20/2009 02:43 Vortex.#6
Need a definition for Char.Name..
05/20/2009 02:45 kinshi88#7
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 samehvan#8
Quote:
Originally Posted by Vortex. View Post
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 Arcotemple#9
why not just after every event do /g Congratulations to XXX for winning the event?
05/20/2009 03:27 Vortex.#10
Yes.. But I have no definition for Name.. Give me one.
05/20/2009 03:39 samehvan#11
Quote:
Originally Posted by Vortex. View Post
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 mejo33#12
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 damianpesta#13
Quote:
Originally Posted by Vortex. View Post
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 danielachraf#14
Quote:
Originally Posted by damianpesta View Post
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 Vortex.#15
Useless commands ey? I've never disrespected you.. And I plan for that favour in return.. You seem to be a cock 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..