Register for your free account! | Forgot your password?

You last visited: Today at 12:28

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

Advertisement



[Request/Help]

Discussion on [Request/Help] within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2007
Posts: 59
Received Thanks: 0
[Request/Help]

I realize that I'm garbage at figuring these things out, but could/would anyone tell me where to edit what the NPCs say when you click on them? anyone?
stiggydude is offline  
Old 12/14/2008, 07:57   #2
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
open client.cs and search for example : if (CurrentNPC == 1010)
there you will see all the npc and what they say
+k if it helped you
turk55 is offline  
Thanks
1 User
Old 12/14/2008, 08:48   #3
 
elite*gold: 0
Join Date: Jul 2007
Posts: 59
Received Thanks: 0
Yea I've done that but how does it take affect, I've edited what they say but all I'm doing is restarting server and nothing happens. any idea what to do?
stiggydude is offline  
Old 12/14/2008, 10:03   #4
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
First, you'll need to enter the MySql Database. In there, create a new NPC. You'll want to set flags to 2, and provide a mesh of your liking. The direction should be between 0-7, this will of course determine the direction the NPC is facing. Make sure to take note of the UID. You can make any UID you wish, but I myself tend to make the number following the last in my list to avoid getting errors from duplicate UID's.

Here is an example of the NPC direction, to help you avoid trial and error on a regular basis.
Ignore how ugly it is, I'm not trying to win an art show here.



Now onto the actual coding. There are two locations you'll always have to add the code for an NPC, and both locations are found in the Client.cs
If you want to find these locations easy, take an NPC UID from your MySql Database, go into the source, press ctrl+h and enter...

Code:
if (CurrentNPC == UID)
Of course replace UID with the actual UID.

Now you need to come up with the opening speach for when you press your NPC. Here I'll make a simple example.

Code:
if (CurrentNPC == 119928)
{
     SendPacket(General.MyPackets.NPCSay("Hi, I'm the example NPC.")); [COLOR="seagreen"]//simply what the NPC says.//Opening speach, but not enough, we need options.[/COLOR]
     SendPacket(General.MyPackets.NPCLink("Really?", [COLOR="Blue"]1[/COLOR])); [COLOR="seagreen"]//the number at the end in blue is the control number. Whenever you create an option, you need a control number to access the next window.[/COLOR]
     SendPacket(General.MyPackets.NPCLink("Sorry!", [COLOR="Blue"]255[/COLOR])); [COLOR="seagreen"]//control 255 automatically closes the window.[/COLOR]
     SendPacket(General.MyPackets.NPCSetFace(30)); [COLOR="seagreen"]//the NPC face, not required, but nice to have.[/COLOR]
     SendPacket(General.MyPackets.NPCFinish()); [COLOR="seagreen"]//ends the options for the npc.
}[/COLOR]

Now you could always get a bit more spiffy with it if you want, giving 2 possible openings for the NPC. This is handy when making an NPC for something like marriage, or divorce, getting reborn, etc...

I'll make this example like a cheap rb npc.

Code:
if (CurrentNPC == 10101010)
{
   if (MyChar.RBCount >1)
   {
      SendPacket(General.MyPackets.NPCSay("You can't get first reborn two times moron."));
      SendPacket(General.MyPackets.NPCLink("Sorry", 255));
      SendPacket(General.MyPackets.NPCSetFace(30));
      SendPacket(General.MyPackets.NPCFinish());
   }
   else
   {
      If (MyChar.Level >=120
      {
            SendPacket(General.MyPackets.NPCSay("Want to get reborn? Then give me a CelestialStone"));
            SendPacket(General.MyPackets.NPCLink("Take it, just make me a noob again.", 1));
            SendPacket(General.MyPackets.NPCLink("No way, I worked hard for this stone.", 255));
            SendPacket(General.MyPackets.NPCSetFace(30));
            SendPacket(General.MyPackets.NPCFinish());
      }
   }
}
See... Simple enough. Now to add the controls. Go to the NPC below the one you made, highlight it's UID line, press ctrl+h again, hit enter, and bam, you're down in the controls section to place your controls (that is of course if the NPC you just did that with is complete, lol). Now, it starts like the other code, but works a bit different.

Code:
if (CurrentNPC == 119928)
{
    if (Control == 1) [COLOR="SeaGreen"]//Remember the control you added to the option? Here it is at work...[/COLOR]
    {
           SendPacket(General.MyPackets.NPCSay("Yes, I am the example NPC."));
           SendPacket(General.MyPackets.NPCLink("For real?", 5));
           SendPacket(General.MyPackets.NPCLink("Liar, Goodbye.", 255));
           SendPacket(General.MyPackets.NPCSetFace(30));
           SendPacket(General.MyPackets.NPCFinish());
    }
    if (Control == 5)
    {
           SendPacket(General.MyPackets.NPCSay("Yes, I'll prove it... Bring me Meteor, and I'll give you a MeteorTear"));
           SendPacket(General.MyPackets.NPCLink("Give me a meteor.", 7));
           SendPacket(General.MyPackets.NPCLink("BS, I'm out of here.", 255));
           SendPacket(General.MyPackets.NPCSetFace(30));
           SendPacket(General.MyPackets.NPCFinish());
    }
    if (Control == 7)
    {
           if (MyChar.InventoryContains(ItemID, 1))
           {
                  MyChar.RemoveItem(MyChar.ItemNext(ItemID));
                  MyChar.AddItem("ItemID-0-0-0-0-0", 0, (uint)General.Rand.Next(263573635));
           }
           else
           {
                   SendPacket(General.MyPackets.NPCSay("How stupid do you think I am? Think you can cheat me that easy?"));
                   SendPacket(General.MyPackets.NPCLink("Sorry o.o", 255));
                   SendPacket(General.MyPackets.NPCSetFace(30));
                   SendPacket(General.MyPackets.NPCFinish());
            }
    }
}
Now there are a large variety of options that can be given of course, but I'm not exactly going to post them all... This is just to give a rough idea. Hope it helps some, if it doesn't not much else I can do.
Incariuz is offline  
Old 12/14/2008, 10:23   #5
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
he had it about changing what a npc says not making 1 lol
turk55 is offline  
Old 12/14/2008, 10:30   #6
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
Ah, well I misread, w/e... ><

The answer is in what I just posted anyway.

Aside from that... Make sure you're making the changes in visual studio, and build the solution once done, otherwise it won't take effect.
Incariuz is offline  
Old 12/14/2008, 12:07   #7
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
Quote:
Originally Posted by Incariuz View Post
Ah, well I misread, w/e... ><

The answer is in what I just posted anyway.

Aside from that... Make sure you're making the changes in visual studio, and build the solution once done, otherwise it won't take effect.

ive told him that ^^
turk55 is offline  
Reply


Similar Threads Similar Threads
[Request]ZeroTolerance Dekaron Admin Request
02/21/2010 - Dekaron Private Server - 1 Replies
We need Staff Members ~EDITED~
[REQUEST] speak freakin english -_- florensi hack [REQUEST]
01/22/2010 - Florensia - 1 Replies
any florensia hacks?
[REQUEST]5165 Client Request Help/ Question
12/18/2009 - CO2 Private Server - 5 Replies
hey yall its me TheLeGend Im Back in CO for a while but i gots a question ok so i have a 5165 Client im editing for a server but the only problem is that stupid-ass popup page that comes up the Conquer Online - Official Site - co.91.com one well i was just wondering how can i edit that site orrr how can i make it not popup anymore??? Thanks so Much, TheLeGend209



All times are GMT +2. The time now is 12:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.