Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 00:45

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

Advertisement



[HELP]Calling an NPC dialog from inside a current NPC [5375]

Discussion on [HELP]Calling an NPC dialog from inside a current NPC [5375] within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
devilsmum's Avatar
 
elite*gold: 0
Join Date: Jun 2006
Posts: 899
Received Thanks: 479
[HELP]Calling an NPC dialog from inside a current NPC [5375]

I have been trying to call another NPCs dialog from within the current NPC. i.e

NPC1

Code:
case 001:
{
	switch (npcRequest.OptionID)
	{
		case 0:
		{
			dialog.Text("Hello, I can teleport you to the market for free. Would you like me to?");
			dialog.Option("Yes Please", 1);
			dialog.Option("No Thanks", 255);	
			dialog.Send();
			break;
		}
		case 1:
		{
			// Calls the NPC 002
		}
	}
	break;
}
NPC2

Code:
case 002:
{
	switch (npcRequest.OptionID)
	{
		case 0:
		{
			client.Entity.teleport(1036, 500, 500);
			break;
		}
	}
	break;
}
So for examples sake, I want the first NPC (001) to call the second NPC (002) when case 1 is initiated.

Now the namespace of the file is NpcDialogs and the class is Dialogs. The method which gets the dialogs is called GetDialog which has two variables, NpcRequest npcRequest and GameState client.

I have tried switching the active NPC to the new NPC, i.e client.ActiveNPC = 002;

Any help would be much appreciated as I have less time to work on the source since University has started.
devilsmum is offline  
Old 10/10/2011, 17:48   #2
 
pwerty's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
You have to build npc dialog packet. and pass the npcdialogID(2 or 002?) with dialogID 0!
pwerty is offline  
Old 10/10/2011, 17:51   #3
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,223
Received Thanks: 867
Why are you linking to another npc to teleport in the firtst place?

#edit

Impulse's source requires alot of modifications for its NPCSystem as I found out, as it is I was unable to do what your trying to achieve. I just invented my own npc system to make it alot easier.
_DreadNought_ is offline  
Old 10/10/2011, 18:02   #4
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
You could just pretend like you are.
Change the avatar and you're done. You can also just make an npc packet using the other one's id... or make a path finding packet that triggers the next npc if it's out-of-screen.
Spirited is offline  
Old 10/10/2011, 18:39   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,376
Alternatively...

Set client last npc used to the new npc id and then just re-call the useNPC method using the new npcid and linkback 0.

Don!
pro4never is offline  
Old 10/10/2011, 19:30   #6
 
devilsmum's Avatar
 
elite*gold: 0
Join Date: Jun 2006
Posts: 899
Received Thanks: 479
Quote:
Originally Posted by _DreadNought_ View Post
Why are you linking to another npc to teleport in the firtst place?
It was for examples sake, I don't really want it for something as trivial as that :P


@everyone: I will try what you recommend and come back with results.

Thanks
devilsmum is offline  
Reply


Similar Threads Similar Threads
NPC Dialog
06/14/2010 - Flyff Private Server - 3 Replies
Hallo ElitePvPers, Ich wuerde gerne wissen wie ich den Dialog von NPC's aendern kann. Z.b weiss ich das wenn ich den Dialog von Isruel aendern will, muss ich eine Datei oeffnen die "MaFl_Isruel.txt". Ich finde dieses .txt leider nirgendwo und frage euch nun, koennt ihr mir helfen mit dem problem? Bitee bitee bitee!! XD
NPC Dialog
12/12/2009 - CO2 Private Server - 6 Replies
Can anyone tell me what its wrong with this for some reason it is not working =\ This is for 5165 FTW! #region TOP TRO PK TOURNEY case 2772: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Hey there i hold every Class PK Tournament for Trojans, Warriors, Ninjas, Taoists And Archers, So Tell me your Class so i can...
[HELP] Where is the NPC Dialog?
09/15/2009 - CO2 Private Server - 3 Replies
I'm copying and pasting codes and it says to go to NPC Dialog but I don't know where that is, can you help me find it?
Help me please i need Dialog.ini
08/18/2008 - Conquer Online 2 - 0 Replies
Hi all, i have a private server CO 2 and i want the file: Dialog.ini of NPCsStuff Because some npc. Ej: ArcherGod, he change your class, and all the npc that changes the class to you, nobody of those can speak. Please say me some download of Dialog.ini or say me the information of they. -edit- I want the npc to learn skills please
[coding] Making a dialog show inside of CO process
05/15/2007 - Conquer Online 2 - 0 Replies
i have done this alot before in time, but when i try to do it with Conquer nothing appears.. my dll gets injected into the process and all. just nothing appears. any ideas suggestions are welcome, ty :) im doing this in c/c++ btw



All times are GMT +2. The time now is 00:45.


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.