/// <summary> /// Calculate the minumum needed secondary crafting skill level to make the item /// </summary> public override int GetSecondaryCraftingSkillMinimumLevel(DBCraftedItem recipe, ItemTemplate itemToCraft) { switch (itemToCraft.Object_Type) { case (int)eObjectType.CrushingWeapon: case (int)eObjectType.SlashingWeapon: case (int)eObjectType.ThrustWeapon: case (int)eObjectType.TwoHandedWeapon: case (int)eObjectType.PolearmWeapon: case (int)eObjectType.Flexible: case (int)eObjectType.Sword: case (int)eObjectType.Hammer: case (int)eObjectType.Axe: case (int)eObjectType.Spear: case (int)eObjectType.HandToHand: case (int)eObjectType.Blades: case (int)eObjectType.Blunt: case (int)eObjectType.Piercing: case (int)eObjectType.LargeWeapons: case (int)eObjectType.CelticSpear: case (int)eObjectType.Scythe: return recipe.CraftingLevel - 60; } return base.GetSecondaryCraftingSkillMinimumLevel(recipe, itemToCraft); }
/// <summary> /// Check if the player is near the needed tools (forge, lathe, etc) /// </summary> /// <param name="player">the crafting player</param> /// <param name="recipe">the recipe being used</param> /// <param name="itemToCraft">the item to make</param> /// <param name="rawMaterials">a list of raw materials needed to create this item</param> /// <returns>true if required tools are found</returns> protected override bool CheckForTools(GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList<DBCraftedXItem> rawMaterials) { bool needForge = false; foreach (DBCraftedXItem material in rawMaterials) { ItemTemplate template = GameServer.Database.FindObjectByKey<ItemTemplate>(material.IngredientId_nb); if (template != null && template.Model == 519) // metal bar { needForge = true; break; } } if (needForge) { foreach (GameStaticItem item in player.GetItemsInRadius(CRAFT_DISTANCE)) { if (item.Name == "forge" || item.Model == 478) // Forge return true; } player.Out.SendMessage(LanguageMgr.GetTranslation(player.Client, "Crafting.CheckTool.NotHaveTools", itemToCraft.Name), eChatType.CT_System, eChatLoc.CL_SystemWindow); player.Out.SendMessage(LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Crafting.CheckTool.FindForge"), eChatType.CT_System, eChatLoc.CL_SystemWindow); if (player.Client.Account.PrivLevel > 1) return true; return false; } return true; }
public void TestAddTemplate() { GameLivingInventory gameLivingInventory = new TestInventory(); ItemTemplate template = new ItemTemplate(); Random rand = new Random(); template.Id_nb = "blankItem" + rand.Next().ToString(); template.Name = "a blank item"; template.MaxCount = 10; if (template == null) Console.WriteLine("template null"); if (gameLivingInventory.AddTemplate(GameInventoryItem.Create<ItemTemplate>(template), 7, eInventorySlot.RightHandWeapon, eInventorySlot.FourthQuiver)) Console.WriteLine("addtemplate 7 blank item"); else Console.WriteLine("can not add 7 blank item"); Console.WriteLine("----PRINT AFTER FIRST ADD 7 TEMPLATE-----"); PrintInventory(gameLivingInventory); if (gameLivingInventory.AddTemplate(GameInventoryItem.Create<ItemTemplate>(template), 4, eInventorySlot.RightHandWeapon, eInventorySlot.FourthQuiver)) Console.WriteLine("addtemplate 4 blank item"); else Console.WriteLine("can not add 4 blank item"); Console.WriteLine("----PRINT AFTER SECOND ADD 4 TEMPLATE-----"); PrintInventory(gameLivingInventory); //here must have 10 item in a slot and 1 in another }
private void Init() { #region defineItems // item db check RecruitsCloak = GameServer.Database.FindObjectByKey<ItemTemplate>("k109_recruits_cloak"); if (RecruitsCloak == null) { RecruitsCloak = new ItemTemplate(); RecruitsCloak.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Alb.ANewHeroesWelcome.Init.Text1"); if (log.IsWarnEnabled) log.Warn("Could not find " + RecruitsCloak.Name + ", creating it ..."); RecruitsCloak.Level = 5; RecruitsCloak.Weight = 3; RecruitsCloak.Model = 443; RecruitsCloak.Color = 36; RecruitsCloak.Object_Type = (int)eObjectType.Magical; RecruitsCloak.Item_Type = (int)eEquipmentItems.CLOAK; RecruitsCloak.Id_nb = "k109_recruits_cloak"; RecruitsCloak.Price = 0; RecruitsCloak.IsPickable = true; RecruitsCloak.IsDropable = false; // can't be sold to merchand RecruitsCloak.Bonus1 = 6; RecruitsCloak.Bonus1Type = (int)eProperty.MaxHealth; RecruitsCloak.Quality = 100; RecruitsCloak.Condition = 50000; RecruitsCloak.MaxCondition = 50000; RecruitsCloak.Durability = 50000; RecruitsCloak.MaxDurability = 50000; GameServer.Database.AddObject(RecruitsCloak); } LetterToPompin = GameServer.Database.FindObjectByKey<ItemTemplate>("letter_to_pompin"); if (LetterToPompin == null) { LetterToPompin = new ItemTemplate(); LetterToPompin.Weight = 0; LetterToPompin.Condition = 50000; LetterToPompin.MaxCondition = 50000; LetterToPompin.Model = 499; LetterToPompin.Extension = 1; LetterToPompin.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Alb.ANewHeroesWelcome.Init.Text2"); LetterToPompin.Id_nb = "letter_to_pompin"; GameServer.Database.AddObject(LetterToPompin); } #endregion defineItems Level = 1; QuestGiver = MasterClaistan; Rewards.Experience = 22; Rewards.MoneyPercent = 100; Rewards.AddBasicItem(RecruitsCloak); Rewards.ChoiceOf = 1; pompinsletter = AddGoal(LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.ANewHeroesWelcome.Init.Text3"), QuestGoal.GoalType.ScoutMission, 1, LetterToPompin); }
/// <summary> /// Create a new house vault. /// </summary> /// <param name="vaultIndex"></param> public GameHouseVault(ItemTemplate itemTemplate, int vaultIndex) { if (itemTemplate == null) throw new ArgumentNullException(); Name = itemTemplate.Name; Model = (ushort) (itemTemplate.Model); _templateID = itemTemplate.Id_nb; Index = vaultIndex; }
// the following is not in the constructor because TestFixtureSetup // is not initialized at this time, thus we can't connect to server public void InventoryTestCreation() { player = CreateMockGamePlayer(); Assert.IsNotNull(player, "Player is null !"); itemt = GameServer.Database.SelectObject<ItemTemplate>("Id_nb = 'championDocharWardenBlade'"); Assert.IsNotNull(itemt, "ItemTemplate is null !"); itemu = new ItemUnique(); itemu.Id_nb = "tunik" + DateTime.Now.Ticks; GameServer.Database.AddObject(itemu); Assert.IsNotNull(itemu, "ItemUnique is created !"); itema = GameServer.Database.SelectObject<ItemTemplate>("id_nb= 'traitors_dagger_hib"); }
/// <summary> /// Calculate the minumum needed secondary crafting skill level to make the item /// </summary> public override int GetSecondaryCraftingSkillMinimumLevel(DBCraftedItem recipe, ItemTemplate itemToCraft) { switch(itemToCraft.Object_Type) { case (int)eObjectType.Studded: case (int)eObjectType.Chain: case (int)eObjectType.Plate: case (int)eObjectType.Reinforced: case (int)eObjectType.Scale: return recipe.CraftingLevel - 60; } return base.GetSecondaryCraftingSkillMinimumLevel(recipe, itemToCraft); }
protected override void BuildCraftedItem(GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft) { GameSiegeWeapon siegeweapon = null; switch ((eObjectType)itemToCraft.Object_Type) { case eObjectType.SiegeBalista: { siegeweapon = new GameSiegeBallista(); } break; case eObjectType.SiegeCatapult: { siegeweapon = new GameSiegeCatapult(); } break; case eObjectType.SiegeCauldron: { siegeweapon = new GameSiegeCauldron(); } break; case eObjectType.SiegeRam: { siegeweapon = new GameSiegeRam(); } break; case eObjectType.SiegeTrebuchet: { siegeweapon = new GameSiegeTrebuchet(); } break; default: { base.BuildCraftedItem(player, recipe, itemToCraft); return; } } //actually stores the Id_nb of the siegeweapon siegeweapon.ItemId = itemToCraft.Id_nb; siegeweapon.LoadFromDatabase(itemToCraft); siegeweapon.CurrentRegion = player.CurrentRegion; siegeweapon.Heading = player.Heading; siegeweapon.X = player.X; siegeweapon.Y = player.Y; siegeweapon.Z = player.Z; siegeweapon.Realm = player.Realm; siegeweapon.AddToWorld(); }
private void Init() { ItemTemplate insigniarings = new ItemTemplate(); insigniarings.Weight = 0; insigniarings.Condition = 50000; insigniarings.MaxCondition = 50000; insigniarings.Model = 103; insigniarings.Extension = 1; insigniarings.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Alb.DredgeUpAPledge.Init.Text1"); Level = 1; QuestGiver = sirDorian; Rewards.Experience = 30; Rewards.MoneyPercent = 100; banditPledgesKilled = AddGoal(LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.DredgeUpAPledge.Init.Text2"), QuestGoal.GoalType.KillTask, 2, insigniarings); }
/// <summary> /// Check if the player is near the needed tools (forge, lathe, etc) /// </summary> /// <param name="player">the crafting player</param> /// <param name="recipe">the recipe being used</param> /// <param name="itemToCraft">the item to make</param> /// <param name="rawMaterials">a list of raw materials needed to create this item</param> /// <returns>true if required tools are found</returns> protected override bool CheckForTools(GamePlayer player, DBCraftedItem recipe, ItemTemplate itemToCraft, IList<DBCraftedXItem> rawMaterials) { foreach (GameStaticItem item in player.GetItemsInRadius(CRAFT_DISTANCE)) { if (item.Name.ToLower() == "forge" || item.Model == 478) // Forge return true; } player.Out.SendMessage(LanguageMgr.GetTranslation(player.Client.Account.Language, "Crafting.CheckTool.NotHaveTools", itemToCraft.Name), eChatType.CT_System, eChatLoc.CL_SystemWindow); player.Out.SendMessage(LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Crafting.CheckTool.FindForge"), eChatType.CT_System, eChatLoc.CL_SystemWindow); if (player.Client.Account.PrivLevel > 1) return true; return false; }
/// <summary> /// Create a new inventory artifact from an item template. /// </summary> /// <param name="template"></param> public InventoryArtifact(ItemTemplate template) : base(template) { ArtifactID = ArtifactMgr.GetArtifactIDFromItemID(template.Id_nb); ArtifactLevel = 0; m_levelRequirements = ArtifactMgr.GetLevelRequirements(ArtifactID); for (ArtifactBonus.ID bonusID = ArtifactBonus.ID.Min; bonusID <= ArtifactBonus.ID.Max; ++bonusID) { // Clear all bonuses except the base (L0) bonuses. if (m_levelRequirements[(int)bonusID] > 0) { Template.SetBonusType(bonusID, 0); Template.SetBonusAmount(bonusID, 0); } } }
/// <summary> /// An account vault that masquerades as a house vault to the game client /// </summary> /// <param name="player">Player who owns the vault</param> /// <param name="vaultNPC">NPC controlling the interaction between player and vault</param> /// <param name="vaultOwner">ID of vault owner (can be anything unique, if it's the account name then all toons on account can access the items)</param> /// <param name="vaultNumber">Valid vault IDs are 0-3</param> /// <param name="dummyTemplate">An ItemTemplate to satisfy the base class's constructor</param> public AccountVault(GamePlayer player, GameNPC vaultNPC, string vaultOwner, int vaultNumber, ItemTemplate dummyTemplate) : base(dummyTemplate, vaultNumber) { m_player = player; m_vaultNPC = vaultNPC; m_vaultOwner = vaultOwner; m_vaultNumber = vaultNumber; DBHouse dbh = new DBHouse(); //was allowsave = false but uhh i replaced with allowadd = false dbh.AllowAdd = false; dbh.GuildHouse = false; dbh.HouseNumber = player.ObjectID; dbh.Name = player.Name + "'s House"; dbh.OwnerID = player.DBCharacter.ObjectId; dbh.RegionID = player.CurrentRegionID; CurrentHouse = new House(dbh); }
public static void OnScriptLoaded(DOLEvent e, object sender, EventArgs args) { int[] prices = new int[] { 0, 1500, 1500, 3750, 3000, 2000, 3250, 2500, 3500, 4000, 5000 }; for (int i = 1 ; i < 11 ; i++) { ItemTemplate credit = GameServer.Database.FindObjectByKey<ItemTemplate>(string.Format("master_level_credit_bptoken_{0}", i)); if (credit == null) { credit = new ItemTemplate(); credit.AllowAdd = true; credit.Id_nb = string.Format("master_level_credit_bptoken_{0}", i); credit.Weight = 0; credit.Price = prices[i]; credit.Condition = 50000; credit.MaxCondition = 50000; credit.Model = 0x01E7; credit.Name = string.Format("Master Level {0} Credit", i); GameServer.Database.AddObject(credit); } m_offeredItems.AddTradeItem(0, eMerchantWindowSlot.FirstEmptyInPage, credit); } // Respec ItemTemplate resp = GameServer.Database.FindObjectByKey<ItemTemplate>("master_level_respec_bptoken"); if (resp == null) { resp = new ItemTemplate(); resp.AllowAdd = true; resp.Id_nb = "master_level_respec_bptoken"; resp.Weight = 5; resp.Price = 5000; resp.Condition = 50000; resp.MaxCondition = 50000; resp.Level = 40; resp.Object_Type = 0x29; resp.Model = 0x075E; resp.Name = "Star of Destiny"; GameServer.Database.AddObject(resp); } m_offeredItems.AddTradeItem(0, eMerchantWindowSlot.FirstEmptyInPage, resp); }
/// <summary> /// Generate loot for given mob /// </summary> /// <param name="mob"></param> /// <param name="killer"></param> /// <returns></returns> public override LootList GenerateLoot(GameNPC mob, GameObject killer) { LootList loot = base.GenerateLoot(mob, killer); int lvl = mob.Level + 1; if (lvl < 1) lvl = 1; int minLoot = 2 + ((lvl * lvl * lvl) >> 3); long moneyCount = minLoot + Util.Random(minLoot >> 1); moneyCount = (long)((double)moneyCount * ServerProperties.Properties.MONEY_DROP); ItemTemplate money = new ItemTemplate(); money.Model = 488; money.Name = "bag of coins"; money.Level = 0; money.Price = moneyCount; loot.AddFixed(money, 1); return loot; }
public override int GetSecondaryCraftingSkillMinimumLevel(DBCraftedItem recipe, ItemTemplate itemToCraft) { switch (itemToCraft.Object_Type) { case (int)eObjectType.Fired: //tested case (int)eObjectType.Longbow: //tested case (int)eObjectType.Crossbow: //tested case (int)eObjectType.Instrument: //tested case (int)eObjectType.RecurvedBow: case (int)eObjectType.CompositeBow: return recipe.CraftingLevel - 20; case (int)eObjectType.Arrow: //tested case (int)eObjectType.Bolt: //tested case (int)eObjectType.Thrown: return recipe.CraftingLevel - 15; case (int)eObjectType.Staff: //tested return recipe.CraftingLevel - 35; } return base.GetSecondaryCraftingSkillMinimumLevel(recipe, itemToCraft); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the certain Realm. If we find a the players, * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCS GameNPC[] npcs = WorldMgr.GetNPCsByName("Godeleva Dowden", eRealm.Albion); /* Whops, if the npcs array length is 0 then no npc exists in * this users Mob Database, so we simply create one ;-) * else we take the existing one. And if more than one exist, we take * the first ... */ if (npcs.Length == 0) { godelevaDowden = new GameNPC(); godelevaDowden.Model = 7; godelevaDowden.Name = "Godeleva Dowden"; if (log.IsWarnEnabled) log.Warn("Could not find " + godelevaDowden.Name + ", creating him ..."); godelevaDowden.GuildName = "Part of " + questTitle + " Quest"; godelevaDowden.Realm = eRealm.Albion; godelevaDowden.CurrentRegionID = 1; GameNpcInventoryTemplate template = new GameNpcInventoryTemplate(); template.AddNPCEquipment(eInventorySlot.FeetArmor, 138); template.AddNPCEquipment(eInventorySlot.TorsoArmor, 134); template.AddNPCEquipment(eInventorySlot.LegsArmor, 135); godelevaDowden.Inventory = template.CloseTemplate(); godelevaDowden.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard); godelevaDowden.Size = 48; godelevaDowden.Level = 40; godelevaDowden.X = 559528; godelevaDowden.Y = 510953; godelevaDowden.Z = 2488; godelevaDowden.Heading = 1217; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) godelevaDowden.SaveIntoDatabase(); godelevaDowden.AddToWorld(); } else godelevaDowden = npcs[0]; #endregion #region defineItems // item db check woodenBucket = GameServer.Database.FindObjectByKey<ItemTemplate>("wooden_bucket"); if (woodenBucket == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wooden Bucket, creating it ..."); woodenBucket = new ItemTemplate(); woodenBucket.Name = "Wooden Bucket"; woodenBucket.Level = 1; woodenBucket.Weight = 10; woodenBucket.Model = 1610; woodenBucket.Object_Type = (int)eObjectType.GenericItem; woodenBucket.Id_nb = "wooden_bucket"; woodenBucket.Price = 0; woodenBucket.IsPickable = false; woodenBucket.IsDropable = false; woodenBucket.Quality = 100; woodenBucket.Condition = 1000; woodenBucket.MaxCondition = 1000; woodenBucket.Durability = 1000; woodenBucket.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(woodenBucket); } // item db check fullWoodenBucket = GameServer.Database.FindObjectByKey<ItemTemplate>("full_wooden_bucket"); if (fullWoodenBucket == null) { if (log.IsWarnEnabled) log.Warn("Could not find Full Wooden Bucket, creating it ..."); fullWoodenBucket = new ItemTemplate(); fullWoodenBucket.Name = "Full Wooden Bucket"; fullWoodenBucket.Level = 1; fullWoodenBucket.Weight = 250; fullWoodenBucket.Model = 1610; fullWoodenBucket.Object_Type = (int)eObjectType.GenericItem; fullWoodenBucket.Id_nb = "full_wooden_bucket"; fullWoodenBucket.Price = 0; fullWoodenBucket.IsPickable = false; fullWoodenBucket.IsDropable = false; fullWoodenBucket.Quality = 100; fullWoodenBucket.Condition = 1000; fullWoodenBucket.MaxCondition = 1000; fullWoodenBucket.Durability = 1000; fullWoodenBucket.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(fullWoodenBucket); } // item db check reedBracer = GameServer.Database.FindObjectByKey<ItemTemplate>("reed_bracer"); if (reedBracer == null) { if (log.IsWarnEnabled) log.Warn("Could not find Reed Bracer of Health creating it ..."); reedBracer = new ItemTemplate(); reedBracer.Name = "Reed Bracer"; reedBracer.Level = 3; reedBracer.Weight = 1; reedBracer.Model = 598; reedBracer.Object_Type = (int)eObjectType.Magical; reedBracer.Item_Type = (int)eEquipmentItems.L_BRACER; reedBracer.Id_nb = "reed_bracer"; reedBracer.Price = Money.GetMoney(0,0,0,0,30); reedBracer.IsPickable = true; reedBracer.IsDropable = true; reedBracer.Bonus = 1; reedBracer.Bonus1Type = (int)eProperty.MaxHealth; reedBracer.Bonus1 = 8; reedBracer.Bonus2Type = (int)eProperty.Resist_Cold; reedBracer.Bonus2 = 1; reedBracer.Quality = 100; reedBracer.Condition = 1000; reedBracer.MaxCondition = 1000; reedBracer.Durability = 1000; reedBracer.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(reedBracer); } #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld)); GameEventMgr.AddHandler(godelevaDowden, GameLivingEvent.Interact, new DOLEventHandler(TalkToGodelevaDowden)); GameEventMgr.AddHandler(godelevaDowden, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToGodelevaDowden)); /* Now we bring to Ydenia the possibility to give this quest to players */ godelevaDowden.AddQuestToGive(typeof(GodelevasNeed)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the Albion realm. If we find a the players, * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCs addrir = GetAddrir(); GameNPC[] npcs = WorldMgr.GetNPCsByName("Aethic", eRealm.Hibernia); if (npcs.Length == 0) { aethic = new GameNPC(); aethic.Model = 361; aethic.Name = "Aethic"; if (log.IsWarnEnabled) log.Warn("Could not find" + aethic.Name + " , creating ..."); aethic.GuildName = "Part of " + questTitle + " Quest"; aethic.Realm = eRealm.Hibernia; aethic.CurrentRegionID = 200; aethic.Size = 49; aethic.Level = 21; aethic.X = GameLocation.ConvertLocalXToGlobalX(23761, 200); aethic.Y = GameLocation.ConvertLocalYToGlobalY(45658, 200); aethic.Z = 5448; aethic.Heading = 320; //aethic.EquipmentTemplateID = "1707754"; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) aethic.SaveIntoDatabase(); aethic.AddToWorld(); } else aethic = npcs[0] as GameStableMaster; npcs = WorldMgr.GetNPCsByName("Freagus", eRealm.Hibernia); if (npcs.Length == 0) { freagus = new GameStableMaster(); freagus.Model = 361; freagus.Name = "Freagus"; if (log.IsWarnEnabled) log.Warn("Could not find " + freagus.Name + ", creating ..."); freagus.GuildName = "Stable Master"; freagus.Realm = eRealm.Hibernia; freagus.CurrentRegionID = 200; freagus.Size = 48; freagus.Level = 30; freagus.X = 341008; freagus.Y = 469180; freagus.Z = 5200; freagus.Heading = 1934; freagus.EquipmentTemplateID = "3800664"; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) freagus.SaveIntoDatabase(); freagus.AddToWorld(); } else freagus = npcs[0]; npcs = WorldMgr.GetNPCsByName("Rumdor", eRealm.Hibernia); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find Rumdor, creating ..."); rumdor = new GameStableMaster(); rumdor.Model = 361; rumdor.Name = "Rumdor"; rumdor.GuildName = "Stable Master"; rumdor.Realm = eRealm.Hibernia; rumdor.CurrentRegionID = 200; rumdor.Size = 53; rumdor.Level = 33; rumdor.X = 347175; rumdor.Y = 491836; rumdor.Z = 5226; rumdor.Heading = 1262; rumdor.EquipmentTemplateID = "3800664"; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) rumdor.SaveIntoDatabase(); rumdor.AddToWorld(); } else rumdor = npcs[0] as GameStableMaster; GameObject[] objects = WorldMgr.GetObjectsByName("Truichon", eRealm.Hibernia,typeof(GameStableMaster)); if (npcs.Length == 0) { truichon = new GameStableMaster(); truichon.Model = 361; truichon.Name = "Truichon"; if (log.IsWarnEnabled) log.Warn("Could not find " + truichon.Name + ", creating ..."); truichon.GuildName = "Stable Master"; truichon.Realm = eRealm.Hibernia; truichon.CurrentRegionID = 1; truichon.Size = 50; truichon.Level = 33; truichon.X = 343464; truichon.Y = 526708; truichon.Z = 5448; truichon.Heading = 68; //truichon.EquipmentTemplateID = "5448"; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) truichon.SaveIntoDatabase(); truichon.AddToWorld(); } else truichon = npcs[0] as GameStableMaster; #endregion #region defineItems ticketToTirnamBeo = GameServer.Database.FindObjectByKey<ItemTemplate>("hs_magmell_tirnambeo"); if (ticketToTirnamBeo == null) ticketToTirnamBeo = CreateTicketTo("Tir na mBeo", "hs_magmell_tirnambeo"); ticketToArdee = GameServer.Database.FindObjectByKey<ItemTemplate>("hs_tirnambeo_ardee"); if (ticketToArdee == null) ticketToArdee = CreateTicketTo("Ardee", "hs_tirnambeo_ardee"); recruitsDiary = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_diary"); if (recruitsDiary == null) { recruitsDiary = new ItemTemplate(); recruitsDiary.Name = "Recruits Diary"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsDiary.Name + " , creating it ..."); recruitsDiary.Weight = 3; recruitsDiary.Model = 500; recruitsDiary.Object_Type = (int)eObjectType.GenericItem; recruitsDiary.Id_nb = "recruits_diary"; recruitsDiary.IsPickable = true; recruitsDiary.IsDropable = false; if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(recruitsDiary); } sackOfSupplies = GameServer.Database.FindObjectByKey<ItemTemplate>("sack_of_supplies"); if (sackOfSupplies == null) { sackOfSupplies = new ItemTemplate(); sackOfSupplies.Name = "Sack of Supplies"; if (log.IsWarnEnabled) log.Warn("Could not find " + sackOfSupplies.Name + " , creating it ..."); sackOfSupplies.Weight = 10; sackOfSupplies.Model = 488; sackOfSupplies.Object_Type = (int) eObjectType.GenericItem; sackOfSupplies.Id_nb = "sack_of_supplies"; sackOfSupplies.IsPickable = true; sackOfSupplies.IsDropable = false; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(sackOfSupplies); } crateOfVegetables = GameServer.Database.FindObjectByKey<ItemTemplate>("crate_of_vegetables"); if (crateOfVegetables == null) { crateOfVegetables = new ItemTemplate(); crateOfVegetables.Name = "Crate of Vegetables"; if (log.IsWarnEnabled) log.Warn("Could not find " + crateOfVegetables.Name + " , creating it ..."); crateOfVegetables.Weight = 15; crateOfVegetables.Model = 602; crateOfVegetables.Object_Type = (int) eObjectType.GenericItem; crateOfVegetables.Id_nb = "crate_of_vegetables"; crateOfVegetables.IsPickable = true; crateOfVegetables.IsDropable = false; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(crateOfVegetables); } // item db check recruitsCloak = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_cloak_hib"); if (recruitsCloak == null) { if (log.IsWarnEnabled) log.Warn("Could not find Recruit's Cloak, creating it ..."); recruitsCloak = new ItemTemplate(); recruitsCloak.Name = "Recruit's Cloak (Hib)"; recruitsCloak.Level = 3; recruitsCloak.Weight = 3; recruitsCloak.Model = 57; recruitsCloak.Object_Type = (int) eObjectType.Cloth; recruitsCloak.Item_Type = (int) eEquipmentItems.CLOAK; recruitsCloak.Id_nb = "recruits_cloak_hib"; recruitsCloak.Price = Money.GetMoney(0,0,0,1,0); recruitsCloak.IsPickable = true; recruitsCloak.IsDropable = true; recruitsCloak.Color = 69; recruitsCloak.Bonus = 1; // default bonus recruitsCloak.Bonus1 = 1; recruitsCloak.Bonus1Type = (int) eStat.CON; recruitsCloak.Bonus2 = 1; recruitsCloak.Bonus2Type = (int) eResist.Slash; recruitsCloak.Quality = 100; recruitsCloak.Condition = 1000; recruitsCloak.MaxCondition = 1000; recruitsCloak.Durability = 1000; recruitsCloak.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(recruitsCloak); } #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); //We want to be notified whenever a player enters the world GameEventMgr.AddHandler(addrir, GameLivingEvent.Interact, new DOLEventHandler(TalkToAddrir)); GameEventMgr.AddHandler(addrir, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToAddrir)); GameEventMgr.AddHandler(freagus, GameLivingEvent.Interact, new DOLEventHandler(TalkToFreagus)); GameEventMgr.AddHandler(freagus, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToFreagus)); GameEventMgr.AddHandler(aethic, GameLivingEvent.Interact, new DOLEventHandler(TalkToAethic)); GameEventMgr.AddHandler(aethic, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToAethic)); /* Now we bring to addrir the possibility to give this quest to players */ addrir.AddQuestToGive(typeof (ImportantDelivery)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the certain Realm. If we find the npc * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCS GameNPC[] npcs = WorldMgr.GetNPCsByName("Baeth", eRealm.Hibernia); /* If the npcs array length is 0 then no npc exists in * this users Mob Database, so we simply create one ;-) * else we take the existing one. And if more than one exist, we take * the first ... */ if (npcs.Length == 0) { npcBaeth = new GameNPC(); npcBaeth.Model = 361; npcBaeth.Name = "Baeth"; if (log.IsWarnEnabled) { log.Warn("Could not find " + npcBaeth.Name + ", creating him ..."); } npcBaeth.GuildName = "Part of " + questTitle + " Quest"; npcBaeth.Realm = eRealm.Hibernia; npcBaeth.CurrentRegionID = 27; npcBaeth.Size = 52; npcBaeth.Level = 30; npcBaeth.X = 356650; npcBaeth.Y = 355078; npcBaeth.Z = 5015; npcBaeth.Heading = 2959; if (SAVE_INTO_DATABASE) { npcBaeth.SaveIntoDatabase(); } npcBaeth.AddToWorld(); } else { npcBaeth = npcs[0]; } npcs = WorldMgr.GetNPCsByName("Jessica", eRealm.Hibernia); if (npcs.Length == 0) { npcJessica = new GameNPC(); npcJessica.Model = 366; npcJessica.Name = "Jessica"; if (log.IsWarnEnabled) { log.Warn("Could not find " + npcJessica.Name + ", creating him ..."); } npcJessica.GuildName = "Part of " + questTitle + " Quest"; npcJessica.Realm = eRealm.Hibernia; npcJessica.CurrentRegionID = 27; npcJessica.Size = 38; npcJessica.Level = 1; npcJessica.X = 358068; npcJessica.Y = 347553; npcJessica.Z = 5491; npcJessica.Heading = 49; if (SAVE_INTO_DATABASE) { npcJessica.SaveIntoDatabase(); } npcJessica.AddToWorld(); } else { npcJessica = npcs[0]; } #endregion #region defineItems // item db check reedFlute = GameServer.Database.FindObjectByKey<ItemTemplate>("quest_reed_flute"); if (reedFlute == null) { reedFlute = new ItemTemplate(); reedFlute.Name = "Reed Flute"; if (log.IsWarnEnabled) { log.Warn("Could not find " + reedFlute.Name + ", creating it ..."); } reedFlute.Level = 1; reedFlute.Weight = 1; reedFlute.Model = 325; reedFlute.Object_Type = (int)eObjectType.Magical; reedFlute.Item_Type = (int)eInventorySlot.FirstBackpack; reedFlute.Id_nb = "quest_reed_flute"; reedFlute.Price = 0; reedFlute.IsPickable = false; reedFlute.IsDropable = false; reedFlute.IsTradable = false; reedFlute.Quality = 100; reedFlute.Condition = 5000; reedFlute.MaxCondition = 5000; reedFlute.Durability = 5000; reedFlute.MaxDurability = 5000; reedFlute.SpellID = 65001; reedFlute.CanUseEvery = 300; GameServer.Database.AddObject(reedFlute); } // Add spell and npctemplate to the DB /* insert into spell (`Spell_ID`, `SpellID`, `ClientEffect`, `Icon`, `Name`, `Description`, `Target`, `Range`, `Power`, `CastTime`, `Damage`, `DamageType`, `Type`, `Duration`, `Frequency`, `Pulse`, `PulsePower`, `Radius`, `Value`, `LifeDrainReturn`, `Message1`, `PackageID`) values ('summon_dragonfly', 65001, 0, 0, 'Call Dragonfly', 'Summons a dragonfly to travel at your side, but cannot be used in the battlegrounds or the frontier regions.', 'Self', 0, 0, 0, 1, 0, 'SummonNoveltyPet', 65535, 0, 0, 0, 0, 1, 65001, 'A small dragonfly appears as the sound of the whistle fades.', 'NoveltyPets'); insert into npctemplate (`NpcTemplate_ID`, `TemplateId`, `Name`, `GuildName`, `Model`, `Size`, `MaxSpeed`, `Flags`, `Level`, `ClassType`, `PackageID`) values ('quest_pet_dragonfly', 65001, 'Dragonfly', '', 819, 12, 250, 48, 1, '', 'NoveltyPets'); */ #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(npcBaeth, GameLivingEvent.Interact, new DOLEventHandler(TalkToBaeth)); GameEventMgr.AddHandler(npcBaeth, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToBaeth)); GameEventMgr.AddHandler(npcJessica, GameLivingEvent.Interact, new DOLEventHandler(TalkToJessica)); GameEventMgr.AddHandler(npcJessica, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToJessica)); npcBaeth.AddQuestToGive(typeof(WingsOfTheIsleHibernia)); if (log.IsInfoEnabled) { log.Info("Quest \"" + questTitle + "\" initialized"); } }
/// <summary> /// Generate loot for given mob /// </summary> /// <param name="mob"></param> /// <param name="killer"></param> /// <returns></returns> public override LootList GenerateLoot(GameNPC mob, GameObject killer) { LootList loot = base.GenerateLoot(mob, killer); try { GamePlayer player = killer as GamePlayer; if (killer is GameNPC && ((GameNPC)killer).Brain is IControlledBrain) player = ((ControlledNpcBrain)((GameNPC)killer).Brain).GetPlayerOwner(); if (player == null) return loot; ItemTemplate atlanteanGlass = new ItemTemplate(m_atlanteanglass); int killedcon = (int)player.GetConLevel(mob)+3; if(killedcon <= 0) return loot; int lvl = mob.Level + 1; if (lvl < 1) lvl = 1; int maxcount = 1; //Switch pack size if (lvl > 0 && lvl < 10) { //Single AtlanteanGlass maxcount = (int)Math.Floor((double)(lvl/2))+1; } else if (lvl >= 10 && lvl < 20) { //Double atlanteanGlass.PackSize = 2; maxcount = (int)Math.Floor((double)((lvl-10)/2))+1; } else if (lvl >= 20 && lvl < 30) { //Triple atlanteanGlass.PackSize = 3; maxcount = (int)Math.Floor((double)((lvl-20)/2))+1; } else if (lvl >=30 && lvl < 40) { //Quad atlanteanGlass.PackSize = 4; maxcount = (int)Math.Floor((double)((lvl-30)/2))+1; } else if (lvl >= 40 && lvl < 50) { //Quint atlanteanGlass.PackSize = 5; maxcount = (int)Math.Floor((double)((lvl-40)/2))+1; } else { //Cache (x10) atlanteanGlass.PackSize = 10; maxcount = (int)Math.Round((double)(lvl/10)); } if (!mob.Name.ToLower().Equals(mob.Name)) { //Named mob, more cash ! maxcount = (int)Math.Round(maxcount*ServerProperties.Properties.LOOTGENERATOR_ATLANTEANGLASS_NAMED_COUNT); } if(maxcount > 0 && Util.Chance(ServerProperties.Properties.LOOTGENERATOR_ATLANTEANGLASS_BASE_CHANCE+Math.Max(10, killedcon))) { loot.AddFixed(atlanteanGlass, maxcount); } } catch { return loot; } return loot; }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); #region defineNPCS GameNPC[] npcs = WorldMgr.GetNPCsByName(questGiverName, eRealm.Hibernia); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find " + questGiverName + ", creating her ..."); questGiver = new GameNPC(); questGiver.Name = questGiverName; questGiver.Realm = eRealm.Hibernia; questGiver.CurrentRegionID = 200; // select * from NPCEquipment where TemplateID in (select EquipmentTemplateID from Mob where name = ?) GameNpcInventoryTemplate template = new GameNpcInventoryTemplate(); template.AddNPCEquipment(eInventorySlot.TwoHandWeapon, 448, 0); // Slot 12 template.AddNPCEquipment(eInventorySlot.FeetArmor, 427, 0); // Slot 23 template.AddNPCEquipment(eInventorySlot.TorsoArmor, 423, 0); // Slot 25 template.AddNPCEquipment(eInventorySlot.LegsArmor, 424, 0); // Slot 27 template.AddNPCEquipment(eInventorySlot.ArmsArmor, 425, 0); // Slot 28 questGiver.Inventory = template.CloseTemplate(); questGiver.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard); questGiver.Model = 388; questGiver.Size = 51; questGiver.Level = 35; questGiver.X = 346768; questGiver.Y = 489521; questGiver.Z = 5200; questGiver.Heading = 2594; if (SAVE_INTO_DATABASE) questGiver.SaveIntoDatabase(); questGiver.AddToWorld(); } else questGiver = npcs[0]; npcs = WorldMgr.GetNPCsByName(questTargetName, eRealm.Hibernia); if (npcs.Length == 0) { questTarget = new GameNPC(); questTarget.Name = questTargetName; if (log.IsWarnEnabled) log.Warn("Could not find " + questTarget.Name + ", creating him ..."); questTarget.Realm = eRealm.Hibernia; questTarget.CurrentRegionID = 200; // select * from NPCEquipment where TemplateID in (select EquipmentTemplateID from Mob where name = ?) GameNpcInventoryTemplate template = new GameNpcInventoryTemplate(); template.AddNPCEquipment(eInventorySlot.HandsArmor, 411, 0); // Slot 22 template.AddNPCEquipment(eInventorySlot.FeetArmor, 412, 0); // Slot 23 template.AddNPCEquipment(eInventorySlot.TorsoArmor, 408, 0); // Slot 25 template.AddNPCEquipment(eInventorySlot.Cloak, 57, 34); // Slot 26 template.AddNPCEquipment(eInventorySlot.LegsArmor, 409, 0); // Slot 27 template.AddNPCEquipment(eInventorySlot.ArmsArmor, 410, 0); // Slot 28 questTarget.Inventory = template.CloseTemplate(); questTarget.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard); questTarget.Model = 381; questTarget.Size = 50; questTarget.Level = 12; questTarget.X = 347327; questTarget.Y = 492700; questTarget.Z = 5199; questTarget.Heading = 2468; if (SAVE_INTO_DATABASE) questTarget.SaveIntoDatabase(); questTarget.AddToWorld(); } else questTarget = npcs[0]; #endregion /* #region defineAreas targetArea = WorldMgr.GetRegion(targetLocation.RegionID).AddArea(new Area.Circle("", targetLocation.X, targetLocation.Y, targetLocation.Z, 200)); #endregion */ #region defineItems armBone = GameServer.Database.FindObjectByKey<ItemTemplate>("BonesToBlades-armbone"); if (armBone == null) { armBone = new ItemTemplate(); armBone.Name = "Arm Bone"; if (log.IsWarnEnabled) log.Warn("Could not find " + armBone.Name + ", creating it ..."); armBone.Level = 1; armBone.Weight = 1; armBone.Model = 497; armBone.Object_Type = (int) eObjectType.GenericItem; armBone.Item_Type = -1; armBone.Id_nb = "BonesToBlades-armbone"; armBone.Hand = 0; armBone.Price = 0; armBone.IsTradable = false; armBone.Color = 0; armBone.Bonus = 0; // default bonus armBone.Bonus1 = 0; armBone.Bonus1Type = (int)0; armBone.Bonus2 = 0; armBone.Bonus2Type = (int)0; armBone.Bonus3 = 0; armBone.Bonus3Type = (int)0; armBone.Bonus4 = 0; armBone.Bonus4Type = (int)0; armBone.Bonus5 = 0; armBone.Bonus5Type = (int)0; armBone.Bonus6 = 0; armBone.Bonus6Type = (int)0; armBone.Bonus7 = 0; armBone.Bonus7Type = (int)0; armBone.Bonus8 = 0; armBone.Bonus8Type = (int)0; armBone.Bonus9 = 0; armBone.Bonus9Type = (int)0; armBone.Bonus10 = 0; armBone.Bonus10Type = (int)0; armBone.ExtraBonus = 0; armBone.ExtraBonusType = (int)0; armBone.Effect = 0; armBone.Emblem = 0; armBone.Charges = 0; armBone.MaxCharges = 0; armBone.SpellID = 0; armBone.ProcSpellID = 0; armBone.Type_Damage = 0; armBone.Realm = 0; armBone.MaxCount = 1; armBone.PackSize = 1; armBone.Extension = 0; armBone.Quality = 100; armBone.Condition = 100; armBone.MaxCondition = 100; armBone.Durability = 100; armBone.MaxDurability = 100; armBone.PoisonCharges = 0; armBone.PoisonMaxCharges = 0; armBone.PoisonSpellID = 0; armBone.ProcSpellID1 = 0; armBone.SpellID1 = 0; armBone.MaxCharges1 = 0; armBone.Charges1 = 0; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(armBone); } carvedBoneHilt = GameServer.Database.FindObjectByKey<ItemTemplate>("BonesToBlades-carvedBoneHilts"); if (carvedBoneHilt == null) { carvedBoneHilt = new ItemTemplate(); carvedBoneHilt.Name = "Two Carved Bone Hilts"; if (log.IsWarnEnabled) log.Warn("Could not find " + carvedBoneHilt.Name + ", creating it ..."); carvedBoneHilt.Level = 1; carvedBoneHilt.Weight = 1; carvedBoneHilt.Model = 497; carvedBoneHilt.Object_Type = (int)eObjectType.GenericItem; carvedBoneHilt.Item_Type = -1; carvedBoneHilt.Id_nb = "BonesToBlades-carvedBoneHilts"; carvedBoneHilt.Hand = 0; carvedBoneHilt.Price = 0; carvedBoneHilt.IsTradable = false; carvedBoneHilt.Color = 0; carvedBoneHilt.Bonus = 0; // default bonus carvedBoneHilt.Bonus1 = 0; carvedBoneHilt.Bonus1Type = (int)0; carvedBoneHilt.Bonus2 = 0; carvedBoneHilt.Bonus2Type = (int)0; carvedBoneHilt.Bonus3 = 0; carvedBoneHilt.Bonus3Type = (int)0; carvedBoneHilt.Bonus4 = 0; carvedBoneHilt.Bonus4Type = (int)0; carvedBoneHilt.Bonus5 = 0; carvedBoneHilt.Bonus5Type = (int)0; carvedBoneHilt.Bonus6 = 0; carvedBoneHilt.Bonus6Type = (int)0; carvedBoneHilt.Bonus7 = 0; carvedBoneHilt.Bonus7Type = (int)0; carvedBoneHilt.Bonus8 = 0; carvedBoneHilt.Bonus8Type = (int)0; carvedBoneHilt.Bonus9 = 0; carvedBoneHilt.Bonus9Type = (int)0; carvedBoneHilt.Bonus10 = 0; carvedBoneHilt.Bonus10Type = (int)0; carvedBoneHilt.ExtraBonus = 0; carvedBoneHilt.ExtraBonusType = (int)0; carvedBoneHilt.Effect = 0; carvedBoneHilt.Emblem = 0; carvedBoneHilt.Charges = 0; carvedBoneHilt.MaxCharges = 0; carvedBoneHilt.SpellID = 0; carvedBoneHilt.ProcSpellID = 0; carvedBoneHilt.Type_Damage = 0; carvedBoneHilt.Realm = 0; carvedBoneHilt.MaxCount = 1; carvedBoneHilt.PackSize = 1; carvedBoneHilt.Extension = 0; carvedBoneHilt.Quality = 100; carvedBoneHilt.Condition = 100; carvedBoneHilt.MaxCondition = 100; carvedBoneHilt.Durability = 100; carvedBoneHilt.MaxDurability = 100; carvedBoneHilt.PoisonCharges = 0; carvedBoneHilt.PoisonMaxCharges = 0; carvedBoneHilt.PoisonSpellID = 0; carvedBoneHilt.ProcSpellID1 = 0; carvedBoneHilt.SpellID1 = 0; carvedBoneHilt.MaxCharges1 = 0; carvedBoneHilt.Charges1 = 0; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(carvedBoneHilt); } #endregion #region defineBehaviours QuestBuilder builder = QuestMgr.getBuilder(typeof(BonesToBlades)); QuestBehaviour a = null; string message1 = "Oh, have you been standing there long, <Class>? If you have, I apologize for ignoring you. I find my mind is quite distracted these days after the meeting I had yesterday with a [new client]."; string message2 = "Ah, I would love to tell you the name of the client, but I promised to keep their identity a secret. I keep the identity of all my clients secret because I don't want the other merchants in this area to try to steal them away from me! See, there I go again, getting distracted when I should be thinking about [those blades]."; string message3 = "Day in and day out I sell these plain, everyday blades. But from time to time clients do approach me to commission special blades to be made. My newest client came to me and requested that I make a set of matched falcatas to be given as [a gift] to this client's daughter upon her next birthday."; string message4 = "The daughter is a highly skilled blademaster who is preparing to venture into the Frontiers. My client wants the daughter to be as well armed as possible and I seemed to have developed a reputation as a maker of some of the best custom blades out there. I hope I can [live up to] that reputation."; string message5 = "I fear I have agreed to make these falcatas before I checked to see if I have all the supplies I need. It turns out I'm missing a few things, and I need to have the blades done within a few days. Making the blades alone will take me all that time without having to gather the materials for [the hilt] of each blade."; string message6 = "My client has asked that the hilts of these falcatas be carved from bone. I would be happy to do that, but I don't have the bones I need. I need to get them and send them over to Jahan so he can carve them for me. Say, if you're not busy, perhaps [you can go] get the bones I need. I can pay you for your time."; string message7 = "I cannot thank you enough for agreeing to help me. I've found that when people ask for carved bone hilts that the best bones come from the skeletal pawns and minions that roam the lands [just outside] of Mag Mell."; string message8 = "You'll find the skeletal pawns and minions across the road on the hill northwest of here. I've also seen them in the field and by the standing stone in the woods east-southeast of Rumdor the Stable Master here in Mag Mell. Get two arm bones from either the pawns or the minions. When you have them, take them to Jahan here in Mag Mell. He will carve them for me. Good luck, <Class>!"; string message9 = "Ah, you must be the young <Class> that Wony told me about. She said you would have two arm bones that needed carving for hilts. Wony thinks it will take me a few days to get those bones carved but I have [a surprise] for her."; string message10 = "I already had some bones among my supplies. I went ahead and carved them while you were out obtaining more bones. I'll give you the carved ones and I'll take the ones you have so I can keep my supplies well stocked. Why don't you hand me those two arm bones now?"; string message11 = "There you go, <Class>. Take those two carved bones to Wony right now. It will put her mind at ease having those hilts already taken care of. Don't worry about payment for my work; Wony has taken care of that already."; string message12 = "<Class>, what are you doing back here already? I told you to take the arm bones to Jahan so he can carve them! You should have listened to me! Now what am I going to do?"; string message13 = "What is this? These hilts are already carved! Jahan played a trick on me, didn't he? He already had these done. I guess the arm bones I had you collect will get used the next time I need bone hilts. I am sorry for yelling at you when I should have been offering you [the payment] I promised you."; string message14 = "There we go, <Class>. Thank you so much for helping me get these bone hilts. I shall be able to get the matching falcatas done on time and keep my new client. Perhaps one day you will have enough platinum to hire me to make custom blades for you. Until then, be well!"; a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Interact, null, questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(eActionType.Talk, message1, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "new client", questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(eActionType.Talk, message2, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "those blades", questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(eActionType.Talk, message3, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "a gift", questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(eActionType.Talk, message4, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "live up to", questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(eActionType.Talk, message5, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "the hilt", questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(new MessageAction(questGiver, questGiverName + " blushes a deep red.", eTextType.Emote)); a.AddAction(eActionType.Talk, message6, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "you can go", questGiver); a.AddRequirement(eRequirementType.QuestGivable, typeof(BonesToBlades), questGiver); a.AddRequirement(eRequirementType.QuestPending, typeof(BonesToBlades), null, (eComparator)5); a.AddAction(eActionType.OfferQuest, typeof(BonesToBlades), "Do you want to help Wony?"); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, 1); a.AddTrigger(eTriggerType.AcceptQuest, null, typeof(BonesToBlades)); a.AddAction(eActionType.Talk, message7, questGiver); a.AddAction(eActionType.GiveQuest, typeof(BonesToBlades), questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "just outside", questGiver); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 1, eComparator.Equal); a.AddAction(eActionType.Talk, message8, questGiver); AddBehaviour(a); //a = builder.CreateBehaviour(questGiver, -1); //a.AddTrigger(eTriggerType.EnemyKilled, "skeletal pawn", null); //a.AddTrigger(eTriggerType.EnemyKilled, "skeletal minion", null); //a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 0, eComparator.Greater); //a.AddRequirement(eRequirementType.InventoryItem, armBone, 2, eComparator.Less); //a.AddAction(eActionType.GiveItem, armBone, null); //AddBehaviour(a); //a = builder.CreateBehaviour(questGiver, -1); //a.AddTrigger(eTriggerType.EnemyKilled, mobTypes[0], null); //a.AddTrigger(eTriggerType.EnemyKilled, mobTypes[1], null); //a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 1, eComparator.Equal); //a.AddRequirement(eRequirementType.InventoryItem, armBone, 1, eComparator.Greater); //a.AddAction(eActionType.SetQuestStep, typeof(BonesToBlades), 2); //AddBehaviour(a); a = builder.CreateBehaviour(questTarget, -1); a.AddTrigger(eTriggerType.Interact, null, questTarget); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 2, eComparator.Equal); a.AddAction(eActionType.Talk, message9, questTarget); AddBehaviour(a); a = builder.CreateBehaviour(questTarget, -1); a.AddTrigger(eTriggerType.Whisper, "a surprise", questTarget); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 2, eComparator.Equal); a.AddAction(eActionType.Talk, message10, questTarget); a.AddAction(eActionType.SetQuestStep, typeof(BonesToBlades), 3); AddBehaviour(a); a = builder.CreateBehaviour(questTarget, -1); a.AddTrigger(eTriggerType.GiveItem, questTarget, armBone); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 4, eComparator.Equal); a.AddAction(eActionType.SetQuestStep, typeof(BonesToBlades), 5); a.AddAction(eActionType.TakeItem, armBone, null); a.AddAction(eActionType.GiveItem, carvedBoneHilt, null); a.AddAction(eActionType.Talk, message11, questTarget); AddBehaviour(a); a = builder.CreateBehaviour(questTarget, -1); a.AddTrigger(eTriggerType.GiveItem, questTarget, armBone); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 3, eComparator.Equal); a.AddAction(eActionType.SetQuestStep, typeof(BonesToBlades), 4); a.AddAction(eActionType.TakeItem, armBone, null); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Interact, null, questGiver); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 5, eComparator.Equal); a.AddAction(eActionType.Talk, message12, questGiver); a.AddAction(eActionType.SetQuestStep, typeof(BonesToBlades), 6); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.GiveItem, questGiver, carvedBoneHilt); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 6, eComparator.Equal); a.AddAction(eActionType.SetQuestStep, typeof(BonesToBlades), 7); a.AddAction(eActionType.TakeItem, carvedBoneHilt, null); a.AddAction(eActionType.Talk, message13, questGiver); AddBehaviour(a); a = builder.CreateBehaviour(questGiver, -1); a.AddTrigger(eTriggerType.Whisper, "the payment", questGiver); a.AddRequirement(eRequirementType.QuestStep, typeof(BonesToBlades), 7, eComparator.Equal); a.AddAction(eActionType.Talk, message14, questGiver); a.AddAction(eActionType.GiveXP, 20, null); a.AddAction(eActionType.GiveGold, 37, null); a.AddAction(eActionType.FinishQuest, typeof(BonesToBlades), null); AddBehaviour(a); #endregion questGiver.AddQuestToGive(typeof(BonesToBlades)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the certain Realm. If we find a the players, * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCs masterFrederick = GetMasterFrederick(); GameNPC[] npcs = WorldMgr.GetNPCsByName("Queen Tatiana", eRealm.None); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find Queen Tatiana, creating ..."); queenTatiana = new GameNPC(); queenTatiana.Name = "Queen Tatiana"; queenTatiana.X = 558500; queenTatiana.Y = 533042; queenTatiana.Z = 2573; queenTatiana.Heading = 174; queenTatiana.Model = 603; queenTatiana.GuildName = "Part of " + questTitle + " Quest"; queenTatiana.Realm = eRealm.None; queenTatiana.CurrentRegionID = 1; queenTatiana.Size = 49; queenTatiana.Level = 5; StandardMobBrain brain = new StandardMobBrain(); brain.AggroLevel = 30; brain.AggroRange = 600; queenTatiana.SetOwnBrain(brain); if (SAVE_INTO_DATABASE) queenTatiana.SaveIntoDatabase(); queenTatiana.AddToWorld(); } else { queenTatiana = (GameNPC) npcs[0]; } int counter = 0; foreach (GameNPC npc in queenTatiana.GetNPCsInRadius(500)) { if (npc.Name == "ire fairy sorceress") { fairySorceress[counter] = (GameNPC) npc; counter++; } if (counter == fairySorceress.Length) break; } for (int i = 0; i < fairySorceress.Length; i++) { if (fairySorceress[i] == null) { if (log.IsWarnEnabled) log.Warn("Could not find ire fairy sorceress, creating ..."); fairySorceress[i] = new GameNPC(); fairySorceress[i].Model = 603; // //819; fairySorceress[i].Name = "ire fairy sorceress"; fairySorceress[i].GuildName = "Part of " + questTitle + " Quest"; fairySorceress[i].Realm = eRealm.None; fairySorceress[i].CurrentRegionID = 1; fairySorceress[i].Size = 35; fairySorceress[i].Level = 5; fairySorceress[i].X = queenTatiana.X + Util.Random(30, 150); fairySorceress[i].Y = queenTatiana.Y + Util.Random(30, 150); fairySorceress[i].Z = queenTatiana.Z; StandardMobBrain brain = new StandardMobBrain(); brain.AggroLevel = 30; brain.AggroRange = 600; fairySorceress[i].SetOwnBrain(brain); fairySorceress[i].Heading = 93; //fairySorceress[i].EquipmentTemplateID = 200276; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) fairySorceress[i].SaveIntoDatabase(); fairySorceress[i].AddToWorld(); } } #endregion #region defineItems queenTatianasHead = GameServer.Database.FindObjectByKey<ItemTemplate>("queen_tatianas_head"); if (queenTatianasHead == null) { queenTatianasHead = new ItemTemplate(); queenTatianasHead.Name = "Queen Tatiana's Head"; if (log.IsWarnEnabled) log.Warn("Could not find " + queenTatianasHead.Name + " , creating it ..."); queenTatianasHead.Weight = 15; queenTatianasHead.Model = 503; queenTatianasHead.Object_Type = (int) eObjectType.GenericItem; queenTatianasHead.Id_nb = "queen_tatianas_head"; queenTatianasHead.IsPickable = true; queenTatianasHead.IsDropable = false; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(queenTatianasHead); } // item db check recruitsGauntlets = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_studded_gauntlets"); if (recruitsGauntlets == null) { recruitsGauntlets = new ItemTemplate(); recruitsGauntlets.Name = "Recruit's Studded Gauntles"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsGauntlets.Name + ", creating it ..."); recruitsGauntlets.Level = 8; recruitsGauntlets.Weight = 24; recruitsGauntlets.Model = 80; recruitsGauntlets.DPS_AF = 14; // Armour recruitsGauntlets.SPD_ABS = 19; // Absorption recruitsGauntlets.Object_Type = (int) eObjectType.Studded; recruitsGauntlets.Item_Type = (int) eEquipmentItems.HAND; recruitsGauntlets.Id_nb = "recruits_studded_gauntlets"; recruitsGauntlets.Price = Money.GetMoney(0,0,0,9,0); recruitsGauntlets.IsPickable = true; recruitsGauntlets.IsDropable = true; recruitsGauntlets.Color = 9; // red leather recruitsGauntlets.Bonus = 5; // default bonus recruitsGauntlets.Bonus1 = 4; recruitsGauntlets.Bonus1Type = (int) eStat.STR; recruitsGauntlets.Bonus2 = 3; recruitsGauntlets.Bonus2Type = (int) eStat.DEX; recruitsGauntlets.Quality = 100; recruitsGauntlets.Condition = 1000; recruitsGauntlets.MaxCondition = 1000; recruitsGauntlets.Durability = 1000; recruitsGauntlets.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(recruitsGauntlets); } // item db check recruitsGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_gloves"); if (recruitsGloves == null) { recruitsGloves = new ItemTemplate(); recruitsGloves.Name = "Recruit's Quilted Gloves"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsGloves.Name + ", creating it ..."); recruitsGloves.Level = 8; recruitsGloves.Weight = 8; recruitsGloves.Model = 154; recruitsGloves.DPS_AF = 7; // Armour recruitsGloves.SPD_ABS = 0; // Absorption recruitsGloves.Object_Type = (int) eObjectType.Cloth; recruitsGloves.Item_Type = (int) eEquipmentItems.HAND; recruitsGloves.Id_nb = "recruits_quilted_gloves"; recruitsGloves.Price = Money.GetMoney(0,0,0,9,0); recruitsGloves.IsPickable = true; recruitsGloves.IsDropable = true; recruitsGloves.Color = 27; // red leather recruitsGloves.Bonus = 5; // default bonus recruitsGloves.Bonus1 = 4; recruitsGloves.Bonus1Type = (int) eStat.INT; recruitsGloves.Bonus2 = 3; recruitsGloves.Bonus2Type = (int) eStat.DEX; recruitsGloves.Quality = 100; recruitsGloves.Condition = 1000; recruitsGloves.MaxCondition = 1000; recruitsGloves.Durability = 1000; recruitsGloves.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(recruitsGloves); } recruitsJewel = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_cloudy_jewel"); if (recruitsJewel == null) { recruitsJewel = new ItemTemplate(); recruitsJewel.Name = "Recruit's Cloudy Jewel"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsJewel.Name + ", creating it ..."); recruitsJewel.Level = 7; recruitsJewel.Weight = 2; recruitsJewel.Model = 110; recruitsJewel.Object_Type = (int) eObjectType.Magical; recruitsJewel.Item_Type = (int) eEquipmentItems.JEWEL; recruitsJewel.Id_nb = "recruits_cloudy_jewel"; recruitsJewel.Price = Money.GetMoney(0,0,0,9,0); recruitsJewel.IsPickable = true; recruitsJewel.IsDropable = true; recruitsJewel.Bonus = 5; // default bonus recruitsJewel.Bonus1 = 6; recruitsJewel.Bonus1Type = (int) eStat.STR; recruitsJewel.Quality = 100; recruitsJewel.Condition = 1000; recruitsJewel.MaxCondition = 1000; recruitsJewel.Durability = 1000; recruitsJewel.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(recruitsJewel); } recruitsJewelCloth = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_cloudy_jewel_cloth"); if (recruitsJewelCloth == null) { recruitsJewelCloth = new ItemTemplate(); recruitsJewelCloth.Name = "Recruit's Cloudy Jewel"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsJewelCloth.Name + ", creating it ..."); recruitsJewelCloth.Level = 7; recruitsJewelCloth.Weight = 2; recruitsJewelCloth.Model = 110; recruitsJewelCloth.Object_Type = (int) eObjectType.Magical; recruitsJewelCloth.Item_Type = (int) eEquipmentItems.JEWEL; recruitsJewelCloth.Id_nb = "recruits_cloudy_jewel_cloth"; recruitsJewelCloth.Price = Money.GetMoney(0,0,0,9,0); recruitsJewelCloth.IsPickable = true; recruitsJewelCloth.IsDropable = true; recruitsJewelCloth.Bonus = 5; // default bonus recruitsJewelCloth.Bonus1 = 4; recruitsJewelCloth.Bonus1Type = (int) eStat.INT; recruitsJewelCloth.Bonus2 = 3; recruitsJewelCloth.Bonus2Type = (int) eStat.CON; recruitsJewelCloth.Bonus3 = 1; recruitsJewelCloth.Bonus3Type = (int) eResist.Body; recruitsJewelCloth.Quality = 100; recruitsJewelCloth.Condition = 1000; recruitsJewelCloth.MaxCondition = 1000; recruitsJewelCloth.Durability = 1000; recruitsJewelCloth.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(recruitsJewelCloth); } recruitsBracer = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_golden_bracer"); if (recruitsBracer == null) { recruitsBracer = new ItemTemplate(); recruitsBracer.Name = "Recruit's Golden Bracer"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsBracer.Name + ", creating it ..."); recruitsBracer.Level = 7; recruitsBracer.Weight = 2; recruitsBracer.Model = 121; recruitsBracer.Object_Type = (int) eObjectType.Magical; recruitsBracer.Item_Type = (int) eEquipmentItems.R_BRACER; recruitsBracer.Id_nb = "recruits_golden_bracer"; recruitsBracer.Price = Money.GetMoney(0,0,0,9,0); recruitsBracer.IsPickable = true; recruitsBracer.IsDropable = true; recruitsBracer.Bonus = 5; // default bonus recruitsBracer.Bonus1 = 4; recruitsBracer.Bonus1Type = (int) eStat.STR; recruitsBracer.Bonus2 = 3; recruitsBracer.Bonus2Type = (int) eStat.CON; recruitsBracer.Bonus3 = 1; recruitsBracer.Bonus3Type = (int) eResist.Body; recruitsBracer.Quality = 100; recruitsBracer.Condition = 1000; recruitsBracer.MaxCondition = 1000; recruitsBracer.Durability = 1000; recruitsBracer.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(recruitsBracer); } #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); //We want to be notified whenever a player enters the world GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld)); GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterFrederick)); GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToMasterFrederick)); GameEventMgr.AddHandler(queenTatiana, GameNPCEvent.OnAICallback, new DOLEventHandler(CheckNearQueenTatiana)); /* Now we bring to masterFrederick the possibility to give this quest to players */ masterFrederick.AddQuestToGive(typeof (Culmination)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); #region NPC Declarations GameNPC[] npcs = WorldMgr.GetNPCsByName("Brigit", eRealm.Hibernia); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find Brigit , creating it ..."); Brigit = new GameNPC(); Brigit.Model = 384; Brigit.Name = "Brigit"; Brigit.GuildName = ""; Brigit.Realm = eRealm.Hibernia; Brigit.CurrentRegionID = 201; Brigit.Size = 51; Brigit.Level = 50; Brigit.X = 33131; Brigit.Y = 32922; Brigit.Z = 8008; Brigit.Heading = 3254; Brigit.AddToWorld(); if (SAVE_INTO_DATABASE) { Brigit.SaveIntoDatabase(); } } else Brigit = npcs[0]; // end npc npcs = WorldMgr.GetNPCsByName("Caithor", eRealm.None); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find Caithor , creating it ..."); Caithor = new GameNPC(); Caithor.Model = 339; Caithor.Name = "Caithor"; Caithor.GuildName = ""; Caithor.Realm = eRealm.None; Caithor.CurrentRegionID = 200; Caithor.Size = 60; Caithor.Level = 65; Caithor.X = 470547; Caithor.Y = 531497; Caithor.Z = 4984; Caithor.Heading = 3319; Caithor.AddToWorld(); if (SAVE_INTO_DATABASE) { Caithor.SaveIntoDatabase(); } } else Caithor = npcs[0]; // end npc #endregion #region Item Declarations Moonstone = GameServer.Database.FindObjectByKey<ItemTemplate>("Moonstone"); if (Moonstone == null) { if (log.IsWarnEnabled) log.Warn("Could not find Moonstone , creating it ..."); Moonstone = new ItemTemplate(); Moonstone.Id_nb = "Moonstone"; Moonstone.Name = "Moonstone"; Moonstone.Level = 8; Moonstone.Item_Type = 29; Moonstone.Model = 514; Moonstone.IsDropable = false; Moonstone.IsPickable = false; Moonstone.DPS_AF = 0; Moonstone.SPD_ABS = 0; Moonstone.Object_Type = 41; Moonstone.Hand = 0; Moonstone.Type_Damage = 0; Moonstone.Quality = 100; Moonstone.Weight = 12; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(Moonstone); } } // end item BardEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("BardEpicBoots"); if (BardEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Bards Epic Boots , creating it ..."); BardEpicBoots = new ItemTemplate(); BardEpicBoots.Id_nb = "BardEpicBoots"; BardEpicBoots.Name = "Moonsung Boots"; BardEpicBoots.Level = 50; BardEpicBoots.Item_Type = 23; BardEpicBoots.Model = 738; BardEpicBoots.IsDropable = true; BardEpicBoots.IsPickable = true; BardEpicBoots.DPS_AF = 100; BardEpicBoots.SPD_ABS = 19; BardEpicBoots.Object_Type = 37; BardEpicBoots.Quality = 100; BardEpicBoots.Weight = 22; BardEpicBoots.Bonus = 35; BardEpicBoots.MaxCondition = 50000; BardEpicBoots.MaxDurability = 50000; BardEpicBoots.Condition = 50000; BardEpicBoots.Durability = 50000; BardEpicBoots.Bonus1 = 15; BardEpicBoots.Bonus1Type = (int) eStat.QUI; BardEpicBoots.Bonus2 = 10; BardEpicBoots.Bonus2Type = (int) eResist.Matter; BardEpicBoots.Bonus3 = 4; BardEpicBoots.Bonus3Type = (int) eProperty.PowerRegenerationRate; BardEpicBoots.Bonus4 = 33; BardEpicBoots.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(BardEpicBoots); } } //end item //Moonsung Coif BardEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("BardEpicHelm"); if (BardEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Bards Epic Helm , creating it ..."); BardEpicHelm = new ItemTemplate(); BardEpicHelm.Id_nb = "BardEpicHelm"; BardEpicHelm.Name = "Moonsung Coif"; BardEpicHelm.Level = 50; BardEpicHelm.Item_Type = 21; BardEpicHelm.Model = 1292; //NEED TO WORK ON.. BardEpicHelm.IsDropable = true; BardEpicHelm.IsPickable = true; BardEpicHelm.DPS_AF = 100; BardEpicHelm.SPD_ABS = 19; BardEpicHelm.Object_Type = 37; BardEpicHelm.Quality = 100; BardEpicHelm.Weight = 22; BardEpicHelm.Bonus = 35; BardEpicHelm.MaxCondition = 50000; BardEpicHelm.MaxDurability = 50000; BardEpicHelm.Condition = 50000; BardEpicHelm.Durability = 50000; BardEpicHelm.Bonus1 = 18; BardEpicHelm.Bonus1Type = (int) eStat.CHR; BardEpicHelm.Bonus2 = 4; BardEpicHelm.Bonus2Type = (int) eProperty.PowerRegenerationRate; BardEpicHelm.Bonus3 = 3; BardEpicHelm.Bonus3Type = (int) eProperty.Skill_Regrowth; BardEpicHelm.Bonus4 = 21; BardEpicHelm.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(BardEpicHelm); } } //end item //Moonsung Gloves BardEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("BardEpicGloves"); if (BardEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Bards Epic Gloves , creating it ..."); BardEpicGloves = new ItemTemplate(); BardEpicGloves.Id_nb = "BardEpicGloves"; BardEpicGloves.Name = "Moonsung Gloves "; BardEpicGloves.Level = 50; BardEpicGloves.Item_Type = 22; BardEpicGloves.Model = 737; BardEpicGloves.IsDropable = true; BardEpicGloves.IsPickable = true; BardEpicGloves.DPS_AF = 100; BardEpicGloves.SPD_ABS = 19; BardEpicGloves.Object_Type = 37; BardEpicGloves.Quality = 100; BardEpicGloves.Weight = 22; BardEpicGloves.Bonus = 35; BardEpicGloves.MaxCondition = 50000; BardEpicGloves.MaxDurability = 50000; BardEpicGloves.Condition = 50000; BardEpicGloves.Durability = 50000; BardEpicGloves.Bonus1 = 3; BardEpicGloves.Bonus1Type = (int) eProperty.Skill_Nurture; BardEpicGloves.Bonus2 = 3; BardEpicGloves.Bonus2Type = (int) eProperty.Skill_Music; BardEpicGloves.Bonus3 = 12; BardEpicGloves.Bonus3Type = (int) eStat.DEX; BardEpicGloves.Bonus4 = 33; BardEpicGloves.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(BardEpicGloves); } } //Moonsung Hauberk BardEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("BardEpicVest"); if (BardEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Bards Epic Vest , creating it ..."); BardEpicVest = new ItemTemplate(); BardEpicVest.Id_nb = "BardEpicVest"; BardEpicVest.Name = "Moonsung Hauberk"; BardEpicVest.Level = 50; BardEpicVest.Item_Type = 25; BardEpicVest.Model = 734; BardEpicVest.IsDropable = true; BardEpicVest.IsPickable = true; BardEpicVest.DPS_AF = 100; BardEpicVest.SPD_ABS = 19; BardEpicVest.Object_Type = 37; BardEpicVest.Quality = 100; BardEpicVest.Weight = 22; BardEpicVest.Bonus = 35; BardEpicVest.MaxCondition = 50000; BardEpicVest.MaxDurability = 50000; BardEpicVest.Condition = 50000; BardEpicVest.Durability = 50000; BardEpicVest.Bonus1 = 3; BardEpicVest.Bonus1Type = (int) eProperty.Skill_Regrowth; BardEpicVest.Bonus2 = 3; BardEpicVest.Bonus2Type = (int) eProperty.Skill_Nurture; BardEpicVest.Bonus3 = 13; BardEpicVest.Bonus3Type = (int) eStat.CON; BardEpicVest.Bonus4 = 15; BardEpicVest.Bonus4Type = (int) eStat.CHR; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(BardEpicVest); } } //Moonsung Legs BardEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("BardEpicLegs"); if (BardEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Bards Epic Legs , creating it ..."); BardEpicLegs = new ItemTemplate(); BardEpicLegs.Id_nb = "BardEpicLegs"; BardEpicLegs.Name = "Moonsung Legs"; BardEpicLegs.Level = 50; BardEpicLegs.Item_Type = 27; BardEpicLegs.Model = 735; BardEpicLegs.IsDropable = true; BardEpicLegs.IsPickable = true; BardEpicLegs.DPS_AF = 100; BardEpicLegs.SPD_ABS = 19; BardEpicLegs.Object_Type = 37; BardEpicLegs.Quality = 100; BardEpicLegs.Weight = 22; BardEpicLegs.Bonus = 35; BardEpicLegs.MaxCondition = 50000; BardEpicLegs.MaxDurability = 50000; BardEpicLegs.Condition = 50000; BardEpicLegs.Durability = 50000; BardEpicLegs.Bonus1 = 16; BardEpicLegs.Bonus1Type = (int) eStat.CON; BardEpicLegs.Bonus2 = 15; BardEpicLegs.Bonus2Type = (int) eStat.DEX; BardEpicLegs.Bonus3 = 10; BardEpicLegs.Bonus3Type = (int) eResist.Body; BardEpicLegs.Bonus4 = 10; BardEpicLegs.Bonus4Type = (int) eResist.Matter; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(BardEpicLegs); } } //Moonsung Sleeves BardEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("BardEpicArms"); if (BardEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Bard Epic Arms , creating it ..."); BardEpicArms = new ItemTemplate(); BardEpicArms.Id_nb = "BardEpicArms"; BardEpicArms.Name = "Moonsung Sleeves"; BardEpicArms.Level = 50; BardEpicArms.Item_Type = 28; BardEpicArms.Model = 736; BardEpicArms.IsDropable = true; BardEpicArms.IsPickable = true; BardEpicArms.DPS_AF = 100; BardEpicArms.SPD_ABS = 19; BardEpicArms.Object_Type = 37; BardEpicArms.Quality = 100; BardEpicArms.Weight = 22; BardEpicArms.Bonus = 35; BardEpicArms.MaxCondition = 50000; BardEpicArms.MaxDurability = 50000; BardEpicArms.Condition = 50000; BardEpicArms.Durability = 50000; BardEpicArms.Bonus1 = 15; BardEpicArms.Bonus1Type = (int) eStat.STR; BardEpicArms.Bonus2 = 12; BardEpicArms.Bonus2Type = (int) eStat.CHR; BardEpicArms.Bonus3 = 10; BardEpicArms.Bonus3Type = (int) eStat.CON; BardEpicArms.Bonus4 = 12; BardEpicArms.Bonus4Type = (int) eResist.Energy; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(BardEpicArms); } } //Champion Epic Sleeves End ChampionEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("ChampionEpicBoots"); if (ChampionEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Champions Epic Boots , creating it ..."); ChampionEpicBoots = new ItemTemplate(); ChampionEpicBoots.Id_nb = "ChampionEpicBoots"; ChampionEpicBoots.Name = "Moonglow Boots"; ChampionEpicBoots.Level = 50; ChampionEpicBoots.Item_Type = 23; ChampionEpicBoots.Model = 814; ChampionEpicBoots.IsDropable = true; ChampionEpicBoots.IsPickable = true; ChampionEpicBoots.DPS_AF = 100; ChampionEpicBoots.SPD_ABS = 27; ChampionEpicBoots.Object_Type = 38; ChampionEpicBoots.Quality = 100; ChampionEpicBoots.Weight = 22; ChampionEpicBoots.Bonus = 35; ChampionEpicBoots.MaxCondition = 50000; ChampionEpicBoots.MaxDurability = 50000; ChampionEpicBoots.Condition = 50000; ChampionEpicBoots.Durability = 50000; ChampionEpicBoots.Bonus1 = 33; ChampionEpicBoots.Bonus1Type = (int) eProperty.MaxHealth; ChampionEpicBoots.Bonus2 = 10; ChampionEpicBoots.Bonus2Type = (int) eResist.Heat; ChampionEpicBoots.Bonus3 = 10; ChampionEpicBoots.Bonus3Type = (int) eResist.Matter; ChampionEpicBoots.Bonus4 = 15; ChampionEpicBoots.Bonus4Type = (int) eStat.DEX; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(ChampionEpicBoots); } } //end item //Moonglow Coif ChampionEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("ChampionEpicHelm"); if (ChampionEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Champions Epic Helm , creating it ..."); ChampionEpicHelm = new ItemTemplate(); ChampionEpicHelm.Id_nb = "ChampionEpicHelm"; ChampionEpicHelm.Name = "Moonglow Coif"; ChampionEpicHelm.Level = 50; ChampionEpicHelm.Item_Type = 21; ChampionEpicHelm.Model = 1292; //NEED TO WORK ON.. ChampionEpicHelm.IsDropable = true; ChampionEpicHelm.IsPickable = true; ChampionEpicHelm.DPS_AF = 100; ChampionEpicHelm.SPD_ABS = 27; ChampionEpicHelm.Object_Type = 38; ChampionEpicHelm.Quality = 100; ChampionEpicHelm.Weight = 22; ChampionEpicHelm.Bonus = 35; ChampionEpicHelm.MaxCondition = 50000; ChampionEpicHelm.MaxDurability = 50000; ChampionEpicHelm.Condition = 50000; ChampionEpicHelm.Durability = 50000; ChampionEpicHelm.Bonus1 = 3; ChampionEpicHelm.Bonus1Type = (int) eProperty.Skill_Valor; ChampionEpicHelm.Bonus2 = 12; ChampionEpicHelm.Bonus2Type = (int) eStat.CON; ChampionEpicHelm.Bonus3 = 12; ChampionEpicHelm.Bonus3Type = (int) eStat.QUI; ChampionEpicHelm.Bonus4 = 6; ChampionEpicHelm.Bonus4Type = (int) eProperty.PowerRegenerationRate; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(ChampionEpicHelm); } } //end item //Moonglow Gloves ChampionEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("ChampionEpicGloves"); if (ChampionEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Champions Epic Gloves , creating it ..."); ChampionEpicGloves = new ItemTemplate(); ChampionEpicGloves.Id_nb = "ChampionEpicGloves"; ChampionEpicGloves.Name = "Moonglow Gloves "; ChampionEpicGloves.Level = 50; ChampionEpicGloves.Item_Type = 22; ChampionEpicGloves.Model = 813; ChampionEpicGloves.IsDropable = true; ChampionEpicGloves.IsPickable = true; ChampionEpicGloves.DPS_AF = 100; ChampionEpicGloves.SPD_ABS = 27; ChampionEpicGloves.Object_Type = 38; ChampionEpicGloves.Quality = 100; ChampionEpicGloves.Weight = 22; ChampionEpicGloves.Bonus = 35; ChampionEpicGloves.MaxCondition = 50000; ChampionEpicGloves.MaxDurability = 50000; ChampionEpicGloves.Condition = 50000; ChampionEpicGloves.Durability = 50000; ChampionEpicGloves.Bonus1 = 3; ChampionEpicGloves.Bonus1Type = (int) eProperty.Skill_Parry; ChampionEpicGloves.Bonus2 = 15; ChampionEpicGloves.Bonus2Type = (int) eStat.STR; ChampionEpicGloves.Bonus3 = 15; ChampionEpicGloves.Bonus3Type = (int) eStat.QUI; ChampionEpicGloves.Bonus4 = 10; ChampionEpicGloves.Bonus4Type = (int) eResist.Crush; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(ChampionEpicGloves); } } //Moonglow Hauberk ChampionEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("ChampionEpicVest"); if (ChampionEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Champions Epic Vest , creating it ..."); ChampionEpicVest = new ItemTemplate(); ChampionEpicVest.Id_nb = "ChampionEpicVest"; ChampionEpicVest.Name = "Moonglow Brestplate"; ChampionEpicVest.Level = 50; ChampionEpicVest.Item_Type = 25; ChampionEpicVest.Model = 810; ChampionEpicVest.IsDropable = true; ChampionEpicVest.IsPickable = true; ChampionEpicVest.DPS_AF = 100; ChampionEpicVest.SPD_ABS = 27; ChampionEpicVest.Object_Type = 38; ChampionEpicVest.Quality = 100; ChampionEpicVest.Weight = 22; ChampionEpicVest.Bonus = 35; ChampionEpicVest.MaxCondition = 50000; ChampionEpicVest.MaxDurability = 50000; ChampionEpicVest.Condition = 50000; ChampionEpicVest.Durability = 50000; ChampionEpicVest.Bonus1 = 4; ChampionEpicVest.Bonus1Type = (int) eProperty.Skill_Valor; ChampionEpicVest.Bonus2 = 13; ChampionEpicVest.Bonus2Type = (int) eStat.STR; ChampionEpicVest.Bonus3 = 13; ChampionEpicVest.Bonus3Type = (int) eStat.QUI; ChampionEpicVest.Bonus4 = 10; ChampionEpicVest.Bonus4Type = (int) eResist.Energy; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(ChampionEpicVest); } } //Moonglow Legs ChampionEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("ChampionEpicLegs"); if (ChampionEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Champions Epic Legs , creating it ..."); ChampionEpicLegs = new ItemTemplate(); ChampionEpicLegs.Id_nb = "ChampionEpicLegs"; ChampionEpicLegs.Name = "Moonglow Legs"; ChampionEpicLegs.Level = 50; ChampionEpicLegs.Item_Type = 27; ChampionEpicLegs.Model = 811; ChampionEpicLegs.IsDropable = true; ChampionEpicLegs.IsPickable = true; ChampionEpicLegs.DPS_AF = 100; ChampionEpicLegs.SPD_ABS = 27; ChampionEpicLegs.Object_Type = 38; ChampionEpicLegs.Quality = 100; ChampionEpicLegs.Weight = 22; ChampionEpicLegs.Bonus = 35; ChampionEpicLegs.MaxCondition = 50000; ChampionEpicLegs.MaxDurability = 50000; ChampionEpicLegs.Condition = 50000; ChampionEpicLegs.Durability = 50000; ChampionEpicLegs.Bonus1 = 15; ChampionEpicLegs.Bonus1Type = (int) eStat.CON; ChampionEpicLegs.Bonus2 = 15; ChampionEpicLegs.Bonus2Type = (int) eStat.DEX; ChampionEpicLegs.Bonus3 = 10; ChampionEpicLegs.Bonus3Type = (int) eResist.Crush; ChampionEpicLegs.Bonus4 = 18; ChampionEpicLegs.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(ChampionEpicLegs); } } //Moonglow Sleeves ChampionEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("ChampionEpicArms"); if (ChampionEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Champion Epic Arms , creating it ..."); ChampionEpicArms = new ItemTemplate(); ChampionEpicArms.Id_nb = "ChampionEpicArms"; ChampionEpicArms.Name = "Moonglow Sleeves"; ChampionEpicArms.Level = 50; ChampionEpicArms.Item_Type = 28; ChampionEpicArms.Model = 812; ChampionEpicArms.IsDropable = true; ChampionEpicArms.IsPickable = true; ChampionEpicArms.DPS_AF = 100; ChampionEpicArms.SPD_ABS = 27; ChampionEpicArms.Object_Type = 38; ChampionEpicArms.Quality = 100; ChampionEpicArms.Weight = 22; ChampionEpicArms.Bonus = 35; ChampionEpicArms.MaxCondition = 50000; ChampionEpicArms.MaxDurability = 50000; ChampionEpicArms.Condition = 50000; ChampionEpicArms.Durability = 50000; ChampionEpicArms.Bonus1 = 3; ChampionEpicArms.Bonus1Type = (int) eProperty.Skill_Large_Weapon; ChampionEpicArms.Bonus2 = 10; ChampionEpicArms.Bonus2Type = (int) eStat.STR; ChampionEpicArms.Bonus3 = 10; ChampionEpicArms.Bonus3Type = (int) eStat.QUI; ChampionEpicArms.Bonus4 = 33; ChampionEpicArms.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(ChampionEpicArms); } } NightshadeEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("NightshadeEpicBoots"); if (NightshadeEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Nightshade Epic Boots , creating it ..."); NightshadeEpicBoots = new ItemTemplate(); NightshadeEpicBoots.Id_nb = "NightshadeEpicBoots"; NightshadeEpicBoots.Name = "Moonlit Boots"; NightshadeEpicBoots.Level = 50; NightshadeEpicBoots.Item_Type = 23; NightshadeEpicBoots.Model = 750; NightshadeEpicBoots.IsDropable = true; NightshadeEpicBoots.IsPickable = true; NightshadeEpicBoots.DPS_AF = 100; NightshadeEpicBoots.SPD_ABS = 10; NightshadeEpicBoots.Object_Type = 33; NightshadeEpicBoots.Quality = 100; NightshadeEpicBoots.Weight = 22; NightshadeEpicBoots.Bonus = 35; NightshadeEpicBoots.MaxCondition = 50000; NightshadeEpicBoots.MaxDurability = 50000; NightshadeEpicBoots.Condition = 50000; NightshadeEpicBoots.Durability = 50000; NightshadeEpicBoots.Bonus1 = 12; NightshadeEpicBoots.Bonus1Type = (int) eStat.STR; NightshadeEpicBoots.Bonus2 = 15; NightshadeEpicBoots.Bonus2Type = (int) eStat.DEX; NightshadeEpicBoots.Bonus3 = 10; NightshadeEpicBoots.Bonus3Type = (int) eResist.Thrust; NightshadeEpicBoots.Bonus4 = 24; NightshadeEpicBoots.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(NightshadeEpicBoots); } } //end item //Moonlit Coif NightshadeEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("NightshadeEpicHelm"); if (NightshadeEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Nightshade Epic Helm , creating it ..."); NightshadeEpicHelm = new ItemTemplate(); NightshadeEpicHelm.Id_nb = "NightshadeEpicHelm"; NightshadeEpicHelm.Name = "Moonlit Helm"; NightshadeEpicHelm.Level = 50; NightshadeEpicHelm.Item_Type = 21; NightshadeEpicHelm.Model = 1292; //NEED TO WORK ON.. NightshadeEpicHelm.IsDropable = true; NightshadeEpicHelm.IsPickable = true; NightshadeEpicHelm.DPS_AF = 100; NightshadeEpicHelm.SPD_ABS = 10; NightshadeEpicHelm.Object_Type = 33; NightshadeEpicHelm.Quality = 100; NightshadeEpicHelm.Weight = 22; NightshadeEpicHelm.Bonus = 35; NightshadeEpicHelm.MaxCondition = 50000; NightshadeEpicHelm.MaxDurability = 50000; NightshadeEpicHelm.Condition = 50000; NightshadeEpicHelm.Durability = 50000; NightshadeEpicHelm.Bonus1 = 9; NightshadeEpicHelm.Bonus1Type = (int) eStat.STR; NightshadeEpicHelm.Bonus2 = 9; NightshadeEpicHelm.Bonus2Type = (int) eStat.DEX; NightshadeEpicHelm.Bonus3 = 9; NightshadeEpicHelm.Bonus3Type = (int) eStat.QUI; NightshadeEpicHelm.Bonus4 = 39; NightshadeEpicHelm.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(NightshadeEpicHelm); } } //end item //Moonlit Gloves NightshadeEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("NightshadeEpicGloves"); if (NightshadeEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Nightshade Epic Gloves , creating it ..."); NightshadeEpicGloves = new ItemTemplate(); NightshadeEpicGloves.Id_nb = "NightshadeEpicGloves"; NightshadeEpicGloves.Name = "Moonlit Gloves "; NightshadeEpicGloves.Level = 50; NightshadeEpicGloves.Item_Type = 22; NightshadeEpicGloves.Model = 749; NightshadeEpicGloves.IsDropable = true; NightshadeEpicGloves.IsPickable = true; NightshadeEpicGloves.DPS_AF = 100; NightshadeEpicGloves.SPD_ABS = 10; NightshadeEpicGloves.Object_Type = 33; NightshadeEpicGloves.Quality = 100; NightshadeEpicGloves.Weight = 22; NightshadeEpicGloves.Bonus = 35; NightshadeEpicGloves.MaxCondition = 50000; NightshadeEpicGloves.MaxDurability = 50000; NightshadeEpicGloves.Condition = 50000; NightshadeEpicGloves.Durability = 50000; NightshadeEpicGloves.Bonus1 = 2; NightshadeEpicGloves.Bonus1Type = (int) eProperty.Skill_Critical_Strike; NightshadeEpicGloves.Bonus2 = 12; NightshadeEpicGloves.Bonus2Type = (int) eStat.DEX; NightshadeEpicGloves.Bonus3 = 13; NightshadeEpicGloves.Bonus3Type = (int) eStat.QUI; NightshadeEpicGloves.Bonus4 = 5; NightshadeEpicGloves.Bonus4Type = (int) eProperty.Skill_Envenom; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(NightshadeEpicGloves); } } //Moonlit Hauberk NightshadeEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("NightshadeEpicVest"); if (NightshadeEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Nightshade Epic Vest , creating it ..."); NightshadeEpicVest = new ItemTemplate(); NightshadeEpicVest.Id_nb = "NightshadeEpicVest"; NightshadeEpicVest.Name = "Moonlit Leather Jerking"; NightshadeEpicVest.Level = 50; NightshadeEpicVest.Item_Type = 25; NightshadeEpicVest.Model = 746; NightshadeEpicVest.IsDropable = true; NightshadeEpicVest.IsPickable = true; NightshadeEpicVest.DPS_AF = 100; NightshadeEpicVest.SPD_ABS = 10; NightshadeEpicVest.Object_Type = 33; NightshadeEpicVest.Quality = 100; NightshadeEpicVest.Weight = 22; NightshadeEpicVest.Bonus = 35; NightshadeEpicVest.MaxCondition = 50000; NightshadeEpicVest.MaxDurability = 50000; NightshadeEpicVest.Condition = 50000; NightshadeEpicVest.Durability = 50000; NightshadeEpicVest.Bonus1 = 10; NightshadeEpicVest.Bonus1Type = (int) eStat.STR; NightshadeEpicVest.Bonus2 = 10; NightshadeEpicVest.Bonus2Type = (int) eStat.DEX; NightshadeEpicVest.Bonus3 = 30; NightshadeEpicVest.Bonus3Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(NightshadeEpicVest); } } //Moonlit Legs NightshadeEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("NightshadeEpicLegs"); if (NightshadeEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Nightshade Epic Legs , creating it ..."); NightshadeEpicLegs = new ItemTemplate(); NightshadeEpicLegs.Id_nb = "NightshadeEpicLegs"; NightshadeEpicLegs.Name = "Moonlit Leggings"; NightshadeEpicLegs.Level = 50; NightshadeEpicLegs.Item_Type = 27; NightshadeEpicLegs.Model = 747; NightshadeEpicLegs.IsDropable = true; NightshadeEpicLegs.IsPickable = true; NightshadeEpicLegs.DPS_AF = 100; NightshadeEpicLegs.SPD_ABS = 10; NightshadeEpicLegs.Object_Type = 33; NightshadeEpicLegs.Quality = 100; NightshadeEpicLegs.Weight = 22; NightshadeEpicLegs.Bonus = 35; NightshadeEpicLegs.MaxCondition = 50000; NightshadeEpicLegs.MaxDurability = 50000; NightshadeEpicLegs.Condition = 50000; NightshadeEpicLegs.Durability = 50000; NightshadeEpicLegs.Bonus1 = 16; NightshadeEpicLegs.Bonus1Type = (int) eStat.CON; NightshadeEpicLegs.Bonus2 = 15; NightshadeEpicLegs.Bonus2Type = (int) eStat.DEX; NightshadeEpicLegs.Bonus3 = 10; NightshadeEpicLegs.Bonus3Type = (int) eResist.Crush; NightshadeEpicLegs.Bonus4 = 10; NightshadeEpicLegs.Bonus4Type = (int) eResist.Slash; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(NightshadeEpicLegs); } } //Moonlit Sleeves NightshadeEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("NightshadeEpicArms"); if (NightshadeEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Nightshade Epic Arms , creating it ..."); NightshadeEpicArms = new ItemTemplate(); NightshadeEpicArms.Id_nb = "NightshadeEpicArms"; NightshadeEpicArms.Name = "Moonlit Sleeves"; NightshadeEpicArms.Level = 50; NightshadeEpicArms.Item_Type = 28; NightshadeEpicArms.Model = 748; NightshadeEpicArms.IsDropable = true; NightshadeEpicArms.IsPickable = true; NightshadeEpicArms.DPS_AF = 100; NightshadeEpicArms.SPD_ABS = 10; NightshadeEpicArms.Object_Type = 33; NightshadeEpicArms.Quality = 100; NightshadeEpicArms.Weight = 22; NightshadeEpicArms.Bonus = 35; NightshadeEpicArms.MaxCondition = 50000; NightshadeEpicArms.MaxDurability = 50000; NightshadeEpicArms.Condition = 50000; NightshadeEpicArms.Durability = 50000; NightshadeEpicArms.Bonus1 = 4; NightshadeEpicArms.Bonus1Type = (int) eProperty.Skill_Celtic_Dual; NightshadeEpicArms.Bonus2 = 16; NightshadeEpicArms.Bonus2Type = (int) eStat.CON; NightshadeEpicArms.Bonus3 = 15; NightshadeEpicArms.Bonus3Type = (int) eStat.DEX; NightshadeEpicArms.Bonus4 = 6; NightshadeEpicArms.Bonus4Type = (int) eResist.Cold; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(NightshadeEpicArms); } } EnchanterEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("EnchanterEpicBoots"); if (EnchanterEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Enchanter Epic Boots , creating it ..."); EnchanterEpicBoots = new ItemTemplate(); EnchanterEpicBoots.Id_nb = "EnchanterEpicBoots"; EnchanterEpicBoots.Name = "Moonspun Boots"; EnchanterEpicBoots.Level = 50; EnchanterEpicBoots.Item_Type = 23; EnchanterEpicBoots.Model = 382; EnchanterEpicBoots.IsDropable = true; EnchanterEpicBoots.IsPickable = true; EnchanterEpicBoots.DPS_AF = 50; EnchanterEpicBoots.SPD_ABS = 0; EnchanterEpicBoots.Object_Type = 32; EnchanterEpicBoots.Quality = 100; EnchanterEpicBoots.Weight = 22; EnchanterEpicBoots.Bonus = 35; EnchanterEpicBoots.MaxCondition = 50000; EnchanterEpicBoots.MaxDurability = 50000; EnchanterEpicBoots.Condition = 50000; EnchanterEpicBoots.Durability = 50000; EnchanterEpicBoots.Bonus1 = 12; EnchanterEpicBoots.Bonus1Type = (int) eStat.CON; EnchanterEpicBoots.Bonus2 = 12; EnchanterEpicBoots.Bonus2Type = (int) eStat.DEX; EnchanterEpicBoots.Bonus3 = 12; EnchanterEpicBoots.Bonus3Type = (int) eResist.Body; EnchanterEpicBoots.Bonus4 = 39; EnchanterEpicBoots.Bonus4Type = (int) eProperty.MaxHealth; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(EnchanterEpicBoots); } } //end item //Moonspun Coif EnchanterEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("EnchanterEpicHelm"); if (EnchanterEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Enchanter Epic Helm , creating it ..."); EnchanterEpicHelm = new ItemTemplate(); EnchanterEpicHelm.Id_nb = "EnchanterEpicHelm"; EnchanterEpicHelm.Name = "Moonspun Cap"; EnchanterEpicHelm.Level = 50; EnchanterEpicHelm.Item_Type = 21; EnchanterEpicHelm.Model = 1298; //NEED TO WORK ON.. EnchanterEpicHelm.IsDropable = true; EnchanterEpicHelm.IsPickable = true; EnchanterEpicHelm.DPS_AF = 50; EnchanterEpicHelm.SPD_ABS = 0; EnchanterEpicHelm.Object_Type = 32; EnchanterEpicHelm.Quality = 100; EnchanterEpicHelm.Weight = 22; EnchanterEpicHelm.Bonus = 35; EnchanterEpicHelm.MaxCondition = 50000; EnchanterEpicHelm.MaxDurability = 50000; EnchanterEpicHelm.Condition = 50000; EnchanterEpicHelm.Durability = 50000; EnchanterEpicHelm.Bonus1 = 21; EnchanterEpicHelm.Bonus1Type = (int) eProperty.MaxHealth; EnchanterEpicHelm.Bonus2 = 8; EnchanterEpicHelm.Bonus2Type = (int) eResist.Energy; EnchanterEpicHelm.Bonus3 = 4; EnchanterEpicHelm.Bonus3Type = (int) eProperty.Skill_Enchantments; EnchanterEpicHelm.Bonus4 = 18; EnchanterEpicHelm.Bonus4Type = (int) eStat.INT; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(EnchanterEpicHelm); } } //end item //Moonspun Gloves EnchanterEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("EnchanterEpicGloves"); if (EnchanterEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Enchanter Epic Gloves , creating it ..."); EnchanterEpicGloves = new ItemTemplate(); EnchanterEpicGloves.Id_nb = "EnchanterEpicGloves"; EnchanterEpicGloves.Name = "Moonspun Gloves "; EnchanterEpicGloves.Level = 50; EnchanterEpicGloves.Item_Type = 22; EnchanterEpicGloves.Model = 381; EnchanterEpicGloves.IsDropable = true; EnchanterEpicGloves.IsPickable = true; EnchanterEpicGloves.DPS_AF = 50; EnchanterEpicGloves.SPD_ABS = 0; EnchanterEpicGloves.Object_Type = 32; EnchanterEpicGloves.Quality = 100; EnchanterEpicGloves.Weight = 22; EnchanterEpicGloves.Bonus = 35; EnchanterEpicGloves.MaxCondition = 50000; EnchanterEpicGloves.MaxDurability = 50000; EnchanterEpicGloves.Condition = 50000; EnchanterEpicGloves.Durability = 50000; EnchanterEpicGloves.Bonus1 = 30; EnchanterEpicGloves.Bonus1Type = (int) eProperty.MaxHealth; EnchanterEpicGloves.Bonus2 = 4; EnchanterEpicGloves.Bonus2Type = (int) eProperty.Skill_Mana; EnchanterEpicGloves.Bonus3 = 6; EnchanterEpicGloves.Bonus3Type = (int) eStat.INT; EnchanterEpicGloves.Bonus4 = 13; EnchanterEpicGloves.Bonus4Type = (int) eStat.DEX; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(EnchanterEpicGloves); } } //Moonspun Hauberk EnchanterEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("EnchanterEpicVest"); if (EnchanterEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Enchanter Epic Vest , creating it ..."); EnchanterEpicVest = new ItemTemplate(); EnchanterEpicVest.Id_nb = "EnchanterEpicVest"; EnchanterEpicVest.Name = "Moonspun Vest"; EnchanterEpicVest.Level = 50; EnchanterEpicVest.Item_Type = 25; EnchanterEpicVest.Model = 781; EnchanterEpicVest.IsDropable = true; EnchanterEpicVest.IsPickable = true; EnchanterEpicVest.DPS_AF = 50; EnchanterEpicVest.SPD_ABS = 0; EnchanterEpicVest.Object_Type = 32; EnchanterEpicVest.Quality = 100; EnchanterEpicVest.Weight = 22; EnchanterEpicVest.Bonus = 35; EnchanterEpicVest.MaxCondition = 50000; EnchanterEpicVest.MaxDurability = 50000; EnchanterEpicVest.Condition = 50000; EnchanterEpicVest.Durability = 50000; EnchanterEpicVest.Bonus1 = 30; EnchanterEpicVest.Bonus1Type = (int) eProperty.MaxHealth; EnchanterEpicVest.Bonus2 = 15; EnchanterEpicVest.Bonus2Type = (int) eStat.INT; EnchanterEpicVest.Bonus3 = 15; EnchanterEpicVest.Bonus3Type = (int) eStat.DEX; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(EnchanterEpicVest); } } //Moonspun Legs EnchanterEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("EnchanterEpicLegs"); if (EnchanterEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Enchanter Epic Legs , creating it ..."); EnchanterEpicLegs = new ItemTemplate(); EnchanterEpicLegs.Id_nb = "EnchanterEpicLegs"; EnchanterEpicLegs.Name = "Moonspun Pants"; EnchanterEpicLegs.Level = 50; EnchanterEpicLegs.Item_Type = 27; EnchanterEpicLegs.Model = 379; EnchanterEpicLegs.IsDropable = true; EnchanterEpicLegs.IsPickable = true; EnchanterEpicLegs.DPS_AF = 50; EnchanterEpicLegs.SPD_ABS = 0; EnchanterEpicLegs.Object_Type = 32; EnchanterEpicLegs.Quality = 100; EnchanterEpicLegs.Weight = 22; EnchanterEpicLegs.Bonus = 35; EnchanterEpicLegs.MaxCondition = 50000; EnchanterEpicLegs.MaxDurability = 50000; EnchanterEpicLegs.Condition = 50000; EnchanterEpicLegs.Durability = 50000; EnchanterEpicLegs.Bonus1 = 16; EnchanterEpicLegs.Bonus1Type = (int) eStat.CON; EnchanterEpicLegs.Bonus2 = 15; EnchanterEpicLegs.Bonus2Type = (int) eStat.DEX; EnchanterEpicLegs.Bonus3 = 10; EnchanterEpicLegs.Bonus3Type = (int) eResist.Heat; EnchanterEpicLegs.Bonus4 = 10; EnchanterEpicLegs.Bonus4Type = (int) eResist.Cold; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(EnchanterEpicLegs); } } //Moonspun Sleeves EnchanterEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("EnchanterEpicArms"); if (EnchanterEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Enchanter Epic Arms , creating it ..."); EnchanterEpicArms = new ItemTemplate(); EnchanterEpicArms.Id_nb = "EnchanterEpicArms"; EnchanterEpicArms.Name = "Moonspun Sleeves"; EnchanterEpicArms.Level = 50; EnchanterEpicArms.Item_Type = 28; EnchanterEpicArms.Model = 380; EnchanterEpicArms.IsDropable = true; EnchanterEpicArms.IsPickable = true; EnchanterEpicArms.DPS_AF = 50; EnchanterEpicArms.SPD_ABS = 0; EnchanterEpicArms.Object_Type = 32; EnchanterEpicArms.Quality = 100; EnchanterEpicArms.Weight = 22; EnchanterEpicArms.Bonus = 35; EnchanterEpicArms.MaxCondition = 50000; EnchanterEpicArms.MaxDurability = 50000; EnchanterEpicArms.Condition = 50000; EnchanterEpicArms.Durability = 50000; EnchanterEpicArms.Bonus1 = 27; EnchanterEpicArms.Bonus1Type = (int) eProperty.MaxHealth; EnchanterEpicArms.Bonus2 = 10; EnchanterEpicArms.Bonus2Type = (int) eStat.INT; EnchanterEpicArms.Bonus3 = 5; EnchanterEpicArms.Bonus3Type = (int) eProperty.Skill_Light; EnchanterEpicArms.Bonus4 = 10; EnchanterEpicArms.Bonus4Type = (int) eStat.DEX; if (SAVE_INTO_DATABASE) { GameServer.Database.AddObject(EnchanterEpicArms); } } //Champion Epic Sleeves End //Item Descriptions End #endregion GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(Brigit, GameObjectEvent.Interact, new DOLEventHandler(TalkToBrigit)); GameEventMgr.AddHandler(Brigit, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToBrigit)); /* Now we bring to Brigit the possibility to give this quest to players */ Brigit.AddQuestToGive(typeof (Essence_50)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
private void Init() { #region defineItems RecruitsIntelligentBelt = GameServer.Database.FindObjectByKey<ItemTemplate>("RecruitsIntelligentBelt"); if(RecruitsIntelligentBelt == null) { RecruitsIntelligentBelt = new ItemTemplate(); RecruitsIntelligentBelt.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Alb.ToReachTheBreach.Init.Text1"); RecruitsIntelligentBelt.Id_nb = "RecruitsIntelligentBelt"; RecruitsIntelligentBelt.Level = 4; RecruitsIntelligentBelt.Weight = 3; RecruitsIntelligentBelt.Model = 597; RecruitsIntelligentBelt.Color = 0; RecruitsIntelligentBelt.Object_Type = (int)eObjectType.Magical; RecruitsIntelligentBelt.Item_Type = (int)eEquipmentItems.WAIST; RecruitsIntelligentBelt.Price = Money.GetMoney(0,0,0,0,10); RecruitsIntelligentBelt.Quality = 100; RecruitsIntelligentBelt.Condition = 50000; RecruitsIntelligentBelt.MaxCondition = 50000; RecruitsIntelligentBelt.Durability = 50000; RecruitsIntelligentBelt.MaxDurability = 50000; RecruitsIntelligentBelt.Bonus1 = 3; RecruitsIntelligentBelt.Bonus1Type = (int)eProperty.Acuity ; RecruitsIntelligentBelt.Bonus2 = 3; RecruitsIntelligentBelt.Bonus2Type = (int)eProperty.Dexterity; RecruitsIntelligentBelt.Bonus3 = 1; RecruitsIntelligentBelt.Bonus3Type = (int)eProperty.Constitution; RecruitsIntelligentBelt.Bonus4 = 8; RecruitsIntelligentBelt.Bonus4Type = (int)eProperty.MaxHealth; RecruitsIntelligentBelt.IsDropable = false; GameServer.Database.AddObject(RecruitsIntelligentBelt); } RecruitsMightyBelt = GameServer.Database.FindObjectByKey<ItemTemplate>("RecruitsMightyBelt"); if(RecruitsMightyBelt == null) { RecruitsMightyBelt = new ItemTemplate(); RecruitsMightyBelt.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Alb.ToReachTheBreach.Init.Text2"); RecruitsMightyBelt.Id_nb = "RecruitsMightyBelt"; RecruitsMightyBelt.Level = 4; RecruitsMightyBelt.Weight = 3; RecruitsMightyBelt.Model = 597; RecruitsMightyBelt.Color = 0; RecruitsMightyBelt.Object_Type = (int)eObjectType.Magical; RecruitsMightyBelt.Item_Type = (int)eEquipmentItems.WAIST; RecruitsMightyBelt.Price = Money.GetMoney(0,0,0,0,10); RecruitsMightyBelt.Quality = 100; RecruitsMightyBelt.Condition = 50000; RecruitsMightyBelt.MaxCondition = 50000; RecruitsMightyBelt.Durability = 50000; RecruitsMightyBelt.MaxDurability = 50000; RecruitsMightyBelt.Bonus1 = 3; RecruitsMightyBelt.Bonus1Type = (int)eProperty.Strength; RecruitsMightyBelt.Bonus2 = 3; RecruitsMightyBelt.Bonus2Type = (int)eProperty.Dexterity; RecruitsMightyBelt.Bonus3 = 1; RecruitsMightyBelt.Bonus3Type = (int)eProperty.Quickness; RecruitsMightyBelt.Bonus4 = 8; RecruitsMightyBelt.Bonus4Type = (int)eProperty.MaxHealth; RecruitsMightyBelt.IsDropable = false; GameServer.Database.AddObject(RecruitsMightyBelt); } RecruitsPiousBelt = GameServer.Database.FindObjectByKey<ItemTemplate>("RecruitsPiousBelt"); if(RecruitsPiousBelt == null) { RecruitsPiousBelt = new ItemTemplate(); RecruitsPiousBelt.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Alb.ToReachTheBreach.Init.Text3"); RecruitsPiousBelt.Id_nb = "RecruitsPiousBelt"; RecruitsPiousBelt.Level = 4; RecruitsPiousBelt.Weight = 3; RecruitsPiousBelt.Model = 597; RecruitsPiousBelt.Color = 0; RecruitsPiousBelt.Object_Type = (int)eObjectType.Magical; RecruitsPiousBelt.Item_Type = (int)eEquipmentItems.WAIST; RecruitsPiousBelt.Price = Money.GetMoney(0,0,0,0,10); RecruitsPiousBelt.Quality = 100; RecruitsPiousBelt.Condition = 50000; RecruitsPiousBelt.MaxCondition = 50000; RecruitsPiousBelt.Durability = 50000; RecruitsPiousBelt.MaxDurability = 50000; RecruitsPiousBelt.Bonus1 = 3; RecruitsPiousBelt.Bonus1Type = (int)eProperty.Acuity; RecruitsPiousBelt.Bonus2 = 1; RecruitsPiousBelt.Bonus2Type = (int)eProperty.AllMagicSkills; RecruitsPiousBelt.Bonus3 = 3; RecruitsPiousBelt.Bonus3Type = (int)eProperty.Dexterity; RecruitsPiousBelt.Bonus4 = 8; RecruitsPiousBelt.Bonus4Type = (int)eProperty.MaxHealth; RecruitsPiousBelt.IsDropable = false; GameServer.Database.AddObject(RecruitsPiousBelt); } #endregion Level = 3; QuestGiver = LadyGrynoch; Rewards.Experience = 90; Rewards.MoneyPercent = 100; Rewards.AddOptionalItem(RecruitsIntelligentBelt); Rewards.AddOptionalItem(RecruitsMightyBelt); Rewards.AddOptionalItem(RecruitsPiousBelt); Rewards.ChoiceOf = 1; FoundBreach = AddGoal(LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Alb.ToReachTheBreach.Init.Text4"), QuestGoal.GoalType.ScoutMission, 1, null); }
public static void OnScriptLoaded(DOLEvent e, object sender, EventArgs args) { ItemTemplate arrow_summoning1 = GameServer.Database.FindObjectByKey<ItemTemplate>("arrow_summoning1"); if (arrow_summoning1 == null) { arrow_summoning1 = new ItemTemplate(); arrow_summoning1.Name = "mystical barbed footed flight broadhead arrows"; arrow_summoning1.Level = 1; arrow_summoning1.MaxDurability = 100; arrow_summoning1.MaxCondition = 50000; arrow_summoning1.Quality = 100; arrow_summoning1.DPS_AF = 0; arrow_summoning1.SPD_ABS = 47; arrow_summoning1.Hand = 0; arrow_summoning1.Type_Damage = 3; arrow_summoning1.Object_Type = 43; arrow_summoning1.Item_Type = 40; arrow_summoning1.Weight = 0; arrow_summoning1.Model = 1635; arrow_summoning1.IsPickable = true; arrow_summoning1.IsDropable = false; arrow_summoning1.IsTradable = false; arrow_summoning1.MaxCount = 20; arrow_summoning1.Id_nb = "arrow_summoning1"; GameServer.Database.AddObject(arrow_summoning1); if (log.IsDebugEnabled) log.Debug("Added " + arrow_summoning1.Id_nb); } ItemTemplate arrow_summoning2 = GameServer.Database.FindObjectByKey<ItemTemplate>("arrow_summoning2"); if (arrow_summoning2 == null) { arrow_summoning2 = new ItemTemplate(); arrow_summoning2.Name = "mystical keen footed flight broadhead arrows"; arrow_summoning2.Level = 1; arrow_summoning2.MaxDurability = 100; arrow_summoning2.MaxCondition = 50000; arrow_summoning2.Quality = 100; arrow_summoning2.DPS_AF = 0; arrow_summoning2.SPD_ABS = 47; arrow_summoning2.Hand = 0; arrow_summoning2.Type_Damage = 3; arrow_summoning2.Object_Type = 43; arrow_summoning2.Item_Type = 40; arrow_summoning2.Weight = 0; arrow_summoning2.Model = 1635; arrow_summoning2.IsPickable = true; arrow_summoning2.IsDropable = false; arrow_summoning2.IsTradable = false; arrow_summoning2.MaxCount = 20; arrow_summoning2.Id_nb = "arrow_summoning2"; GameServer.Database.AddObject(arrow_summoning2); if (log.IsDebugEnabled) log.Debug("Added " + arrow_summoning2.Id_nb); } ItemTemplate arrow_summoning3 = GameServer.Database.FindObjectByKey<ItemTemplate>("arrow_summoning3"); if (arrow_summoning3 == null) { arrow_summoning3 = new ItemTemplate(); arrow_summoning3.Name = "mystical blunt footed flight broadhead arrows"; arrow_summoning3.Level = 1; arrow_summoning3.MaxDurability = 100; arrow_summoning3.MaxCondition = 50000; arrow_summoning3.Quality = 100; arrow_summoning3.DPS_AF = 0; arrow_summoning3.SPD_ABS = 47; arrow_summoning3.Hand = 0; arrow_summoning3.Type_Damage = 3; arrow_summoning3.Object_Type = 43; arrow_summoning3.Item_Type = 40; arrow_summoning3.Weight = 0; arrow_summoning3.Model = 1635; arrow_summoning3.IsPickable = true; arrow_summoning3.IsDropable = false; arrow_summoning3.IsTradable = false; arrow_summoning3.MaxCount = 20; arrow_summoning3.Id_nb = "arrow_summoning3"; GameServer.Database.AddObject(arrow_summoning3); if (log.IsDebugEnabled) log.Debug("Added " + arrow_summoning3.Id_nb); } }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the certain Realm. If we find a the players, * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCs masterFrederick = GetMasterFrederick(); GameNPC[] npcs = WorldMgr.GetNPCsByName("Apprentice Dunan", eRealm.Albion); if (npcs.Length == 0) { dunan = new GameNPC(); dunan.Model = 49; dunan.Name = "Apprentice Dunan"; if (log.IsWarnEnabled) log.Warn("Could not find " + dunan.Name + ", creating ..."); dunan.GuildName = "Part of " + questTitle + " Quest"; dunan.Realm = eRealm.Albion; dunan.CurrentRegionID = 1; dunan.Size = 49; dunan.Level = 21; dunan.X = 531663; dunan.Y = 479785; dunan.Z = 2200; dunan.Heading = 1579; dunan.EquipmentTemplateID = "1707754"; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) dunan.SaveIntoDatabase(); dunan.AddToWorld(); } else dunan = npcs[0]; npcs = WorldMgr.GetNPCsByName("Bombard", eRealm.Albion); if (npcs.Length == 0) { bombard = new GameStableMaster(); bombard.Model = 8; bombard.Name = "Bombard"; if (log.IsWarnEnabled) log.Warn("Could not find " + bombard.Name + ", creating ..."); bombard.GuildName = "Stable Master"; bombard.Realm = eRealm.Albion; bombard.CurrentRegionID = 1; bombard.Size = 49; bombard.Level = 4; bombard.X = 515718; bombard.Y = 496739; bombard.Z = 3352; bombard.Heading = 2500; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) bombard.SaveIntoDatabase(); bombard.AddToWorld(); } else bombard = npcs[0]; npcs = WorldMgr.GetNPCsByName("Vuloch", eRealm.Albion); if (npcs.Length == 0) { vuloch = new GameStableMaster(); vuloch.Model = 86; vuloch.Name = "Vuloch"; if (log.IsWarnEnabled) log.Warn("Could not find " + vuloch.Name + ", creating ..."); vuloch.GuildName = "Stable Master"; vuloch.Realm = eRealm.Albion; vuloch.CurrentRegionID = 1; vuloch.Size = 50; vuloch.Level = 4; vuloch.X = 553089; vuloch.Y = 513380; vuloch.Z = 2896; vuloch.Heading = 2139; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) vuloch.SaveIntoDatabase(); vuloch.AddToWorld(); } else vuloch = npcs[0]; npcs = WorldMgr.GetNPCsByName("Yaren", eRealm.Albion); if (npcs.Length == 0) { yaren = new GameStableMaster(); yaren.Model = 79; yaren.Name = "Yaren"; if (log.IsWarnEnabled) log.Warn("Could not find " + yaren.Name + ", creating ..."); yaren.GuildName = "Stable Master"; yaren.Realm = eRealm.Albion; yaren.CurrentRegionID = 1; yaren.Size = 48; yaren.Level = 4; yaren.X = 529638; yaren.Y = 478091; yaren.Z = 2200; yaren.Heading = 3160; yaren.EquipmentTemplateID = "11701347"; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) yaren.SaveIntoDatabase(); yaren.AddToWorld(); } else yaren = npcs[0]; #endregion #region defineItems ticketToLudlow = CreateTicketTo("Ludlow", "hs_northcamelotgates_ludlow"); ticketToBombard = CreateTicketTo("North Camelot Gates", "hs_ludlow_northcamelotgates"); sackOfSupplies = GameServer.Database.FindObjectByKey<ItemTemplate>("sack_of_supplies"); if (sackOfSupplies == null) { sackOfSupplies = new ItemTemplate(); sackOfSupplies.Name = "Sack of Supplies"; if (log.IsWarnEnabled) log.Warn("Could not find " + sackOfSupplies.Name + " , creating it ..."); sackOfSupplies.Weight = 10; sackOfSupplies.Model = 488; sackOfSupplies.Object_Type = (int) eObjectType.GenericItem; sackOfSupplies.Id_nb = "sack_of_supplies"; sackOfSupplies.IsPickable = true; sackOfSupplies.IsDropable = false; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(sackOfSupplies); } crateOfVegetables = GameServer.Database.FindObjectByKey<ItemTemplate>("crate_of_vegetables"); if (crateOfVegetables == null) { crateOfVegetables = new ItemTemplate(); crateOfVegetables.Name = "Crate of Vegetables"; if (log.IsWarnEnabled) log.Warn("Could not find " + crateOfVegetables.Name + " , creating it ..."); crateOfVegetables.Weight = 15; crateOfVegetables.Model = 602; crateOfVegetables.Object_Type = (int) eObjectType.GenericItem; crateOfVegetables.Id_nb = "crate_of_vegetables"; crateOfVegetables.IsPickable = true; crateOfVegetables.IsDropable = false; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(crateOfVegetables); } // item db check recruitsCloak = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_cloak"); if (recruitsCloak == null) { recruitsCloak = new ItemTemplate(); recruitsCloak.Name = "Recruit's Cloak"; if (log.IsWarnEnabled) log.Warn("Could not find " + recruitsCloak.Name + ", creating it ..."); recruitsCloak.Level = 3; recruitsCloak.Weight = 3; recruitsCloak.Model = 57; // studded Boots recruitsCloak.Object_Type = (int) eObjectType.Cloth; recruitsCloak.Item_Type = (int) eEquipmentItems.CLOAK; recruitsCloak.Id_nb = "recruits_cloak"; recruitsCloak.Price = Money.GetMoney(0,0,0,1,0); recruitsCloak.IsPickable = true; recruitsCloak.IsDropable = true; recruitsCloak.Color = 36; recruitsCloak.Bonus = 1; // default bonus recruitsCloak.Bonus1 = 1; recruitsCloak.Bonus1Type = (int) eStat.CON; recruitsCloak.Bonus2 = 1; recruitsCloak.Bonus2Type = (int) eResist.Slash; recruitsCloak.Quality = 100; recruitsCloak.Condition = 1000; recruitsCloak.MaxCondition = 1000; recruitsCloak.Durability = 1000; recruitsCloak.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(recruitsCloak); } #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); //We want to be notified whenever a player enters the world GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterFrederick)); GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToMasterFrederick)); GameEventMgr.AddHandler(bombard, GameLivingEvent.Interact, new DOLEventHandler(TalkToBombard)); GameEventMgr.AddHandler(bombard, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToBombard)); GameEventMgr.AddHandler(dunan, GameLivingEvent.Interact, new DOLEventHandler(TalkToDunan)); GameEventMgr.AddHandler(dunan, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToDunan)); /* Now we bring to masterFrederick the possibility to give this quest to players */ masterFrederick.AddQuestToGive(typeof (ImportantDelivery)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the certain Realm. If we find a the players, * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCS GameNPC[] npcs = WorldMgr.GetNPCsByName("Hugh Gallen", eRealm.Albion); /* Whops, if the npcs array length is 0 then no npc exists in * this users Mob Database, so we simply create one ;-) * else we take the existing one. And if more than one exist, we take * the first ... */ if (npcs.Length == 0) { hughGallen = new GameNPC(); hughGallen.Model = 40; hughGallen.Name = "Hugh Gallen"; if (log.IsWarnEnabled) log.Warn("Could not find " + hughGallen.Name + ", creating him ..."); hughGallen.GuildName = "Part of " + questTitle + " Quest"; hughGallen.Realm = eRealm.Albion; hughGallen.CurrentRegionID = 1; GameNpcInventoryTemplate template = new GameNpcInventoryTemplate(); template.AddNPCEquipment(eInventorySlot.HandsArmor, 39); template.AddNPCEquipment(eInventorySlot.FeetArmor, 40); template.AddNPCEquipment(eInventorySlot.TorsoArmor, 36); template.AddNPCEquipment(eInventorySlot.LegsArmor, 37); template.AddNPCEquipment(eInventorySlot.ArmsArmor, 38); hughGallen.Inventory = template.CloseTemplate(); hughGallen.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard); hughGallen.Size = 49; hughGallen.Level = 38; hughGallen.X = 574640; hughGallen.Y = 531109; hughGallen.Z = 2896; hughGallen.Heading = 2275; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) hughGallen.SaveIntoDatabase(); hughGallen.AddToWorld(); } else hughGallen = npcs[0]; #endregion #region defineItems // item db check beltOfAnimation = GameServer.Database.FindObjectByKey<ItemTemplate>("belt_of_animation"); if (beltOfAnimation == null) { beltOfAnimation = new ItemTemplate(); beltOfAnimation.Name = "Belt of Animation"; if (log.IsWarnEnabled) log.Warn("Could not find "+beltOfAnimation.Name+", creating it ..."); beltOfAnimation.Level = 5; beltOfAnimation.Weight = 3; beltOfAnimation.Model = 597; beltOfAnimation.Object_Type = (int) eObjectType.Magical; beltOfAnimation.Item_Type = (int) eEquipmentItems.WAIST; beltOfAnimation.Id_nb = "belt_of_animation"; beltOfAnimation.Price = 0; beltOfAnimation.IsPickable = true; beltOfAnimation.IsDropable = false; // can't be sold to merchand beltOfAnimation.Bonus1 = 6; beltOfAnimation.Bonus1Type = (int)eProperty.MaxHealth; beltOfAnimation.Quality = 100; beltOfAnimation.Condition = 1000; beltOfAnimation.MaxCondition = 1000; beltOfAnimation.Durability = 1000; beltOfAnimation.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(beltOfAnimation); } #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(hughGallen, GameLivingEvent.Interact, new DOLEventHandler(TalkToHughGallen)); GameEventMgr.AddHandler(hughGallen, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToHughGallen)); /* Now we bring to Yetta Fletcher the possibility to give this quest to players */ hughGallen.AddQuestToGive(typeof (ClericMulgrut)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); /* First thing we do in here is to search for the NPCs inside * the world who comes from the certain Realm. If we find a the players, * this means we don't have to create a new one. * * NOTE: You can do anything you want in this method, you don't have * to search for NPC's ... you could create a custom item, place it * on the ground and if a player picks it up, he will get the quest! * Just examples, do anything you like and feel comfortable with :) */ #region defineNPCS GameNPC[] npcs = WorldMgr.GetNPCsByName("Elvar Ironhand", eRealm.Albion); /* Whops, if the npcs array length is 0 then no npc exists in * this users Mob Database, so we simply create one ;-) * else we take the existing one. And if more than one exist, we take * the first ... */ if (npcs.Length == 0) { elvarIronhand = new GameNPC(); elvarIronhand.Model = 10; elvarIronhand.Name = "Elvar Ironhand"; if (log.IsWarnEnabled) log.Warn("Could not find " + elvarIronhand.Name + ", creating him ..."); elvarIronhand.GuildName = "Part of " + questTitle + " Quest"; elvarIronhand.Realm = eRealm.Albion; elvarIronhand.CurrentRegionID = 1; GameNpcInventoryTemplate template = new GameNpcInventoryTemplate(); template.AddNPCEquipment(eInventorySlot.RightHandWeapon, 12); elvarIronhand.Inventory = template.CloseTemplate(); elvarIronhand.SwitchWeapon(GameLiving.eActiveWeaponSlot.Standard); elvarIronhand.Size = 54; elvarIronhand.Level = 17; elvarIronhand.X = 561351; elvarIronhand.Y = 510292; elvarIronhand.Z = 2400; elvarIronhand.Heading = 3982; //You don't have to store the created mob in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database if (SAVE_INTO_DATABASE) elvarIronhand.SaveIntoDatabase(); elvarIronhand.AddToWorld(); } else elvarIronhand = npcs[0]; #endregion #region defineItems // item db check wellPreservedBones = GameServer.Database.FindObjectByKey<ItemTemplate>("well_preserved_bone"); if (wellPreservedBones == null) { wellPreservedBones = new ItemTemplate(); wellPreservedBones.Name = "Well-Preserved Bone"; if (log.IsWarnEnabled) log.Warn("Could not find "+wellPreservedBones.Name+", creating it ..."); wellPreservedBones.Level = 0; wellPreservedBones.Weight = 1; wellPreservedBones.Model = 497; wellPreservedBones.Object_Type = (int) eObjectType.GenericItem; wellPreservedBones.Id_nb = "well_preserved_bone"; wellPreservedBones.Price = 0; wellPreservedBones.IsPickable = false; wellPreservedBones.IsDropable = false; wellPreservedBones.Quality = 100; wellPreservedBones.Condition = 1000; wellPreservedBones.MaxCondition = 1000; wellPreservedBones.Durability = 1000; wellPreservedBones.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(wellPreservedBones); } // item db check twoWellPreservedBones = GameServer.Database.FindObjectByKey<ItemTemplate>("two_well_preserved_bones"); if (twoWellPreservedBones == null) { twoWellPreservedBones = new ItemTemplate(); twoWellPreservedBones.Name = "Two Well-Preserved Bones"; if (log.IsWarnEnabled) log.Warn("Could not find "+twoWellPreservedBones.Name+", creating it ..."); twoWellPreservedBones.Level = 0; twoWellPreservedBones.Weight = 1; twoWellPreservedBones.Model = 497; twoWellPreservedBones.Object_Type = (int) eObjectType.GenericItem; twoWellPreservedBones.Id_nb = "two_well_preserved_bones"; twoWellPreservedBones.Price = 0; twoWellPreservedBones.IsPickable = false; twoWellPreservedBones.IsDropable = false; twoWellPreservedBones.Quality = 100; twoWellPreservedBones.Condition = 1000; twoWellPreservedBones.MaxCondition = 1000; twoWellPreservedBones.Durability = 1000; twoWellPreservedBones.MaxDurability = 1000; //You don't have to store the created item in the db if you don't want, //it will be recreated each time it is not found, just comment the following //line if you rather not modify your database GameServer.Database.AddObject(twoWellPreservedBones); } #endregion /* Now we add some hooks to the npc we found. * Actually, we want to know when a player interacts with him. * So, we hook the right-click (interact) and the whisper method * of npc and set the callback method to the "TalkToXXX" * method. This means, the "TalkToXXX" method is called whenever * a player right clicks on him or when he whispers to him. */ GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(elvarIronhand, GameLivingEvent.Interact, new DOLEventHandler(TalkToElvarIronhand)); GameEventMgr.AddHandler(elvarIronhand, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToElvarIronhand)); /* Now we bring to Ydenia the possibility to give this quest to players */ elvarIronhand.AddQuestToGive(typeof (BuildingABetterBow)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
private void Init() { #region defineItems // item db check RecruitsCloak = GameServer.Database.FindObjectByKey<ItemTemplate>("k109_recruits_cloak"); if (RecruitsCloak == null) { RecruitsCloak = new ItemTemplate(); RecruitsCloak.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Hib.SearchForKnowledge.Init.Text1"); if (log.IsWarnEnabled) log.Warn("Could not find " + RecruitsCloak.Name + ", creating it ..."); RecruitsCloak.Level = 3; RecruitsCloak.Weight = 3; RecruitsCloak.Model = 443; RecruitsCloak.Color = 30; RecruitsCloak.Object_Type = (int)eObjectType.Magical; RecruitsCloak.Item_Type = (int)eEquipmentItems.CLOAK; RecruitsCloak.Id_nb = "k109_recruits_cloak"; RecruitsCloak.Price = 0; RecruitsCloak.IsPickable = true; RecruitsCloak.IsDropable = false; // can't be sold to merchand RecruitsCloak.Bonus = 1; RecruitsCloak.Bonus1 = 1; RecruitsCloak.Bonus1Type = (int)eProperty.Constitution; RecruitsCloak.Bonus2 = 1; RecruitsCloak.Bonus2Type = (int)eProperty.Resist_Slash; RecruitsCloak.Bonus3 = 1; RecruitsCloak.Bonus3Type = (int)eProperty.Strength; RecruitsCloak.Bonus4 = 1; RecruitsCloak.Bonus4Type = (int)eProperty.Dexterity; RecruitsCloak.Bonus5 = 1; RecruitsCloak.Bonus5Type = (int)eProperty.Acuity; RecruitsCloak.Quality = 100; RecruitsCloak.Condition = 50000; RecruitsCloak.MaxCondition = 50000; RecruitsCloak.Durability = 50000; RecruitsCloak.MaxDurability = 50000; if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(RecruitsCloak); } LetterToEpona = GameServer.Database.FindObjectByKey<ItemTemplate>("letter_to_epona"); if (LetterToEpona == null) { LetterToEpona = new ItemTemplate(); LetterToEpona.Weight = 0; LetterToEpona.Condition = 50000; LetterToEpona.MaxCondition = 50000; LetterToEpona.Model = 499; LetterToEpona.Extension = 1; LetterToEpona.Name = LanguageMgr.GetTranslation(ServerProperties.Properties.DB_LANGUAGE, "Hib.SearchForKnowledge.Init.Text2"); LetterToEpona.Id_nb = "letter_to_epona"; if (SAVE_INTO_DATABASE) GameServer.Database.AddObject(LetterToEpona); } #endregion defineItems Level = 1; QuestGiver = Blercyn; Rewards.Experience = 22; Rewards.MoneyPercent = 100; Rewards.AddBasicItem(RecruitsCloak); Rewards.ChoiceOf = 1; eponasletter = AddGoal(LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "Hib.SearchForKnowledge.Init.Text3"), QuestGoal.GoalType.ScoutMission, 1, LetterToEpona); }
public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args) { if (!ServerProperties.Properties.LOAD_QUESTS) return; if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initializing ..."); #region defineNPCs GameNPC[] npcs = WorldMgr.GetNPCsByName("Master Ferowl", eRealm.Albion); if (npcs.Length == 0) { Ferowl = new GameNPC(); Ferowl.Model = 61; Ferowl.Name = "Master Ferowl"; if (log.IsWarnEnabled) log.Warn("Could not find " + Ferowl.Name + " , creating it ..."); Ferowl.GuildName = ""; Ferowl.Realm = eRealm.Albion; Ferowl.CurrentRegionID = 1; Ferowl.Size = 51; Ferowl.Level = 40; Ferowl.X = 559716; Ferowl.Y = 510733; Ferowl.Z = 2720; Ferowl.Heading = 703; Ferowl.AddToWorld(); if (SAVE_INTO_DATABASE) Ferowl.SaveIntoDatabase(); } else Ferowl = npcs[0]; // end npc npcs = WorldMgr.GetNPCsByName("Morgana", eRealm.None); if (npcs.Length == 0) { Morgana = new GameNPC(); Morgana.Model = 283; Morgana.Name = "Morgana"; if (log.IsWarnEnabled) log.Warn("Could not find " + Morgana.Name + " , creating it ..."); Morgana.GuildName = ""; Morgana.Realm = eRealm.None; Morgana.CurrentRegionID = 1; Morgana.Size = 51; Morgana.Level = 90; Morgana.X = 306056; Morgana.Y = 670106; Morgana.Z = 3095; Morgana.Heading = 3261; StandardMobBrain brain = new StandardMobBrain(); brain.AggroLevel = 0; brain.AggroRange = 0; Morgana.SetOwnBrain(brain); GameNpcInventoryTemplate template = new GameNpcInventoryTemplate(); template.AddNPCEquipment(eInventorySlot.TorsoArmor, 98, 43); template.AddNPCEquipment(eInventorySlot.FeetArmor, 133, 61); Morgana.Inventory = template.CloseTemplate(); // Morgana.AddNPCEquipment((byte) eVisibleItems.TORSO, 98, 43, 0, 0); // Morgana.AddNPCEquipment((byte) eVisibleItems.BOOT, 133, 61, 0, 0); //Morgana.AddToWorld(); will be added later during quest if (SAVE_INTO_DATABASE) Morgana.SaveIntoDatabase(); } else Morgana = npcs[0]; npcs = WorldMgr.GetNPCsByName("Bechard", eRealm.None); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find Bechard , creating it ..."); Bechard = new GameNPC(); Bechard.Model = 606; Bechard.Name = "Bechard"; Bechard.GuildName = ""; Bechard.Realm = eRealm.None; Bechard.CurrentRegionID = 1; Bechard.Size = 50; Bechard.Level = 63; Bechard.X = 306025; Bechard.Y = 670473; Bechard.Z = 2863; Bechard.Heading = 3754; Bechard.AddToWorld(); if (SAVE_INTO_DATABASE) Bechard.SaveIntoDatabase(); } else Bechard = npcs[0]; // end npc npcs = WorldMgr.GetNPCsByName("Silcharde", eRealm.None); if (npcs.Length == 0) { if (log.IsWarnEnabled) log.Warn("Could not find Silcharde , creating it ..."); Silcharde = new GameNPC(); Silcharde.Model = 606; Silcharde.Name = "Silcharde"; Silcharde.GuildName = ""; Silcharde.Realm = eRealm.None; Silcharde.CurrentRegionID = 1; Silcharde.Size = 50; Silcharde.Level = 63; Silcharde.X = 306252; Silcharde.Y = 670274; Silcharde.Z = 2857; Silcharde.Heading = 3299; Silcharde.AddToWorld(); if (SAVE_INTO_DATABASE) Silcharde.SaveIntoDatabase(); } else Silcharde = npcs[0]; // end npc #endregion #region Item Declarations sealed_pouch = GameServer.Database.FindObjectByKey<ItemTemplate>("sealed_pouch"); if (sealed_pouch == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sealed Pouch , creating it ..."); sealed_pouch = new ItemTemplate(); sealed_pouch.Id_nb = "sealed_pouch"; sealed_pouch.Name = "Sealed Pouch"; sealed_pouch.Level = 8; sealed_pouch.Item_Type = 29; sealed_pouch.Model = 488; sealed_pouch.IsDropable = false; sealed_pouch.IsPickable = false; sealed_pouch.DPS_AF = 0; sealed_pouch.SPD_ABS = 0; sealed_pouch.Object_Type = 41; sealed_pouch.Hand = 0; sealed_pouch.Type_Damage = 0; sealed_pouch.Quality = 100; sealed_pouch.Weight = 12; GameServer.Database.AddObject(sealed_pouch); } // end item ItemTemplate item = null; WizardEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("WizardEpicBoots"); if (WizardEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wizards Epic Boots , creating it ..."); item = new ItemTemplate(); item.Id_nb = "WizardEpicBoots"; item.Name = "Bernor's Numinous Boots"; item.Level = 50; item.Item_Type = 23; item.Model = 143; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eProperty.Skill_Cold; item.Bonus2 = 22; item.Bonus2Type = (int) eStat.DEX; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Body; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Energy; GameServer.Database.AddObject(item); WizardEpicBoots = item; } //end item //Bernor's Numinous Coif WizardEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("WizardEpicHelm"); if (WizardEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wizards Epic Helm , creating it ..."); item = new ItemTemplate(); item.Id_nb = "WizardEpicHelm"; item.Name = "Bernor's Numinous Cap"; item.Level = 50; item.Item_Type = 21; item.Model = 1290; //NEED TO WORK ON.. item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 13; item.Bonus1Type = (int) eStat.DEX; item.Bonus2 = 21; item.Bonus2Type = (int) eStat.INT; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Thrust; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Spirit; GameServer.Database.AddObject(item); WizardEpicHelm = item; } //end item //Bernor's Numinous Gloves WizardEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("WizardEpicGloves"); if (WizardEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wizards Epic Gloves , creating it ..."); item = new ItemTemplate(); item.Id_nb = "WizardEpicGloves"; item.Name = "Bernor's Numinous Gloves "; item.Level = 50; item.Item_Type = 22; item.Model = 142; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 16; item.Bonus1Type = (int) eStat.DEX; item.Bonus2 = 18; item.Bonus2Type = (int) eStat.INT; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Matter; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Heat; GameServer.Database.AddObject(item); WizardEpicGloves = item; } //Bernor's Numinous Hauberk WizardEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("WizardEpicVest"); if (WizardEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wizards Epic Vest , creating it ..."); item = new ItemTemplate(); item.Id_nb = "WizardEpicVest"; item.Name = "Bernor's Numinous Robes"; item.Level = 50; item.Item_Type = 25; item.Model = 798; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eResist.Cold; item.Bonus2 = 14; item.Bonus2Type = (int) eProperty.PowerRegenerationRate; item.Bonus3 = 24; item.Bonus3Type = (int) eProperty.MaxHealth; GameServer.Database.AddObject(item); WizardEpicVest = item; } //Bernor's Numinous Legs WizardEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("WizardEpicLegs"); if (WizardEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wizards Epic Legs , creating it ..."); item = new ItemTemplate(); item.Id_nb = "WizardEpicLegs"; item.Name = "Bernor's Numinous Pants"; item.Level = 50; item.Item_Type = 27; item.Model = 140; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eProperty.Skill_Fire; item.Bonus2 = 8; item.Bonus2Type = (int) eResist.Cold; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Energy; GameServer.Database.AddObject(item); WizardEpicLegs = item; } //Bernor's Numinous Sleeves WizardEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("WizardEpicArms"); if (WizardEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Wizard Epic Arms , creating it ..."); item = new ItemTemplate(); item.Id_nb = "WizardEpicArms"; item.Name = "Bernor's Numinous Sleeves"; item.Level = 50; item.Item_Type = 28; item.Model = 141; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eProperty.Skill_Earth; item.Bonus2 = 18; item.Bonus2Type = (int) eStat.DEX; item.Bonus3 = 16; item.Bonus3Type = (int) eStat.INT; GameServer.Database.AddObject(item); WizardEpicArms = item; } //Minstrel Epic Sleeves End MinstrelEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("MinstrelEpicBoots"); if (MinstrelEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Minstrels Epic Boots , creating it ..."); item = new ItemTemplate(); item.Id_nb = "MinstrelEpicBoots"; item.Name = "Boots of Coruscating Harmony"; item.Level = 50; item.Item_Type = 23; item.Model = 727; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 100; item.SPD_ABS = 27; item.Object_Type = 35; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 7; item.Bonus1Type = (int) eStat.DEX; item.Bonus2 = 27; item.Bonus2Type = (int) eStat.QUI; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Slash; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Cold; GameServer.Database.AddObject(item); MinstrelEpicBoots = item; } //end item //of Coruscating Harmony Coif MinstrelEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("MinstrelEpicHelm"); if (MinstrelEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Minstrels Epic Helm , creating it ..."); item = new ItemTemplate(); item.Id_nb = "MinstrelEpicHelm"; item.Name = "Coif of Coruscating Harmony"; item.Level = 50; item.Item_Type = 21; item.Model = 1290; //NEED TO WORK ON.. item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 100; item.SPD_ABS = 27; item.Object_Type = 35; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 16; item.Bonus1Type = (int) eStat.CON; item.Bonus2 = 18; item.Bonus2Type = (int) eStat.CHR; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Thrust; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Energy; GameServer.Database.AddObject(item); MinstrelEpicHelm = item; } //end item //of Coruscating Harmony Gloves MinstrelEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("MinstrelEpicGloves"); if (MinstrelEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Minstrels Epic Gloves , creating it ..."); item = new ItemTemplate(); item.Id_nb = "MinstrelEpicGloves"; item.Name = "Gauntlets of Coruscating Harmony"; item.Level = 50; item.Item_Type = 22; item.Model = 726; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 100; item.SPD_ABS = 27; item.Object_Type = 35; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 15; item.Bonus1Type = (int) eStat.CON; item.Bonus2 = 19; item.Bonus2Type = (int) eStat.DEX; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Crush; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Heat; GameServer.Database.AddObject(item); MinstrelEpicGloves = item; } //of Coruscating Harmony Hauberk MinstrelEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("MinstrelEpicVest"); if (MinstrelEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Minstrels Epic Vest , creating it ..."); item = new ItemTemplate(); item.Id_nb = "MinstrelEpicVest"; item.Name = "Habergeon of Coruscating Harmony"; item.Level = 50; item.Item_Type = 25; item.Model = 723; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 100; item.SPD_ABS = 27; item.Object_Type = 35; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 6; item.Bonus1Type = (int) eResist.Cold; item.Bonus2 = 8; item.Bonus2Type = (int) eProperty.PowerRegenerationRate; item.Bonus3 = 39; item.Bonus3Type = (int) eProperty.MaxHealth; item.Bonus4 = 6; item.Bonus4Type = (int) eResist.Energy; GameServer.Database.AddObject(item); MinstrelEpicVest = item; } //of Coruscating Harmony Legs MinstrelEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("MinstrelEpicLegs"); if (MinstrelEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Minstrels Epic Legs , creating it ..."); item = new ItemTemplate(); item.Id_nb = "MinstrelEpicLegs"; item.Name = "Chaussess of Coruscating Harmony"; item.Level = 50; item.Item_Type = 27; item.Model = 724; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 100; item.SPD_ABS = 27; item.Object_Type = 35; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 15; item.Bonus1Type = (int) eStat.STR; item.Bonus2 = 19; item.Bonus2Type = (int) eStat.CON; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Body; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Heat; GameServer.Database.AddObject(item); MinstrelEpicLegs = item; } //of Coruscating Harmony Sleeves MinstrelEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("MinstrelEpicArms"); if (MinstrelEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Minstrel Epic Arms , creating it ..."); item = new ItemTemplate(); item.Id_nb = "MinstrelEpicArms"; item.Name = "Sleeves of Coruscating Harmony"; item.Level = 50; item.Item_Type = 28; item.Model = 725; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 100; item.SPD_ABS = 27; item.Object_Type = 35; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 16; item.Bonus1Type = (int) eStat.STR; item.Bonus2 = 21; item.Bonus2Type = (int) eStat.DEX; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Crush; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Body; GameServer.Database.AddObject(item); MinstrelEpicArms = item; } SorcerorEpicBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicBoots"); if (SorcerorEpicBoots == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sorceror Epic Boots , creating it ..."); item = new ItemTemplate(); item.Id_nb = "SorcerorEpicBoots"; item.Name = "Boots of Mental Acuity"; item.Level = 50; item.Item_Type = 23; item.Model = 143; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eProperty.Focus_Matter; item.Bonus2 = 22; item.Bonus2Type = (int) eStat.DEX; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Matter; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Energy; GameServer.Database.AddObject(item); SorcerorEpicBoots = item; } //end item //of Mental Acuity Coif SorcerorEpicHelm = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicHelm"); if (SorcerorEpicHelm == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sorceror Epic Helm , creating it ..."); item = new ItemTemplate(); item.Id_nb = "SorcerorEpicHelm"; item.Name = "Cap of Mental Acuity"; item.Level = 50; item.Item_Type = 21; item.Model = 1290; //NEED TO WORK ON.. item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 13; item.Bonus1Type = (int) eStat.DEX; item.Bonus2 = 21; item.Bonus2Type = (int) eStat.INT; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Slash; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Thrust; GameServer.Database.AddObject(item); SorcerorEpicHelm = item; } //end item //of Mental Acuity Gloves SorcerorEpicGloves = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicGloves"); if (SorcerorEpicGloves == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sorceror Epic Gloves , creating it ..."); item = new ItemTemplate(); item.Id_nb = "SorcerorEpicGloves"; item.Name = "Gloves of Mental Acuity"; item.Level = 50; item.Item_Type = 22; item.Model = 142; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 16; item.Bonus1Type = (int) eStat.DEX; item.Bonus2 = 18; item.Bonus2Type = (int) eStat.INT; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Cold; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Heat; GameServer.Database.AddObject(item); SorcerorEpicGloves = item; } //of Mental Acuity Hauberk SorcerorEpicVest = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicVest"); if (SorcerorEpicVest == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sorceror Epic Vest , creating it ..."); item = new ItemTemplate(); item.Id_nb = "SorcerorEpicVest"; item.Name = "Vest of Mental Acuity"; item.Level = 50; item.Item_Type = 25; item.Model = 804; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eResist.Spirit; item.Bonus2 = 14; item.Bonus2Type = (int) eProperty.PowerRegenerationRate; item.Bonus3 = 24; item.Bonus3Type = (int) eProperty.MaxHealth; GameServer.Database.AddObject(item); SorcerorEpicVest = item; } //of Mental Acuity Legs SorcerorEpicLegs = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicLegs"); if (SorcerorEpicLegs == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sorceror Epic Legs , creating it ..."); item = new ItemTemplate(); item.Id_nb = "SorcerorEpicLegs"; item.Name = "Pants of Mental Acuity"; item.Level = 50; item.Item_Type = 27; item.Model = 140; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eProperty.Focus_Mind; item.Bonus2 = 19; item.Bonus2Type = (int) eStat.CON; item.Bonus3 = 8; item.Bonus3Type = (int) eResist.Body; item.Bonus4 = 8; item.Bonus4Type = (int) eResist.Spirit; GameServer.Database.AddObject(item); SorcerorEpicLegs = item; } //of Mental Acuity Sleeves SorcerorEpicArms = GameServer.Database.FindObjectByKey<ItemTemplate>("SorcerorEpicArms"); if (SorcerorEpicArms == null) { if (log.IsWarnEnabled) log.Warn("Could not find Sorceror Epic Arms , creating it ..."); item = new ItemTemplate(); item.Id_nb = "SorcerorEpicArms"; item.Name = "Sleeves of Mental Acuity"; item.Level = 50; item.Item_Type = 28; item.Model = 141; item.IsDropable = true; item.IsPickable = true; item.DPS_AF = 50; item.SPD_ABS = 0; item.Object_Type = 32; item.Quality = 100; item.Weight = 22; item.Bonus = 35; item.MaxCondition = 50000; item.MaxDurability = 50000; item.Condition = 50000; item.Durability = 50000; item.Bonus1 = 4; item.Bonus1Type = (int) eProperty.Focus_Body; item.Bonus2 = 16; item.Bonus2Type = (int) eStat.DEX; item.Bonus3 = 18; item.Bonus3Type = (int) eStat.INT; GameServer.Database.AddObject(item); SorcerorEpicArms = item; } //Item Descriptions End #endregion morganaArea = WorldMgr.GetRegion(Morgana.CurrentRegionID).AddArea(new Area.Circle(null, Morgana.X, Morgana.Y, 0, 1000)); morganaArea.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterMorganaArea)); GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest)); GameEventMgr.AddHandler(Ferowl, GameObjectEvent.Interact, new DOLEventHandler(TalkToFerowl)); GameEventMgr.AddHandler(Ferowl, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToFerowl)); /* Now we bring to Ferowl the possibility to give this quest to players */ Ferowl.AddQuestToGive(typeof (Academy_50)); if (log.IsInfoEnabled) log.Info("Quest \"" + questTitle + "\" initialized"); }
public static eRealm[] GetItemTemplateRealm(ItemTemplate item) { switch ((eObjectType)item.Object_Type) { //Albion case eObjectType.CrushingWeapon: case eObjectType.SlashingWeapon: case eObjectType.ThrustWeapon: case eObjectType.TwoHandedWeapon: case eObjectType.PolearmWeapon: case eObjectType.Staff: case eObjectType.Longbow: case eObjectType.Crossbow: case eObjectType.Flexible: case eObjectType.Plate: case eObjectType.Bolt: return new eRealm[] { eRealm.Albion }; //Midgard case eObjectType.Sword: case eObjectType.Hammer: case eObjectType.Axe: case eObjectType.Spear: case eObjectType.CompositeBow: case eObjectType.Thrown: case eObjectType.LeftAxe: case eObjectType.HandToHand: return new eRealm[] { eRealm.Midgard }; //Hibernia case eObjectType.Fired: case eObjectType.RecurvedBow: case eObjectType.Blades: case eObjectType.Blunt: case eObjectType.Piercing: case eObjectType.LargeWeapons: case eObjectType.CelticSpear: case eObjectType.Scythe: case eObjectType.Reinforced: case eObjectType.Scale: return new eRealm[] { eRealm.Hibernia }; //Special case eObjectType.Studded: case eObjectType.Chain: return new eRealm[] { eRealm.Albion, eRealm.Midgard }; case eObjectType.Instrument: return new eRealm[] { eRealm.Albion, eRealm.Hibernia }; //Common Armor case eObjectType.Cloth: case eObjectType.Leather: //Misc case eObjectType.GenericItem: case eObjectType.GenericWeapon: case eObjectType.GenericArmor: case eObjectType.Magical: case eObjectType.Shield: case eObjectType.Arrow: case eObjectType.Poison: case eObjectType.AlchemyTincture: case eObjectType.SpellcraftGem: case eObjectType.GardenObject: case eObjectType.SiegeBalista: case eObjectType.SiegeCatapult: case eObjectType.SiegeCauldron: case eObjectType.SiegeRam: case eObjectType.SiegeTrebuchet: break; } eRealm realm = eRealm.None; if (item.Bonus1Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus1Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus2Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus2Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus3Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus3Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus4Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus4Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus5Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus5Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus6Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus6Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus7Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus7Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus8Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus8Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus9Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus9Type)) != eRealm.None) return new eRealm[] { realm }; if (item.Bonus10Type > 0 && (realm = GetBonusRealm((eProperty)item.Bonus10Type)) != eRealm.None) return new eRealm[] { realm }; return new eRealm[] { realm }; }
public ItemTemplate(ItemTemplate template) { AllowUpdate = false; m_id_nb = template.Id_nb; TranslationId = template.TranslationId; Name = template.Name; ExamineArticle = template.ExamineArticle; MessageArticle = template.MessageArticle; Bonus = template.Bonus; Bonus1 = template.Bonus1; Bonus2 = template.Bonus2; Bonus3 = template.Bonus3; Bonus4 = template.Bonus4; Bonus5 = template.Bonus5; Bonus6 = template.Bonus6; Bonus7 = template.Bonus7; Bonus8 = template.Bonus8; Bonus9 = template.Bonus9; Bonus10 = template.Bonus10; Color = template.Color; Condition = template.Condition; DPS_AF = template.DPS_AF; Durability = template.Durability; Effect = template.Effect; Emblem = template.Emblem; ExtraBonus = template.ExtraBonus; Hand = template.Hand; IsDropable = template.IsDropable; IsPickable = template.IsPickable; IsTradable = template.IsTradable; CanDropAsLoot = template.CanDropAsLoot; MaxCount = template.MaxCount; PackSize = template.PackSize; Item_Type = template.Item_Type; Level = template.Level; MaxCondition = template.MaxCondition; MaxDurability = template.MaxDurability; Model = template.Model; Extension = template.Extension; Object_Type = template.Object_Type; Quality = template.Quality; SPD_ABS = template.SPD_ABS; Type_Damage = template.Type_Damage; Weight = template.Weight; Price = template.Price; Bonus1Type = template.Bonus1Type; Bonus2Type = template.Bonus2Type; Bonus3Type = template.Bonus3Type; Bonus4Type = template.Bonus4Type; Bonus5Type = template.Bonus5Type; Bonus6Type = template.Bonus6Type; Bonus7Type = template.Bonus7Type; Bonus8Type = template.Bonus8Type; Bonus9Type = template.Bonus9Type; Bonus10Type = template.Bonus10Type; ExtraBonusType = template.ExtraBonusType; Charges = template.Charges; MaxCharges = template.MaxCharges; Charges1 = template.Charges1; MaxCharges1 = template.MaxCharges1; SpellID = template.SpellID; SpellID1 = template.SpellID1; ProcSpellID = template.ProcSpellID; ProcSpellID1 = template.ProcSpellID1; ProcChance = template.ProcChance; PoisonSpellID = template.PoisonSpellID; PoisonCharges = template.PoisonCharges; PoisonMaxCharges = template.PoisonMaxCharges; Realm = template.Realm; AllowedClasses = template.AllowedClasses; CanUseEvery = template.CanUseEvery; Flags = template.Flags; BonusLevel = template.BonusLevel; LevelRequirement = template.LevelRequirement; Description = template.Description; IsIndestructible = template.IsIndestructible; IsNotLosingDur = template.IsNotLosingDur; PackageID = template.PackageID; ClassType = template.ClassType; SalvageYieldID = template.SalvageYieldID; }