public static void SetSublevelCheckpoint(Client client, int id, string mapID, int x, int y) { SteppedOnTileTriggerEvent trigger = new SteppedOnTileTriggerEvent("ESTSublevelGoal-" + id, TriggerEventAction.RunScript, 1, true, client, mapID, x, y); client.Player.AddTriggerEvent(trigger); CheckForSublevelGoal(client, null); }
public static void ReachedSublevelGoal(Client client, SteppedOnTileTriggerEvent tEvent) { DisplayInvisibleSublevelGoalTile(client, client.Player.Map, tEvent.X, tEvent.Y, null); string[] split = tEvent.ID.Split('-'); if (split[1].IsNumeric()) { int id = split[1].ToInt(); if (exPlayer.Get(client).ElectrolockSublevel.Contains(id) == false) { exPlayer.Get(client).ElectrolockSublevel.Add(id); Messenger.BattleMsg(client, "The light of the crystal enters into your shock flask!", Text.BrightGreen); Messenger.BattleMsg(client, "Your shock flask feels heavier...", Text.WhiteSmoke); } if (VerifyMapKeyTiles(client, client.Player.Map, null)) { Messenger.BattleMsg(client, "An electrolock has been opened nearby!", Text.BrightGreen); } } }