Register for your free account! | Forgot your password?

You last visited: Today at 01:58

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

Advertisement



[Release]Easier Npc System for LOTF

Discussion on [Release]Easier Npc System for LOTF within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
[Release]Easier Npc System for LOTF

Well I don't know if this would count as a release but here it goes.
This is really easy,
I coded this in all of but 5 minutes.
Go to Client.cs and search for
Code:
public void SendPacket(byte[] Dat)
Right above that insert this code.
Code:
        public void Say(string text)
        {
            SendPacket(General.MyPackets.NPCSay(text));
        }
        public void Link(string text, byte option)
        {
            SendPacket(General.MyPackets.NPCLink(text, option));
        }
        public void Done(string text)
        {
            SendPacket(General.MyPackets.NPCLink(text, 255));
            SendPacket(General.MyPackets.NPCSetFace(30));
            SendPacket(General.MyPackets.NPCFinish());
        }

After that instead of your npc's being built like this:
Code:
                            if (CurrentNPC == 123)
                            {
                                SendPacket(General.MyPackets.Say("NPC dialog"));
                                SendPacket(General.MyPackets.NPCLink("Option", 1));
                                SendPacket(General.MyPackets.NPCLink("Exit option", 255));
                                SendPacket(General.MyPackets.SetFace(30));
                                SendPacket(General.MyPackets.Finish());
                            }
They will be built like this:
Code:
                            if (CurrentNPC == 123)
                            {
                                Say("NPC Dialog"));
                                Link("Option", 1));
                                Done("Exit Option");
                            }
Hope this helps some of you.
Any questions post here.
Arcо is offline  
Thanks
3 Users
Old 11/26/2009, 11:36   #2
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
and where do u set the face and finish?

Make a complete tutorial -_-

Also this is already released 10 times.
~Yuki~ is offline  
Old 11/26/2009, 11:42   #3
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by ~Yuki~ View Post
and where do u set the face and finish?

Make a complete tutorial -_-

Also this is already released 10 times.
I have not seen this released at all and I am currently working on screenshots.

#EDIT:Screenshot put in.
Btw I would love some links to releases like this since it has been released 10 times already as you say.
Arcо is offline  
Old 11/26/2009, 12:59   #4
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
Quote:
Originally Posted by Tiku View Post
Well I don't know if this would count as a release but here it goes.
This is really easy,
I coded this in all of but 5 minutes.
Go to Client.cs and search for
Code:
public void SendPacket(byte[] Dat)
Right above that insert this code.
Code:
        public void Say(string text)
        {
            SendPacket(General.MyPackets.NPCSay(text));
        }
        public void Link(string text, byte option)
        {
            SendPacket(General.MyPackets.NPCLink(text, option));
        }
        public void Done(string text)
        {
            SendPacket(General.MyPackets.NPCLink(text, 255));
            SendPacket(General.MyPackets.NPCSetFace(30));
            SendPacket(General.MyPackets.NPCFinish());
        }

After that instead of your npc's being built like this:
Code:
                            if (CurrentNPC == 123)
                            {
                                SendPacket(General.MyPackets.Say("NPC dialog"));
                                SendPacket(General.MyPackets.NPCLink("Option", 1));
                                SendPacket(General.MyPackets.NPCLink("Exit option", 255));
                                SendPacket(General.MyPackets.SetFace(30));
                                SendPacket(General.MyPackets.Finish());
                            }
They will be built like this:
Code:
                            if (CurrentNPC == 123)
                            {
                                Say("NPC Dialog"));
                                Link("Option", 1));
                                Done("Exit Option");
                            }
Hope this helps some of you.
Any questions post here.


can yuo make it for 1565?
sawickas is offline  
Old 11/26/2009, 15:53   #5
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by sawickas View Post
can yuo make it for 1565?
Show me how a 5165 Npc is built.
Arcо is offline  
Old 11/26/2009, 16:55   #6
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
Quote:
Originally Posted by Tiku View Post
Show me how a 5165 Npc is built.
Ok



Quote:
#region MightyTao
case 35500:
{
if (Control == 0)
{
GC.AddSend(Packets.NPCSay("I am the mighty tao who teaches skills to those worthy reborn characters. So do you want to learn anything?"));
GC.AddSend(Packets.NPCLink("Teach me Summon Guard.", 1));
GC.AddSend(Packets.NPCLink("Nah. I'll just leave.", 255));
GC.AddSend(Packets.NPCSetFace(30));
GC.AddSend(Packets.NPCFinish());
}
else if (Control == 1)
{
if (GC.MyChar.Reborn)
GC.MyChar.NewSkill(new Game.Skill() { ID = 4000, Lvl = 0 });
}
break;
}
#endregion
sawickas is offline  
Old 11/26/2009, 17:01   #7
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by sawickas View Post
Ok
Hmm well since I haven't personally looked at this 5165 source going around, I can't tell you exactly where to put this.
But here's what you need.
Code:
        public void Say(string text)
        {
            GC.AddSend(Packets.NPCSay(text));
        }
        public void Link(string text, byte option)
        {
            GC.AddSend(Packets.NPCLink(text, option));
        }
        public void Done(string text)
        {
            GC.AddSend(Packets.NPCLink(text, 255));
            GC.AddSend(Packets.NPCSetFace(30));
            GC.AddSend(Packets.NPCFinish());
        }
Hope this helps you sawickas.
Arcо is offline  
Thanks
1 User
Old 11/26/2009, 17:15   #8
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
Quote:
Originally Posted by Tiku View Post
Hmm well since I haven't personally looked at this 5165 source going around, I can't tell you exactly where to put this.
But here's what you need.
Code:
        public void Say(string text)
        {
            GC.AddSend(Packets.NPCSay(text));
        }
        public void Link(string text, byte option)
        {
            GC.AddSend(Packets.NPCLink(text, option));
        }
        public void Done(string text)
        {
            GC.AddSend(Packets.NPCLink(text, 255));
            GC.AddSend(Packets.NPCSetFace(30));
            GC.AddSend(Packets.NPCFinish());
        }
Hope this helps you sawickas.
can yuo plyz take look Here Link to source>>>>>
sawickas is offline  
Old 11/26/2009, 17:17   #9
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by sawickas View Post
can yuo plyz take look Here Link to source>>>>>
I'm not downloading the entire source just so I can help one person.
If you upload the *.cs with all the npc stuff in it i'll be sure to take a look at it.
Arcо is offline  
Old 11/26/2009, 17:35   #10
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
Quote:
Originally Posted by Tiku View Post
I'm not downloading the entire source just so I can help one person.
If you upload the *.cs with all the npc stuff in it i'll be sure to take a look at it.
ok
Attached Files
File Type: rar PacketHandling.rar (103.2 KB, 17 views)
sawickas is offline  
Old 11/26/2009, 17:48   #11
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by sawickas View Post
ok
Okay well I looked at it and your going to scroll all the way down to the bottom of NPCDialog.cs.
You will see
Code:
catch (Exception Exc) { Program.WriteLine(Exc); }
After the next }, that's where you're going to add the code
Code:
        public void Say(string text)
        {
            GC.AddSend(Packets.NPCSay(text));
        }
        public void Link(string text, byte option)
        {
            GC.AddSend(Packets.NPCLink(text, option));
        }
        public void Done(string text)
        {
            GC.AddSend(Packets.NPCLink(text, 255));
            GC.AddSend(Packets.NPCSetFace(30));
            GC.AddSend(Packets.NPCFinish());
        }
That should work.
I'll post a screenshot if it helps.

Arcо is offline  
Thanks
1 User
Old 11/26/2009, 18:16   #12
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
Quote:
Originally Posted by Tiku View Post
Okay well I looked at it and your going to scroll all the way down to the bottom of NPCDialog.cs.
You will see
Code:
catch (Exception Exc) { Program.WriteLine(Exc); }
After the next }, that's where you're going to add the code
Code:
        public void Say(string text)
        {
            GC.AddSend(Packets.NPCSay(text));
        }
        public void Link(string text, byte option)
        {
            GC.AddSend(Packets.NPCLink(text, option));
        }
        public void Done(string text)
        {
            GC.AddSend(Packets.NPCLink(text, 255));
            GC.AddSend(Packets.NPCSetFace(30));
            GC.AddSend(Packets.NPCFinish());
        }
That should work.
I'll post a screenshot if it helps.

Thanks
sawickas is offline  
Old 11/26/2009, 18:18   #13
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
Quote:
Originally Posted by sawickas View Post
Thanks
Don't just say it.
Press it.
I'd appreciate it.
Arcо is offline  
Thanks
1 User
Old 11/26/2009, 18:18   #14
 
sawickas's Avatar
 
elite*gold: 0
Join Date: Sep 2008
Posts: 617
Received Thanks: 38
How i can make it Like in LOTF? Its posible?

I got problem in strukture
sawickas is offline  
Old 11/26/2009, 18:19   #15


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
Why are the methods placed in client.cs?
Korvacs is offline  
Reply


Similar Threads Similar Threads
[FINAL RELEASE]HuB- Source (BASIC) (Original LOTF easier workable)
11/14/2009 - CO2 PServer Guides & Releases - 25 Replies
#REMOVED
[Req]New upgrade system LOTF
08/07/2009 - CO2 Private Server - 3 Replies
I need help to add new upgrade system on global (minor major progres) for guide to add horse (LOTF)
[HELP]GW system in lotf- which changes the anme of the pole etc.
07/06/2009 - CO2 Private Server - 0 Replies
can anyone like give me the link to a working gw system that name of the pole changes and it has the points of the guilds at the top right of the screen or can you etach me ho wto do it?please tell me its like the only thing that does not work for my server..T_T..i would b really glad if anyone could help..^^
[RELEASE] Possible Hacker System LOTF
07/01/2009 - CO2 PServer Guides & Releases - 7 Replies
This is my possible hacker system. What does this Possible Hacker System do? When someone logs out of the game and if they have more than 15k cps or more than 350m it writes their ... Name : CPs :
[LOTF]NPC Talk System
05/19/2009 - CO2 Private Server - 14 Replies
Creat NPCDialog.cs and paste this code: using System; using System.Collections.Generic; using System.Text; using System.Collections; namespace COServer_Project



All times are GMT +2. The time now is 01:58.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.