|
You last visited: Today at 10:11
Advertisement
[Release]Coding NPC's (Very basic)
Discussion on [Release]Coding NPC's (Very basic) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
10/12/2009, 10:59
|
#16
|
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
|
Thanks Yuki
|
|
|
10/12/2009, 15:40
|
#17
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by zbest
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
|
#18
|
elite*gold: 0
Join Date: Oct 2009
Posts: 27
Received Thanks: 11
|
Nice!
|
|
|
10/12/2009, 17:54
|
#19
|
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
|
Quote:
Originally Posted by grillmad
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?
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
|
#20
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
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
|
#21
|
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
|
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
|
#22
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by zbest
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
|
#23
|
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
|
Neah ok bro ,maybe someone have the codes i'l wait.
|
|
|
10/12/2009, 20:31
|
#24
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by zbest
Neah ok bro ,maybe someone have the codes i'l wait.
|
Yea, maybe someone have it 
If i found ill let you know
|
|
|
10/12/2009, 20:31
|
#25
|
elite*gold: 111
Join Date: Feb 2008
Posts: 2,161
Received Thanks: 646
|
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
|
#26
|
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
|
Neah i like this guide much easier ,and i like the teachers (Yuki & grillmad):P.  .
|
|
|
10/12/2009, 20:36
|
#27
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by zbest
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
Quote:
Originally Posted by BERGHUIS1
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
|
#28
|
elite*gold: 0
Join Date: Aug 2008
Posts: 889
Received Thanks: 199
|
@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
|
#29
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by zbest
@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 
But is good that you at least like it XD
Thanks
|
|
|
10/12/2009, 21:06
|
#30
|
elite*gold: 111
Join Date: Feb 2008
Posts: 2,161
Received Thanks: 646
|
Quote:
Originally Posted by zbest
@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.
|
|
|
All times are GMT +1. The time now is 10:11.
|
|