Problem With PServer Roborning

04/12/2009 22:22 kharina#1
Ok..all my source work great..but when I reborn and put my Points and then die or DC..my points doesnt save...and I need to start over...
Can some one help me with C# code of that line(lines) and where I need to modify..!

Thankyou guys and Sorry for my bad english
04/12/2009 22:34 Zatoichi#2
I have the same problem, and not sure why. all other aspects of Rb work perfectly (except the 2nd RBskills, just need to be coded in). As far as i can tell the client isnt sending a packet to the server saying we have manipulated the stats using those buttons. You can do what we did. My friend kyle wrote a splitter so we can enter like -

/str 9

That will add 9 points to strength, only if the points are available to be added from the StatP collection, and it will then deduct them from the StatP collection. I didnt write it, but if you look at the existing splitters (depending on your source), you can gather terms that can be used to write this. i'll ask him if he minds if we put the code up. If so i'll update.
04/12/2009 22:51 Klefto#3
The code is pretty simple and straight forward, just put it in a area where it checks for the status to be 0 or bigger, if its not there you can also add it. this code allows you, like zatoichi sayd, /str 9 and itl add 9 to your str while deducting your statp by 9, if your statp doesnt have 9 or more points it wont work, its tested, 100% functional, and saves to the DB.
Hope this helps, its just something i made quick, but it works, although its probably not the cleanest way, it works. The red is for the status check only, if you dont have that you'll want it too

Code:
                                  [COLOR="Red"]if (Status >= 0)
                                    {[/COLOR]
                                        if (Splitter[0] == "/str")
                                        {
                                            ushort Str = ushort.Parse(Splitter[1]);
                                            if (MyChar.StatP >= Str)
                                            {
                                                MyChar.Str += Str;
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 16, MyChar.Str));
                                                World.UpdateSpawn(MyChar);
                                                MyChar.StatP -= Str;
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 11, MyChar.StatP));
                                                SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                                MyChar.SendEquips(false);
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                                World.SpawnMeToOthers(MyChar, true);
                                            }
                                        }
                                        if (Splitter[0] == "/agi")
                                        {
                                            ushort Agi = ushort.Parse(Splitter[1]);
                                            if (MyChar.StatP >= Agi)
                                            {
                                                MyChar.Agi += Agi;
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 17, MyChar.Agi));
                                                World.UpdateSpawn(MyChar);
                                                MyChar.StatP -= Agi;
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 11, MyChar.StatP));
                                                SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                                MyChar.SendEquips(false);
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                                World.SpawnMeToOthers(MyChar, true);
                                            }
                                        }
                                        if (Splitter[0] == "/spi")
                                        {
                                            ushort Spi = ushort.Parse(Splitter[1]);
                                            if (MyChar.StatP >= Spi)
                                            {
                                                MyChar.Spi += Spi;
                                                MyChar.StatP -= Spi;
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 11, MyChar.StatP));
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 14, MyChar.Spi));
                                                World.UpdateSpawn(MyChar);
                                                SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                                MyChar.SendEquips(false);
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                                World.SpawnMeToOthers(MyChar, true);
                                            }
                                        }
                                        if (Splitter[0] == "/vit")
                                        {
                                            ushort Vit = ushort.Parse(Splitter[1]);
                                            if (MyChar.StatP >= Vit)
                                            {
                                                MyChar.Vit += Vit;
                                                MyChar.StatP -= Vit;
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 11, MyChar.StatP));
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 15, MyChar.Vit));
                                                World.UpdateSpawn(MyChar);
                                                SendPacket(General.MyPackets.CharacterInfo(MyChar));
                                                MyChar.SendEquips(false);
                                                SendPacket(General.MyPackets.Vital(MyChar.UID, 26, MyChar.GetStat()));
                                                World.SpawnMeToOthers(MyChar, true);
                                            }
                                        }
                                    }
                                [COLOR="Red"]}[/COLOR]
Hope this helped =)