public override void Die(GameObject killer) { GamePlayer player = killer as GamePlayer; if (player != null) { if (Util.Chance(40)) { #region rog_stuff GameNPC mob = new GameNPC(); mob.Name = "Unique Object"; mob.CurrentRegionID = 1; mob.Level = (byte)(player.Level); if (mob.Level > 50) { mob.Level = 51; } mob.Level = 60; mob.Name = "TOA Mob"; mob.CurrentRegionID = 30; mob.Z = 9999; ItemUnique unique = LootGeneratorUniqueObject.GenerateUniqueItem(mob, player, null); GameServer.Database.AddObject(unique); InventoryItem item = GameInventoryItem.Create <ItemUnique>(unique); player.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, item); #endregion } } base.Die(killer); }
public void GenerateROG(GamePlayer player, eObjectType objectType, eSlot slot) { player.RemoveBountyPoints(2000); GameNPC mob = new GameNPC(); mob.Name = "Unique Object"; mob.CurrentRegionID = 1; mob.Level = (byte)(player.Level); if (mob.Level > 50) { mob.Level = 51; } LootList lootlist = new LootList(); ItemUnique item = null; item = new ItemUnique(); item.Object_Type = (int)objectType; item.Item_Type = (int)slot; mob.Level = 60; mob.Name = "TOA Mob"; mob.CurrentRegionID = 30; mob.Z = 9999; lootlist.AddFixed(LootGeneratorUniqueObject.GenerateUniqueItem(mob, player, item), 1); foreach (ItemUnique unique in lootlist.GetLoot()) { unique.Price = 0; GameServer.Database.AddObject(unique); InventoryItem invitem = GameInventoryItem.Create <ItemUnique>(unique); player.Inventory.AddItem(eInventorySlot.FirstEmptyBackpack, invitem); player.Out.SendMessage("Generated: " + unique.Name, eChatType.CT_System, eChatLoc.CL_SystemWindow); } }