Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 17:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP]Long NPC Code (tao promo)

Discussion on [HELP]Long NPC Code (tao promo) within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
[HELP]Long NPC Code (tao promo)

Ok... So needless to say, this is the first issue I've ever had trying to make an NPC work. I personally don't even understand why. I've made atleast a dozen variations of code for the tao promo npc, and well... I'm here now.

2nd Last attempt.

Code:
                            if (CurrentNPC == 12)
                            {
                                SendPacket(General.MyPackets.NPCSay("Hello, I am the Taoist Trainer. What can i do for you?"));
                                SendPacket(General.MyPackets.NPCSay("When deciding to promote to either Water or Fire, remember there is no turning back."));
                                SendPacket(General.MyPackets.NPCLink("Water Promotion.", 1));
                                SendPacket(General.MyPackets.NPCLink("Fire Promotion.", 5));
                                SendPacket(General.MyPackets.NPCLink("Learn Skill.", 100));
                                SendPacket(General.MyPackets.NPCLink("Learn Fire Tao Skill.", 101));
                                SendPacket(General.MyPackets.NPCLink("Learn Water Tao Skill.", 102));
                                SendPacket(General.MyPackets.NPCLink("Just passing by.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
Code:
                            if (CurrentNPC == 12)
                            {
                                if (MyChar.Job < 145 && MyChar.Job > 100 || Control == 255)
                                {
                                    if (Control == 100)
                                    {

                                        SendPacket(General.MyPackets.NPCSay("Ok, choose the skill you want to learn."));
                                        SendPacket(General.MyPackets.NPCLink("Thunder: Lv 1", 31));
                                        SendPacket(General.MyPackets.NPCLink("Cure: Lv 1", 32));
                                        SendPacket(General.MyPackets.NPCLink("Meditation: Lv 44", 34));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                    }
                                    if (Control == 31)
                                    {
                                        if (MyChar.Level >= 1)
                                            MyChar.LearnSkill(1000, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this, I don't understand why. All Taoist noobs can..."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 32)
                                    {
                                        if (MyChar.Level >= 1)
                                            MyChar.LearnSkill(1005, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this, I don't understand why. All Taoist noobs can..."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 34)
                                    {
                                        if (MyChar.Level >= 44)
                                            MyChar.LearnSkill(1192, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You are not a WaterTaoist, you can't learn these skills!"));
                                    SendPacket(General.MyPackets.NPCLink("Ok.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 101)
                                {

                                        SendPacket(General.MyPackets.NPCSay("Ok, choose the skill you want to learn."));
                                        SendPacket(General.MyPackets.NPCLink("Healing Rain: Lv 40", 33));
                                        SendPacket(General.MyPackets.NPCLink("Star Of Accuracy: Lv 45", 35));
                                        SendPacket(General.MyPackets.NPCLink("Magic Shield: Lv 50", 36));
                                        SendPacket(General.MyPackets.NPCLink("Stigma: Lv 55", 37));
                                        SendPacket(General.MyPackets.NPCLink("Invisibility: Lv 60", 38));
                                        SendPacket(General.MyPackets.NPCLink("Pray: Lv 70", 39));
                                        SendPacket(General.MyPackets.NPCLink("Advanced Cure: Lv 81", 40));
                                        SendPacket(General.MyPackets.NPCLink("Nectar: Lv 94", 41));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                    }
                                    if (Control == 33)
                                    {
                                        if (MyChar.Level >= 40)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1055, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 35)
                                    {
                                        if (MyChar.Level >= 45)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1085, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 36)
                                    {
                                        if (MyChar.Level >= 50)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1090, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 37)
                                    {
                                        if (MyChar.Level >= 55)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1095, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 38)
                                    {
                                        if (MyChar.Level >= 60)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1075, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 39)
                                    {
                                        if (MyChar.Level >= 70)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1100, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 40)
                                    {
                                        if (MyChar.Level >= 81)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1175, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 41)
                                    {
                                        if (MyChar.Level >= 94)
                                        if (MyChar.Job < 135 && MyChar.Job > 132)
                                            MyChar.LearnSkill(1170, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You are not a WaterTaoist, you can't learn these skills!"));
                                    SendPacket(General.MyPackets.NPCLink("Ok.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 102)
                                {

                                        SendPacket(General.MyPackets.NPCSay("Ok, choose the skill you want to learn."));
                                        SendPacket(General.MyPackets.NPCLink("Fire: Lv 40", 42));
                                        SendPacket(General.MyPackets.NPCLink("Fire Ring: Lv 55", 43));
                                        SendPacket(General.MyPackets.NPCLink("Fire Meteor: Lv 52", 44));
                                        SendPacket(General.MyPackets.NPCLink("Fire Circle: Lv 65", 45));
                                        SendPacket(General.MyPackets.NPCLink("Bomb: Lv 82", 46));
                                        SendPacket(General.MyPackets.NPCLink("Fire Of Hell: Lv 84", 47));
                                        SendPacket(General.MyPackets.NPCLink("Tornado: Lv 90", 48));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                    }
                                    if (Control == 42)
                                    {
                                        if (MyChar.Level >= 65)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1001, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 43)
                                    {
                                        if (MyChar.Level >= 55)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1150, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 44)
                                    {
                                        if (MyChar.Level >= 52)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1180, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 45)
                                    {
                                        if (MyChar.Level >= 65)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1120, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 46)
                                    {
                                        if (MyChar.Level >= 82)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1160, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 47)
                                    {
                                        if (MyChar.Level >= 84)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1165, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 48)
                                    {
                                        if (MyChar.Level >= 65)
                                        if (MyChar.Job < 145 && MyChar.Job > 142)
                                            MyChar.LearnSkill(1002, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You are not a FireTaoist, you can't learn these skills!"));
                                    SendPacket(General.MyPackets.NPCLink("Ok.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 1)
                                {
                                    if (MyChar.Job == 100)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Taoist you need to be level 15 or higher."));
                                    }
                                    if (MyChar.Job == 101)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterTaoist you need to be level 40 or higher."));
                                    }
                                    if (MyChar.Job == 132)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterWizard you need to be level 70 or higher."));
                                    }
                                    if (MyChar.Job == 133)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterMaster you need to be level 100 or higher."));
                                    }
                                    if (MyChar.Job == 134)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterSaint you need to be level 110 or higher."));
                                    }
                                    if (MyChar.Job != 135)
                                    {
                                        SendPacket(General.MyPackets.NPCLink("Promote me.", 2));
                                        SendPacket(General.MyPackets.NPCLink("Maybe later.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You can't receive a higher promotion at your current level."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    bool Promoted = false;

                                    if (MyChar.Job == 100 && MyChar.Level >= 15)
                                    {
                                        MyChar.Job = 101;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 101 && MyChar.Level >= 40)
                                    {
                                        MyChar.Job = 132;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 132 && MyChar.Level >= 70)
                                    {
                                        MyChar.Job = 133;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 133 && MyChar.Level >= 100)
                                    {
                                        MyChar.Job = 134;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 134 && MyChar.Level >= 110)
                                    {
                                        MyChar.Job = 135;
                                        Promoted = true;
                                    }

                                    if (Promoted)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Congratulations!"));
                                        SendPacket(General.MyPackets.NPCLink("Yay!.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 7, MyChar.Job));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You can't receive a higher promotion at this time."));
                                        SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 5)
                                {
                                    if (MyChar.Job == 100)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Taoist you need to be level 15 or higher."));
                                    }
                                    if (MyChar.Job == 101)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterTaoist you need to be level 40 or higher."));
                                    }
                                    if (MyChar.Job == 142)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterWizard you need to be level 70 or higher."));
                                    }
                                    if (MyChar.Job == 143)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterMaster you need to be level 100 or higher."));
                                    }
                                    if (MyChar.Job == 144)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to WaterSaint you need to be level 110 or higher."));
                                    }
                                    if (MyChar.Job != 145)
                                    {
                                        SendPacket(General.MyPackets.NPCLink("Promote me.", 6));
                                        SendPacket(General.MyPackets.NPCLink("Maybe later.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You can't receive a higher promotion at your current level."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 6)
                                {
                                    bool Promoted = false;

                                    if (MyChar.Job == 100 && MyChar.Level >= 15)
                                    {
                                        MyChar.Job = 101;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 101 && MyChar.Level >= 40)
                                    {
                                        MyChar.Job = 142;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 132 && MyChar.Level >= 70)
                                    {
                                        MyChar.Job = 143;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 133 && MyChar.Level >= 100)
                                    {
                                        MyChar.Job = 144;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 134 && MyChar.Level >= 110)
                                    {
                                        MyChar.Job = 145;
                                        Promoted = true;
                                    }

                                    if (Promoted)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Congratulations!"));
                                        SendPacket(General.MyPackets.NPCLink("Yay!.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 7, MyChar.Job));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You can't receive a higher promotion at this time."));
                                        SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
The source just won't accept this. So if anyone see's an issue in that, please let me know, cause I'm just not seeing it.

Now for my last attempt, I figured I'd make it for just 1 classification like all other promo NPC's.

Code:
                            if (CurrentNPC == 12)
                            {
                                SendPacket(General.MyPackets.NPCSay("Hello, I am the Taoist Trainer. What can i do for you?"));
                                SendPacket(General.MyPackets.NPCLink("Promotion.", 1));
                                SendPacket(General.MyPackets.NPCLink("Learn Skill.", 100));
                                SendPacket(General.MyPackets.NPCLink("Just passing by.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
Code:
                         if (CurrentNPC == 12)
                            {
                                if (MyChar.Job < 101 && MyChar.Job > 100 && MyChar.Job < 135 && MyChar.Job > 132 || Control == 255)
                                {
                                    if (Control == 100)
                                    {

                                        SendPacket(General.MyPackets.NPCSay("Ok, choose the skill you want to learn."));
                                        SendPacket(General.MyPackets.NPCLink("Thunder: Lv 1", 31));
                                        SendPacket(General.MyPackets.NPCLink("Cure: Lv 1", 32));
                                        SendPacket(General.MyPackets.NPCLink("Meditation: Lv 44", 34));
                                        SendPacket(General.MyPackets.NPCLink("Healing Rain: Lv 40", 33));
                                        SendPacket(General.MyPackets.NPCLink("Star Of Accuracy: Lv 45", 35));
                                        SendPacket(General.MyPackets.NPCLink("Magic Shield: Lv 50", 36));
                                        SendPacket(General.MyPackets.NPCLink("Stigma: Lv 55", 37));
                                        SendPacket(General.MyPackets.NPCLink("Invisibility: Lv 60", 38));
                                        SendPacket(General.MyPackets.NPCLink("Pray: Lv 70", 39));
                                        SendPacket(General.MyPackets.NPCLink("Advanced Cure: Lv 81", 40));
                                        SendPacket(General.MyPackets.NPCLink("Nectar: Lv 94", 41));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                    }
                                    if (Control == 31)
                                    {
                                        if (MyChar.Level >= 1)
                                            MyChar.LearnSkill(1000, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this, I don't understand why. All Taoist noobs can..."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 32)
                                    {
                                        if (MyChar.Level >= 1)
                                            MyChar.LearnSkill(1005, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this, I don't understand why. All Taoist noobs can..."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 34)
                                    {
                                        if (MyChar.Level >= 44)
                                            MyChar.LearnSkill(1192, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 33)
                                    {
                                        if (MyChar.Level >= 40)
                                            MyChar.LearnSkill(1055, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 35)
                                    {
                                        if (MyChar.Level >= 45)
                                            MyChar.LearnSkill(1085, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 36)
                                    {
                                        if (MyChar.Level >= 50)
                                            MyChar.LearnSkill(1090, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 37)
                                    {
                                        if (MyChar.Level >= 55)
                                            MyChar.LearnSkill(1095, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 38)
                                    {
                                        if (MyChar.Level >= 60)
                                            MyChar.LearnSkill(1075, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 39)
                                    {
                                        if (MyChar.Level >= 70)
                                            MyChar.LearnSkill(1100, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 40)
                                    {
                                        if (MyChar.Level >= 81)
                                            MyChar.LearnSkill(1175, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                    if (Control == 41)
                                    {
                                        if (MyChar.Level >= 94)
                                            MyChar.LearnSkill(1170, 0);
                                        else
                                        {
                                            SendPacket(General.MyPackets.NPCSay("You can't learn this spell."));
                                            SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                            SendPacket(General.MyPackets.NPCSetFace(30));
                                            SendPacket(General.MyPackets.NPCFinish());
                                        }
                                    }
                                else
                                {
                                    SendPacket(General.MyPackets.NPCSay("You are not a WaterTaoist, you can't learn these skills!"));
                                    SendPacket(General.MyPackets.NPCLink("Ok.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 1)
                                {
                                    if (MyChar.Job == 100)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Warrior you need to be level 15 or higher."));
                                    }
                                    if (MyChar.Job == 101)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Brass Warrior you need to be level 40 or higher."));
                                    }
                                    if (MyChar.Job == 132)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Silver Warrior you need to be level 70 or higher."));
                                    }
                                    if (MyChar.Job == 133)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Gold Warrior you need to be level 100 or higher."));
                                    }
                                    if (MyChar.Job == 134)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("To promote yourself to Warrior Master you need to be level 110 or higher."));
                                    }
                                    if (MyChar.Job != 135)
                                    {
                                        SendPacket(General.MyPackets.NPCLink("Promote me.", 2));
                                        SendPacket(General.MyPackets.NPCLink("Maybe later.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You can't receive a higher promotion at your current level."));
                                        SendPacket(General.MyPackets.NPCLink("Sorry.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                                if (Control == 2)
                                {
                                    bool Promoted = false;

                                    if (MyChar.Job == 100 && MyChar.Level >= 15)
                                    {
                                        MyChar.Job = 101;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 101 && MyChar.Level >= 40)
                                    {
                                        MyChar.Job = 132;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 132 && MyChar.Level >= 70)
                                    {
                                        MyChar.Job = 133;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 133 && MyChar.Level >= 100)
                                    {
                                        MyChar.Job = 134;
                                        Promoted = true;
                                    }
                                    else if (MyChar.Job == 134 && MyChar.Level >= 110)
                                    {
                                        MyChar.Job = 135;
                                        Promoted = true;
                                    }

                                    if (Promoted)
                                    {
                                        SendPacket(General.MyPackets.NPCSay("Congratulations!"));
                                        SendPacket(General.MyPackets.NPCLink("Yay!.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());

                                        SendPacket(General.MyPackets.Vital(MyChar.UID, 7, MyChar.Job));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You can't receive a higher promotion at this time."));
                                        SendPacket(General.MyPackets.NPCLink("Damn.", 255));
                                        SendPacket(General.MyPackets.NPCSetFace(30));
                                        SendPacket(General.MyPackets.NPCFinish());
                                    }
                                }
                            }
                        }
Now that one builds unlike the first one. However, the damn npc still doesn't work. All my number are matching, correct NPC Id and all, so I really don't have a clue. I know when I click "Just passing by." A box pops open saying I can't learn that skill, lmao, but it never closes, I have to log out to get rid of it.

Anyway, to anyone who took the time to read this whole thing, I thank you for being insane enough to do it. And if anyone has any idea's what I'm doing wrong, greatly appreciated.
Incariuz is offline  
Old 11/26/2008, 17:26   #2
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,001
Code:
if (MyChar.Job < 101 && MyChar.Job > 100 && MyChar.Job < 135 && MyChar.Job > 132 || Control == 255)
I belive that line is the problem, I don't see how Job could be smaller than 101 and higher than 100 (You need >= for it to work correctly.) Etc etc.

Try this :

Code:
if((MyChar.Job >= 100 && MyChar.Job <= 101) || (MyChar.Job >= 132 && MyChar.Job <= 135) || Control == 255)
tanelipe is offline  
Old 11/26/2008, 20:19   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Remove the || control = 255?
255 Should be sent to end the dialog..
tao4229 is offline  
Old 11/26/2008, 23:30   #4
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Out of curiosity, did nobody using LOTF think of using an line function just like this?
Code:
public void text(string s)
{
  SendPacket(General.MyPackets.NPCSay(s));
}
instead of using that long added line for just saying, or adding an option?
Functions that're extremely small, or just call other functions will be inlined by the .NET JIT
InfamousNoone is offline  
Old 11/27/2008, 07:15   #5
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
didn't think of that...

Code:
if((MyChar.Job >= 100 && MyChar.Job <= 101) || (MyChar.Job >= 132 && MyChar.Job <= 135) || Control == 255)
None of my other promo NPC's required the "=" though, so not sure how that could effect it, but I'll try.

Code:
|| control = 255
is also on all my other promo NPC's and works fine.

I'll attempt both changes though to see if anything changes, but I really don't see how it could make a difference if it functions for all others.
Incariuz is offline  
Reply


Similar Threads Similar Threads
Promo code 2 mal benutzen pro code
08/19/2011 - WarRock Guides, Tutorials & Modifications - 176 Replies
Hallo Leute, Wollt ihr ein Promo Code 2 mal benutzen? -Wen ja dann folgt der Anleitung.
Promo Code
03/01/2010 - WarRock - 8 Replies
Neh Kleine Frage ich habe von Kolege ein Promo Code Bekommen aber das problem ist Ich weiss nicht wiee ich es einlösen kann kann mir jemand mit Bildern Weiter helfe Ihr krigt Auch EIn THX:D



All times are GMT +1. The time now is 17:14.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.