public void CmdSurvivor_OnCommand(CommandEventArgs e)
        {
            if (e.Mobile.AccessLevel >= AccessLevel.GameMaster)
            {
                List <SurvivorStone> survivorStoneList = new List <SurvivorStone>();
                foreach (Item item in World.Items.Values)
                {
                    if (item is SurvivorStone)
                    {
                        survivorStoneList.Add((SurvivorStone)item);
                    }
                }

                if (survivorStoneList.Count > 0)
                {
                    if (survivorStoneIndex >= survivorStoneList.Count)
                    {
                        survivorStoneIndex = 0;
                    }

                    e.Mobile.MoveToWorld(survivorStoneList[survivorStoneIndex].Location, survivorStoneList[survivorStoneIndex].Map);
                    survivorStoneIndex++;
                }
                else
                {
                    e.Mobile.SendMessage("Nenhuma SurvivorStone localizada.");
                }

                return;
            }


            if (currentSurvivorStone != null && SingletonEvent.Instance.IsEventRunning)
            {
                currentSurvivorStone.EnterEvent(e.Mobile);
            }
        }
Example #2
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            switch (info.ButtonID)
            {
            case 100:     // Ir Invisivel para o evento
            {
                from.Hidden = true;
                BaseEventHelper.GoEvent(from, EnumEventBase.EnumEventType.Survivor);
                from.SendGump(this);
                break;
            }

            case 101:     // Ir como Juiz para o evento
            {
                BaseEventHelper.GoEvent(from, EnumEventBase.EnumEventType.Survivor);
                from.SendGump(this);
                break;
            }

            case 1:
            {
                SurvivorStone.EnterEvent(from);
                break;
            }

            case 2:
            {
                break;
            }

            case 0:
            default:
                break;
            }
        }