Register for your free account! | Forgot your password?

You last visited: Today at 01:36

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

Advertisement



[RELEASE] Make a more Advanced NPC

Discussion on [RELEASE] Make a more Advanced NPC within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 03/18/2010, 04:56   #16
 
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
ninjas 50-55
.Guru is offline  
Old 03/18/2010, 11:00   #17
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by o sTriiDe View Post
ninjas 50-55
huh?
.Beatz is offline  
Old 03/19/2010, 16:18   #18
 
elite*gold: 0
Join Date: May 2006
Posts: 297
Received Thanks: 58
ù asked:
please help me with ninja jojbs cant remember,
ninja jobs are"
50
51
52
53
54
55
pintser is offline  
Old 03/20/2010, 00:22   #19
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by pintser View Post
ù asked:
please help me with ninja jojbs cant remember,
ninja jobs are"
50
51
52
53
54
55
haha lol thanks xD will go add it now
.Beatz is offline  
Old 03/20/2010, 02:15   #20
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
u said advanced actually u said a MORE advanced.. change the thread title ( or request a change ) to something like...

Learn how to create a NPC...from basic to advanced.. instead of advanced.
PeTe Ninja is offline  
Old 03/20/2010, 02:36   #21
 
ImFlamedCOD's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 141
To even further "advance" your npcs instead of using Control and a ton of if statements you can do it this way.

Code:
 public static void Npc(byte OptionID, Game Client)
        {
            switch (OptionID)
            {
                case 0:
                    {
                     NPCEngine NPC = new NPCEngine();
                     NPC.Talk("Hello and this is a test NPC);
                     NPC. Options("Yes","No","Maybe");
                     NPC.Input("Players Name" , 15);
                     NPC.Controls(2);
                       
                        break;
                    }
                case 1:
                    {
                     NPCEngine NPC = new NPCEngine();
                     NPC.Talk("Thanks for talking to me i will leave you alone now:);
                     NPC.Options("Bye");

                     NPC.End(True);
                        break;
                    }
             default:
                    {
                     NPCEngine NPC = new NPCEngine();
                     NPC.End(true);
                        break;
                    }
            }
        }
That version of my NPC Engine used the lua scripts , the newer version is a completely new system for inter-graded and smarter and much smoother npcs. Also movable npc's that can walk around that are spawn as an entity , can wear weapons and fight back. Tho i haven't wrote that part of the NPC Engine yet i hope this gives people some advise on there server npc scripting.
ImFlamedCOD is offline  
Old 03/20/2010, 03:35   #22
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by ImFlamedCOD View Post
To even further "advance" your npcs instead of using Control and a ton of if statements you can do it this way.

Code:
 public static void Npc(byte OptionID, Game Client)
        {
            switch (OptionID)
            {
                case 0:
                    {
                     NPCEngine NPC = new NPCEngine();
                     NPC.Talk("Hello and this is a test NPC);
                     NPC. Options("Yes","No","Maybe");
                     NPC.Input("Players Name" , 15);
                     NPC.Controls(2);
                       
                        break;
                    }
                case 1:
                    {
                     NPCEngine NPC = new NPCEngine();
                     NPC.Talk("Thanks for talking to me i will leave you alone now:);
                     NPC.Options("Bye");

                     NPC.End(True);
                        break;
                    }
             default:
                    {
                     NPCEngine NPC = new NPCEngine();
                     NPC.End(true);
                        break;
                    }
            }
        }
That version of my NPC Engine used the lua scripts , the newer version is a completely new system for inter-graded and smarter and much smoother npcs. Also movable npc's that can walk around that are spawn as an entity , can wear weapons and fight back. Tho i haven't wrote that part of the NPC Engine yet i hope this gives people some advise on there server npc scripting.
i dont know anything about lua scripts lol :S
any chance you can help with the namespace definitions for it?
or anyone that can help with this?
I am looking at some lua stuff now but too tired and not reli making much sense lmao
.Beatz is offline  
Old 03/20/2010, 06:39   #23
 
ImFlamedCOD's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 141
i know i was just saying there are better ways to do npc's. The way 5165 does is not good, as stated there are exploits in them. But yea lua, or custom engine works nicely or case statements.
ImFlamedCOD is offline  
Old 03/26/2010, 16:30   #24
 
ftp4life's Avatar
 
elite*gold: 0
Join Date: Mar 2007
Posts: 130
Received Thanks: 9
okay i have put everything in the right place well i followed each step from u and nothing is happening im getting like errors saying that the npc number is invalid when im in the game
ftp4life is offline  
Old 03/27/2010, 00:52   #25
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
have you changed the NPC case number? you will need to change the case number and make the number the same in NPC.txt
if you got anymore problems post your code and the NPC from NPC.txt here and i will see whats wrong with it
.Beatz is offline  
Thanks
1 User
Old 03/29/2010, 05:29   #26
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Hey. I have a request.
I've been trying to figure this out with no success.

I want to make an NPC that talks to you, then if the character chooses a link...
the link opens the armor shop in Twin City.
Help? x_x
-NewDawn- is offline  
Old 03/29/2010, 17:08   #27
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by -NewDawn- View Post
Hey. I have a request.
I've been trying to figure this out with no success.

I want to make an NPC that talks to you, then if the character chooses a link...
the link opens the armor shop in Twin City.
Help? x_x
You still need this? coz u got your answer in another post in the discussions / questions section? if you still do need it i will work on it later as i am out atm and dont have access to my PC and cant remember exatly what packets have to be sent over.

Bump! Added Sounds for NPCs!
.Beatz is offline  
Old 04/04/2010, 02:38   #28
 
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
Quote:
Originally Posted by mattyc2580 View Post
You still need this? coz u got your answer in another post in the discussions / questions section? if you still do need it i will work on it later as i am out atm and dont have access to my PC and cant remember exatly what packets have to be sent over.
Oh, sorry- I didn't remember that I posted that. No- I was able to figure that out on my own by downloading the original source and replacing the first line. The NPC ID wasn't matching up is all.

Here are the problems I'd love for someone to help me with. They're very advanced though:

1. I still can't make it open a chat window and then go to the shop if you say "I'd like to buy something". When I say shop I mean like the Armor Shop.

2. I would like to make an NPC that disappears when you talk to it.
-NewDawn- is offline  
Old 04/04/2010, 11:56   #29
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Atually your (2nd) question well that atually that would be a nice because in the npc dialog you could out like

Code:
#region SteedRace Back
                            case 987853:
                                {
                                    if (Control == 0)
                                    {
if (World.dmV2 = true)
[COLOR=Red]me.Visable = true[/COLOR]
                                        GC.AddSend(Packets.NPCSay("Do you want to get your reward and to leave here ?"));
                                        GC.AddSend(Packets.NPCLink("Yes.", 1));
                                        GC.AddSend(Packets.NPCLink("No.", 1));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                    }
                                    if (Control == 1)
                                    {
                                        Game.World.SendMsgToAll("Server", ""+ GC.MyChar.Name + " has finished the steed race and won 200cps", 2011, 0);
                                        GC.MyChar.CPs = +200;
                                        GC.MyChar.Teleport(1002, 431, 379);
                                        GC.MyChar.StatEff.Remove(NewestCOServer.Game.StatusEffectEn.Ride);
                                    }
else
{
[COLOR=Red]Me.Visable = false[/COLOR]
                                    break;
                                }
                            #endregion
Well that WOULD be the code but whats marked in red WILL NOT WORK xP
Paralyzer[GM] is offline  
Old 04/05/2010, 01:15   #30
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by -NewDawn- View Post
Oh, sorry- I didn't remember that I posted that. No- I was able to figure that out on my own by downloading the original source and replacing the first line. The NPC ID wasn't matching up is all.

Here are the problems I'd love for someone to help me with. They're very advanced though:

1. I still can't make it open a chat window and then go to the shop if you say "I'd like to buy something". When I say shop I mean like the Armor Shop.

2. I would like to make an NPC that disappears when you talk to it.
Ok for the first question this will be very hard to write for all players as many players dont speak 100% english ad certainly dont spell in english. So to make this would need to make several variations of words and sentences before you even think about it. I would help you do this but i just think its too much hassle for what its worth. Yer maybe 1 day i will give it ago but cba to sit here for days writing words differently lol.

For the second question i will get to work on it when i wake up
But i think the easiest way to achieve that is to use a Lua Interface. I am still leanring Lua so please dont ask any questions about it lol
.Beatz is offline  
Reply


Similar Threads Similar Threads
[Release]Advanced Serverinfo.py Generator
11/30/2012 - Metin2 PServer Guides & Strategies - 13 Replies
Hello, i know there are some generators but i made another one with some good functions :rolleyes: FEATURES: *add server *remove server *save project *load project *generate serverinfo.py
Advanced Tribalwars Bot Release
05/31/2010 - Browsergames - 20 Replies
Ein Bot für das Browsergame "Die Stämme". Features: Multiaccountfähig baut Dörfer selbstständig aus Bot merkt sich, wann ein Gebäude gebaut werden kann, bzw. wann es fertiggestellt ist Information: Bei "Server" z.B. de60.die-staemme.de o.ä. eingeben.
[TUT]How to make your own Trainer ADVANCED way[TUT]
03/01/2010 - Dekaron Exploits, Hacks, Bots, Tools & Macros - 16 Replies
First of all I will like to thank trane. for letting me make this thread and and ~Kakkarot~ for making the basic way on how to make a trainer. In this tutorial I will show you how to make a trainer and adding pictures, text, commands, buttons, etc... Ok so the things you need: Cheat Engine 5.5 Your hacks which can be made by following the steps:



All times are GMT +1. The time now is 01:36.


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.