Register for your free account! | Forgot your password?

You last visited: Today at 01:35

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

Advertisement



NpcDialog.cs

Discussion on NpcDialog.cs within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2011
Posts: 10
Received Thanks: 0
NpcDialog.cs

Hey, Ive been trying to change what an NPC's is saying and what it gives, so I go to NpcDialog.cs with Visual C and changed from;

#region CPAdmin
case 1234:
{
if (option == 0)
{
OptionText("Hello, I can trade you 215 CPs for a DragonBall and 2150 CPs for a DBScroll.", GC);
OptionLink("Here, take my DragonBall!", 1, GC);
OptionLink("Here, take my DBScroll!", 2, GC);
OptionLink("1kk silver for (5k cps)", 5, GC);
OptionLink("I'm too poor..., Bye.", 255, GC);
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (option == 5)
{
if (GC.MyChar.Silvers >= 500000)
{
GC.MyChar.Silvers -= 500000;
GC.MyChar.CPs += 5000;
GC.AddSend(Packets.NPCSay("You have got 10k cps say thanks to Conquer-Sx"));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

TO;

#region CPAdmin
case 1234:
{
if (option == 0)
{
OptionText("Hello, I can trade you 215 CPs for a DragonBall and 2150 CPs for a DBScroll.", GC);
OptionLink("Here, take my DragonBall!", 1, GC);
OptionLink("Here, take my DBScroll!", 2, GC);
OptionLink("1kk silver for (10k cps)", 5, GC);
OptionLink("I'm too poor..., Bye.", 255, GC);
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
else if (option == 5)
{
if (GC.MyChar.Silvers >= 1000000)
{
GC.MyChar.Silvers -= 1000000;
GC.MyChar.CPs += 10000;
GC.AddSend(Packets.NPCSay("You have got 10k cps say thanks to Conquer-Sx"));
GC.AddSend(Packets.NPCLink("Thanks.", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

Then I save the .cs file and starting the server, but the NPC is saying the same thing, and gives the same amount of CPS for the silver, that will say 5k cps for 500k silver.

Is there another file I need to edit?
Tjix is offline  
Old 07/20/2011, 01:35   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 168
Received Thanks: 33
Your opening the file itself rather than the project.

.csproj
zTek is offline  
Old 07/20/2011, 01:36   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
You need to download C# and then build the file. Pressing F6 or F5 for debugging it as well.
BaussHacker is offline  
Old 07/20/2011, 01:41   #4
 
elite*gold: 0
Join Date: Jun 2011
Posts: 10
Received Thanks: 0
There are no npcdialog.csproj, but I came over something with pressing F5 and F6 to rebuild but when I try to, it wont rebuild.
Tjix is offline  
Old 07/20/2011, 01:42   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
Getting any errors?
BaussHacker is offline  
Old 07/20/2011, 01:44   #6
 
elite*gold: 0
Join Date: Jun 2011
Posts: 10
Received Thanks: 0
Nothing, when I go debug the text and highlights are grey. I can't even debug.

I will play arround a little with C#, try to build, debug and so on. Will post my results here.
Tjix is offline  
Old 07/20/2011, 01:55   #7
 
elite*gold: 0
Join Date: Jun 2011
Posts: 10
Received Thanks: 0
------ Build started: Project: ConquerSx, Configuration: Debug Any CPU ------
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\PacketHandling\NPCDialog.cs(11396 ,5): error CS0103: The name 'Control' does not exist in the current context
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\PacketHandling\NPCDialog.cs(11407 ,5): error CS0103: The name 'Control' does not exist in the current context
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\PacketHandling\NPCDialog.cs(11414 ,5): error CS0103: The name 'Control' does not exist in the current context
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\PacketHandling\NPCDialog.cs(11416 ,5): error CS1501: No overload for method 'InventoryContains' takes 2 arguments
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\Game\Character.cs(4773,21): (Related location)
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\PacketHandling\NPCDialog.cs(11418 ,32): error CS1061: 'ConquerSx.Game.Character' does not contain a definition for 'NextItem' and no extension method 'NextItem' accepting a first argument of type 'ConquerSx.Game.Character' could be found (are you missing a using directive or an assembly reference?)
C:\Users\Tjix\Desktop\csosourcebest rör ej\csosourcebest\Game\Mob.cs(263,58): error CS1061: 'ConquerSx.Game.Character' does not contain a definition for 'HunterName' and no extension method 'HunterName' accepting a first argument of type 'ConquerSx.Game.Character' could be found (are you missing a using directive or an assembly reference?)

Compile complete -- 6 errors, 0 warnings
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Tjix is offline  
Old 07/20/2011, 02:52   #8
 
elite*gold: 0
Join Date: May 2011
Posts: 168
Received Thanks: 33
Quote:
Originally Posted by Tjix View Post
There are no npcdialog.csproj, but I came over something with pressing F5 and F6 to rebuild but when I try to, it wont rebuild.
The reason it's not building is because you aren't opening the project. I'm assuming your using ncos considering you mentioned npcdialog.cs. So you need to open NewestCOServer.csproj.
zTek is offline  
Old 07/20/2011, 09:40   #9
 
elite*gold: 0
Join Date: Jun 2011
Posts: 10
Received Thanks: 0
I was opening the .csproj but it got me errors when I tryed to Debug, but it's all fixed. Thanks for your help!
Tjix is offline  
Old 08/10/2011, 02:14   #10
 
XMasterrrr's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 357
Received Thanks: 250
Quote:
Originally Posted by Tjix View Post
I was opening the .csproj but it got me errors when I tryed to Debug, but it's all fixed. Thanks for your help!
how did you fix this error?

Quote:
Error 1 'ConquerSx.Game.Character' does not contain a definition for 'HunterName' and no extension method 'HunterName' accepting a first argument of type 'ConquerSx.Game.Character' could be found (are you missing a using directive or an assembly reference?) G:\Games\Conquer Private Server\5165\csosourcebest\csosourcebest\Game\Mob.c s 263
XMasterrrr is offline  
Old 08/14/2011, 15:51   #11
 
elite*gold: 0
Join Date: Oct 2010
Posts: 1
Received Thanks: 0
how did you fix the .HunterName error?

can any1 tell me, i've been struggling with this for a few weeks now, and still couldnt fix it..

greetz
kristijn is offline  
Old 02/25/2013, 23:03   #12
 
elite*gold: 0
Join Date: Jun 2010
Posts: 9
Received Thanks: 0
I have the same problem please how you fix it?
george155922 is offline  
Old 02/25/2013, 23:51   #13
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 946
Quote:
Originally Posted by george155922 View Post
I have the same problem please how you fix it?
Debug / Build or Rebuild.
Super Aids is offline  
Reply


Similar Threads Similar Threads
Question about (case) in coding NPCDialog!
04/05/2011 - CO2 Private Server - 17 Replies
Hello, What case means?? and how do I know the exact number of case I should type? For example, for Barber NPC, it's: #region Barber case 10002: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Would you like to change your hairstyle? I can offer you a change for 500 silvers. You can choose from the styles...
Hi I got little Problems here at 5165 source(NPCDialog.cs)
09/16/2010 - CO2 Private Server - 3 Replies
#region Gw Winner npc case 8888: { if (Control == 0) { GC.AddSend(Packets.NPCSay("Hello if you win guild war you can recive good prizes!")); GC.AddSend(Packets.NPCSay("I Can Give You 100k Cps For Wining!!")); GC.AddSend(Packets.NPCLink("My...
npcdialog (5018)
08/01/2010 - CO2 Private Server - 5 Replies
does this look right for npc dialog? (arco's) case 333333://test id { if (Client.Money >= 100) { dialog(Client, new string { "AVATAR 30", "TEXT You got 100Silvers",
Npcdialog
06/19/2010 - CO2 Private Server - 0 Replies
Helo all i am working on 5180 source i aded mobs spawn some more futures,now i wan add npc dialog not from cq_acion but normal like in coemu etc,but i stacket can any one help my?
NPCDialog.cs (LOTF v5017)
04/08/2010 - CO2 PServer Guides & Releases - 15 Replies
This is old... Replace case 2031 and case 2032 (in client.cs) with these case 2031: { MyChar.Ready = false; int NPCID = (Data << 24) + (Data << 16) + (Data << 8) + Data;



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


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.