Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public static void CheckForSublevelGoal(Client client, PacketHitList packetList)
        {
            for (int i = 0; i < client.Player.TriggerEvents.Count; i++)
            {
                if (client.Player.TriggerEvents[i].Trigger == TriggerEventTrigger.SteppedOnTile &&
                    client.Player.TriggerEvents[i].ID.StartsWith("ESTSublevelGoal"))
                {
                    SteppedOnTileTriggerEvent tEvent = client.Player.TriggerEvents[i] as SteppedOnTileTriggerEvent;

                    if (client.Player.MapID == tEvent.MapID)
                    {
                        DisplayVisibleSublevelGoalTile(client, client.Player.Map, tEvent.X, tEvent.Y, packetList);
                    }
                }
            }
        }
Ejemplo n.º 3
0
 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);
         }
     }
 }