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.
------ 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?)
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.
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
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;