Esempio n. 1
0
        private void ItemCommand(ZoneCharacter character, params string[] param)
        {
            var  id     = ushort.Parse(param[1]);
            byte amount = 1;

            if (param.Length > 2)
            {
                amount = byte.Parse(param[2]);
            }

            // character.GiveItem(id,amount);
            switch (character.GiveItem(id, amount))
            {
            case InventoryStatus.Full:
                Handler12.InventoryFull(character);
                return;

            case InventoryStatus.NotFound:
                character.DropMessage("Item not found.");
                return;
            }
        }
Esempio n. 2
0
        private void SpawnMobT(ZoneCharacter character, params string[] param)
        {
            ushort id    = ushort.Parse(param[1]);
            int    count = 1;

            if (param.Length >= 3)
            {
                count = int.Parse(param[2]);
            }
            if (DataProvider.Instance.MobsByID.ContainsKey(id))
            {
                for (int i = 0; i < count; i++)
                {
                    Mob mob = new Mob(id, new Vector2(character.Position));
                    character.Map.FullAddObject(mob);
                }
            }
            else
            {
                character.DropMessage("Monster ID not found.");
            }
        }
Esempio n. 3
0
        private void SpawnMobT(ZoneCharacter character, params string[] param)
        {
            string mobName = param[1];
            int    count   = 1;

            if (param.Length >= 3)
            {
                count = int.Parse(param[2]);
            }
            if (DataProvider.Instance.MobsByName.ContainsKey(mobName))
            {
                ushort mobID = DataProvider.Instance.MobsByName[mobName].ID;
                for (int i = 0; i < count; i++)
                {
                    Mob mob = new Mob(mobID, new Vector2(character.Position));
                    character.Map.FullAddObject(mob);
                }
            }
            else
            {
                character.DropMessage("Monster Name not found.");
            }
        }
Esempio n. 4
0
 private void Performance(ZoneCharacter character, params string[] param)
 {
     character.DropMessage("Ticks per second on this zone: {0}", Worker.Instance.TicksPerSecond);
 }
Esempio n. 5
0
 private void AdminLevel(ZoneCharacter character, params string[] param)
 {
     Log.WriteLine(LogLevel.Debug, "GM {0} authenticated ingame.", character.Name);
     character.DropMessage("Admin level is {0}", character.Client.Admin);
 }
Esempio n. 6
0
 private void AdminLevel(ZoneCharacter character, params string[] param)
 {
     Log.WriteLine(LogLevel.Debug, "GM {0} authenticated ingame.", character.Name);
     character.DropMessage("Admin level is {0}", character.Client.Admin);
     InterHandler.SendWorldMessage(FiestaLib.WorldMessageTypes.Level20, "Fun!");
 }