DropMessage() public method

public DropMessage ( string text ) : void
text string
return void
 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.");
 }
 private void Test(ZoneCharacter character, params string[] param)
 {
     ushort skillid = ushort.Parse(param[1]);
     if (!DataProvider.Instance.ActiveSkillsByID.ContainsKey(skillid))
     {
         character.DropMessage("Unknown skill.");
     }
     else if (character.SkillsActive.ContainsKey(skillid))
     {
         character.DropMessage("You already have that skill");
     }
     else
     {
         character.SkillsActive.Add(skillid, new Skill(character, skillid));
         Handler18.SendSkillLearnt(character, skillid);
     }
 }
 private void Pos(ZoneCharacter character, params string[] param)
 {
     character.DropMessage("Map= {0} ({1}); Pos= {2}:{3};",
         character.Map.MapID,
         character.Map.MapInfo.FullName,
         character.Position.X,
         character.Position.Y);
 }
 private void SpawnMob(ZoneCharacter character, params string[] param)
 {
     ushort id = ushort.Parse(param[1]);
     if (DataProvider.Instance.MobsByID.ContainsKey(id))
     {
         Mob mob = new Mob((ushort)(param.Length == 2 ? id : 1045), new Vector2(character.Position));
         character.Map.FullAddObject(mob);
     }
     else character.DropMessage("Monster ID not found.");
 }
 private void List(ZoneCharacter character, params string[] param)
 {
     character.DropMessage("Your l33t commands:");
     foreach (var kvp in commands)
     {
         if (kvp.Value.GmLevel <= character.Client.Admin)
         {
             character.DropMessage("{0} {1}", kvp.Key, string.Join(" ", kvp.Value.Parameters));
         }
     }
 }
 private void Performance(ZoneCharacter character, params string[] param)
 {
     character.DropMessage("Ticks per second on this zone: {0}", Worker.Instance.TicksPerSecond);
 }
        private void IsGay(ZoneCharacter character, params string[] param)
        {
            ZoneClient otherclient = ClientManager.Instance.GetClientByName(param[1]);
            if (otherclient == null || otherclient.Character == null)
            {
                character.DropMessage("Character not found.");
            }
            ZoneCharacter other = otherclient.Character;

            Question question = new Question("Are you gay?", new QuestionCallback(AnswerGay), character);
            question.Add("Yes", "No", "Boobs!");
            other.Question = question;
            question.Send(other);
        }
        private void ItemCommand(ZoneCharacter character, params string[] param)
        {
            ushort id = ushort.Parse(param[1]);
            byte amount = 1;
            if (param.Length > 2)
            {
                amount = byte.Parse(param[2]);
            }

            switch (character.GiveItem(id, amount))
            {
                case FiestaLib.InventoryStatus.FULL:
                    Handler12.InventoryFull(character);
                    return;
                case FiestaLib.InventoryStatus.NOT_FOUND:
                    character.DropMessage("Item not found.");
                    return;
            }
        }
 private void CommandParam(ZoneCharacter character, params string[] param)
 {
     string input = param[1];
     string request;
     if (!input.StartsWith("&"))
     {
         request = "&" + input;
     }
     else request = input;
     CommandInfo info;
     if (commands.TryGetValue(request, out info))
     {
         string output = request + ": ";
         if (info.Parameters.Length > 0)
         {
             foreach (var par in info.Parameters)
             {
                 output += "[" + par + "] ";
             }
         }
         else output += "None";
         character.DropMessage(output);
     }
     else character.DropMessage("Command not found.");
 }
        private void ChangeMap(ZoneCharacter character, params string[] param)
        {
            ushort mapid = 0;
            if (!ushort.TryParse(param[1], out mapid))
            {
                param[1] = param[1].ToLower();
                var map = DataProvider.Instance.MapsByID.Values.ToList().Find(m => m.ShortName.ToLower() == param[1]);
                if (map != null)
                {
                    mapid = map.ID;
                }
                else
                {
                    character.DropMessage("Map not found");
                    return;
                }
            }
            else
            {
                if (!DataProvider.Instance.MapsByID.ContainsKey(mapid))
                {
                    character.DropMessage("Map not found");
                    return;
                }
            }

            if (param.Length > 2)
            {
                int x = int.Parse(param[2]);
                int y = int.Parse(param[3]);
                character.ChangeMap(mapid, x, y);
            }
            character.ChangeMap(mapid);
        }
 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!");
 }
Beispiel #12
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.");
 }
Beispiel #13
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);
 }