//just for the use of the portal private bool OnUseTeleporterListener(uint actorDynID, Map.World world) { if (world.HasActor(actorDynID)) { var actor = world.GetActorByDynamicId(actorDynID); // it is not null :p Logger.Debug(" supposed portal has type {3} has name {0} and state {1} , has gizmo been operated ? {2} ", actor.NameSNOId, actor.Attributes[Net.GS.Message.GameAttribute.Gizmo_State], actor.Attributes[Net.GS.Message.GameAttribute.Gizmo_Has_Been_Operated], actor.GetType()); while (true) { if (actor.Attributes[Net.GS.Message.GameAttribute.Gizmo_Has_Been_Operated]) { world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.InteractWithActor, 192164); break; } } } return(true); }
private bool OnKillBonusListener(List <uint> monstersAlive, Map.World world, int taskID) { var monsterCount = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting. Logger.Debug(" dead to be counted {0} world contains {1} WM ", monsterCount, world.GetActorsBySNO(wretchedMotherAID).Count); while (true) { if (world.GetActorsBySNO(wretchedMotherAID).Count < monsterCount) { //If dead we count one less and send the update for the bonus stuff :p Logger.Debug("A wretched mother has been killed"); monsterCount--; world.Game.Quests.NotifyBonus(QuestStepObjectiveType.BonusStep, bonusTaskID); if (monsterCount == 0) { break; } } } return(true); }
}; //We use this for the killeventlistener. public override void Execute(Map.World world) { //The spawning positions for each monster in its wave. Basically, you add here the "number" of mobs, accoring to each vector LaunchWave() will spawn every mob in its position. //Vector3D[] WretchedMotherSpawn = { new Vector3D(2766.513f, 2913.982f, 24.04533f) }; //Somehow shes already spawned when the Inn event finishes.. so we search for the ID and add it to the kill event listener. var actor = world.GetActorBySNO(219725); monstersAlive.Add(actor.DynamicID); //Run Kill Event Listener var ListenerFirstWaveTask = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); //Wait for wtretchedmother to be killed. ListenerFirstWaveTask.ContinueWith(delegate //Once killed: { world.Game.Quests.Advance(87700); Logger.Debug("Event finished"); StartConversation(world, 156223); }); }
private bool OnKillListener(List <uint> monstersAlive, Map.World world) { Int32 monstersKilled = 0; var monsterCount = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting. while (monstersKilled != monsterCount) { for (int i = monstersAlive.Count - 1; i >= 0; i--) { if (world.HasMonster(monstersAlive[i])) { } else { Logger.Debug(monstersAlive[i] + " has been killed"); monstersAlive.RemoveAt(i); monstersKilled++; } } } // –егистраци¤ всех убийств = продвижение по квесту) if (monstersKilled == monsterCount) { if (killed == false) { killed = true; //world.Game.Quests.Advance(87700); world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.KillGroup, -1); foreach (var plr in world.Players.Values) { plr.Toon.ActiveQuest = 87700; plr.Toon.StepOfQuest = 4; plr.Toon.StepIDofQuest = 46; } ; } } return(true); }
public override void Execute(Map.World world) { //StartConversation(world, 198521); Logger.Debug(" Conversation done "); if (HadConversation) { world.Game.Quests.Notify(QuestStepObjectiveType.CompleteQuest, 87700); world.Game.Quests.Advance(87700); world.Game.Quests.NotifyQuest(87700, Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.CompleteQuest, 1); HadConversation = false; } //okay now we send a notify with QuestEvent for every one //force leah to have a specific conversation list :p //world.GetActorBySNO(4580).Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(198541, 108832, 2)); foreach (var player in world.Players) { var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Value.Toon.PersistentID); player.Value.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Quest.QuestMeterMessage() { snoQuest = 87700, Field1 = 2, Field2 = 10.0f }); dbQuestProgress.LastQuest = 87700; dbQuestProgress.ActiveQuest = 72095; dbQuestProgress.StepOfQuest = -1; DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress); DBSessions.AccountSession.Flush(); } ; // starting second quest StartConversation(world, 198541); }
public override void Execute(Map.World world) { if (HadConversation) { HadConversation = false; world.Game.Quests.NotifyQuest(72221, QuestStepObjectiveType.EventReceived, -1); Logger.Debug(" Quests.NotifyQuest(72221) "); } foreach (var player in world.Players.Values) { player.Toon.ActiveQuest = 72221; player.Toon.StepIDofQuest = 35; player.Toon.StepOfQuest = 5; Logger.Debug(" Progress Saved "); } ; var BlacksmithQuest = world.GetActorBySNO(65036); (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Conversations.Clear(); (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 0; (BlacksmithQuest as Core.GS.Actors.InteractiveNPC).Attributes.BroadcastChangedIfRevealed(); }
public override void Execute(Map.World world) { if (HadConversation) { HadConversation = false; StartConversation(world, 204113); world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.HadConversation, 151123); var transformActors = Task <bool> .Factory.StartNew(() => HoudiniVsZombies(world, 204605)); transformActors.Wait(); var zombieWave = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, 203121)); zombieWave.Wait(); var ListenerZombie = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie.ContinueWith(delegate { StartConversation(world, 151156); }); } }
private bool OnKillListener(List <uint> monstersAlive, Map.World world) { Int32 monstersKilled = 0; var monsterCount = monstersAlive.Count; while (monstersKilled != monsterCount) { for (int i = monstersAlive.Count - 1; i >= 0; i--) { if (world.HasMonster(monstersAlive[i])) { } else { Logger.Debug(monstersAlive[i] + " has been killed"); monstersAlive.RemoveAt(i); monstersKilled++; } } } return(true); }
private bool WaitConversation(Map.World world) { var players = world.Players; while (!_status) { foreach (var player in players) { if (player.Value.Conversations.ConversationRunning() == true) { Logger.Debug("Conversation Finished"); _status = false; return(true); } else { //Logger.Debug("Waiting"); } } } return(true); }
private bool OnListenerToEnter(Players.Player player, Map.World world) { int sceneID = player.CurrentScene.SceneSNO.Id; while (true) { sceneID = player.CurrentScene.SceneSNO.Id; if (sceneID == 90196) { bool ActivePortal = true; foreach (var playerN in world.Players) { var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(playerN.Value.Toon.PersistentID); if (dbQuestProgress.StepOfQuest == 1) { ActivePortal = false; } dbQuestProgress.ActiveQuest = 72095; dbQuestProgress.StepOfQuest = 3; DBSessions.AccountSession.SaveOrUpdate(dbQuestProgress); DBSessions.AccountSession.Flush(); } if (ActivePortal == true) { world.Game.Quests.Advance(72095); } else { world.Game.Quests.Advance(72095); world.Game.Quests.Advance(72095); } StartConversation(world, 166678); break; } } return(true); }
public override void Execute(Map.World world) { Logger.Debug(" Death Of King Event Path 2"); //Берём участников сцены var LeoricGhost = world.GetActorBySNO(5365); var GhostKnights = world.GetActorsBySNO(4182); var LachdananGhost = world.GetActorBySNO(4183); var SwordPlace = world.GetActorBySNO(163449); TickTimer Timeout = new SecondsTickTimer(world.Game, 23f); var ListenerKingSkeletons = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout)); ListenerKingSkeletons.ContinueWith(delegate { LeoricGhost.Destroy(); LachdananGhost.Destroy(); foreach (var GK in GhostKnights) { GK.Destroy(); } }); }
private bool OnWMQKillListener(uint monsterDynID, Map.World world) { while (true) { if (world.HasMonster(monsterDynID)) { } else { world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.EventReceived, -1); foreach (var plr in world.Players.Values) { plr.Toon.ActiveQuest = 87700; plr.Toon.StepOfQuest = 8; plr.Toon.StepIDofQuest = 55; plr.Toon.WayPointStatus = 3; plr.UpdateHeroState(); } ; break; } } return(true); }
private bool OnKillListener(List <uint> monstersAlive, Map.World world) { Int32 monstersKilled = 0; var monsterCount = monstersAlive.Count; while (monstersKilled != monsterCount) { for (int i = monstersAlive.Count - 1; i >= 0; i--) { if (world.HasMonster(monstersAlive[i])) { //Alive: Nothing. } else { //If dead we remove it from the list and keep iterating. Logger.Debug(monstersAlive[i] + " has been killed"); monstersAlive.RemoveAt(i); monstersKilled++; } } } return(true); }
public override void Execute(Map.World world) { StartConversation(world, 198521); Logger.Debug(" Conversation done "); world.Game.Quests.Advance(87700); //okay now we send a notify with QuestEvent for every one world.Game.Quests.Notify(QuestStepObjectiveType.CompleteQuest, 87700); //force leah to have a specific conversation list :p //world.GetActorBySNO(4580).Tags.Add(MarkerKeys.ConversationList, new TagMapEntry(198541, 108832, 2)); foreach (var player in world.Players) { player.Value.InGameClient.SendMessage(new Mooege.Net.GS.Message.Definitions.Quest.QuestMeterMessage() { snoQuest = 87700, Field1 = 2, Field2 = 10.0f }); } ; // starting second quest StartConversation(world, 198541); }
private bool OnListenerToEnter(Players.Player player, Map.World world) { while (true) { try { int sceneID = player.CurrentScene.SceneSNO.Id; if (sceneID == 90196) { foreach (var playerN in world.Players.Values) { playerN.Toon.ActiveQuest = 72095; playerN.Toon.StepOfQuest = 3; } try { if (player.ActiveHireling != null) { Vector3D NearDoor = new Vector3D(1935.697f, 2792.971f, 40.23627f); var facingAngle = Actors.Movement.MovementHelpers.GetFacingAngle(player.ActiveHireling.Position, NearDoor); player.ActiveHireling.Brain.DeActivate(); player.ActiveHireling.Move(NearDoor, facingAngle); StartConversation(world, 166678); } } catch { } break; } } catch { Logger.Debug("Приостановка скрипта, идёт загрузка."); } } return(true); }
public override void Execute(Map.World world) { ////Disable RumFord so he doesn't offer the quest. Somehow, hes supposed to mark it as readed and not offer it while theres no other quest available but he does, ////so you can trigger the event multiple times while the event is already running, therefor, we disable his interaction till the event is done.-Wesko if (HadConversation) { HadConversation = false; setActorOperable(world, 3739, false); //Start the conversation between RumFord & Guard. StartConversation(world, 198199); //After Conversations ends!. var wave1Actors = world.GetActorsInGroup("GizmoGroup1"); monstersId.Clear(); ActorsVector3D.Clear(); foreach (var actor in wave1Actors) { if (actor.ActorSNO.Id == 76857) { monstersId.Add(6632); } else { monstersId.Add(6644); } ActorsVector3D.Add(new Vector3D(actor.Position.X, actor.Position.Y, actor.Position.Z)); } var zombieWave1 = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, monstersId)); zombieWave1.Wait(); var ListenerZombie1 = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie1.ContinueWith(delegate //Once killed: { //Wave three: Skinnies + RumFord conversation #2 "They Keep Comming!". StartConversation(world, 80088); var wave2Actors = world.GetActorsInGroup("GizmoGroup2"); monstersId.Clear(); ActorsVector3D.Clear(); foreach (var actor in wave2Actors) { if (actor.ActorSNO.Id == 76857) { monstersId.Add(6632); } else { monstersId.Add(6644); } ActorsVector3D.Add(new Vector3D(actor.Position.X, actor.Position.Y, actor.Position.Z)); } var zombieWave2 = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, monstersId)); zombieWave2.Wait(); var ListenerZombie2 = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie2.ContinueWith(delegate //Once killed: { StartConversation(world, 151102); world.Game.Quests.Advance(87700); Logger.Debug("Event finished"); setActorOperable(world, 3739, true); }); }); } }
public override void Execute(Map.World world) { if (HadConversation) { HadConversation = false; } foreach (var player in world.Players.Values) { player.Toon.MaximumQuest = 72221; player.Toon.ActiveQuest = 72221; player.Toon.StepOfQuest = -1; } ; Logger.Debug(" Второй квест окончен. "); bool questConversation = true; var Cain = world.GetActorBySNO(3533); Cain.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true; (Cain as InteractiveNPC).Conversations.Clear(); (Cain as InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(198691)); Cain.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0; Cain.Attributes.BroadcastChangedIfRevealed(); try { var BlacksmithVendor = world.GetActorBySNO(56947); Vector3D position = new Vector3D(BlacksmithVendor.Position); var BlacksmithQuest = world.GetActorBySNO(65036); BlacksmithQuest.RotationAxis = BlacksmithVendor.RotationAxis; BlacksmithQuest.RotationW = BlacksmithVendor.RotationW; var TELEGAS = world.GetActorsBySNO(112131); Vector3D LastTelega = new Vector3D(); foreach (var TELEGA in TELEGAS) { LastTelega = TELEGA.Position; TELEGA.Destroy(); } } catch { Logger.Warn("Не критичная ошибка скрипта."); } Players.Player Master = null; Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!"); foreach (var player in world.Game.Players.Values) { if (player.PlayerIndex == 0) { Master = player; } D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder(); Reward.SnoQuest = 72095; Reward.XpGranted = 3300; D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder(); StepCompleted.Reward = Reward.Build(); StepCompleted.SetIsQuestComplete(true); player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage() { QuestStepComplete = StepCompleted.Build() }); player.UpdateExp(Reward.XpGranted); } }
public HealthPotion(Map.World world, ItemTable definition) : base(world, definition) { }
public Potion(Map.World world, ItemTable definition) : base(world, definition) { Attributes[GameAttribute.ItemStackQuantityLo] = 1; }
}; //We fill this with the vectors of the actors //bool started = false; public override void Execute(Map.World world) { setActorOperable(world, 3739, false); StartConversation(world, 198199); var wave1Actors = world.GetActorsInGroup("GizmoGroup1"); monstersId.Clear(); ActorsVector3D.Clear(); foreach (var actor in wave1Actors) { if (actor.ActorSNO.Id == 76857) { monstersId.Add(6632); } else { monstersId.Add(6644); } ActorsVector3D.Add(new Vector3D(actor.Position.X, actor.Position.Y, actor.Position.Z)); } var zombieWave1 = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, monstersId)); zombieWave1.Wait(); var ListenerZombie1 = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie1.ContinueWith(delegate { StartConversation(world, 80088); var wave2Actors = world.GetActorsInGroup("GizmoGroup2"); monstersId.Clear(); ActorsVector3D.Clear(); foreach (var actor in wave2Actors) { if (actor.ActorSNO.Id == 76857) { monstersId.Add(6632); } else { monstersId.Add(6644); } ActorsVector3D.Add(new Vector3D(actor.Position.X, actor.Position.Y, actor.Position.Z)); } var zombieWave2 = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, monstersId)); zombieWave2.Wait(); var ListenerZombie2 = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie2.ContinueWith(delegate { StartConversation(world, 151102); world.Game.Quests.NotifyQuest(87700, QuestStepObjectiveType.KillGroup, -1); foreach (var plr in world.Players.Values) { plr.Toon.ActiveQuest = 87700; plr.Toon.StepOfQuest = 2; plr.Toon.StepIDofQuest = 42; } ; #region Открываем ворота var OldGate = world.GetActorBySNO(90419); var NoDownGate = new Door(world, 90419, world.GetActorBySNO(90419).Tags); NoDownGate.Field2 = 16; NoDownGate.RotationAxis = world.GetActorBySNO(90419).RotationAxis; NoDownGate.RotationW = world.GetActorBySNO(90419).RotationW; NoDownGate.Attributes[GameAttribute.Gizmo_Has_Been_Operated] = true; NoDownGate.Attributes[GameAttribute.Gizmo_State] = 1; NoDownGate.Attributes[GameAttribute.Untargetable] = true; NoDownGate.Attributes.BroadcastChangedIfRevealed(); NoDownGate.EnterWorld(world.GetActorBySNO(90419).Position); OldGate.Destroy(); world.BroadcastIfRevealed(new PlayAnimationMessage { ActorID = NoDownGate.DynamicID, Field1 = 5, Field2 = 0, tAnim = new Net.GS.Message.Fields.PlayAnimationMessageSpec[] { new Net.GS.Message.Fields.PlayAnimationMessageSpec() { Duration = 100, AnimationSNO = NoDownGate.AnimationSet.TagMapAnimDefault[AnimationSetKeys.Opening], PermutationIndex = 0, Speed = 0.5f } } }, NoDownGate); world.BroadcastIfRevealed(new SetIdleAnimationMessage { ActorID = NoDownGate.DynamicID, AnimationSNO = Core.GS.Common.Types.TagMap.AnimationSetKeys.Open.ID, }, NoDownGate); NoDownGate.Field2 = 16; NoDownGate.Attributes[Net.GS.Message.GameAttribute.Operatable] = false; #endregion #region Убираем ненужню Лею var actorToShoot = world.GetActorByDynamicId(72); if (actorToShoot != null) { world.Leave(actorToShoot); } else { Logger.Debug("No actor to shoot yet"); } #endregion setActorOperable(world, 3739, true); }); }); var rumfordActor = world.GetActorBySNO(3739); Logger.Debug(" Rumford has type {0}", rumfordActor.GetType()); }
private bool OnKillButcherListener(List <uint> monstersAlive, Map.World world) { System.Int32 monstersKilled = 0; //bool MidMidle_Active = false; var monsterCount = monstersAlive.Count; //Since we are removing values while iterating, this is set at the first real read of the mob counting. while (monstersKilled != monsterCount) { /* * if (MidMidle_Active == false) * { * MidMidle_Active = true; * * var Panel_MidMiddle_Base = world.GetActorBySNO(201426); * * if (Panel_MidMiddle_Base == null) * { * world.SpawnMonster(201426, new Vector3D(120.9595f, 121.6244f, -0.1068707f)); * Panel_MidMiddle_Base = world.GetActorBySNO(201426); * } * * TickTimer Timeout1 = new SecondsTickTimer(world.Game, 2f); * var TimeoutToReady = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout1)); * TimeoutToReady.ContinueWith(delegate * { * world.SpawnMonster(201428, Panel_MidMiddle_Base.Position); * var Panel_MidMiddle_Ready = world.GetActorBySNO(201428); * * TickTimer Timeout2 = new SecondsTickTimer(world.Game, 4f); * var TimeoutToActive = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout2)); * TimeoutToActive.ContinueWith(delegate * { * Panel_MidMiddle_Ready.Destroy(); * world.SpawnMonster(201430, Panel_MidMiddle_Base.Position); * var Panel_MidMiddle_Active = world.GetActorBySNO(201430); * * TickTimer Timeout3 = new SecondsTickTimer(world.Game, 5f); * var TimeoutToOff = System.Threading.Tasks.Task<bool>.Factory.StartNew(() => WaitToSpawn(Timeout3)); * TimeoutToOff.ContinueWith(delegate * { * Panel_MidMiddle_Active.Destroy(); * MidMidle_Active = false; * }); * }); * }); * } */ //Iterate through monstersAlive List, if found dead we start to remove em till all of em are dead and removed. for (int i = monstersAlive.Count - 1; i >= 0; i--) { if (world.HasMonster(monstersAlive[i])) { //Alive: Nothing. } else { //If dead we remove it from the list and keep iterating. Logger.Debug(monstersAlive[i] + " has been killed"); monstersAlive.RemoveAt(i); monstersKilled++; } } } return(true); }
public override void Execute(Map.World world) { Logger.Debug(" Разговор с Леей закончен "); }
public override void Execute(Map.World world) { // Проверка на ненужную Лию if (world.HasActor(72)) { world.GetActorByDynamicId(72).Destroy(); } //Берем нужную Лию =) var LeahBrains = world.GetActorByDynamicId(83); //Берем путевую точку Нового Тристрама var NewTristramPortal = world.GetActorBySNO(223757); if (HadConversation) { HadConversation = false; Logger.Debug(" RESCUE CAIN QUEST STARTED "); world.Game.Quests.NotifyQuest(72095, QuestStepObjectiveType.EventReceived, -1); } #region Создаем Лею как подругу. Hireling LeahFriend = new LeahParty(world, LeahBrains.ActorSNO.Id, LeahBrains.Tags); //LeahFriend.Brain = new HirelingBrain(LeahFriend); foreach (var player in world.Players) { if (player.Value.PlayerIndex == 0) { LeahFriend.GBHandle.Type = 4; LeahFriend.GBHandle.GBID = 717705071; LeahFriend.Attributes[GameAttribute.Pet_Creator] = player.Value.PlayerIndex; LeahFriend.Attributes[GameAttribute.Pet_Type] = 0x8; LeahFriend.Attributes[GameAttribute.Hitpoints_Max] = 100f; LeahFriend.Attributes[GameAttribute.Hitpoints_Cur] = 80f; LeahFriend.Attributes[GameAttribute.Attacks_Per_Second] = 1.6f; LeahFriend.Attributes[GameAttribute.Pet_Owner] = player.Value.PlayerIndex; LeahFriend.Attributes[GameAttribute.Untargetable] = false; LeahFriend.Position = RandomDirection(player.Value.Position, 3f, 8f); LeahFriend.RotationW = LeahBrains.RotationW; LeahFriend.RotationAxis = LeahBrains.RotationAxis; LeahFriend.EnterWorld(RandomDirection(player.Value.Position, 3f, 8f)); LeahFriend.Attributes[GameAttribute.Level]++; player.Value.ActiveHireling = LeahFriend; LeahFriend.Brain.Activate(); MasterPlayer = player.Value; } player.Value.Toon.ActiveQuest = 72095; player.Value.Toon.StepOfQuest = 1; player.Value.Toon.StepIDofQuest = 7; } #endregion // Убираем Лею NPC try { world.Leave(LeahBrains); } catch { } NewTristramPortal.Attributes[Net.GS.Message.GameAttribute.Gizmo_Has_Been_Operated] = false; var ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnUseTeleporterListener(NewTristramPortal.DynamicID, world)); ListenerUsePortalTask.ContinueWith(delegate //Ждём использования телепорта: { Logger.Debug(" Waypoint_NewTristram Objective done "); // Waypoint_NewTristram }); var ListenerEnterToOldTristram = Task <bool> .Factory.StartNew(() => OnListenerToEnter(MasterPlayer, world)); ListenerEnterToOldTristram.ContinueWith(delegate //Once killed: { Logger.Debug("Enter to Road Objective done "); var ListenerEnterToAdriaEnter = Task <bool> .Factory.StartNew(() => OnListenerToAndriaEnter(MasterPlayer, world)); ListenerEnterToAdriaEnter.ContinueWith(delegate //Once killed: { Logger.Debug("Enter to Adria Objective done "); }); }); }
public abstract void Execute(Map.World world);
}; //We use this for the killeventlistener. public override void Execute(Map.World world) { //The spawning positions for each monster in its wave. Basically, you add here the "number" of mobs, accoring to each vector LaunchWave() will spawn every mob in its position. //Vector3D[] WretchedMotherSpawn = { new Vector3D(2766.513f, 2913.982f, 24.04533f) }; //Somehow shes already spawned when the Inn event finishes.. so we search for the ID and add it to the kill event listener. var actor = world.GetActorBySNO(wretchedMotherAID); if (actor == null) { Logger.Debug("Could not find the Wretched Mother ACTOR ID {0}", wretchedMotherAID); Vector3D FirstMother = new Vector3D(2766.513f, 2913.982f, 24.04533f); world.SpawnMonster(wretchedMotherAID, FirstMother); actor = world.GetActorBySNO(wretchedMotherAID); monstersAlive1.Add(actor.DynamicID); } else { monstersAlive1.Add(actor.DynamicID); } //Убираем телегу var FactorToShoot = world.GetActorBySNO(81699); try { world.Leave(FactorToShoot); } catch { } //FactorToShoot.Destroy(); //Запуск отслеживания убийства var ListenerWretchedMother = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive1, world)); //Ждём пока убьют ListenerWretchedMother.ContinueWith(delegate { // WMQ + 3 WM (group) // portal + rumford (group) // WMQ + 3 WM (group) // force next quest step world.Game.Quests.Advance(87700); Logger.Debug("Event finished"); // launch dialog StartConversation(world, 156223); // position of the wretched mother Vector3D[] WretchedMotherPosSpawn = new Vector3D[3]; // too hard 3 elems.. WretchedMotherPosSpawn[0] = new Vector3D(2427.788f, 2852.193f, 27.1f); WretchedMotherPosSpawn[1] = new Vector3D(2356.931f, 2528.715f, 27.1f); WretchedMotherPosSpawn[2] = new Vector3D(2119.563f, 2489.693f, 27.1f); // spawn 3 wretched mother Logger.Debug(" spawn 1 Wretched Mother "); world.SpawnMonster(wretchedMotherAID, WretchedMotherPosSpawn[0]); Logger.Debug(" spawn 1 Wretched Mother "); world.SpawnMonster(wretchedMotherAID, WretchedMotherPosSpawn[1]); Logger.Debug(" spawn 1 Wretched Mother "); world.SpawnMonster(wretchedMotherAID, WretchedMotherPosSpawn[2]); // ugly hack to get all actors with the same snoID..no idea if it is lmegit or if game will crash and summon diablo on my pc... var actorsWM = world.GetActorsBySNO(wretchedMotherAID); // this is the List of wretched mother ACTOR ID var actorWQM = world.GetActorBySNO(wretchedMotherQueenAID); // this is the wretched queen mother ACTOR ID Logger.Debug(" world contains {0} WM ", actorsWM.Count); if (actorsWM.Count > 0) { monstersAliveBonus.Add(actorsWM.ElementAt(0).DynamicID); monstersAliveBonus.Add(actorsWM.ElementAt(0).DynamicID); monstersAliveBonus.Add(actorsWM.ElementAt(0).DynamicID); // run killbonus event listener var ListenerWQTask = Task <bool> .Factory.StartNew(() => OnKillBonusListener(monstersAliveBonus, world, bonusTaskID)); //Wait for wretched queen mother to be killed. ListenerWQTask.ContinueWith(delegate //Once killed: { Logger.Debug("Bonus Event Completed "); }); } else { Logger.Debug("Could not get/spawn the Wretched Mother ACTOR ID {0}", wretchedMotherAID); } if (actorWQM != null) { // Пытаемся привязать статус босса! actorWQM.Attributes[Net.GS.Message.GameAttribute.Using_Bossbar] = true; actorWQM.Attributes[Net.GS.Message.GameAttribute.InBossEncounter] = true; //actorWQM.Attributes[Net.GS.Message.GameAttribute.Si] // DOES NOT WORK it should be champion affixes or shit of this kind ... // Увеличиваем здоровье босса! //actorWQM.Q actorWQM.Attributes[GameAttribute.Hitpoints_Max] = 150f; actorWQM.Attributes[GameAttribute.Hitpoints_Cur] = 150f; //Запуск отслеживания убийства королевы var ListenerWQMTask = Task <bool> .Factory.StartNew(() => OnWMQKillListener(actorWQM.DynamicID, world)); //Wait for wretched queen mother to be killed. ListenerWQMTask.ContinueWith(delegate //Once killed: { Logger.Debug(" Wretch Queen Event done !!"); // WretchedQueenIsDead // portal shit var portalActorId = world.GetActorBySNO(portalAID); var ListenerUsePortalTask = Task <bool> .Factory.StartNew(() => OnUseTeleporterListener(portalActorId.DynamicID, world)); //Wait for portal to be used . ListenerUsePortalTask.ContinueWith(delegate //Once killed: { Logger.Debug(" Waypoint_OldTristram Objective done "); // Waypoint_OldTristram }); //conversation with rumford... delegated to another class... since we have a nice conversation system :p }); } else { Logger.Debug("Could not find the Wretched Mother QUEEN ACTOR ID {0}", wretchedMotherQueenAID); } }); }
public override void Execute(Map.World world) { Logger.Debug(" SKELETON KING QUEST STARTED "); StartConversation(world, 154570); world.Game.Quests.Advance(72061); }
public override void Execute(Map.World world) { Logger.Debug(" RESCUE CAIN QUEST SECOND FILE STARTED "); // world.GetActorBySNO(3739).WalkSpeed = 0.108f; // world.GetActorBySNO(3739).RunSpeed = 0.3598633f; }
}; //We fill this with the vectors of the actors //bool started = false; public override void Execute(Map.World world) { ////Disable RumFord so he doesn't offer the quest. Somehow, hes supposed to mark it as readed and not offer it while theres no other quest available but he does, ////so you can trigger the event multiple times while the event is already running, therefor, we disable his interaction till the event is done.-Wesko setActorOperable(world, 3739, false); // no need for it now the update conversation list is laucnhed once the conversation is marked as read :p StartConversation(world, 198199); var wave1Actors = world.GetActorsInGroup("GizmoGroup1"); monstersId.Clear(); ActorsVector3D.Clear(); foreach (var actor in wave1Actors) { if (actor.ActorSNO.Id == 76857) { monstersId.Add(6632); } else { monstersId.Add(6644); } ActorsVector3D.Add(new Vector3D(actor.Position.X, actor.Position.Y, actor.Position.Z)); } var zombieWave1 = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, monstersId)); zombieWave1.Wait(); var ListenerZombie1 = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie1.ContinueWith(delegate //Once killed: { //Wave three: Skinnies + RumFord conversation #2 "They Keep Comming!". StartConversation(world, 80088); var wave2Actors = world.GetActorsInGroup("GizmoGroup2"); monstersId.Clear(); ActorsVector3D.Clear(); foreach (var actor in wave2Actors) { if (actor.ActorSNO.Id == 76857) { monstersId.Add(6632); } else { monstersId.Add(6644); } ActorsVector3D.Add(new Vector3D(actor.Position.X, actor.Position.Y, actor.Position.Z)); } var zombieWave2 = Task <bool> .Factory.StartNew(() => LaunchWave(ActorsVector3D, world, monstersId)); zombieWave2.Wait(); var ListenerZombie2 = Task <bool> .Factory.StartNew(() => OnKillListener(monstersAlive, world)); ListenerZombie2.ContinueWith(delegate //Once killed: { StartConversation(world, 151102); world.Game.Quests.Advance(87700); Logger.Debug("Event finished"); // wyjebanie leah var actorToShoot = world.GetActorByDynamicId(72); if (actorToShoot != null) { Logger.Debug("trying to shoot actor SNO {0}, world contains {1} such actors ", actorToShoot.ActorSNO, world.GetActorsBySNO(3739).Count); world.Leave(actorToShoot); } else { Logger.Debug("No actor to shoot yet"); } setActorOperable(world, 3739, true); }); }); // check rumford state :p var rumfordActor = world.GetActorBySNO(3739); // display real type for rumford actor Logger.Debug(" Rumford has type {0}", rumfordActor.GetType()); //var rumfordBrain = (rumfordActor as Living).Brain; //try //{ // Logger.Debug(" Rumford as a brain {0}, activating now ! ", (rumfordActor as CaptainRumford).Brain); // (rumfordActor as CaptainRumford).Brain.Activate(); //} //catch (System.NullReferenceException e) //{ // Logger.Debug(" brain in rumford has a lots of problems !"); //} }
public override void Execute(Map.World world) { Logger.Debug(" Разговор с Леей закончен "); world.Game.Quests.Advance(72095); }
public override void Execute(Map.World world) { if (HadConversation) { HadConversation = false; Logger.Debug(" Quests.Advance(72221) "); //world.Game.Quests.NotifyQuest(72221, QuestStepObjectiveType.PossessItem, -1); world.Game.Quests.Advance(72221); } foreach (var player in world.Players.Values) { player.Toon.MaximumQuest = 72061; player.Toon.ActiveQuest = 72061; player.Toon.StepOfQuest = 0; Logger.Debug(" Progress Saved "); } ; foreach (var plr in world.Game.Players.Values) { var inventory = plr.Inventory; var dbArtisans = DBSessions.AccountSession.Get <DBArtisansOfToon>(plr.Toon.PersistentID); plr.InGameClient.SendMessage(plr.GetBlacksmithData(dbArtisans)); var Blacksmith = world.GetActorBySNO(56947); Blacksmith.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true; (Blacksmith as Core.GS.Actors.InteractiveNPC).Conversations.Clear(); Blacksmith.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = 0; Blacksmith.Attributes.BroadcastChangedIfRevealed(); foreach (var itm in inventory.GetBackPackItems()) { if (itm.ActorSNO.Id == 92168) { inventory.DestroyInventoryItem(itm); inventory.RefreshInventoryToClient(); var RepairedCrown = Items.ItemGenerator.Cook(plr, "SkeletonKingCrown"); inventory.PickUp(RepairedCrown); } } DBSessions.AccountSession.SaveOrUpdate(dbArtisans); DBSessions.AccountSession.Flush(); } Logger.Debug(" Третий квест окончен. "); Logger.Debug("ПОЛУЧЕНИЕ НАГРАДЫ!"); foreach (var player in world.Game.Players.Values) { D3.Quests.QuestReward.Builder Reward = new D3.Quests.QuestReward.Builder(); //StoneOfRecallSkellet.Set var Hand = D3.GameBalance.Handle.CreateBuilder() .SetGameBalanceType((int)GBHandleType.Gizmo) .SetGbid(-2007738575) // .SetGbid(1612257705) ; var RareName = D3.Items.RareItemName.CreateBuilder() .SetSnoAffixStringList(213647) .SetAffixStringListIndex(213668) .SetItemNameIsPrefix(true) .SetItemStringListIndex(213647) ; var StoneOfRecallScript = D3.Items.Generator.CreateBuilder() .SetSeed((uint)RandomHelper.Next()) .SetGbHandle(Hand) .SetDurability(1) .SetMaxDurability(1) .SetStackSize(1) .SetFlags(0x1) // .SetItemQualityLevel(6) // .SetMaxDurability(30) // .SetDurability(30) // .SetRareItemName(RareName) ; Reward.SnoQuest = 72221; Reward.GoldGranted = 195; Reward.XpGranted = 900; Reward.ItemGranted = StoneOfRecallScript.Build(); //190617 player.Toon.StoneOfPortal = true; player.EnableStoneOfRecall(); D3.Quests.QuestStepComplete.Builder StepCompleted = new D3.Quests.QuestStepComplete.Builder(); StepCompleted.Reward = Reward.Build(); StepCompleted.SetIsQuestComplete(true); player.InGameClient.SendMessage(new Net.GS.Message.Definitions.Quest.QuestStepCompleteMessage() { QuestStepComplete = StepCompleted.Build() }); player.Inventory.AddGoldAmount(Reward.GoldGranted); player.UpdateExp(Reward.XpGranted); } bool questConversation = true; var Cain = world.GetActorBySNO(3533); Cain.Attributes[Net.GS.Message.GameAttribute.MinimapActive] = true; (Cain as Actors.InteractiveNPC).Conversations.Clear(); (Cain as Actors.InteractiveNPC).Conversations.Add(new Actors.Interactions.ConversationInteraction(80681)); Cain.Attributes[Net.GS.Message.GameAttribute.Conversation_Icon, 0] = questConversation ? 1 : 0; Cain.Attributes.BroadcastChangedIfRevealed(); //StartConversation(world, 196043); }