Hey guys so on my server I recently noticed normal players with crowns and figured out that you can /spawn vault chest and put uts in it for normal players to take... Soooooo to fix this issue it's pretty simple! Just go to wServer/realm/commands/AdminCommands.cs and find SpawnCommand.
Then go to this part:
Code:
string name = string.Join(" ", args.Skip(1).ToArray());
ushort objType;
//creates a new case insensitive dictionary based on the XmlDatas
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(
player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out objType) ||
!player.Manager.GameData.ObjectDescs.ContainsKey(objType))
{
player.SendInfo("Unknown entity!");
return false;
}
Add this line:
Code:
if (name == "vault chest")
{
player.SendError("Cannot spawn this object!");
return false;
}
So it should now look like:
Code:
string name = string.Join(" ", args.Skip(1).ToArray());
ushort objType;
//creates a new case insensitive dictionary based on the XmlDatas
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(
player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (name == "vault chest")
{
player.SendError("Cannot spawn this object!");
return false;
}
if (!icdatas.TryGetValue(name, out objType) ||
!player.Manager.GameData.ObjectDescs.ContainsKey(objType))
{
player.SendInfo("Unknown entity!");
return false;
}
Finally find this part:
Code:
else
{
string name = string.Join(" ", args);
ushort objType;
//creates a new case insensitive dictionary based on the XmlDatas
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(
player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out objType) ||
!player.Manager.GameData.ObjectDescs.ContainsKey(objType))
{
player.SendHelp("Usage: /spawn <entityname>");
return false;
}
And add the same line from earlier so it looks like this:
Code:
else
{
string name = string.Join(" ", args);
if (name == "vault chest")
{
player.SendError("Cannot spawn this object!");
return false;
}
ushort objType;
//creates a new case insensitive dictionary based on the XmlDatas
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(
player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out objType) ||
!player.Manager.GameData.ObjectDescs.ContainsKey(objType))
{
player.SendHelp("Usage: /spawn <entityname>");
return false;
}
That's all! Hope you find this helpful (: