当前位置: 首页>>代码示例>>C#>>正文


C# GameNPC.AddQuestToGive方法代码示例

本文整理汇总了C#中GameNPC.AddQuestToGive方法的典型用法代码示例。如果您正苦于以下问题:C# GameNPC.AddQuestToGive方法的具体用法?C# GameNPC.AddQuestToGive怎么用?C# GameNPC.AddQuestToGive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameNPC的用法示例。


在下文中一共展示了GameNPC.AddQuestToGive方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ScriptLoaded


//.........这里部分代码省略.........
                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");
        }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:101,代码来源:Culmination.cs

示例2: ScriptLoaded


//.........这里部分代码省略.........
                //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");
        }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:101,代码来源:ImportantDelivery.cs

示例3: ScriptLoaded


//.........这里部分代码省略.........
                recruitsArms.SPD_ABS = 19; // Absorption

                recruitsArms.Object_Type = (int) eObjectType.Studded;
                recruitsArms.Item_Type = (int) eEquipmentItems.ARMS;
                recruitsArms.Id_nb = "recruits_studded_arms";
                recruitsArms.Price = Money.GetMoney(0,0,0,4,0);
                recruitsArms.IsPickable = true;
                recruitsArms.IsDropable = true;
                recruitsArms.Color = 9; // red leather

                recruitsArms.Bonus = 5; // default bonus

                recruitsArms.Bonus1 = 4;
                recruitsArms.Bonus1Type = (int) eStat.QUI;

                recruitsArms.Bonus2 = 1;
                recruitsArms.Bonus2Type = (int) eResist.Body;

                recruitsArms.Quality = 100;
                recruitsArms.Condition = 1000;
                recruitsArms.MaxCondition = 1000;
                recruitsArms.Durability = 1000;
                recruitsArms.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(recruitsArms);
            }

            recruitsSleeves = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_sleeves");
            if (recruitsSleeves == null)
            {
                recruitsSleeves = new ItemTemplate();
                recruitsSleeves.Name = "Recruit's Quilted Sleeves";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsSleeves.Name + ", creating it ...");
                recruitsSleeves.Level = 7;

                recruitsSleeves.Weight = 12;
                recruitsSleeves.Model = 153;

                recruitsSleeves.DPS_AF = 6; // Armour
                recruitsSleeves.SPD_ABS = 0; // Absorption

                recruitsSleeves.Object_Type = (int) eObjectType.Cloth;
                recruitsSleeves.Item_Type = (int) eEquipmentItems.ARMS;
                recruitsSleeves.Id_nb = "recruits_quilted_sleeves";
                recruitsSleeves.Price = Money.GetMoney(0,0,0,4,0);
                recruitsSleeves.IsPickable = true;
                recruitsSleeves.IsDropable = true;
                recruitsSleeves.Color = 27; // red cloth

                recruitsSleeves.Bonus = 5; // default bonus

                recruitsSleeves.Bonus1 = 4;
                recruitsSleeves.Bonus1Type = (int) eStat.DEX;

                recruitsSleeves.Bonus2 = 1;
                recruitsSleeves.Bonus2Type = (int) eResist.Body;

                recruitsSleeves.Quality = 100;
                recruitsSleeves.Condition = 1000;
                recruitsSleeves.MaxCondition = 1000;
                recruitsSleeves.Durability = 1000;
                recruitsSleeves.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(recruitsSleeves);
            }

            #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));

            /* Now we bring to masterFrederick the possibility to give this quest to players */
            masterFrederick.AddQuestToGive(typeof (Collection));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:101,代码来源:Collection.cs

示例4: ScriptLoaded


//.........这里部分代码省略.........
                //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");
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:101,代码来源:ImportantDelivery.cs

示例5: ScriptLoaded

        public static void ScriptLoaded(DOLEvent e, object sender, EventArgs args)
        {
            if (!ServerProperties.Properties.LOAD_QUESTS)
                return;
            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initializing ...");

            GameNPC[] npcs = WorldMgr.GetNPCsByName("Sir Dorian", eRealm.Albion);
            if (npcs == null || npcs.Length == 0)
                return;

            sirDorian = npcs[0];

            GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
            GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));

            GameEventMgr.AddHandler(sirDorian, GameLivingEvent.Interact, new DOLEventHandler(TalkToSirDorian));
            GameEventMgr.AddHandler(sirDorian, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToSirDorian));

            sirDorian.AddQuestToGive(typeof(NoHopeForTheHopeful));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:24,代码来源:NoHopeForTheHopeful.cs

示例6: ScriptLoaded


//.........这里部分代码省略.........
                recruitsBoots.Bonus = 5; // default bonus

                recruitsBoots.Bonus1 = 1;
                recruitsBoots.Bonus1Type = (int) eStat.STR;

                recruitsBoots.Bonus2 = 3;
                recruitsBoots.Bonus2Type = (int) eStat.CON;

                recruitsBoots.Bonus3 = 1;
                recruitsBoots.Bonus3Type = (int) eResist.Spirit;

                recruitsBoots.Quality = 100;
                recruitsBoots.Condition = 1000;
                recruitsBoots.MaxCondition = 1000;
                recruitsBoots.Durability = 1000;
                recruitsBoots.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(recruitsBoots);
            }

            // item db check
            recruitsQuiltedBoots = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_boots");
            if (recruitsQuiltedBoots == null)
            {
                recruitsQuiltedBoots = new ItemTemplate();
                recruitsQuiltedBoots.Name = "Recruit's Quilted Boots";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsQuiltedBoots.Name + ", creating it ...");
                recruitsQuiltedBoots.Level = 7;

                recruitsQuiltedBoots.Weight = 8;
                recruitsQuiltedBoots.Model = 155; // studded Boots

                recruitsQuiltedBoots.DPS_AF = 6; // Armour
                recruitsQuiltedBoots.SPD_ABS = 0; // Absorption

                recruitsQuiltedBoots.Object_Type = (int) eObjectType.Cloth;
                recruitsQuiltedBoots.Item_Type = (int) eEquipmentItems.FEET;
                recruitsQuiltedBoots.Id_nb = "recruits_quilted_boots";
                recruitsQuiltedBoots.Price = Money.GetMoney(0,0,0,10,0);
                recruitsQuiltedBoots.IsPickable = true;
                recruitsQuiltedBoots.IsDropable = true;
                recruitsQuiltedBoots.Color = 27; // red leather

                recruitsQuiltedBoots.Bonus = 5; // default bonus

                recruitsQuiltedBoots.Bonus1 = 3;
                recruitsQuiltedBoots.Bonus1Type = (int) eStat.CON;

                recruitsQuiltedBoots.Bonus2 = 1;
                recruitsQuiltedBoots.Bonus2Type = (int) eStat.STR;

                recruitsQuiltedBoots.Bonus3 = 1;
                recruitsQuiltedBoots.Bonus3Type = (int) eResist.Spirit;

                recruitsQuiltedBoots.Quality = 100;
                recruitsQuiltedBoots.Condition = 1000;
                recruitsQuiltedBoots.MaxCondition = 1000;
                recruitsQuiltedBoots.Durability = 1000;
                recruitsQuiltedBoots.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(recruitsQuiltedBoots);
            }

            #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(ladyFelin, GameLivingEvent.Interact, new DOLEventHandler(TalkToLadyFelin));
            GameEventMgr.AddHandler(ladyFelin, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToLadyFelin));

            /* Now we bring to masterFrederick the possibility to give this quest to players */
            masterFrederick.AddQuestToGive(typeof (TraitorInCotswold));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:101,代码来源:TraitorInCotswold.cs

示例7: ScriptLoaded


//.........这里部分代码省略.........
                recruitsVest.Id_nb = "recruits_studded_vest_mid";
                recruitsVest.Price = Money.GetMoney(0, 0, 0, 9, 0);
                recruitsVest.IsPickable = true;
                recruitsVest.IsDropable = true;
                recruitsVest.CanDropAsLoot = false;
                recruitsVest.Color = 14; // blue leather

                recruitsVest.Bonus = 5; // default bonus

                recruitsVest.Bonus1 = 3;
                recruitsVest.Bonus1Type = (int)eStat.STR;

                recruitsVest.Bonus2 = 4;
                recruitsVest.Bonus2Type = (int)eStat.CON;

                recruitsVest.Bonus3 = 1;
                recruitsVest.Bonus3Type = (int)eResist.Body;

                recruitsVest.Quality = 100;
                recruitsVest.Condition = 1000;
                recruitsVest.MaxCondition = 1000;
                recruitsVest.Durability = 1000;
                recruitsVest.MaxDurability = 1000;

                GameServer.Database.AddObject(recruitsVest);
            }

            // item db check
            recruitsQuiltedVest = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_vest");
            if (recruitsQuiltedVest == null)
            {
                recruitsQuiltedVest = new ItemTemplate();
                recruitsQuiltedVest.Name = "Recruit's Quilted Vest";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsQuiltedVest.Name + ", creating it ...");
                recruitsQuiltedVest.Level = 8;

                recruitsQuiltedVest.Weight = 20;
                recruitsQuiltedVest.Model = 151; // studded vest

                recruitsQuiltedVest.DPS_AF = 6; // Armour
                recruitsQuiltedVest.SPD_ABS = 0; // Absorption

                recruitsQuiltedVest.Object_Type = (int)eObjectType.Cloth;
                recruitsQuiltedVest.Item_Type = (int)eEquipmentItems.TORSO;
                recruitsQuiltedVest.Id_nb = "recruits_quilted_vest";
                recruitsQuiltedVest.Price = Money.GetMoney(0, 0, 0, 9, 0);
                recruitsQuiltedVest.IsPickable = true;
                recruitsQuiltedVest.IsDropable = true;
                recruitsQuiltedVest.Color = 36;

                recruitsQuiltedVest.Bonus = 5; // default bonus

                recruitsQuiltedVest.Bonus1 = 4;
                recruitsQuiltedVest.Bonus1Type = (int)eStat.INT;

                recruitsQuiltedVest.Bonus2 = 3;
                recruitsQuiltedVest.Bonus2Type = (int)eStat.DEX;

                recruitsQuiltedVest.Quality = 100;
                recruitsQuiltedVest.Condition = 1000;
                recruitsQuiltedVest.MaxCondition = 1000;
                recruitsQuiltedVest.Durability = 1000;
                recruitsQuiltedVest.MaxDurability = 1000;

                GameServer.Database.AddObject(recruitsQuiltedVest);
            }

            #endregion defineItems

            /* 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.
			*/
            //We want to be notified whenever a player enters the world
            GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
            GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));

            GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld));

            GameEventMgr.AddHandler(dalikor, GameLivingEvent.Interact, new DOLEventHandler(TalkToDalikor));
            GameEventMgr.AddHandler(dalikor, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToDalikor));

            GameEventMgr.AddHandler(njiedi, GameLivingEvent.Interact, new DOLEventHandler(TalkToNjiedi));
            GameEventMgr.AddHandler(njiedi, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToNjiedi));

            GameEventMgr.AddHandler(hyndla, GameLivingEvent.Interact, new DOLEventHandler(TalkToHyndla));
            GameEventMgr.AddHandler(hyndla, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToHyndla));

            GameEventMgr.AddHandler(askefruerTrainer, GameNPCEvent.OnAICallback, new DOLEventHandler(CheckNearAskefruerTrainer));

            /* Now we bring to dalikor the possibility to give this quest to players */
            dalikor.AddQuestToGive(typeof(StolenEggs));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:101,代码来源:StolenEggs.cs

示例8: ScriptLoaded


//.........这里部分代码省略.........
                recruitsVest.Bonus = 5; // default bonus

                recruitsVest.Bonus1 = 4;
                recruitsVest.Bonus1Type = (int)eStat.STR;

                recruitsVest.Bonus2 = 3;
                recruitsVest.Bonus2Type = (int)eStat.CON;

                recruitsVest.Quality = 100;
                recruitsVest.Condition = 1000;
                recruitsVest.MaxCondition = 1000;
                recruitsVest.Durability = 1000;
                recruitsVest.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(recruitsVest);
            }

            // item db check
            recruitsQuiltedVest = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_vest");
            if (recruitsQuiltedVest == null)
            {
                recruitsQuiltedVest = new ItemTemplate();
                recruitsQuiltedVest.Name = "Recruit's Quilted Vest";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsQuiltedVest.Name + ", creating it ...");
                recruitsQuiltedVest.Level = 8;

                recruitsQuiltedVest.Weight = 20;
                recruitsQuiltedVest.Model = 151; // studded vest

                recruitsQuiltedVest.DPS_AF = 6; // Armour
                recruitsQuiltedVest.SPD_ABS = 0; // Absorption

                recruitsQuiltedVest.Object_Type = (int)eObjectType.Cloth;
                recruitsQuiltedVest.Item_Type = (int)eEquipmentItems.TORSO;
                recruitsQuiltedVest.Id_nb = "recruits_quilted_vest";
                recruitsQuiltedVest.Price = Money.GetMoney(0, 0, 0, 9, 0);
                recruitsQuiltedVest.IsPickable = true;
                recruitsQuiltedVest.IsDropable = true;
                recruitsQuiltedVest.Color = 9; // red leather

                recruitsQuiltedVest.Bonus = 5; // default bonus

                recruitsQuiltedVest.Bonus1 = 4;
                recruitsQuiltedVest.Bonus1Type = (int)eStat.INT;

                recruitsQuiltedVest.Bonus2 = 3;
                recruitsQuiltedVest.Bonus2Type = (int)eStat.DEX;

                recruitsQuiltedVest.Quality = 100;
                recruitsQuiltedVest.Condition = 1000;
                recruitsQuiltedVest.MaxCondition = 1000;
                recruitsQuiltedVest.Durability = 1000;
                recruitsQuiltedVest.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(recruitsQuiltedVest);
            }

            #endregion defineItems

            /* 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.Quit, new DOLEventHandler(PlayerLeftWorld));

            GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterFrederick));
            GameEventMgr.AddHandler(masterFrederick, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToMasterFrederick));

            GameEventMgr.AddHandler(colm, GameLivingEvent.Interact, new DOLEventHandler(TalkToColm));
            GameEventMgr.AddHandler(colm, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToColm));

            GameEventMgr.AddHandler(nob, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToNob));

            GameEventMgr.AddHandler(haruld, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToHaruld));

            GameEventMgr.AddHandler(fairyDragonflyHandler, GameNPCEvent.OnAICallback, new DOLEventHandler(CheckNearFairyDragonflyHandler));

            /* Now we bring to masterFrederick the possibility to give this quest to players */
            masterFrederick.AddQuestToGive(typeof(IreFairyIre));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:101,代码来源:IreFairyIre.cs

示例9: ScriptLoaded


//.........这里部分代码省略.........
                //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_mid");
            if (recruitsCloak == null)
            {
                recruitsCloak = new ItemTemplate();
                recruitsCloak.Name = "Recruit's Cloak (Mid)";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsCloak.Name + ", creating it ...");
                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_mid";
                recruitsCloak.Price = Money.GetMoney(0, 0, 0, 1, 0);
                recruitsCloak.IsPickable = true;
                recruitsCloak.IsDropable = true;
                recruitsCloak.Color = 44; // brown

                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 defineItems

            /* 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.
			*/
            //We want to be notified whenever a player enters the world
            GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
            GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));

            GameEventMgr.AddHandler(dalikor, GameLivingEvent.Interact, new DOLEventHandler(TalkToDalikor));
            GameEventMgr.AddHandler(dalikor, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToDalikor));

            GameEventMgr.AddHandler(harlfug, GameLivingEvent.Interact, new DOLEventHandler(TalkToHarlfug));
            GameEventMgr.AddHandler(harlfug, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToHarlfug));

            GameEventMgr.AddHandler(abohas, GameLivingEvent.Interact, new DOLEventHandler(TalkToAbohas));
            GameEventMgr.AddHandler(abohas, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToAbohas));

            /* Now we bring to dalikor the possibility to give this quest to players */
            dalikor.AddQuestToGive(typeof(ImportantDelivery));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:101,代码来源:ImportantDelivery.cs

示例10: ScriptLoaded


//.........这里部分代码省略.........
                recruitsShortSword.Price = Money.GetMoney(0, 0, 0, 2, 0);
                recruitsShortSword.IsPickable = true;
                recruitsShortSword.IsDropable = true;
                recruitsShortSword.Color = 45; // blue metal

                recruitsShortSword.Bonus = 1; // default bonus

                recruitsShortSword.Bonus1 = 3;
                recruitsShortSword.Bonus1Type = (int)eStat.STR;

                recruitsShortSword.Bonus2 = 1;
                recruitsShortSword.Bonus2Type = (int)eResist.Body;

                recruitsShortSword.Quality = 100;
                recruitsShortSword.Condition = 1000;
                recruitsShortSword.MaxCondition = 1000;
                recruitsShortSword.Durability = 1000;
                recruitsShortSword.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(recruitsShortSword);
            }

            // item db check
            recruitsStaff = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_staff");
            if (recruitsStaff == null)
            {
                recruitsStaff = new ItemTemplate();
                recruitsStaff.Name = "Recruit's Staff";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsStaff.Name + ", creating it ...");
                recruitsStaff.Level = 4;

                recruitsStaff.Weight = 45;
                recruitsStaff.Model = 442;

                recruitsStaff.DPS_AF = 24;
                recruitsStaff.SPD_ABS = 45;

                recruitsStaff.Type_Damage = (int)eDamageType.Slash;
                recruitsStaff.Object_Type = (int)eObjectType.Staff;
                recruitsStaff.Item_Type = (int)eEquipmentItems.LEFT_HAND;
                recruitsStaff.Id_nb = "recruits_staff";
                recruitsStaff.Price = Money.GetMoney(0, 0, 0, 2, 0);
                recruitsStaff.IsPickable = true;
                recruitsStaff.IsDropable = true;
                recruitsStaff.Color = 45; // blue metal

                recruitsStaff.Bonus = 1; // default bonus

                recruitsStaff.Bonus1 = 3;
                recruitsStaff.Bonus1Type = (int)eStat.INT;

                recruitsStaff.Bonus2 = 1;
                recruitsStaff.Bonus2Type = (int)eResist.Crush;

                recruitsStaff.Quality = 100;
                recruitsStaff.Condition = 1000;
                recruitsStaff.MaxCondition = 1000;
                recruitsStaff.Durability = 1000;
                recruitsStaff.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(recruitsStaff);
            }

            #endregion defineItems

            fairyArea = WorldMgr.GetRegion(fairyLocation.RegionID).AddArea(new Area.Circle("Fairy contamined Area", fairyLocation.X, fairyLocation.Y, 0, 1500));
            fairyArea.RegisterPlayerEnter(new DOLEventHandler(PlayerEnterFairyArea));

            /* 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));

            /* Now we bring to masterFrederick the possibility to give this quest to players */
            masterFrederick.AddQuestToGive(typeof(Nuisances));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:101,代码来源:Nuisances.cs

示例11: ScriptLoaded


//.........这里部分代码省略.........
                recruitsCap.Name = "Recruit's Quilted Cap";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsCap.Name + ", creating it ...");
                recruitsCap.Level = 8;

                recruitsCap.Weight = 8;
                recruitsCap.Model = 822; // studded vest

                recruitsCap.DPS_AF = 6; // Armour
                recruitsCap.SPD_ABS = 0; // Absorption

                recruitsCap.Object_Type = (int) eObjectType.Cloth;
                recruitsCap.Item_Type = (int) eEquipmentItems.HEAD;
                recruitsCap.Id_nb = "recruits_quilted_cap";
                recruitsCap.Price = Money.GetMoney(0,0,0,9,0);
                recruitsCap.IsPickable = true;
                recruitsCap.IsDropable = true;
                recruitsCap.Color = 27; // red cloth

                recruitsCap.Bonus = 5; // default bonus

                recruitsCap.Bonus1 = 4;
                recruitsCap.Bonus1Type = (int) eStat.DEX;

                recruitsCap.Bonus2 = 20;
                recruitsCap.Bonus2Type = (int) eProperty.MaxHealth;

                recruitsCap.Bonus3 = 1;
                recruitsCap.Bonus3Type = (int) eResist.Spirit;

                recruitsCap.Quality = 100;
                recruitsCap.Condition = 1000;
                recruitsCap.MaxCondition = 1000;
                recruitsCap.Durability = 1000;
                recruitsCap.MaxDurability = 1000;
                GameServer.Database.AddObject(recruitsCap);
            }

            recruitsRing = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_silver_ring");
            if (recruitsRing == null)
            {
                recruitsRing = new ItemTemplate();
                recruitsRing.Name = "Recruit's Silver Ring";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsRing.Name + ", creating it ...");
                recruitsRing.Level = 6;

                recruitsRing.Weight = 2;
                recruitsRing.Model = 103; // studded vest

                recruitsRing.Object_Type = (int) eObjectType.Magical;
                recruitsRing.Item_Type = (int) eEquipmentItems.R_RING;
                recruitsRing.Id_nb = "recruits_silver_ring";
                recruitsRing.Price = Money.GetMoney(0,0,0,9,0);
                recruitsRing.IsPickable = true;
                recruitsRing.IsDropable = true;

                recruitsRing.Bonus = 5; // default bonus

                recruitsRing.Bonus1 = 20;
                recruitsRing.Bonus1Type = (int) eProperty.MaxHealth;

                recruitsRing.Quality = 100;
                recruitsRing.Condition = 1000;
                recruitsRing.MaxCondition = 1000;
                recruitsRing.Durability = 1000;
                recruitsRing.MaxDurability = 1000;
                GameServer.Database.AddObject(recruitsRing);
            }

            #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(dunwyn, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterDunwyn));
            GameEventMgr.AddHandler(dunwyn, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToMasterDunwyn));

            GameEventMgr.AddHandler(princessObera, GameNPCEvent.OnAICallback, new DOLEventHandler(CheckNearPrincessObera));

            /* Now we bring to masterFrederick the possibility to give this quest to players */
            masterFrederick.AddQuestToGive(typeof (BeginningOfWar));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:mynew4,项目名称:DAoC,代码行数:101,代码来源:BeginningOfWar.cs

示例12: ScriptLoaded


//.........这里部分代码省略.........
                recruitsArms.DPS_AF = 10; // Armour
                recruitsArms.SPD_ABS = 19; // Absorption

                recruitsArms.Object_Type = (int)eObjectType.Studded;
                recruitsArms.Item_Type = (int)eEquipmentItems.ARMS;
                recruitsArms.Id_nb = "recruits_studded_arms_mid";
                recruitsArms.Price = Money.GetMoney(0, 0, 0, 4, 0);
                recruitsArms.IsPickable = true;
                recruitsArms.IsDropable = true;
                recruitsArms.Color = 36; // blue cloth

                recruitsArms.Bonus = 5; // default bonus

                recruitsArms.Bonus1 = 4;
                recruitsArms.Bonus1Type = (int)eStat.QUI;

                recruitsArms.Bonus2 = 1;
                recruitsArms.Bonus2Type = (int)eResist.Body;

                recruitsArms.Quality = 100;
                recruitsArms.Condition = 1000;
                recruitsArms.MaxCondition = 1000;
                recruitsArms.Durability = 1000;
                recruitsArms.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(recruitsArms);
            }

            recruitsSleeves = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_sleeves");
            if (recruitsSleeves == null)
            {
                recruitsSleeves = new ItemTemplate();
                recruitsSleeves.Name = "Recruit's Quilted Sleeves";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsSleeves.Name + ", creating it ...");
                recruitsSleeves.Level = 7;

                recruitsSleeves.Weight = 12;
                recruitsSleeves.Model = 153;

                recruitsSleeves.DPS_AF = 6; // Armour
                recruitsSleeves.SPD_ABS = 0; // Absorption

                recruitsSleeves.Object_Type = (int)eObjectType.Cloth;
                recruitsSleeves.Item_Type = (int)eEquipmentItems.ARMS;
                recruitsSleeves.Id_nb = "recruits_quilted_sleeves";
                recruitsSleeves.Price = Money.GetMoney(0, 0, 0, 4, 0);
                recruitsSleeves.IsPickable = true;
                recruitsSleeves.IsDropable = true;
                recruitsSleeves.Color = 27; // red cloth

                recruitsSleeves.Bonus = 5; // default bonus

                recruitsSleeves.Bonus1 = 4;
                recruitsSleeves.Bonus1Type = (int)eStat.DEX;

                recruitsSleeves.Bonus2 = 1;
                recruitsSleeves.Bonus2Type = (int)eResist.Body;

                recruitsSleeves.Quality = 100;
                recruitsSleeves.Condition = 1000;
                recruitsSleeves.MaxCondition = 1000;
                recruitsSleeves.Durability = 1000;
                recruitsSleeves.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(recruitsSleeves);
            }

            #endregion defineItems

            /* 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.
			*/
            //We want to be notified whenever a player enters the world
            GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld));

            GameEventMgr.AddHandler(dalikor, GameLivingEvent.Interact, new DOLEventHandler(TalkToDalikor));
            GameEventMgr.AddHandler(dalikor, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToDalikor));

            GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
            GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));

            /* Now we bring to dalikor the possibility to give this quest to players */
            dalikor.AddQuestToGive(typeof(Collection));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:101,代码来源:Collection.cs

示例13: ScriptLoaded


//.........这里部分代码省略.........

                recruitsLegs.Bonus = 5; // default bonus

                recruitsLegs.Bonus1 = 12;
                recruitsLegs.Bonus1Type = (int) eProperty.MaxHealth; // hit

                recruitsLegs.Bonus2 = 2;
                recruitsLegs.Bonus2Type = (int) eResist.Slash;

                recruitsLegs.Bonus3 = 1;
                recruitsLegs.Bonus3Type = (int) eResist.Cold;

                recruitsLegs.Quality = 100;
                recruitsLegs.Condition = 1000;
                recruitsLegs.MaxCondition = 1000;
                recruitsLegs.Durability = 1000;
                recruitsLegs.MaxDurability = 1000;

                GameServer.Database.AddObject(recruitsLegs);
            }

            // item db check
            recruitsPants = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_quilted_pants");
            if (recruitsPants == null)
            {
                recruitsPants = new ItemTemplate();
                recruitsPants.Name = "Recruit's Quilted Pants";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsPants.Name + ", creating it ...");
                recruitsPants.Level = 7;

                recruitsPants.Weight = 14;
                recruitsPants.Model = 152; // cloth Legs

                recruitsPants.DPS_AF = 5; // Armour
                recruitsPants.SPD_ABS = 0; // Absorption

                recruitsPants.Object_Type = (int) eObjectType.Cloth;
                recruitsPants.Item_Type = (int) eEquipmentItems.LEGS;
                recruitsPants.Id_nb = "recruits_quilted_pants";
                recruitsPants.Price = Money.GetMoney(0,0,0,10,0);
                recruitsPants.IsPickable = true;
                recruitsPants.IsDropable = true;
                recruitsPants.Color = 36;

                recruitsPants.Bonus = 5; // default bonus

                recruitsPants.Bonus1 = 12;
                recruitsPants.Bonus1Type = (int) eProperty.MaxHealth; // hit

                recruitsPants.Bonus2 = 2;
                recruitsPants.Bonus2Type = (int) eResist.Slash;

                recruitsPants.Bonus3 = 1;
                recruitsPants.Bonus3Type = (int) eResist.Cold;

                recruitsPants.Quality = 100;
                recruitsPants.Condition = 1000;
                recruitsPants.MaxCondition = 1000;
                recruitsPants.Durability = 1000;
                recruitsPants.MaxDurability = 1000;

                GameServer.Database.AddObject(recruitsPants);
            }

            #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.
            */
            //We want to be notified whenever a player enters the world
            GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
            GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));

            GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld));

            GameEventMgr.AddHandler(dalikor, GameLivingEvent.Interact, new DOLEventHandler(TalkToDalikor));
            GameEventMgr.AddHandler(dalikor, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToDalikor));

            GameEventMgr.AddHandler(annark, GameObjectEvent.Interact, new DOLEventHandler(TalkToAnnark));

            GameEventMgr.AddHandler(njiedi, GameObjectEvent.Interact, new DOLEventHandler(TalkToNjiedi));

            GameEventMgr.AddHandler(idora, GameObjectEvent.Interact, new DOLEventHandler(TalkToIdora));
            GameEventMgr.AddHandler(idora, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToIdora));

            GameEventMgr.AddHandler(vorgar, GameObjectEvent.Interact, new DOLEventHandler(TalkToVorgar));
            GameEventMgr.AddHandler(vorgar, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToVorgar));

            /* Now we bring to dalikor the possibility to give this quest to players */
            dalikor.AddQuestToGive(typeof (Frontiers));

            if (log.IsInfoEnabled)
                if (log.IsInfoEnabled)
                    log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:101,代码来源:Frontiers.cs

示例14: ScriptLoaded


//.........这里部分代码省略.........
                recruitsCap.IsPickable = true;
                recruitsCap.IsDropable = true;
                recruitsCap.Color = 36; // blue cloth

                recruitsCap.Bonus = 5; // default bonus

                recruitsCap.Bonus1 = 4;
                recruitsCap.Bonus1Type = (int) eStat.DEX;

                recruitsCap.Bonus2 = 20;
                recruitsCap.Bonus2Type = (int) eProperty.MaxHealth;

                recruitsCap.Bonus3 = 1;
                recruitsCap.Bonus3Type = (int) eResist.Spirit;

                recruitsCap.Quality = 100;
                recruitsCap.Condition = 1000;
                recruitsCap.MaxCondition = 1000;
                recruitsCap.Durability = 1000;
                recruitsCap.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(recruitsCap);
            }

            recruitsRing = GameServer.Database.FindObjectByKey<ItemTemplate>("recruits_pewter_ring");
            if (recruitsRing == null)
            {
                recruitsRing = new ItemTemplate();
                recruitsRing.Name = "Recruit's Pewter Ring";
                if (log.IsWarnEnabled)
                    log.Warn("Could not find " + recruitsRing.Name + ", creating it ...");
                recruitsRing.Level = 6;

                recruitsRing.Weight = 2;
                recruitsRing.Model = 103;

                recruitsRing.Object_Type = (int) eObjectType.Magical;
                recruitsRing.Item_Type = (int) eEquipmentItems.R_RING;
                recruitsRing.Id_nb = "recruits_pewter_ring";
                recruitsRing.Price = Money.GetMoney(0,0,0,9,0);
                recruitsRing.IsPickable = true;
                recruitsRing.IsDropable = true;

                recruitsRing.Bonus = 5; // default bonus

                recruitsRing.Bonus1 = 4;
                recruitsRing.Bonus1Type = (int) eStat.CON;

                recruitsRing.Bonus2 = 1;
                recruitsRing.Bonus2Type = (int) eResist.Crush;

                recruitsRing.Bonus3 = 12;
                recruitsRing.Bonus3Type = (int) eProperty.MaxHealth;

                recruitsRing.Quality = 100;
                recruitsRing.Condition = 1000;
                recruitsRing.MaxCondition = 1000;
                recruitsRing.Durability = 1000;
                recruitsRing.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(recruitsRing);
            }

            #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.
            */
            //We want to be notified whenever a player enters the world
            GameEventMgr.AddHandler(GamePlayerEvent.GameEntered, new DOLEventHandler(PlayerEnterWorld));

            GameEventMgr.AddHandler(dalikor, GameLivingEvent.Interact, new DOLEventHandler(TalkToDalikor));
            GameEventMgr.AddHandler(dalikor, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToDalikor));

            GameEventMgr.AddHandler(briedi, GameLivingEvent.Interact, new DOLEventHandler(TalkToMasterBriedi));
            GameEventMgr.AddHandler(briedi, GameLivingEvent.WhisperReceive, new DOLEventHandler(TalkToMasterBriedi));

            GameEventMgr.AddHandler(princessAiyr, GameNPCEvent.OnAICallback, new DOLEventHandler(CheckNearPrincessAyir));

            GameEventMgr.AddHandler(GamePlayerEvent.AcceptQuest, new DOLEventHandler(SubscribeQuest));
            GameEventMgr.AddHandler(GamePlayerEvent.DeclineQuest, new DOLEventHandler(SubscribeQuest));

            /* Now we bring to dalikor the possibility to give this quest to players */
            dalikor.AddQuestToGive(typeof (BeginningOfWar));

            if (log.IsInfoEnabled)
                log.Info("Quest \"" + questTitle + "\" initialized");
        }
开发者ID:mynew4,项目名称:DOLSharp,代码行数:101,代码来源:BeginningOfWar.cs


注:本文中的GameNPC.AddQuestToGive方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。