- Code: Select all
public class Infect : Item
{
public override string Name
{
get
{
return "Infect";
}
}
public override int ListPosition
{
get
{
return 14;
}
}
public override int GetAmount(Player p)
{
return 1;
}
public override int GetPrice(Player p)
{
return 450;
}
public override bool GetIsListed(Player p)
{
return true;
}
public override string GetDescription(Player p)
{
return " - turns you into a zombie,";
}
public override string GetHelp(Player p)
{
return "If you buy this item you will change to a zombie.";
}
public override bool OnBuying(Player p)
{
if (p.isZombie)
{
Player.SendMessage(p, "You are already a zombie. You don't need to infect yourself again.");
return false;
}
if (InfectionSystem.InfectionUtils.EndTime.Subtract(DateTime.Now).TotalMinutes > 6)
{
Player.SendMessage(p, "It's too early to get disinfected.");
return false;
}
return true;
}
public override void OnBought(Player p)
{
InfectionSystem.InfectionSystem.infected.Add(p);
InfectionSystem.InfectionSystem.notInfected.Remove(p);
Player.GlobalMessageLevel(InfectionSystem.InfectionSystem.currentInfectionLevel, p.PublicName + "%c has chosen te betray his team.!");
InfectionSystem.InfectionSystem.DisplayHumansLeft();
}
}
Place this into /scripts/ZombieStoreItems.cs before the last } bracket.
Delete the .DLL in the script/dll folder.
Restart server.
Have fun killing your team mates
The 450 is the price.