Help?

12/30/2013 03:01 sfkwuya#1
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:


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 .Light#2
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
[Only registered and activated users can see links. Click Here To Register...]

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 turk55#3
That is your very own fault for using it.
01/06/2014 05:06 eshemaun2#4
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;
}