[Release] Atr Points Command

01/29/2010 13:32 Olodady#1
Put these codes in Chat.cs in your source
Command for free Atr. Points
Code:
           if (GC.AuthInfo.Status == "[PM]")
            {
               if (Cmd[0] == "/statp")
                  {
                     GC.MyChar.StatPoints = 0;
                     GC.MyChar.StatPoints = byte.Parse(Cmd[1]);
                   }
              }
Command for Strenght:
Code:
           if (GC.AuthInfo.Status == "[PM]")
            {
               if (Cmd[0] == "/str")
                  {
                     GC.MyChar.Str = 0;
                     GC.MyChar.Str = byte.Parse(Cmd[1]);
                   }
              }
Command for Agility:
Code:
           if (GC.AuthInfo.Status == "[PM]")
            {
               if (Cmd[0] == "/agi")
                  {
                     GC.MyChar.Agi = 0;
                     GC.MyChar.Agi = byte.Parse(Cmd[1]);
                   }
              }
Command for Vitality:
Code:
           if (GC.AuthInfo.Status == "[PM]")
            {
               if (Cmd[0] == "/vit")
                  {
                     GC.MyChar.Vit = 0;
                     GC.MyChar.Vit = byte.Parse(Cmd[1]);
                   }
              }
Command for Spirit:
Code:
           if (GC.AuthInfo.Status == "[PM]")
            {
               if (Cmd[0] == "/spi")
                  {
                     GC.MyChar.Spi = 0;
                     GC.MyChar.Spi = byte.Parse(Cmd[1]);
                   }
              }

Enjoy



Press [Only registered and activated users can see links. Click Here To Register...] if I helped
01/29/2010 14:45 Jedex#2
THANK YOU!!!
This helped me a whole bunches! ! ! :D
01/29/2010 14:46 Korvacs#3
Why are you setting the stat points to 0 before setting them to the value in the command? Theres no need for that at all.
01/29/2010 14:55 Olodady#4
To make sure it works perfectly :)
But any1 can remove it if they want
01/29/2010 15:00 Korvacs#5
Quote:
Originally Posted by Olodady View Post
to make sure it works perfectly :)
But it will work perfectly.

When you do:

Code:
int x = 0;
or

Code:
int x = byte.Parse("300");
All your doing is overriding x, so you can just remove x = 0, because x will become 300 on the next line, regardless of what the value was before hand.

If you were doing

Code:
x += byte.Parse("300");
Then there would be cause for you to set the stats to 0 beforehand, but even then you wouldnt want to be using += because you should just be using =
01/29/2010 15:05 Olodady#6
Quote:
If you were doing

Code:
x += byte.Parse("300");
Then there would be cause for you to set the stats to 0 beforehand, but even then you wouldnt want to be using += because you should just be using =
If your doing it += it will add the atr points you want and I bet there's a max for it
And if it passes that max it might crack
And if it's not you wont be able to reduce them
Lets say u got 5k str if you go += you wont be able to reduce them but if you go = you will be able to set it even back to 0
01/29/2010 16:06 Korvacs#7
Quote:
Originally Posted by Olodady View Post
If your doing it += it will add the atr points you want and I bet there's a max for it
And if it passes that max it might crack
And if it's not you wont be able to reduce them
Lets say u got 5k str if you go += you wont be able to reduce them but if you go = you will be able to set it even back to 0
I said if, however you arnt so you just need to do stat = byte.Parse

It was an example.
01/29/2010 16:43 copz1337#8
I don't get how this code works lol all I see it's that its setting your stats to 0.

Code:
GC.MyChar.StatPoints = byte.Parse(Cmd[1]);
What's this?
01/29/2010 17:08 Olodady#9
It's geting your stats to 0 but after that it makes them the number you put in the command
Ex: /statp 410
You get 410 stat points it's nothing wrong with it :)
01/29/2010 20:39 copz1337#10
I'd recommend just giving 500 stats because if people input a number like 99999 it
s going to screw up the character.
01/29/2010 20:45 .Ryu#11
Hmm goodjob anyways o,o
01/29/2010 23:28 Olodady#12
Quote:
Originally Posted by copz1337 View Post
I'd recommend just giving 500 stats because if people input a number like 99999 it
s going to screw up the character.
This is only for [PM] characters btw...
And it aint gonna screw up anything cuz u can imput a max of 20k or whatever you want ...
02/02/2010 19:45 lockinload#13
where to put this codes ? in conquer folder? please help..thanks
02/12/2010 20:34 Olodady#14
Rikardo updated or however it's called and search for Chat.cs add it there
06/30/2010 10:29 Raresh#15
Good Release thanks