NpcDialog.cs

07/20/2011 00:49 Tjix#1
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?
07/20/2011 01:35 zTek#2
Your opening the file itself rather than the project.

.csproj
07/20/2011 01:36 BaussHacker#3
You need to download C# and then build the file. Pressing F6 or F5 for debugging it as well.
07/20/2011 01:41 Tjix#4
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.
07/20/2011 01:42 BaussHacker#5
Getting any errors?
07/20/2011 01:44 Tjix#6
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.
07/20/2011 01:55 Tjix#7
------ 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 ==========
07/20/2011 02:52 zTek#8
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.
07/20/2011 09:40 Tjix#9
I was opening the .csproj but it got me errors when I tryed to Debug, but it's all fixed. Thanks for your help!
08/10/2011 02:14 XMasterrrr#10
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
08/14/2011 15:51 kristijn#11
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
02/25/2013 23:03 george155922#12
I have the same problem please how you fix it?
02/25/2013 23:51 Super Aids#13
Quote:
Originally Posted by george155922 View Post
I have the same problem please how you fix it?
Debug / Build or Rebuild.