I am just going to post a bunch of stuff lying around in my computer of stuff that might help anyone struggling in making behaviors or with understanding the source itself
I was planning on just making a YouTube series on everything just so I can cover everything and just record on the very small amount of free time I have now-a-days but my computer isn't the best

but anyways I hope this little file will help and if there is any other source you want me to cover or anything in particular that you are having a hard time finding out just ask and I will try to make a template or explain it here
if your asking whats taking so long to post everything....I am making everything into either a template that you can use and learn from or I am thinking of a way to add it and getting all the compatibility patches you will need to make this work
Before you ask me make sure to look around the forums there is tons of tutorials that can help you
Someone requested how to add skins so here is the skins xml for the nilly realm skins currently in the swf
IF YOU DON'T KNOW HOW TO DE-COMPILE A SWF THEN PLEASE GO TO THE NOOB SECTION OF THE FORUMS
If your having difficulties adding the skins these threads can help with whatever questions you have
http://www.mpgh.net/forum/showthread...highlight=Skin
http://www.mpgh.net/forum/showthread...highlight=Skin
You can download Skins on gitub
Skins
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>40</Index>
</AnimatedTexture>
<PlayerClassType>0x0326</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>43</Index>
</AnimatedTexture>
<PlayerClassType>0x031e</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>45</Index>
</AnimatedTexture>
<PlayerClassType>0x0321</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>61</Index>
</AnimatedTexture>
<PlayerClassType>0x030e</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>62</Index>
</AnimatedTexture>
<PlayerClassType>0x0324</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>63</Index>
</AnimatedTexture>
<PlayerClassType>0x0320</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>45</Index>
</AnimatedTexture>
<PlayerClassType>0x0321</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>64</Index>
</AnimatedTexture>
<PlayerClassType>0x0323</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>65</Index>
</AnimatedTexture>
<PlayerClassType>0x0300</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>66</Index>
</AnimatedTexture>
<PlayerClassType>0x031f</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>69</Index>
</AnimatedTexture>
<PlayerClassType>0x031d</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
</Object>
<Object type="0xADDTYPEHERE" id="ADD NAME HERE">
<Skin/>
<Class>Skin</Class>
<AnimatedTexture>
<File>playerskins</File>
<Index>87</Index>
</AnimatedTexture>
<PlayerClassType>0x0325</PlayerClassType>
<UnlockSpecial>DESCRIPTION</UnlockSpecial>
<DisplayId>{skins.NAMEHERE}</DisplayId>
</Object>
DO NOT COPY!!!!! THIS IS ONLY PART 1 (Github has download for this part)
Gold and Fame Part 1...The Template
<Object type="0x66666" id="blahblahblah">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>blahblahblah</File>
<Index>0xnumber</Index>
</Texture>
<SlotType>0</SlotType>
<Description>blahblahblah</Description>
<Sound>use_potion</Sound>
<Activate amount="666">AddGold</Activate>
<Consumable/>
<BagType>666</BagType>
<feedPower>666</feedPower>
<DisplayId>blahblahblah</DisplayId>
</Object>
<Object type="0x66666" id="blahblahblah">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>blahblahblah</File>
<Index>0xnumber</Index>
</Texture>
<SlotType>0</SlotType>
<Description>blahblahblah</Description>
<Sound>use_potion</Sound>
<Activate amount="666">AddFame</Activate>
<Consumable/>
<BagType>666</BagType>
<feedPower>666</feedPower>
<DisplayId>blahblahblah</DisplayId>
</Object>
Gold and Fame Part 2...The Player.UseItem.cs
public static void ActivateAddGold(Player player, int amount, List<Packet> pkts)
{
var db = new Database();
db.UpdateCredit(player.Client.Account, amount);
player.UpdateCount++;
}
public static void ActivateAddFame(Player player, int amount, List<Packet> pkts)
{
var db = new Database();
db.UpdateFame(player.Client.Account, amount);
player.UpdateCount++;
}
Gold and Fame Part 3...Descriptors.cs
public enum ActivateEffects
{
Shoot,
StatBoostSelf,
StatBoostAura,
BulletNova,
ConditionEffectAura,
ConditionEffectSelf,
Heal,
HealNova,
AddGold,
AddFame,
Magic,
MagicNova,
Teleport,
VampireBlast,
Trap,
StasisBlast,
Decoy,
Lightning,
PoisonGrenade,
RemoveNegativeConditions,
RemoveNegativeConditionsSelf,
IncrementStat,
Pet,
PermaPet,
Create,
UnlockPortal,
DazeBlast,
ClearConditionEffectAura,
ClearConditionEffectSelf,
Dye,
CreatePet,
ShurikenAbility,
UnlockSkin,
MysteryPortal,
GenericActivate
}
Pally Hp Glitch Fix Part 1...Descriptors.cs @@noStack
public class ActivateEffect
{
public ActivateEffect(XElement elem)
{
CultureInfo ci = (CultureInfo) CultureInfo.CurrentCulture.Clone();
ci.NumberFormat.CurrencyDecimalSeparator = ".";
Effect = (ActivateEffects) Enum.Parse(typeof (ActivateEffects), elem.Value);
if (elem.Attribute("stat") != null)
Stats = Utils.FromString(elem.Attribute("stat").Value);
if (elem.Attribute("amount") != null)
Amount = Utils.FromString(elem.Attribute("amount").Value);
if (elem.Attribute("range") != null)
Range = float.Parse(elem.Attribute("range").Value, NumberStyles.Any, ci);
if (elem.Attribute("duration") != null)
{
DurationSec = float.Parse(elem.Attribute("duration").Value, NumberStyles.Any, ci);
DurationMS = (int)(DurationSec * 1000);
}
if (elem.Attribute("duration2") != null)
DurationMS2 = (int) (float.Parse(elem.Attribute("duration2").Value, NumberStyles.Any, ci)*1000);
if (elem.Attribute("effect") != null)
ConditionEffect =
(ConditionEffectIndex) Enum.Parse(typeof (ConditionEffectIndex), elem.Attribute("effect").Value);
if (elem.Attribute("condEffect") != null)
ConditionEffect =
(ConditionEffectIndex) Enum.Parse(typeof (ConditionEffectIndex), elem.Attribute("condEffect").Value);
if (elem.Attribute("condDuration") != null)
EffectDuration = float.Parse(elem.Attribute("condDuration").Value, NumberStyles.Any, ci);
if (elem.Attribute("maxDistance") != null)
MaximumDistance = Utils.FromString(elem.Attribute("maxDistance").Value);
if (elem.Attribute("radius") != null)
Radius = float.Parse(elem.Attribute("radius").Value, NumberStyles.Any, ci);
if (elem.Attribute("totalDamage") != null)
TotalDamage = Utils.FromString(elem.Attribute("totalDamage").Value);
if (elem.Attribute("objectId") != null)
ObjectId = elem.Attribute("objectId").Value;
if (elem.Attribute("angleOffset") != null)
AngleOffset = Utils.FromString(elem.Attribute("angleOffset").Value);
if (elem.Attribute("maxTargets") != null)
MaxTargets = Utils.FromString(elem.Attribute("maxTargets").Value);
if (elem.Attribute("id") != null)
Id = elem.Attribute("id").Value;
if (elem.Attribute("dungeonName") != null)
DungeonName = elem.Attribute("dungeonName").Value;
if (elem.Attribute("skinType") != null)
SkinType = int.Parse(elem.Attribute("skinType").Value);
if (elem.Attribute("lockedName") != null)
LockedName = elem.Attribute("lockedName").Value;
if (elem.Attribute("color") != null)
Color = uint.Parse(elem.Attribute("color").Value.Substring(2), NumberStyles.AllowHexSpecifier);
if (elem.Attribute("target") != null)
Target = elem.Attribute("target").Value;
UseWisMod = elem.Attribute("useWisMod") != null;
if (elem.Attribute("visualEffect") != null)
VisualEffect = float.Parse(elem.Attribute("visualEffect").Value, NumberStyles.Any, ci);
if (elem.Attribute("center") != null)
Center = elem.Attribute("center").Value;
noStack = elem.Attribute("noStack") != null;
}
public ActivateEffects Effect { get; private set; }
public int Stats { get; private set; }
public int Amount { get; private set; }
public float Range { get; private set; }
public float DurationSec { get; private set; }
public int DurationMS { get; private set; }
public int DurationMS2 { get; private set; }
public ConditionEffectIndex? ConditionEffect { get; private set; }
public float EffectDuration { get; private set; }
public int MaximumDistance { get; private set; }
public float Radius { get; private set; }
public int TotalDamage { get; private set; }
public string ObjectId { get; private set; }
public int AngleOffset { get; private set; }
public int MaxTargets { get; private set; }
public string Id { get; private set; }
public int SkinType { get; private set; }
public string DungeonName { get; private set; }
public string LockedName { get; private set; }
public string Target { get; private set; }
public string Center { get; private set; }
public bool UseWisMod { get; private set; }
public bool noStack { get; private set; }
public float VisualEffect { get; private set; }
public uint? Color { get; private set; }
}
REMEMBER I AM NOT THE ORIGINAL CREATOR OF THE GodLands COMMAND
All I did was make the player invulnerable for 3 seconds after typing /glands to ensure they wont be killed by a trolling dragger...cuz them glands drags be OP
GodLands Command
internal class GlandCommand : Command
{
public GlandCommand()
: base("glands", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 1000 || args.Length == 1000)
{
player.SendHelp("Usage: /glands to tp to glands");
}
else
{
int x, y;
try
{
x = int.Parse("1000");
y = int.Parse("1000");
}
catch
{
player.SendError("Invalid coordinates!");
return false;
}
player.Move(x + 0.5f, y + 0.5f);
if (player.Pet != null)
player.Pet.Move(x + 0.5f, y + 0.5f);
player.UpdateCount++;
player.Owner.BroadcastPacket(new networking.svrPackets.GotoPacket
{
ObjectId = player.Id,
Position = new Position
{
X = player.X,
Y = player.Y
}
}, null);
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invulnerable,
DurationMS = 3000
});
}
return true;
}
}
REMEMBER I AM NOT THE ORIGNAL CREATOR OF Class COMMAND
All i did was add a block to it so players cannot use /class if slots 1-4 is filled
also fixed the misspelling necromanser to necromancer
Class Command
internal class RogueCommand : Command
{
public RogueCommand() : base("rogue", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else {
player.Inventory[4] = player.Manager.GameData.Items[0xa8a]; // Agate
player.Inventory[5] = player.Manager.GameData.Items[0xae1]; // Twlight
player.Inventory[6] = player.Manager.GameData.Items[0xa90]; // Griffon
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class ArcherCommand : Command
{
public ArcherCommand() : base("archer", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa8d]; // BBow
player.Inventory[5] = player.Manager.GameData.Items[0xa65]; // Gquiver
player.Inventory[6] = player.Manager.GameData.Items[0xa90]; // Griffon
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class WizardCommand : Command
{
public WizardCommand() : base("wizard", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xaa2]; // Astral
player.Inventory[5] = player.Manager.GameData.Items[0xa30]; // MNova
player.Inventory[6] = player.Manager.GameData.Items[0xa96]; // Elder
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class PriestCommand : Command
{
public PriestCommand() : base("priest", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa87]; // Ancient Warning
player.Inventory[5] = player.Manager.GameData.Items[0xa5b]; // T5 Tome
player.Inventory[6] = player.Manager.GameData.Items[0xa96]; // Elder
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class WarriorCommand : Command
{
public WarriorCommand() : base("warrior", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa47]; // Sky
player.Inventory[5] = player.Manager.GameData.Items[0xa6b]; // Ghelm
player.Inventory[6] = player.Manager.GameData.Items[0xa93]; // Abyssal
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class KnightCommand : Command
{
public KnightCommand() : base("knight", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa47]; // Sky
player.Inventory[5] = player.Manager.GameData.Items[0xa0c]; // Mith Shield
player.Inventory[6] = player.Manager.GameData.Items[0xa93]; // Abyssal
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class PaladinCommand : Command
{
public PaladinCommand() : base("paladin", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa47]; // Sky
player.Inventory[5] = player.Manager.GameData.Items[0xa55]; // T5 Seal
player.Inventory[6] = player.Manager.GameData.Items[0xa93]; // Abyssal
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class AssassinCommand : Command
{
public AssassinCommand() : base("assassin", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa8a]; // Agate
player.Inventory[5] = player.Manager.GameData.Items[0xaa8]; // Nightwing
player.Inventory[6] = player.Manager.GameData.Items[0xa90]; // Griffon
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class NecromancerCommand : Command
{
public NecromancerCommand() : base("necromancer", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xaa2]; // Astral
player.Inventory[5] = player.Manager.GameData.Items[0xaaf]; // Lifedrinker
player.Inventory[6] = player.Manager.GameData.Items[0xa96]; // Elder
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class HuntressCommand : Command
{
public HuntressCommand() : base("huntress", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa8d]; // BBow
player.Inventory[5] = player.Manager.GameData.Items[0xab6]; // Dstalker
player.Inventory[6] = player.Manager.GameData.Items[0xa90]; // Griffon
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class MysticCommand : Command
{
public MysticCommand() : base("mystic", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xaa2]; // Astral
player.Inventory[5] = player.Manager.GameData.Items[0xa46]; // Banishment Orb
player.Inventory[6] = player.Manager.GameData.Items[0xa96]; // Elder
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class TricksterCommand : Command
{
public TricksterCommand() : base("trickster", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa8a]; // Agate
player.Inventory[5] = player.Manager.GameData.Items[0xb20]; // Phantoms
player.Inventory[6] = player.Manager.GameData.Items[0xa90]; // Griffon
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class SorcererCommand : Command
{
public SorcererCommand() : base("sorcerer", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xa87]; // Ancient Warning
player.Inventory[5] = player.Manager.GameData.Items[0xb32]; // Skybolt
player.Inventory[6] = player.Manager.GameData.Items[0xa96]; // Elder
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
internal class NinjaCommand : Command
{
public NinjaCommand() : base("ninja", 0)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
for (int i = 0; i < player.Inventory.Length; i++)
{
if (player.Inventory[4] != null) { return false; }
if (player.Inventory[5] != null) { return false; }
if (player.Inventory[6] != null) { return false; }
if (player.Inventory[7] != null) { return false; }
else
{
player.Inventory[4] = player.Manager.GameData.Items[0xc4f]; // Muramasa
player.Inventory[5] = player.Manager.GameData.Items[0xc58]; // Ice Star
player.Inventory[6] = player.Manager.GameData.Items[0xa90]; // Griffon
player.Inventory[7] = player.Manager.GameData.Items[0xac5]; // Para HP
player.UpdateCount++;
}
}
player.SendInfo("Set Given");
return true;
}
}
Just add <Boomerang/> in the <Projectile> and your done

if you want to add cooler behaviors like boomerang I can go indepth and help you with that
Nillys Silly Boomerang Playtoy
<Object type="0x9c9" id="Sword of Majesty">
<Class>Equipment</Class>
<Item/>
<Texture>
<File>lofiObj5</File>
<Index>0x3e</Index>
</Texture>
<SlotType>1</SlotType>
<Description>{equip.A_gleaming_obsidian_sword_of_imperial_power,_fashioned_by_e}</Description>
<RateOfFire>1</RateOfFire>
<Sound>weapon/mithril_sword</Sound>
<Projectile>
<ObjectId>Darkness Bolt</ObjectId>
<Speed>100</Speed>
<MinDamage>235</MinDamage>
<MaxDamage>290</MaxDamage>
<LifetimeMS>350</LifetimeMS>
<Boomerang/>
</Projectile>
<BagType>4</BagType>
<FameBonus>5</FameBonus>
<OldSound>bladeSwing</OldSound>
<feedPower>0</feedPower>
<Soulbound/>
<DisplayId>{equip.Sword_of_Majesty}</DisplayId>
</Object>
Anvil List Command
internal class AnvilList : Command
{
public AnvilList()
: base("anvillist")
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
player.SendInfo("ForgeList:");
player.SendInfo("Agate + Blood Bow = Sword of Acclaim");
player.SendInfo("Astral + Ancient warning = Masamune"); //just add more player.SendInfo("") to add to the line
/*player.SendInfo("");
* player.SendInfo("");
* player.SendInfo("");
* player.SendInfo("");
*/
return true;
}
}
Anvil Is Basically a raw version of the /forge command and I tried to make it as easy to add to as I can
Anvil Command
I had an updated version of this that was very very simple to add on but I just can't seem to find it so if this doesn't work just tell me the error and screenshot it and it will be fixed right away
internal class Anvil : Command
{
public Anvil()
: base("anvil")
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 2)
{
var num2 = 3;
var num1 = 3;
try
{
int choice1 = int.Parse(args[0]);
switch (choice1)
{
case 1:
num1 += 1;
break;
case 2:
num1 += 2;
break;
case 3:
num1 += 3;
break;
case 4:
num1 += 4;
break;
case 5:
num1 += 5;
break;
case 6:
num1 += 6;
break;
case 7:
num1 += 7;
break;
case 8:
num1 += 8;
break;
default:
player.SendError("Invalid Inventory slot");
player.SendHelp("Slots: 1, 2, 3, 4, 5, 6, 7, 8");
return false;
}
}
catch
{
player.SendError("Error while crafting");
return false;
}
try
{
int choice2 = int.Parse(args[1]);
switch (choice2)
{
case 1:
num2 += 1;
break;
case 2:
num2 += 2;
break;
case 3:
num2 += 3;
break;
case 4:
num2 += 4;
break;
case 5:
num2 += 5;
break;
case 6:
num2 += 6;
break;
case 7:
num2 += 7;
break;
case 8:
num2 += 8;
break;
default:
player.SendError("Invalid Inventory slot");
player.SendHelp("Slots: 1, 2, 3, 4, 5, 6, 7, 8");
return false;
}
}
catch
{
player.SendError("Error while crafting");
return false;
}
if (num1 == num2) { player.SendError("Don't try to cheat the system fool ~ Tpain"); return false; }
else
{
var Hot = player.Inventory[num1];
var Pink = player.Inventory[num2];
int item1 = 0;
int item2 = 0; // If you end up with too many items or you want to overlap recipies then just turn this into a switch and case
if (Hot == player.Manager.GameData.Items[0xa8a]) { item1 = 1; } //Agate
if (Hot == player.Manager.GameData.Items[0xaa2]) { item1 = 2; } //Astral Staff
if (Pink == player.Manager.GameData.Items[0xa8d]) { item2 = 1; } //Blocd Bow Add more items to add more recipies
if (Pink == player.Manager.GameData.Items[0xa87]) { item2 = 2; } //Ancient Warning
if (item1 == item2) //<= Do not bother this but if the player does not have the exact two items requird to craft it then it will fail
{
if (item1 == 0) //if player does not have any of the items then it will fail
{
player.SendError("Don't try to cheat the system fool ~Tpain");
return false;
}
if (item1 == 1) //Agate + Blood Bow = Sword of Acclaim
{
Pink = null;
Hot = player.Manager.GameData.Items[0xb0b];
player.SendInfo("Congrats...enjoy your sword :*");
}
if (item1 == 2) //Astral Staff + Ancient Warning = Masamune
{
Pink = null;
Hot = player.Manager.GameData.Items[0xc50];
player.SendInfo("Congrats...enjoy your katana :*");
}
else { player.SendInfo("Crafting Failed..."); return false; }
}
}
return true;
}
else
{
player.SendHelp("Usage: /anvil <Slot1> <slot2>");
player.SendHelp("Slots: 1, 2, 3, 4, 5, 6, 7, 8");
return false;
}
}
}
Earthquake Command
internal class EarthQuake : Command
{
public EarthQuake()
: base("shake", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /shake <playername>");
return false;
}
foreach (KeyValuePair<string, Client> i in player.Manager.Clients)
{
Packet pkt;
if (i.Value.Player.Name.EqualsIgnoreCase(args[0]))
{
pkt = new ShowEffectPacket { EffectType = EffectType.Earthquake };
i.Value.Player.UpdateCount++;
player.SendInfo("Player shaken!");
i.Value.SendPacket(pkt);
return true;
}
}
player.SendError("Player could not be found Or Player info not found!");
return false;
}
}
Freeze command
internal class freeze : Command
{
public freeze()
: base("freeze", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /freeze <playername>");
return false;
}
foreach (KeyValuePair<string, Client> i in player.Manager.Clients)
{
if (i.Value.Player.Name.EqualsIgnoreCase(args[0]))
{
i.Value.Player.ApplyConditionEffect( new ConditionEffect
{
Effect = ConditionEffectIndex.Paralyzed,
DurationMS = -1
});
i.Value.Player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Paused,
DurationMS = -1
});
i.Value.Player.UpdateCount++;
player.SendInfo("Player frozen!");
return true;
}
}
player.SendError("Player could not be found");
return false;
}
}
Heal command
internal class Heal : Command
{
public Heal()
: base("heal", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /heal <playername>");
return false;
}
foreach (Client i in player.Manager.Clients.Values)
{
if (i.Account.Name.EqualsIgnoreCase(args[0]))
{
int max = i.Player.MaxHp;
i.Player.HP += max;
player.SendInfo("Player healed!");
return true;
}
}
player.SendError("Player could not be found");
return false;
}
}
in the SafeTp command basically what I did was give players 1.5 secs of invincibility just to make sure they don't die by trollers
Better Teleport Command : SafeTp
internal class SafeTPCommand : Command
{
public SafeTPCommand()
: base("safetp")
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
try
{
if (String.Equals(player.Name.ToLower(), args[0].ToLower()))
{
player.SendInfo("You are already at yourself, and always will be!");
return false;
}
foreach (KeyValuePair<int, Player> i in player.Owner.Players)
{
if (i.Value.Name.ToLower() == args[0].ToLower().Trim())
{
player.Teleport(time, new TeleportPacket
{
ObjectId = i.Value.Id
});
player.ApplyConditionEffect(new ConditionEffect
{
Effect = ConditionEffectIndex.Invulnerable,
DurationMS = 1500
});
return true;
}
}
player.SendInfo(string.Format("Cannot teleport, {0} not found!", args[0].Trim()));
}
catch
{
player.SendHelp("Usage: /teleport <player name>");
}
return false;
}
}
Visit command
internal class VisitCommand : Command
{
public VisitCommand()
: base("visit", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length < 1)
{
player.SendHelp("Usage: /visit <playername>");
return false;
}
else if (String.Equals(player.Name.ToLower(), args[0].ToLower()))
{
player.SendInfo("You are You.");
return false;
}
foreach (KeyValuePair<string, Client> i in player.Manager.Clients)
{
if (i.Value.Player.Owner is PetYard)
{
player.SendInfo("Player is in his Pet Yard you cannot visit him.");
return false;
}
else if (i.Value.Player.Name.EqualsIgnoreCase(args[0]))
{
if (player.Owner == i.Value.Player.Owner)
{
player.SendInfo("You are already in the same world as this Player.");
return false;
}
else
{
player.Client.Reconnect(new ReconnectPacket
{
GameId = i.Value.Player.Owner.Id,
Host = "",
IsFromArena = false,
Key = i.Value.Player.Owner.PortalKey,
KeyTime = -1,
Name = i.Value.Player.Owner.Name,
Port = -1
});
}
return true;
}
}
player.SendError("Player could not be found!");
return false;
}
}
Take Command
internal class Take : Command
{
public Take()
: base("take", 1)
{
}
protected override bool Process(Player player, RealmTime time, string[] args)
{
if (args.Length < 2)
{
player.SendHelp("Usage: /take <playername> <Itemname>");
return false;
}
Player p = player.Manager.FindPlayer(args[0]);
string name = string.Join(" ", args.ToArray(), 1, (args.Length - 1)).Trim();
ushort objType;
Dictionary<string, ushort> icdatas = new Dictionary<string, ushort>(player.Manager.GameData.IdToObjectType,
StringComparer.OrdinalIgnoreCase);
if (!icdatas.TryGetValue(name, out objType))
{
player.SendError("Unknown type!");
return false;
}
if (!player.Manager.GameData.Items[objType].Secret || player.Client.Account.Rank >= 3)
{
for (int i = 0; i < p.Inventory.Length; i++)
if (p.Inventory[i] == player.Manager.GameData.Items[objType])
{
p.Inventory[i] = null;
p.UpdateCount++;
p.SaveToCharacter();
player.SendInfo("You took " + p.Name + " " + name + " away from them!");
break;
}
}
else
{
player.SendError("Item not found Or Item cannot be taken!");
return false;
}
return true;
}
}
Admin Teleport Bypass
if (!Owner.AllowTeleport)
{
if (player.Client.Account.Rank < 3)
{
SendError(GetLanguageString("server.no_teleport_in_realm", new KeyValuePair<string, object>("realm", Owner.Name)));
return;
}
}
Nexus/World Protection
All this goes in Player.cs
private bool CheckLingo()
{
var world = Owner.Name;
if (world == "Nexus") //Just add => || world =="worldname" <= if you want to add another world
{
HP = Stats[0] + Stats[0];
Mp = Stats[1] + Stats[1];
Owner.BroadcastPacket(new TextPacket
{
BubbleTime = 0,
Stars = -1,
Name = "",
Text = $"{Name} barely managed to escape from death"
}, null);
Client.Disconnect();
resurrecting = true;
return true;
}
return false;
}
This is added in public void Death inside of Player.cs
Code:
if (CheckLingo())
return;
YOU CAN DOWNLOAD THIS Template #1 IN GITHUB
Behavior Template #1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
using System.Text;
using wServer.realm;
using wServer.logic.behaviors;
using wServer.logic.loot;
using wServer.logic.transitions; //You must have all these when making a behavior.
namespace wServer.logic //This is also required.
{
partial class BehaviorDb //This is also required.
{
private _ Jesus = () => Behav() //This is also required //Remember you can rename "Jesus" to whatever you want just make sure that it is not the same as other behaviors.
.Init("Jesus", //This is the enemy name //Rename "Jesus" to whatever enemy name you are making the behaviors for...such as if I were making a behavior for bes it would be called "Tomb Defender".
new State( //If you behavior for the enemy(.Init) has more then 1 State then you need a "state holder" which just holds all the states in 1 state.
new ConditionalEffect(ConditionEffectIndex.Invincible, true), //This is how you apply conditions to the enemy you are making the behavior for, and the "true" is if its going to be permanent or not (true = yes, false = no)
new State("Start",
new Taunt("I am Jesus"), //This is how you can make the enemy talk...in this Taunt Jesus is saying "I am Jesus"
new Prioritize( //Prioritize means which the behavior is going this will always run...like a loop
new Wander(0.5) //This is when the enemy is aimlessly wandering at a speed of 0.5(50 spd)
), //Since Priortize required a '(' then you will need to close it with a ')'
new TimedTransition(5000, "Second", false) //After 5secs(5000ms) it will go the the state called Second and the false is asking if the timed transition will go to a random state or not but since I want it to go to Second I type false
),
new State("Second", //This is the Second state which will happen after State since it will transition to Second after 5 seconds
new Taunt("Recive my blessings, but you must say the magic words"), //Just Jesus talking again
new ChatTransition("Third", "Thank you", "thank you", "THANK YOU", "THANKYOU", "Thankyou", "thankyou"), //This will go to state "Third" if the player says one of the six Thank you
new TimedTransition(10000, "Forth") //If the player does not say one of the six thank you in 10 secs then it will go to state "Forth"
),
new State("Third", //This is the "Third" state that will happen if the player types one of the six thank you in less then 10 seconds
new Taunt("Very well my child take my blessings"), //Just Jesus talking again
new Spawn("White Fountain", 1, 1, 900000001), //White Fountain already has a behavior to heal the player and Jesus just spawns one of them to heal the player
new TimedTransition(1000, "Goodbye") //After 1 second It will go to the state "Goodbye"
),
new State("Forth", //This is the "Forth" state that will happen if the player fails to type one of the six thank you in less then 10 seconds
new Taunt("Very well good luck my child"), //Just Jesus talking
new TimedTransition(1000, "Goodbye") //After 1 second it will go to the state "Goodbye"
),
new State("Goodbye", //This is the "Goodbye" state that will occur after 1 second in the "Third" or "Forth" State
new Taunt("Goodbye children"), //Just Jesus talking again
new Suicide() //Jesus will suicide instantly which is basically like killing him and if the player did damage to jesus the it will drop loot if they got enough soulbound damage
)
), //This is what closes the State Holder that holds all the internal states
//if you wanted to add loot you must add it out of the state holder as such
new MostDamagers(5, //In this the TOP 5 Most Damagers to "jesus" will have a chance of getting the loot in this braket
new TierLoot(15, ItemType.Armor, 0.5), //There is a 0.5(50%) chance for player to get a Tier 15 Armor(Any Class)
/* ItemType.Weapon
* ItemType.Armor
* ItemType.Potion
* ItemType.Ring
* ItemType.Ability
*/
new ItemLoot("Sword of Majesty", 0.35) //There is a 0.35(35%) chance for a player to get a Sword of Majesty
/* You can type any item
* if I wanted it to drop an Acclaim I would put "Sword of Acclaim"
* or if I wanted it to drop The staff of the Fundamental Core then I would type "Staff of the Fundamental Core"
* you can add any item just as long as its an actual item in the game
*/
),
new Threshold(0.5, //All players that did more then 0.5(50%) damage of Jesus health will get a chance of getting the loot in this braket
new TierLoot(14, ItemType.Weapon, 0.4), //There is a 0.4(40%) chance of getting a T14 Weapon(Any Class)
new ItemLoot("Annihilation Armor", 0.65) //There is a 0.65(65%) chance of getting the item "Annihilation Armor"
)
); // You must always close your .Init, and if it's the last .Init for the whole class then your going to have to add a semi-colen after the parentheses => );
}
}
/*If you wanted to make jesus shoot then you would add new Shoot(10, 3, 5, projectileIndex: 0, coolDown: 1000, coolDownOffset: 2000)
* The number 10 is the range it will start shooting at the player
* The number 3 is the amount of bullets shot at the player and it will automatically get divided by 360 so it will shoot at every 120 angle unless you specify the shoot angle
* The number 5 is the shoot angle so it will shoot in a spread of 5 each shot so one shot in the middle, then one shot 5 degrees to the left of the middle oshot, then one shot five degrees to the right of the middle shot
* projectileIndex: 0 is what type of bullet its going to be shooting you can find this info in the XML of the enemy
* coolDown: 1000 is how long till it will shoot again which is 1 second (1000ms)
* coolDownOffset: 2000 is how long will it wait to shoot its first shot then after that it will continue by the rules of coolDown
* There is more but to much to explain in writing but you can see for yourself in the class called Shoot.cs
*/
//This is just a template and not really to be used for actual behaviors but if you were to use this It would work...but only if you have a enemy called Jesus
//There is many more behaviors that I did not mention in this and the best way to learn is to experiment and see what does what :) I hope this helped whoever is reading this
https://github.com/SavageLove/Source-Help
I am going to probably add more and different behavior templates and if requested i'll make some of another source
This is old but I wanted to give a shout out to this thread these items are commenly found in the default package of the current RotMG sources: http://www.mpgh.net/forum/showthread.php?t=647024
Github now also holds a txt file with a link going to a RotMG prod info index if you want to learn more just check it out
TODO
I will add these stuff when I have some free time...which is little to none Q.Q but anyways I will try to upload them when I can
I will be adding my patch for the silly pally hp glitch here soon :3 but I have to get back to work on my game so enjoy with what I've posted and if you guys want any help in any source just ask :)
I will be adding how to make custom characters just stay tuned :)
I will be adding how to make abilities work for all characters and how to make abilities a one time use so you can make cool 1 time use abilities just stay tuned :)
I will be adding how to make your realm spawn more Grand sphinx and more Hermits and etc...
Remember I did not make the /glands and the /class command I am simply modifying them to make them better for the public use 
Original /glands and /class command post : http://www.mpgh.net/forum/showthread.php?t=1086592
BIG SHOUTOUT TO @Luis for posting how to make your pserver work and how to make it public 
make sure to visit his forum post if you want to make your own P'server
Work:
http://www.mpgh.net/forum/showthread.php?t=1079084
Public:
http://www.mpgh.net/forum/showthread.php?t=1079090
Shoutout to @Masternx for making a post dedicated to fixing bugs I am sure he will be successful in his endeavors 
Make sure to visit it if you find any bugs you would like fixed 
Post:
http://www.mpgh.net/forum/showthread.php?t=1112746
If your struggling in making your nexus custom these threads may help:
http://www.mpgh.net/forum/showthread...ighlight=Nexus
And if you want to make your Nexus White Fountain heal MP then check this out:
http://www.mpgh.net/forum/showthread...ighlight=Nexus http://www.mpgh.net/forum/showthread.php?t=1099912
Want to build real features? Check this out
http://www.mpgh.net/forum/showthread.php?t=1099136
LIST OF MOST TUTORIALS: http://www.mpgh.net/forum/showthread.php?t=1109474Check this out, you can easily find what you need to make your server better

^
My Motto:
Learn to Love and Love to Learn, if thou does not ask when will thy learn?Perhaps they maybe struggling and asking silly questions, but no one ever needed to pay attention, for it is your option to answer or not.
End Goal:
To have every new server that comes out to be atleast decent with a decent amount of custom stuff so that players will stop complaining on the blizzard forums like this kiddy
mrROtMGKid6969: OhMagGOd RotMG P'servers are so empty I wish someone would release a decent server
this is a joke but my end goal is cereal
Just seen the BF1 trailer....excited
A pretty long ass thread XD I guess a dying RotMG coder has to go out in a bang

maybe i'll release the anti hack or BlocksSight
nvm I just has a talk with someone and I gotta stick to keeping it away for the better of the P'server nation
