[Release]My source...

06/14/2010 10:12 ramy999#181
please please please -impulse- help me i cannot setup the sever in your source please help me i need setup with appserv but i still cannot and i setup with mysql but still not work please help me please my mail yahoo [Only registered and activated users can see links. Click Here To Register...] i waiting your message
06/14/2010 10:14 zblowfish#182
Quote:
Originally Posted by ramy999 View Post
please please please -impulse- help me i cannot setup the sever in your source please help me i need setup with appserv but i still cannot and i setup with mysql but still not work please help me please my mail yahoo [Only registered and activated users can see links. Click Here To Register...] i waiting your message
PM Me i will help you set it up.
06/14/2010 18:46 chickmagnet#183
Quote:
Originally Posted by ramy999 View Post
please please please -impulse- help me i cannot setup the sever in your source please help me i need setup with appserv but i still cannot and i setup with mysql but still not work please help me please my mail yahoo [Only registered and activated users can see links. Click Here To Register...] i waiting your message
dude theres a simple video 2 this dat works 100%
06/14/2010 19:35 _DreadNought_#184
Im trying to work a command but its not going well its a @staff and it will display the GMs names who are online
I have this
Code:
case "staff":
                                        {
                                            foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values)
                                            {
                                                if (clients.Entity.Name.Contains = "[GM]")
                                                {
                                                    client.Send(new Message(" Are the only staff online", System.Drawing.Color.BurlyWood, GamePackets.Message.Center));
                                                }
                                            }
                                            break;
                                        }
any help please ?
06/14/2010 21:21 pro4never#185
Quote:
Originally Posted by Eliminationn View Post
Im trying to work a command but its not going well its a @staff and it will display the GMs names who are online
I have this
Code:
case "staff":
                                        {
                                            foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values)
                                            {
                                                if (clients.Entity.Name.Contains = "[GM]")
                                                {
                                                    client.Send(new Message(" Are the only staff online", System.Drawing.Color.BurlyWood, GamePackets.Message.Center));
                                                }
                                            }
                                            break;
                                        }
any help please ?


string OnlineNames = "";
int Online = 0;

foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values)
{
if (clients.Value.Entity.Name.Contains = "[GM]")
{
Online++;
OnlineNames += clients.Value.Entity.Name + " ";

}}
Then print out the string to the player using it.

Note: may be too long for 1 chat msg if there are alot of people online... don't feel like coding that in though. Something like that should work.

Ps: I think you are missing .value in your foreach loop..
06/14/2010 21:57 -impulse-#186
Quote:
Originally Posted by pro4never View Post
string OnlineNames = "";
int Online = 0;

foreach (Client.GameState clients in ServerBase.Kernel.GamePool.Values)
{
if (clients.Value.Entity.Name.Contains = "[GM]")
{
Online++;
OnlineNames += clients.Value.Entity.Name + " ";

}}
Then print out the string to the player using it.

Note: may be too long for 1 chat msg if there are alot of people online... don't feel like coding that in though. Something like that should work.

Ps: I think you are missing .value in your foreach loop..
Are you sure it's not
if (clients.Value.Entity.Name.Contains("[GM]"))
{

}

?
06/14/2010 22:08 pro4never#187
Quote:
Originally Posted by -impulse- View Post
Are you sure it's not
if (clients.Value.Entity.Name.Contains("[GM]"))
{

}

?
Ahaha yahh... I just copied what he wrote and added in the string part.

My bad.
06/15/2010 22:48 _DreadNought_#188
Almost 5180 I have added this in the source
Code:
                        msvcrt.msvcrt.srand(this.GeneratedSeed);
                        var rc5Key = new byte[0x10];
                        for (int i = 0; i < 0x10; i++)
                            rc5Key[i] = (byte)msvcrt.msvcrt.rand();
                        var password = Encoding.ASCII.GetString(
                         (new ConquerPasswordCryptpographer(Username)).Decrypt(
                        (new [COLOR="Red"][B]RC5[/B][/COLOR](rc5Key)).Decrypt(Password)));
Error in red is that RC5 is a 'namespace' but is used like a 'type' ok fair enough is there a way to remove that error without creating a whole new RC5.cs file ?
06/22/2010 21:06 jaggedoppolous#189
Ok i got this small problem. I'm trying to make it where if you type @gold or @cp you get that amount of gold/cps.

Example:

@gold 500 ------- Your gold would change to 500
@cps 1000 ------- Your cps would change to 1000

My code is below. Thanks in advanced for help!

Code:
case "cp":
{
         client.Entity.Money = uint.Parse("");
         break;
}
 case "gold":
{
         client.Entity.Money = uint.Parse("");
         break;
}
06/22/2010 21:13 _DreadNought_#190
uhhhhh you mean to ADD to there current gold/cps ?
Code:
case "cps":
{
client.Entity.ConquerPoints += ushort.Parse(Data[1]);
break;
}
case "gold":
{
client.Entity.Money += ushort.Parse(Data[1]);
break;
}
if to actually change it to the amount entered just remove "+"
06/22/2010 21:42 jaggedoppolous#191
I did try == and this is what it came up:

Code:
Only assignment, call, increment, decrement, and new object expressions can be used as a statement	

Only assignment, call, increment, decrement, and new object expressions can be used as a statement
here is my code:

Code:
case "cps":
{
            client.Entity.ConquerPoints == ushort.Parse(Data[1]);
            break;
}
case "gold":
{
            client.Entity.Money == ushort.Parse(Data[1]);
            break;
}
06/22/2010 22:16 _DreadNought_#192
cmon dude BASIC coding...Stick with newestcoserver for now...

uint.Parse(Data[1]); for both btw.
06/22/2010 23:12 pro4never#193
That being said..


= is to SET something

== is to CHECK something....

Check out some of the links in my siggy, you can def use them lol.


In english you would read == as "is equal to"

eg: if(x == 1)

would say if X is equal to 1.


if(x = 1)

won't work because you are trying to SET x to = 1... which obviously won't work for a check. If you are trying to change a value you use either...

+= -= or =

+= means what it already is PLUS whatever I enter

-= means whatever it already is MINUS whatever I enter

= means clear whatever it was and set it to a new value.


I suggest checking out the C# for dummies I linked to in one of my threads. It's the full book.
06/25/2010 17:36 jaggedoppolous#194
Quote:
Originally Posted by Eliminationn View Post
cmon dude BASIC coding...Stick with newestcoserver for now...

uint.Parse(Data[1]); for both btw.
Umm yea wrong???? it was = not ==, so i guess u also need to go learn...

Anyways....


Quick question, not asking for all spells only 1, but could someone provide me with a spell other then FB/SS? I'm trying to code all skills. Also like the effect of Fb and Ss Where does that effect come from. So ex. If i was coding Meditation, Where would i get the Meditation effect from?

Thanks, Please do not Flame trying to learn but want something to look off of not to copy!

If you could add me to my MSN IM that would be great and alot easier! =) its below!

[Only registered and activated users can see links. Click Here To Register...]

Thanks =)
06/25/2010 19:18 _DreadNought_#195
That was my mistake and was edited within 2 hours of me making it so....I need to learn alot but not shiz as basic as that. btw just do a send effect of it