[HELP] NPC That teaches RB skills

04/14/2009 01:48 Vortex.#1
Ok I was wondering, could someone please show, or guide me with the codes for making an ncp that teach rb (pray, rb guards) skills.
04/14/2009 01:58 2coolforu2#2
Did you first off use the searching handy button?
And did you read off on peoples threads of how to make a npc that gives stuff or says stuff? Try reading those kind of posts/threads and maybe that give you a little help on how to do that?
04/14/2009 02:09 r.0ck#3
Quote:
Originally Posted by Vortex. View Post
Ok I was wondering, could someone please show, or guide me with the codes for making an ncp that teach rb (pray, rb guards) skills.

Here if you need more help just post on the same thread and I'll be glad to code it for you.. I'm guessing this is for LOTF so i coded it for LOTF.


Here is the Main Dialog for the NPC
Code:
if (CurrentNPC == 1200) // Skill Learner NPC
                            {
                                SendPacket(General.MyPackets.NPCSay("Would you like to learn some skills?")); // NPC Dialog
                                SendPacket(General.MyPackets.NPCLink("Umm Sure... What skills though?", 1)); // Player Controls Destiny
                                SendPacket(General.MyPackets.NPCLink("Nah, Just passing by.", 255)); // Player Controls Destiny
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
Now here is the Control Dialog for the NPC
Code:
                            if (CurrentNPC == 1200) // Skill Learner NPC
                            {
                                if (Control == 1)
                                {
                                    SendPacket(General.MyPackets.NPCSay("For now we just have these two skills."));
                                    SendPacket(General.MyPackets.NPCLink("Pray", 2));
                                    SendPacket(General.MyPackets.NPCLink("Guard", 3));
                                    SendPacket(General.MyPackets.NPCLink("No Thanks.", 255));
                                    SendPacket(General.MyPackets.NPCSetFace(30));
                                    SendPacket(General.MyPackets.NPCFinish());
                                }
                                if (Control == 2)
                                {
                                    if (MyChar.Job > 132 && MyChar.Job < 136)
                                    {
                                        MyChar.LearnSkill(1100, 0);
                                        SendPacket(General.MyPackets.NPCSay("Congratz, You now learned the water tao skill Pray!"));
                                        SendPacket(General.MyPackets.NPCLink("Thanks!", 255));
                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("I'm sorry you are not a water tao Or you are still too low level to learn the skill!"));
                                        SendPacket(General.MyPackets.NPCLink("Oh Darn!", 255));
                                    }
                                }
                                if (Control == 3)
                                {
                                    if (MyChar.RBCount >= 1)
                                    {
                                        MyChar.LearnSkill(4000, 0);
                                        SendPacket(General.MyPackets.NPCSay("Congratz, You now learned the reborn skill Guard!"));
                                        SendPacket(General.MyPackets.NPCLink("Thanks!", 255));

                                    }
                                    else
                                    {
                                        SendPacket(General.MyPackets.NPCSay("You are not reborn yet!"));
                                        SendPacket(General.MyPackets.NPCLink("Oh Darn!", 255));
                                    }
                                }
                            }
If I accidentally coded it wrong or you get some bugs, Please tell me so i may fix it.
04/14/2009 02:18 Vortex.#4
I searched, and then I kept getting posts from Rakion, so I just posted. Sawwie

But c'mmon if your not gonna help me, please don't post.

Moi need link. :P
04/14/2009 02:19 2coolforu2#5
Quote:
Originally Posted by Vortex. View Post
I searched, and then I kept getting posts from Rakion, so I just posted. Sawwie

But c'mmon if your not gonna help me, please don't post.

Moi need link. :P
Its not all about rakion you just have to go threw the pages.
04/14/2009 02:26 Vortex.#6
There is a small bug that I can't fix, lol

Uhh, when I select I wanan learn Guard, this is what happened, The dialog box closed, When I click on the ncp again It loads Up, you have learned the reborn skill Guard!Would you like to learn skill, any help?
04/14/2009 03:16 r.0ck#7
Quote:
Originally Posted by Vortex. View Post
There is a small bug that I can't fix, lol

Uhh, when I select I wanan learn Guard, this is what happened, The dialog box closed, When I click on the ncp again It loads Up, you have learned the reborn skill Guard!Would you like to learn skill, any help?
That actually is not a bug..





MyChar.LearnSkill(4000, 0);
SendPacket(General.MyPackets.NPCSay("Congratz, You now learned the reborn skill Guard!"));




As you see the bold in the code brackets. All it does after you learned it is tell you. Check your skills and you should have it. If that does not answer your question please ask again in a different way.
04/14/2009 03:20 Vortex.#8
I figured, just letting you know, and I need further assistance

lol, I can't get a command for guards to work :S
04/14/2009 03:30 r.0ck#9
Quote:
Originally Posted by Vortex. View Post
I figured, just letting you know, and I need further assistance

lol, I can't get a command for guards to work :S
Why do you need a command when you can right click the skill?
04/14/2009 03:46 Vortex.#10
Sorry for my being a noob, I been.... Lets put it doing some stuff xD

I need the code for summon guard!!!