[Help] With my rb script.

09/15/2008 22:48 Bottingpunk#1
Okay here's my rb script and i can't figure out wtf is wrong i have the npc and stuff right but like i click on it and say ima trojan etc and nothing happens i dosn't go to a diff control and i can't figure out why not well here it is.

Code:
if (CurrentNPC == 127)
                            {
                                SendPacket(General.MyPackets.NPCSay("Hello. Intresed in getting reborned? If you are an WaterTao,you can get reborned at 110,else you can get reborned after 120. Intresed in getting reborned?"));
                                SendPacket(General.MyPackets.NPCLink("Yeah,im intresed,I am an Trojan.", 1));
                                SendPacket(General.MyPackets.NPCLink("Yeah,im intresed,I am an Taoist.", 2));
                                SendPacket(General.MyPackets.NPCLink("Yeah,im intresed,I am an Water Taoist.", 3));
                                SendPacket(General.MyPackets.NPCLink("Yeah,im intresed,I am an Archer.", 4));
                                SendPacket(General.MyPackets.NPCLink("Yeah,im intresed,I am an Warrior.", 5));
                                SendPacket(General.MyPackets.NPCLink("Not intresed,thanks anyways.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
Code:
if (CurrentNPC == 127)
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("What would you like to get reborned into? Remember that your earlier skills don't save."));
                                    SendPacket(General.MyPackets.NPCLink("Trojan", 2));
                                    SendPacket(General.MyPackets.NPCLink("Warrior", 3));
                                    SendPacket(General.MyPackets.NPCLink("Archer", 4));
                                    SendPacket(General.MyPackets.NPCLink("Fire Taoist", 5));
                                    SendPacket(General.MyPackets.NPCLink("WaterTaoist", 6));
                                    SendPacket(General.MyPackets.NPCLink("Let me think it over.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.InventoryContains(721259, 1))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(721259));
                                        MyChar.ReBorn(11);
                                    }
                                }
                                if (Control == 3)
                                {

                                    if (MyChar.InventoryContains(721259, 1))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(721259));
                                        MyChar.ReBorn(21);
                                    }
                                }
                                if (Control == 4)
                                {

                                    if (MyChar.InventoryContains(721259, 1))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(721259));
                                        MyChar.ReBorn(41);
                                    }
                                }
                                if (Control == 5)
                                {

                                    if (MyChar.InventoryContains(721259, 1))
                                    {
                                        MyChar.RemoveItem(MyChar.ItemNext(721259));
                                        MyChar.ReBorn(101);
                                    }

                                }
                            }
I would really be thankful if you help :)
09/15/2008 22:51 tao4229#2
If you already have control 1-6, you can't use them AGAIN, the server can't tell which is which, if you're doing it like that(LOTF source).
09/15/2008 23:00 Bottingpunk#3
Quote:
Originally Posted by tao4229 View Post
If you already have control 1-6, you can't use them AGAIN, the server can't tell which is which, if you're doing it like that(LOTF source).
So ... thank you for your fast response any idea how i should do it
09/15/2008 23:14 tao4229#4
Well that's all I see wrong with it right now, TBH I barely code/script NPCs, I leave the annoying work to my other server coder.

To fix that in the middle of control 1 just change the end of NPCSay(the number) to a number greater than 6-7 or whatever you ended on and go from there.
09/16/2008 03:17 LetterX#5
Code:
if (CurrentNPC == 127)
                            {
                                SendPacket(General.MyPackets.NPCSay("Hello. Would you like to reborn?"));
                                SendPacket(General.MyPackets.NPCSay("The Price is you must be 110+ for Waters and 120+ for all other classes "));
                                SendPacket(General.MyPackets.NPCSay("and you must give me a Celestial Stone."));
                                SendPacket(General.MyPackets.NPCLink("Yes", 1));
                                SendPacket(General.MyPackets.NPCLink("No", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
That is the first part for you. :D