Adding NPC in NPC Dialog

12/17/2013 06:22 danere2k10#1
Okay so I'm running 5165 (Conqure SX) I'm new to Conqure and a little rusty in c# I was wondering weather I could charge more cps each time you want a higher level so 15-16 costing 2k cps and 16-17 3k and if so would this be about right
Code:
                            #endregion
                            #region Vanish CO leveling NPC
                            case 0001:

                                    {
                                        if (option == 0)
                                        {
                                            GC.AddSend(Packets.NPCSay("Welcome to Vanish CO - This is the leveling NPC! Would you like to buy one level?"));
                                            GC.AddSend(Packets.NPCLink("Hell yeah!", 1));
                                            GC.AddSend(Packets.NPCLink("I'm cool", 255));
                                            GC.AddSend(Packets.NPCSetFace(20));
                                            GC.AddSend(Packets.NPCFinish());
                                        }
                                        if (option == 1)
                                        {
                                            GC.AddSend(Packets.NPCSay("That will be 2000 cps"));
                                            GC.AddSend(Packets.NPCLink("Yes", 2));
                                            GC.AddSend(Packets.NPCLink("No way", 255));
                                        }
                                            if (option == 2)
                                            {
                                                if (GC.MyChar.CPs >= 2000)
                                        {
                                            GC.MyChar.CPs -= 2000
                                            GC.MyChar.Level += 1;
    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());
                                        }


                                            else if (GC.MyChar.Level ==16)

                                            GC.AddSend(Packets.NPCSay("That will be 3000 cps"));
                                            GC.AddSend(Packets.NPCLink("Yes", 2));
                                            GC.AddSend(Packets.NPCLink("No way", 255));
                                                     {
                                                if (GC.MyChar.CPs >= 3000)
                                        {
                                            GC.MyChar.CPs -= 3000
                                            GC.MyChar.Level += 1;
    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());
                                        }
Thanks for your help guys
12/17/2013 06:29 Spirited#2
How did you manage to find a copy of ConquerSx around? That's quite the achievement. I thought all the forums that hosted it closed. Hm.. well, if you insist on using that source, it looks like you're missing a few braces around code blocks (the { }'s). Try looking up some tutorials on selection statements if you don't quite understand what I mean.
12/17/2013 08:14 pro4never#3
Ooh god I thought we were done having to hear about conquer sx....
12/17/2013 13:58 Super Aids#4
I'm literally crying right now :'(

@OP Look in the release section there is a numerous of better sources to use.