You last visited: Today at 01:35
Advertisement
Help?
Discussion on Help? within the CO2 Private Server forum part of the Conquer Online 2 category.
12/30/2013, 03:01
#1
elite*gold: 0
Join Date: Nov 2013
Posts: 3
Received Thanks: 0
Help?
So I'm new to this PServer stuff and I used a sample MessiV10 source (which is horrible but whatever, I don't know how to edit the other sources or even install them so yeah.) Anyways, I'm trying to edit what the NPC's say. I found the NPCS file in my source folder. I open the project and edit what it says but I get an error message "a namespace cannot directly contain members case." The current thing looks like this:
#region Vip Seller
case 9295:
{
switch (npcRequest.OptionID)
{
case 0:
{
if (client.Entity.VIPLevel == 6)
{
dialog.Text("your Are already VIP 6.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
break;
}
dialog.Text("Hay i will upgrade your VIP for cps");
dialog.Option("[VIP 1] 20k cps.", 1);
dialog.Option("[VIP 2] 20k cps.", 2);
dialog.Option("[VIP 3] 15k cps.", 3);
dialog.Option("[VIP 4] 30k cps.", 4);
dialog.Option("[VIP 5] 15k cps.", 5);
dialog.Option("[VIP 6] 20k cps.", 6);
dialog.Option("Just passing by.", 255);
dialog.Avatar(116);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.VIPLevel == 0 && client.Entity.VIPLevel < 1)
{
if (client.Entity.ConquerPoints >= 20000)
{
client.Entity.ConquerPoints -= 20000;
client.Entity.VIPLevel = 1;
}
else
{
dialog.Text("Please take 20k cps.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 2:
{
if (client.Entity.VIPLevel == 1)
{
if (client.Entity.ConquerPoints >= 20000)
{
client.Entity.ConquerPoints -= 20000;
client.Entity.VIPLevel = 2;
}
else
{
dialog.Text("Please take 20k cps.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 3:
{
if (client.Entity.VIPLevel == 2)
{
if (client.Entity.ConquerPoints >= 15000)
{
client.Entity.ConquerPoints -= 15000;
client.Entity.VIPLevel = 3;
}
else
{
dialog.Text("Please take 15k cps.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 4:
{
if (client.Entity.VIPLevel == 3)
{
if (client.Entity.ConquerPoints >= 30000)
{
client.Entity.ConquerPoints -= 30000;
client.Entity.VIPLevel = 4;
}
else
{
dialog.Text("Please take 150k cps.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 5:
{
if (client.Entity.VIPLevel == 4)
{
if (client.Entity.ConquerPoints >= 15000)
{
client.Entity.ConquerPoints -= 15000;
client.Entity.VIPLevel = 5;
}
else
{
dialog.Text("Please take 15k cps.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
case 6:
{
if (client.Entity.VIPLevel == 5)
{
if (client.Entity.ConquerPoints >= 20000)
{
client.Entity.ConquerPoints -= 20000;
client.Entity.VIPLevel = 6;
}
else
{
dialog.Text("Please take 20k cps.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
}
else
{
dialog.Text("Sorry Can't upgrade any more.");
dialog.Option("I see.", 255);
dialog.Avatar(116);
dialog.Send();
}
break;
}
}
break;
}
#endregion
Honestly, it has so many NPCs that I simply just want to remove. I edited the ones that I wanted to but when I press F5 this error shows up and it won't save. Yes, sorry I don't know how to code but I can't find a server that has low rates and no OP donations that's updated with an English speaking community so I resort to this. Any help would be great. I don't need criticism.
12/30/2013, 03:08
#2
elite*gold: 0
Join Date: Mar 2010
Posts: 183
Received Thanks: 74
Honestly, like you said, its horrible. You will probably want to look into some of the other sources on this forum.
I'd recommend:
ProjectX by Super Aids
Sorry to say it but that's the truth about this source, you might as well start with a different one to avoid having to do it later after you've worked on it for a while.
12/30/2013, 17:50
#3
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
That is your very own fault for using it.
01/06/2014, 05:06
#4
elite*gold: 0
Join Date: Dec 2013
Posts: 4
Received Thanks: 0
you can modify this pretty easy to fit your needs.
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("I can trade you some items in exchange for some treasure points. I see you have " + client.Entity.TreasuerPoints + " treasure points");
dialog.Option("VIP Levels", 1);
dialog.Option("ConquerPoints", 8);
dialog.Send();
break;
}
case 1:
{
dialog.Text("Select your VIP level. I see you have " + client.Entity.TreasuerPoints + " treasure points");
dialog.Option("VIP 1 (500)", 2);
dialog.Option("VIP 2 (1000)", 3);
dialog.Option("VIP 3 (1600)", 4);
dialog.Option("VIP 4 (2600)", 5);
dialog.Option("VIP 5 (3500)", 6);
dialog.Option("VIP 6 (4500)", 7);
dialog.Send();
break;
}
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
{
int currentVip = npcRequest.OptionID - 2;
int nextVip = npcRequest.OptionID - 1;
if (client.Entity.VIPLevel != currentVip)
{
dialog.Text("You need to be VIP level " + currentVip + "!");
dialog.Option("Ah.", 255);
dialog.Send();
return;
}
uint cost = 500;
if (nextVip == 2) cost = 1000;
else if (nextVip == 3) cost = 1600;
else if (nextVip == 4) cost = 2600;
else if (nextVip == 5) cost = 3500;
else if (nextVip == 6) cost = 4500;
if (client.Entity.TreasuerPoints >= cost)
{
client.Entity.TreasuerPoints -= cost;
client.Entity.VIPLevel = (byte)nextVip;
dialog.Text("Congratulations. You bought VIP level " + nextVip + " for " + cost + " treasure points.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You need more treasure points.");
dialog.Option("Ahh..", 255);
dialog.Send();
}
break;
}
case 8:
{
dialog.Text("Select ConquerPoints packs. I see you have " + client.Entity.TreasuerPoints + " treasure points");
dialog.Option("500KPack (2500)", 9);
dialog.Option("750KPack (3750)", 10);
dialog.Option("1KKPack (5000)", 11);
dialog.Send();
break;
}
case 9:
case 10:
case 11:
{
uint cost = 2500;
if (npcRequest.OptionID == 10) cost = 3750;
else if (npcRequest.OptionID == 11) cost = 5000;
uint cps = 500000;
if (npcRequest.OptionID == 10) cps = 750000;
else if (npcRequest.OptionID == 11) cps = 1000000;
if (client.Entity.TreasuerPoints >= cost)
{
client.Entity.TreasuerPoints -= cost;
client.Entity.ConquerPoints += cps;
dialog.Text("Congratulations. You bought " + cps + " ConquerPoints for " + cost + " treasure points.");
dialog.Option("Thank you.", 255);
dialog.Send();
}
else
{
dialog.Text("You need more treasure points.");
dialog.Option("Ahh..", 255);
dialog.Send();
}
break;
}
}
break;
}
All times are GMT +2. The time now is 01:36 .