diff --git a/Server.Configurations/ZolianDB/ZolianMaps.sql b/Server.Configurations/ZolianDB/ZolianMaps.sql index 6d05c9c7..373a64cf 100644 Binary files a/Server.Configurations/ZolianDB/ZolianMaps.sql and b/Server.Configurations/ZolianDB/ZolianMaps.sql differ diff --git a/Zolian.Server.Base/GameScripts/Areas/ArenaEntrance.cs b/Zolian.Server.Base/GameScripts/Areas/ArenaEntrance.cs index 97ba8138..278af849 100644 --- a/Zolian.Server.Base/GameScripts/Areas/ArenaEntrance.cs +++ b/Zolian.Server.Base/GameScripts/Areas/ArenaEntrance.cs @@ -10,7 +10,7 @@ namespace Darkages.GameScripts.Areas; [Script("Arena Entrance")] public class ArenaEntrance : AreaScript { - private Sprite _aisling; + private Aisling _aisling; public ArenaEntrance(Area area) : base(area) => Area = area; public override void Update(TimeSpan elapsedTime) { } diff --git a/Zolian.Server.Base/GameScripts/Areas/GenericArea.cs b/Zolian.Server.Base/GameScripts/Areas/GenericArea.cs index 22f0b6cc..5027879e 100644 --- a/Zolian.Server.Base/GameScripts/Areas/GenericArea.cs +++ b/Zolian.Server.Base/GameScripts/Areas/GenericArea.cs @@ -8,7 +8,7 @@ namespace Darkages.GameScripts.Areas; [Script("Generic Area")] public class GenericArea : AreaScript { - private Sprite _aisling; + private Aisling _aisling; public GenericArea(Area area) : base(area) => Area = area; public override void Update(TimeSpan elapsedTime) { } diff --git a/Zolian.Server.Base/GameScripts/Areas/NecroEntrance.cs b/Zolian.Server.Base/GameScripts/Areas/NecroEntrance.cs new file mode 100644 index 00000000..fb2224cb --- /dev/null +++ b/Zolian.Server.Base/GameScripts/Areas/NecroEntrance.cs @@ -0,0 +1,45 @@ +using System.Numerics; + +using Chaos.Common.Definitions; + +using Darkages.Enums; +using Darkages.Network.Client; +using Darkages.ScriptingBase; +using Darkages.Sprites; +using Darkages.Types; + +namespace Darkages.GameScripts.Areas; + +[Script("Necro Entrance")] +public class NecroEntrance : AreaScript +{ + private Aisling _aisling; + + public NecroEntrance(Area area) : base(area) => Area = area; + public override void Update(TimeSpan elapsedTime) { } + public override void OnMapEnter(WorldClient client) => _aisling = client.Aisling; + public override void OnMapExit(WorldClient client) { } + + public override void OnPlayerWalk(WorldClient client, Position oldLocation, Position newLocation) + { + var vectorMap = new Vector2(newLocation.X, newLocation.Y); + if (_aisling.Pos != vectorMap) return; + switch (newLocation.X) + { + case 5 when newLocation.Y == 0: + case 5 when newLocation.Y == 1: + if (_aisling.QuestManager.TagorDungeonAccess) + client.TransitionToMap(1204, new Position(17, 37)); + else + { + _aisling.SendTargetedClientMethod(Scope.NearbyAislings, c => c.SendAnimation(75, null, _aisling.Serial)); + client.SendServerMessage(ServerMessageType.ActiveMessage, $"{{=bYou are forcibly repelled!"); + } + + break; + } + } + + public override void OnItemDropped(WorldClient client, Item itemDropped, Position locationDropped) { } + public override void OnGossip(WorldClient client, string message) { } +} \ No newline at end of file diff --git a/Zolian.Server.Base/GameScripts/Areas/Piet.cs b/Zolian.Server.Base/GameScripts/Areas/Piet.cs index f9625a32..8b7f937d 100644 --- a/Zolian.Server.Base/GameScripts/Areas/Piet.cs +++ b/Zolian.Server.Base/GameScripts/Areas/Piet.cs @@ -9,7 +9,7 @@ namespace Darkages.GameScripts.Areas; [Script("Piet")] public class Piet : AreaScript { - private Sprite _aisling; + private Aisling _aisling; public Piet(Area area) : base(area) => Area = area; public override void Update(TimeSpan elapsedTime) { }