[Help] NPC 5165

03/06/2010 19:14 Jăy1029#1
K so all the NPCs other ppl made work alright. But I made my own npc and when I click on him nothing happens...Theres no reason why it shouldnt work.. So here's the code for it and what I have in NPC.txt. Can someone tell me whats wrong with it?
Code:
#region 130 Talisman
                            case 1029:
                                {
                                    if (Control == 0)
                                    {
                                        GC.AddSend(Packets.NPCSay("I sell special Talismans. The level has been increased to 130."));
                                        GC.AddSend(Packets.NPCLink("How the hell did you manage to do that?", 1));
                                    }
                                    if (Control == 1)
                                    {
                                        GC.AddSend(Packets.NPCSay(" It was simple really. All that I had to do was use my Gamma-X-Ray scanner"));
                                        GC.AddSend(Packets.NPCSay(" to destroy the outter orbits of all the atoms within the Talismans."));
                                        GC.AddSend(Packets.NPCSay(" Doing so enabled the electrons of the atoms to jump freely within all the"));
                                        GC.AddSend(Packets.NPCSay(" orbits of the atom meaning more energy is given off when the electrons"));
                                        GC.AddSend(Packets.NPCSay(" return to their ground state. Interested in buying a pair?"));
                                        GC.AddSend(Packets.NPCSay(" The Tower will cost ya 5375 CPs and the Fan costs 6450."));
                                        GC.AddSend(Packets.NPCLink("Yep, I'll take a Tower.", 2));
                                        GC.AddSend(Packets.NPCLink("I'll take a Fan as well.", 3));
                                        GC.AddSend(Packets.NPCSetFace(30));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 2)
                                    {
                                        if (GC.MyChar.CPs >= 5375)
                                        {
                                            GC.MyChar.CPs -= 5376;
                                            GC.MyChar.AddItem(201010);

                                            GC.AddSend(Packets.NPCSay("Here you are."));
                                            GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CPs."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                    if (Control == 3)
                                    {
                                        if (GC.MyChar.CPs >= 6450)
                                        {
                                            GC.MyChar.CPs -= 6450;
                                            GC.MyChar.AddItem(202010);

                                            GC.AddSend(Packets.NPCSay("Here you are."));
                                            GC.AddSend(Packets.NPCLink("Thanks.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        else
                                        {
                                            GC.AddSend(Packets.NPCSay("You don't have enough CPs."));
                                            GC.AddSend(Packets.NPCLink("I see.", 255));
                                            GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                    }
                                }
                                break;
                            #endregion
Code:
1029 3190 [B]2 10[/B] 1036 212 204
The two bolded numbers are the only 2 numbers I dont know about, so I tried a whole bunch of different numbers there. Didnt work everytime.
03/06/2010 19:20 Arcо#2
Control 0.
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
03/06/2010 19:44 Jăy1029#3
ommffg I deserve a kick in the teeth for that...
Thanks .Arco
03/06/2010 20:05 Arcо#4
Quote:
Originally Posted by Jăy1029 View Post
ommffg I deserve a kick in the teeth for that...
Thanks .Arco
Lol no problem.
Need anymore help don't hesitate to ask :)