[Release]Coding NPC's (Very basic)

10/12/2009 10:59 zbest#16
Thanks Yuki :D
10/12/2009 15:40 Fish*#17
Quote:
Originally Posted by zbest View Post
Wow i like LOTF Coding ;).
I wanna learn,who want to teach me?
By the way grillmad at link 1/link2 i understand are the options when you click do action but can you tell me what are the numbers (30),(255) and so on...??
This numbers are making the action do when click the link?
30 is the face for NPC and 255 is for exit
10/12/2009 15:50 Decker28#18
Nice!
10/12/2009 17:54 zbest#19
Quote:
Originally Posted by grillmad View Post
30 is the face for NPC and 255 is for exit
Thanks if someone is so kind to write here the numbers of the face.
I want to make a npcoooh and how can i change the look of NPC?:handsdown:

This is my first NPC for LOTF ,i hope i have not wrong with something.
By the way im a noob no i'l learn more :P.

Code:
                       if (CurrentNPC == 40900)//City Manager :)
                            {
                                SendPacket(General.MyPackets.NPCSay("Welcome traveller to our city.Before start your journey please select a gift to make your journey more easier."));
                                SendPacket(General.MyPackets.NPCLink("5 Expballs to levelup easier.", 1));
                                SendPacket(General.MyPackets.NPCLink("215 CPS to try you luck at lottery.", 2));
                                SendPacket(General.MyPackets.NPCLink("The GODs will give a praying stone(S).", 3));
                                SendPacket(General.MyPackets.NPCLink("Good luck younger in your journey!", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
                        if (CurrentNPC == 1111)//City Manager :)
                            {

                                if (Control ==1)
                                {
                                   
                                   MyChar.AddItem("723700", 5, (uint)General.Rand.Next(36457836));
                                SendPacket(General.MyPackets.NPCSay("You have received 5 Expballs..")); 
                                SendPacket(General.MyPackets.NPCLink2("I see and thanks for the gift.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());

                                }     

   
                                if (Control == 2)
                                {

                                    MyChar.CPs += 215;
                                    SendPacket(General.MyPackets.NPCSay("Look in you inventory ,you have received 215 Conquer Points."));
                                SendPacket(General.MyPackets.NPCLink2("Awesome i'l try now the lottery.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());

                                }

                               
                                if (Control == 3)
                                {
                                
                                MyChar.AddItem("1200000", 1, (uint)General.Rand.Next(36457836));
                                SendPacket(General.MyPackets.NPCSay("The GODS has give to you 1 Praying stone of 3 Days of bless."));
                                SendPacket(General.MyPackets.NPCLink2("I see and thanks to  GODS for this awesome gift.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());

                                }        

                             }
10/12/2009 19:23 Fish*#20
Dont make the spaces between the lines :)
It should look liek this :)
And for the end.
Only make 1 }, because you only have 1 thing to happen in control :)
I hope it helped ;D
And you forgot to make same NPC id in first you have 40900 and in the last you have 1111, it needs to be the same :) I changed both to 40900
But awsome NPC, i really like the idea hehe
It was nice made, cause it was the first code you made :)

NPC Talk
Code:
                       if (CurrentNPC == 40900)//City Manager :)
                            {
                                SendPacket(General.MyPackets.NPCSay("Welcome traveller to our city.Before start your journey please select a gift to make your journey more easier."));
                                SendPacket(General.MyPackets.NPCLink("5 Expballs to levelup easier.", 1));
                                SendPacket(General.MyPackets.NPCLink("215 CPS to try you luck at lottery.", 2));
                                SendPacket(General.MyPackets.NPCLink("The GODs will give a praying stone(S).", 3));
                                SendPacket(General.MyPackets.NPCLink("Good luck younger in your journey!", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                            }
NPC Control
Code:
if (CurrentNPC == 40900)//City Manager :)
                            {
                                if (Control ==1)
                                {  
                                   MyChar.AddItem("723700", 5, (uint)General.Rand.Next(36457836));
                                SendPacket(General.MyPackets.NPCSay("You have received 5 Expballs..")); 
                                SendPacket(General.MyPackets.NPCLink2("I see and thanks for the gift.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                                }     
                                if (Control == 2)
                                {
                                    MyChar.CPs += 215;
                                    SendPacket(General.MyPackets.NPCSay("Look in you inventory ,you have received 215 Conquer Points."));
                                SendPacket(General.MyPackets.NPCLink2("Awesome i'l try now the lottery.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                                }        
                                if (Control == 3)
                                {
                                MyChar.AddItem("1200000", 1, (uint)General.Rand.Next(36457836));
                                SendPacket(General.MyPackets.NPCSay("The GODS has give to you 1 Praying stone of 3 Days of bless."));
                                SendPacket(General.MyPackets.NPCLink2("I see and thanks to  GODS for this awesome gift.", 255));
                                SendPacket(General.MyPackets.NPCSetFace(30));
                                SendPacket(General.MyPackets.NPCFinish());
                                }        
                             }
10/12/2009 19:59 zbest#21
So do you like my ideea thanks grillmad.
2 people helped me to make this NPC,has gived me an example...
Yuki and grillmad thanks to this 2 woderful ppl.:X:X

Btw some1 to give me some nPC face please .:X
10/12/2009 20:14 Fish*#22
Quote:
Originally Posted by zbest View Post
So do you like my ideea thanks grillmad.
2 people helped me to make this NPC,has gived me an example...
Yuki and grillmad thanks to this 2 woderful ppl.:X:X

Btw some1 to give me some nPC face please .:X
Sorry i cant help here, but try put some numbers ;)
10/12/2009 20:17 zbest#23
Neah ok bro ,maybe someone have the codes i'l wait.
10/12/2009 20:31 Fish*#24
Quote:
Originally Posted by zbest View Post
Neah ok bro ,maybe someone have the codes i'l wait.
Yea, maybe someone have it :)
If i found ill let you know:handsdown:
10/12/2009 20:31 ~*NewDuuDe*~#25
Don't take this personally, but I feel this guide is quite useless as there is allready one out there. Pretty much exactly the same really.
10/12/2009 20:34 zbest#26
Neah i like this guide much easier ,and i like the teachers (Yuki & grillmad):P.;).
10/12/2009 20:36 Fish*#27
Quote:
Originally Posted by zbest View Post
Neah i like this guide much easier ,and i like the teachers (Yuki & grillmad):P.;).
Thank you very much for taht you could use guide and no problem:handsdown:

Quote:
Originally Posted by BERGHUIS1 View Post
Don't take this personally, but I feel this guide is quite useless as there is allready one out there. Pretty much exactly the same really.
And i find you very useless. Why dont you make somethings self that actually help?
10/12/2009 20:40 zbest#28
@grillmad agree with you
I see on forum most of the people comment on others thread and say "Useless thread,get a life,you site sux,you guide sux" only stupid comments,but they don't do something to help others only to TALK.
10/12/2009 21:06 Fish*#29
Quote:
Originally Posted by zbest View Post
@grillmad agree with you
I see on forum most of the people comment on others thread and say "Useless thread,get a life,you site sux,you guide sux" only stupid comments,but they don't do something to help others only to TALK.
Yeah exactly, they just say something you made is stupid, because it is already out there, BUT is always good with more helps, because some peoples dont use the search button and then they only look on the first 3 pages and if dont find what they search they just leave again.
And there is other guides like this, but im just trying to help and the other guides, i dont think they have the add ons for NPC conversations:mofo:
But is good that you at least like it XD
Thanks
10/12/2009 21:06 ~*NewDuuDe*~#30
Quote:
Originally Posted by zbest View Post
@grillmad agree with you
I see on forum most of the people comment on others thread and say "Useless thread,get a life,you site sux,you guide sux" only stupid comments,but they don't do something to help others only to TALK.
I don't have any actual reason to release anything. My source is strictly for myself and Yuki. So no, I'm not planning to release anything. And when it comes to edits and guides, I have made quite a few of those.