Add !AUTOREPLY

This commit is contained in:
SilicaAndPina 2021-07-03 19:26:52 +12:00
parent c17dc3e8bd
commit 699353f2d1
7 changed files with 123 additions and 35 deletions

View file

@ -62,18 +62,21 @@
"buddy_request":"Attempting to Add Buddy. The other player must click ADD BUDDY as well. (Many players reserve this for just a couple players so don't feel insulted if they do not).", "buddy_request":"Attempting to Add Buddy. The other player must click ADD BUDDY as well. (Many players reserve this for just a couple players so don't feel insulted if they do not).",
"click_nothing_message":"Nothing interesting here...", "click_nothing_message":"Nothing interesting here...",
"playtime_timeout":"You have run out of playtime for now. In one minute you will be disconnected. You gain one minute of playtime every 8 minutes. Please come back later!", "playtime_timeout":"You have run out of playtime for now. In one minute you will be disconnected. You gain one minute of playtime every 8 minutes. Please come back later!",
"random_movement":"You are sooo <B>%STAT%</B>. You wander dizzily in a different direction.", "random_movement":"You are sooo <B>%STAT%</B>. You wander %MSG% in a different direction.",
"movement_key":[ "movement_key":{
{"stat":"THIRSTY", "msg":"dizzily"}, "thirsty":"dizzily"},
{"stat":"HUNGERY", "msg":"stumble"}, "hungery":"stumble"},
{"stat":"TIREDNESS", "msg":"???"} },
],
"incorrect_password":"Incorrect. You will have to find the correct answer somewhere...", "incorrect_password":"Incorrect. You will have to find the correct answer somewhere...",
"player_here":"%USERNAME% here", "player_here":"%USERNAME% here",
"no_telescope":"You do not have a telescope to use! You try making circles with your hands and placing them in front of one eye, but it is of minimal aid...", "no_telescope":"You do not have a telescope to use! You try making circles with your hands and placing them in front of one eye, but it is of minimal aid...",
"starved_horse":"You have been sent to Prison Isle for starving one of your horses! They have been fed for you.", "starved_horse":"You have been sent to Prison Isle for starving one of your horses! They have been fed for you.",
"message_queue":"<B>OFFLINE MESSAGE:</B>", "message_queue":"<B>OFFLINE MESSAGE:</B>",
"random_event_prefix":"<B>A RANDOM EVENT HAS OCCURRED:</B> ", "random_event_prefix":"<B>A RANDOM EVENT HAS OCCURRED:</B> ",
"auto_reply":{
"too_long":"Auto-reply too long.",
"contains_violations":"There were chat violations in the AutoReply. NOT SETUP."
},
"timed_messages":{ "timed_messages":{
"rng_message":["Don't forget to pet your kitty/dog/fish/stuffed animal.", "rng_message":["Don't forget to pet your kitty/dog/fish/stuffed animal.",
"Don't forget to stretch once in a while.", "Are you running late for school/work?!?!", "Don't forget to stretch once in a while.", "Are you running late for school/work?!?!",
@ -1219,6 +1222,8 @@
"seperator":"<BR>", "seperator":"<BR>",
}, },
"chat":{ "chat":{
"dm_moderator":"[<FONT COLOR='#006600'>mod</FONT>]",
"dm_autoreply":"[autoreply]",
"for_others":{ "for_others":{
"global_format":"<FONT COLOR='#880000'><B>%USERNAME%:</B> %MESSAGE%</FONT>", "global_format":"<FONT COLOR='#880000'><B>%USERNAME%:</B> %MESSAGE%</FONT>",
"global_format_moderator":"<FONT COLOR='#006600'><B>%USERNAME%:</B> %MESSAGE%</FONT>", "global_format_moderator":"<FONT COLOR='#006600'><B>%USERNAME%:</B> %MESSAGE%</FONT>",
@ -1229,8 +1234,7 @@
"here_format":"<FONT COLOR='#222222'><B>%USERNAME%:</B> %MESSAGE%</FONT>", "here_format":"<FONT COLOR='#222222'><B>%USERNAME%:</B> %MESSAGE%</FONT>",
"near_format":"<B>%USERNAME%:</B> %MESSAGE%", "near_format":"<B>%USERNAME%:</B> %MESSAGE%",
"isle_format":"<B>%USERNAME%:</B> %MESSAGE%", "isle_format":"<B>%USERNAME%:</B> %MESSAGE%",
"dm_format":"<FONT COLOR='#0000FF'><B>%USERNAME%:</B> %MESSAGE%</FONT>", "dm_format":"<FONT COLOR='#0000FF'><B>%USERNAME%%FORMATPART%:</B> %MESSAGE%</FONT>",
"dm_format_moderator":"<FONT COLOR='#0000FF'><B>%USERNAME%[<FONT COLOR='#006600'>mod</FONT>]:</B> %MESSAGE%</FONT>"
}, },
"for_sender":{ "for_sender":{
@ -1241,7 +1245,7 @@
"mod_format":"<FONT COLOR='#880000'><B>%USERNAME%:</B> %MESSAGE%</FONT> [%AMOUNT% mods]", "mod_format":"<FONT COLOR='#880000'><B>%USERNAME%:</B> %MESSAGE%</FONT> [%AMOUNT% mods]",
"admin_format":"<FONT COLOR='#800000'><B>%USERNAME%:</B> %MESSAGE%</FONT> [%AMOUNT% admins]", "admin_format":"<FONT COLOR='#800000'><B>%USERNAME%:</B> %MESSAGE%</FONT> [%AMOUNT% admins]",
"friend_format":"<FONT COLOR='#CC00CC'><B>%USERNAME%:</B> %MESSAGE%</FONT> [%AMOUNT% buds]", "friend_format":"<FONT COLOR='#CC00CC'><B>%USERNAME%:</B> %MESSAGE%</FONT> [%AMOUNT% buds]",
"dm_format":"<FONT COLOR='#0000FF'><B>%FROMUSER%>%TOUSER%:</B> %MESSAGE%</FONT>" "dm_format":"<FONT COLOR='#0000FF'><B>%FROMUSER%%FORMATPART%>%TOUSER%:</B> %MESSAGE%</FONT>"
}, },
"filter":[ "filter":[
{"word":"anal","reason_type":"profanity","match_all":false}, {"word":"anal","reason_type":"profanity","match_all":false},

View file

@ -166,6 +166,9 @@ namespace HISP.Game.Chat
else if (message.ToUpper().StartsWith("!HEAR")) else if (message.ToUpper().StartsWith("!HEAR"))
return Command.UnMute(message, args, user); return Command.UnMute(message, args, user);
else if (message.ToUpper().StartsWith("!AUTOREPLY"))
return Command.AutoReply(message, args, user);
else if (message.ToUpper().StartsWith("!QUIZ")) else if (message.ToUpper().StartsWith("!QUIZ"))
return Command.Quiz(message, args, user); return Command.Quiz(message, args, user);
@ -433,7 +436,7 @@ namespace HISP.Game.Chat
return message.Replace("<", "&lt;"); return message.Replace("<", "&lt;");
} }
public static string FormatChatForOthers(User user, ChatChannel channel, string message) public static string FormatChatForOthers(User user, ChatChannel channel, string message, bool autoReply=false)
{ {
switch (channel) switch (channel)
@ -448,10 +451,12 @@ namespace HISP.Game.Chat
case ChatChannel.Buddies: case ChatChannel.Buddies:
return Messages.FormatBuddyChatMessage(user.Username, message); return Messages.FormatBuddyChatMessage(user.Username, message);
case ChatChannel.Dm: case ChatChannel.Dm:
string badge = "";
if (user.Moderator || user.Administrator) if (user.Moderator || user.Administrator)
return Messages.FormatDirectMessageForMod(user.Username, message); badge += Messages.DmModBadge;
else if (autoReply)
return Messages.FormatDirectMessage(user.Username, message); badge += Messages.DmAutoResponse;
return Messages.FormatDirectMessage(user.Username, message, badge);
case ChatChannel.Near: case ChatChannel.Near:
return Messages.FormatNearbyChatMessage(user.Username, message); return Messages.FormatNearbyChatMessage(user.Username, message);
case ChatChannel.Isle: case ChatChannel.Isle:
@ -464,7 +469,7 @@ namespace HISP.Game.Chat
else else
{ {
Logger.HackerPrint(user.Username + " Tried to send in mod chat without being a moderator. (Hack/Code Attempt)"); Logger.HackerPrint(user.Username + " Tried to send in mod chat without being a moderator. (Hack/Code Attempt)");
return user.Username + " is a hacker! (Sent in mod channel without being a mod) Maybe ban?"; return "";
} }
case ChatChannel.Admin: case ChatChannel.Admin:
if (user.Administrator) if (user.Administrator)
@ -472,14 +477,14 @@ namespace HISP.Game.Chat
else else
{ {
Logger.HackerPrint(user.Username + " Tried to send in mod chat without being a moderator. (Hack/Code Attempt)"); Logger.HackerPrint(user.Username + " Tried to send in mod chat without being a moderator. (Hack/Code Attempt)");
return user.Username + " is a hacker! (Sent in admin channel without being a admin) Maybe ban?"; return "";
} }
default: default:
Logger.ErrorPrint(user.Username + " is trying to end a message in unknown channel " + channel.ToString("X")); Logger.ErrorPrint(user.Username + " is trying to end a message in unknown channel " + channel.ToString("X"));
return "not implemented yet :("; return "not implemented yet :(";
} }
} }
public static string FormatChatForSender(User user, ChatChannel channel, string message, string dmRecipiant=null) public static string FormatChatForSender(User user, ChatChannel channel, string message, string dmRecipiant=null, bool autoReply=false)
{ {
switch (channel) switch (channel)
{ {
@ -511,7 +516,12 @@ namespace HISP.Game.Chat
int adminsOnline = GameServer.GetNumberOfAdminsOnline() - 1; int adminsOnline = GameServer.GetNumberOfAdminsOnline() - 1;
return Messages.FormatAdminChatForSender(adminsOnline, user.Username, message); return Messages.FormatAdminChatForSender(adminsOnline, user.Username, message);
case ChatChannel.Dm: case ChatChannel.Dm:
return Messages.FormatDirectChatMessageForSender(user.Username, dmRecipiant, message); string badge = "";
if (user.Moderator || user.Administrator)
badge += Messages.DmModBadge;
if (autoReply)
badge += Messages.DmAutoResponse;
return Messages.FormatDirectChatMessageForSender(user.Username, dmRecipiant, message, badge);
default: default:
Logger.ErrorPrint(user.Username + " is trying to end a message in unknown channel " + channel.ToString("X")); Logger.ErrorPrint(user.Username + " is trying to end a message in unknown channel " + channel.ToString("X"));
return "not implemented yet :("; return "not implemented yet :(";

View file

@ -499,6 +499,35 @@ namespace HISP.Game.Chat
} }
public static bool AutoReply(string message, string[] args, User user)
{
string replyMessage = string.Join(" ", args);
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
replyMessage = replyMessage.Trim();
if (replyMessage.Length > 1024)
{
byte[] tooLong = PacketBuilder.CreateChat(Messages.AutoReplyTooLong, PacketBuilder.CHAT_BOTTOM_RIGHT);
user.LoggedinClient.SendPacket(tooLong);
return false;
}
Object violationReason = Chat.FilterMessage(replyMessage);
if (violationReason != null)
{
byte[] hasVios = PacketBuilder.CreateChat(Messages.AutoReplyHasViolations, PacketBuilder.CHAT_BOTTOM_RIGHT);
user.LoggedinClient.SendPacket(hasVios);
return false;
}
user.AutoReplyText = replyMessage;
byte[] chatPacket = PacketBuilder.CreateChat(formattedmessage, PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
public static bool Dance(string message, string[] args, User user) public static bool Dance(string message, string[] args, User user)
{ {
string moves = string.Join(" ", args).ToLower(); string moves = string.Join(" ", args).ToLower();

View file

@ -551,6 +551,10 @@ namespace HISP.Game
public static string[] StatPlayerFormats; public static string[] StatPlayerFormats;
public static string StatThirstDizzy;
public static string StatHungerStumble;
// Misc Stats // Misc Stats
public static string StatMiscHeader; public static string StatMiscHeader;
@ -644,11 +648,18 @@ namespace HISP.Game
public static string AdminChatFormatForSender; public static string AdminChatFormatForSender;
public static string ModChatFormatForSender; public static string ModChatFormatForSender;
public static string DmModBadge;
public static string DmAutoResponse;
public static string ChatViolationMessageFormat; public static string ChatViolationMessageFormat;
public static string PasswordNotice; public static string PasswordNotice;
public static string CapsNotice; public static string CapsNotice;
public static string RandomMovement; public static string RandomMovement;
// AutoReply
public static string AutoReplyTooLong;
public static string AutoReplyHasViolations;
// Transport // Transport
public static string CantAffordTransport; public static string CantAffordTransport;
@ -2545,9 +2556,9 @@ namespace HISP.Game
{ {
return PrivateNotesMetaFormat.Replace("%PRIVATENOTES%", privateNotes); return PrivateNotesMetaFormat.Replace("%PRIVATENOTES%", privateNotes);
} }
public static string FormatRandomMovementMessage(string statName) public static string FormatRandomMovementMessage(string statName, string message)
{ {
return RandomMovement.Replace("%STAT%", statName); return RandomMovement.Replace("%STAT%", statName).Replace("%MSG%", message);
} }
public static string FormatJewerlyEquipMessage(string itemName) public static string FormatJewerlyEquipMessage(string itemName)
@ -2889,15 +2900,11 @@ namespace HISP.Game
return HereChatFormat.Replace("%USERNAME%", username).Replace("%MESSAGE%", message); return HereChatFormat.Replace("%USERNAME%", username).Replace("%MESSAGE%", message);
} }
public static string FormatDirectMessage(string username, string message) public static string FormatDirectMessage(string username, string message, string formatPart)
{ {
return DirectChatFormat.Replace("%USERNAME%", username).Replace("%MESSAGE%", message); return DirectChatFormat.Replace("%USERNAME%", username).Replace("%MESSAGE%", message).Replace("%FORMATPART%", formatPart);
} }
public static string FormatDirectMessageForMod(string username, string message)
{
return DirectChatFormatForModerators.Replace("%USERNAME%", username).Replace("%MESSAGE%", message);
}
public static string FormatGlobalChatMessageForMod(string username, string message) public static string FormatGlobalChatMessageForMod(string username, string message)
{ {
return GlobalChatFormatForModerators.Replace("%USERNAME%", username).Replace("%MESSAGE%", message); return GlobalChatFormatForModerators.Replace("%USERNAME%", username).Replace("%MESSAGE%", message);
@ -2951,9 +2958,9 @@ namespace HISP.Game
{ {
return ModChatFormatForSender.Replace("%USERNAME%", username).Replace("%MESSAGE%", message).Replace("%AMOUNT%", numbMods.ToString("N0", CultureInfo.InvariantCulture)); return ModChatFormatForSender.Replace("%USERNAME%", username).Replace("%MESSAGE%", message).Replace("%AMOUNT%", numbMods.ToString("N0", CultureInfo.InvariantCulture));
} }
public static string FormatDirectChatMessageForSender(string username,string toUsername, string message) public static string FormatDirectChatMessageForSender(string username,string toUsername, string message, string formatPart)
{ {
return DirectChatFormatForSender.Replace("%FROMUSER%", username).Replace("%TOUSER%", toUsername).Replace("%MESSAGE%", message); return DirectChatFormatForSender.Replace("%FROMUSER%", username).Replace("%TOUSER%", toUsername).Replace("%MESSAGE%", message).Replace("%FORMATPART%", formatPart);
} }
public static string FormatIdleWarningMessage() public static string FormatIdleWarningMessage()
{ {

View file

@ -107,6 +107,7 @@ namespace HISP.Player
public int CapturingHorseId; public int CapturingHorseId;
public DateTime LoginTime; public DateTime LoginTime;
public string LastSeenWeather; public string LastSeenWeather;
public string AutoReplyText = "";
public int LastClickedRanchBuilding = 0; public int LastClickedRanchBuilding = 0;
public bool ListingAuction = false; public bool ListingAuction = false;
public int TotalGlobalChatMessages = 1; public int TotalGlobalChatMessages = 1;

View file

@ -1461,9 +1461,11 @@ namespace HISP.Server
Messages.StatTired = gameData.messages.meta.stats_page.tired_stat_name; Messages.StatTired = gameData.messages.meta.stats_page.tired_stat_name;
Messages.StatsOtherHorses = gameData.messages.meta.stats_page.msg.other_horses; Messages.StatsOtherHorses = gameData.messages.meta.stats_page.msg.other_horses;
Messages.StatPlayerFormats = gameData.messages.meta.stats_page.player_stats.ToObject<string[]>(); Messages.StatPlayerFormats = gameData.messages.meta.stats_page.player_stats.ToObject<string[]>();
Messages.StatThirstDizzy = gameData.messages.movement_key.thirsty;
Messages.StatHungerStumble = gameData.messages.movement_key.hungery;
// Misc Stats // Misc Stats
Messages.StatMiscHeader = gameData.messages.meta.misc_stats.header; Messages.StatMiscHeader = gameData.messages.meta.misc_stats.header;
Messages.StatMiscNoneRecorded = gameData.messages.meta.misc_stats.no_stats_recorded; Messages.StatMiscNoneRecorded = gameData.messages.meta.misc_stats.no_stats_recorded;
@ -1828,7 +1830,7 @@ namespace HISP.Server
Messages.RequiredChatViolations = gameData.messages.chat.violation_points_required; Messages.RequiredChatViolations = gameData.messages.chat.violation_points_required;
Messages.GlobalChatFormatForModerators = gameData.messages.chat.for_others.global_format_moderator; Messages.GlobalChatFormatForModerators = gameData.messages.chat.for_others.global_format_moderator;
Messages.DirectChatFormatForModerators = gameData.messages.chat.for_others.dm_format_moderator; // Messages.DirectChatFormatForModerators = gameData.messages.chat.for_others.dm_format_moderator;
Messages.YouWereSentToPrisionIsle = gameData.messages.starved_horse; Messages.YouWereSentToPrisionIsle = gameData.messages.starved_horse;
@ -1851,15 +1853,21 @@ namespace HISP.Server
Messages.AdsChatFormatForSender = gameData.messages.chat.for_sender.ads_format; Messages.AdsChatFormatForSender = gameData.messages.chat.for_sender.ads_format;
Messages.AdminChatFormatForSender = gameData.messages.chat.for_sender.admin_format; Messages.AdminChatFormatForSender = gameData.messages.chat.for_sender.admin_format;
Messages.DmModBadge = gameData.messages.chat.dm_moderator;
Messages.DmAutoResponse = gameData.messages.chat.dm_autoreply;
Messages.AdminCommandFormat = gameData.messages.commands.admin_command_completed; Messages.AdminCommandFormat = gameData.messages.commands.admin_command_completed;
Messages.PlayerCommandFormat = gameData.messages.commands.player_command_completed; Messages.PlayerCommandFormat = gameData.messages.commands.player_command_completed;
Messages.MuteHelp = gameData.messages.commands.mute_help; Messages.MuteHelp = gameData.messages.commands.mute_help;
Messages.UnMuteHelp = gameData.messages.commands.unmute_help; Messages.UnMuteHelp = gameData.messages.commands.unmute_help;
Messages.PasswordNotice = gameData.messages.chat.password_included; Messages.PasswordNotice = gameData.messages.chat.password_included;
Messages.CapsNotice = gameData.messages.chat.caps_notice; Messages.CapsNotice = gameData.messages.chat.caps_notice;
// AutoReply
Messages.AutoReplyTooLong = gameData.messages.auto_reply.too_long;
Messages.AutoReplyHasViolations = gameData.messages.auto_reply.contains_violations;
// Drawing Rooms // Drawing Rooms
Messages.DrawingLastToDrawFormat = gameData.messages.meta.drawing_rooms.last_draw; Messages.DrawingLastToDrawFormat = gameData.messages.meta.drawing_rooms.last_draw;
Messages.DrawingContentsSavedInSlotFormat = gameData.messages.meta.drawing_rooms.saved; Messages.DrawingContentsSavedInSlotFormat = gameData.messages.meta.drawing_rooms.saved;

View file

@ -4820,12 +4820,12 @@ namespace HISP.Server
movementDirection = newDirection; movementDirection = newDirection;
if (loggedInUser.Thirst <= 0) if (loggedInUser.Thirst <= 0)
{ {
byte[] chatMessage = PacketBuilder.CreateChat(Messages.FormatRandomMovementMessage(Messages.StatThirst.ToUpper()), PacketBuilder.CHAT_BOTTOM_RIGHT); byte[] chatMessage = PacketBuilder.CreateChat(Messages.FormatRandomMovementMessage(Messages.StatThirst.ToUpper(), Messages.StatThirstDizzy), PacketBuilder.CHAT_BOTTOM_RIGHT);
sender.SendPacket(chatMessage); sender.SendPacket(chatMessage);
} }
else if (loggedInUser.Hunger <= 0) else if (loggedInUser.Hunger <= 0)
{ {
byte[] chatMessage = PacketBuilder.CreateChat(Messages.FormatRandomMovementMessage(Messages.StatHunger.ToUpper()), PacketBuilder.CHAT_BOTTOM_RIGHT); byte[] chatMessage = PacketBuilder.CreateChat(Messages.FormatRandomMovementMessage(Messages.StatHunger.ToUpper(), Messages.StatHungerStumble), PacketBuilder.CHAT_BOTTOM_RIGHT);
sender.SendPacket(chatMessage); sender.SendPacket(chatMessage);
} }
/* /*
@ -5853,19 +5853,38 @@ namespace HISP.Server
// Finally send chat message. // Finally send chat message.
string formattedMessage = Chat.FormatChatForOthers(sender.LoggedinUser, channel, message); string formattedMessage = Chat.FormatChatForOthers(sender.LoggedinUser, channel, message);
string formattedMessageSender = Chat.FormatChatForSender(sender.LoggedinUser, channel, message, nameTo); string formattedMessageSender = Chat.FormatChatForSender(sender.LoggedinUser, channel, message, nameTo);
string formattedMessageAutoReply = "";
string formattedMessageSenderAutoReply = "";
if (sender.LoggedinUser.AutoReplyText != "")
{
formattedMessageAutoReply = Chat.FormatChatForOthers(sender.LoggedinUser, channel, sender.LoggedinUser.AutoReplyText, true);
formattedMessageSenderAutoReply = Chat.FormatChatForSender(sender.LoggedinUser, channel, sender.LoggedinUser.AutoReplyText, nameTo, true);
}
byte[] chatPacketOthers = PacketBuilder.CreateChat(formattedMessage, chatSide); byte[] chatPacketOthers = PacketBuilder.CreateChat(formattedMessage, chatSide);
byte[] chatPacketSender = PacketBuilder.CreateChat(formattedMessageSender, chatSide); byte[] chatPacketSender = PacketBuilder.CreateChat(formattedMessageSender, chatSide);
byte[] playDmSound = PacketBuilder.CreatePlaysoundPacket(Chat.PrivateMessageSound); byte[] playDmSound = PacketBuilder.CreatePlaysoundPacket(Chat.PrivateMessageSound);
// Send to clients ... // Send to clients ...
foreach (GameClient recipiant in recipiants) foreach (GameClient recipiant in recipiants)
{ {
recipiant.SendPacket(chatPacketOthers); recipiant.SendPacket(chatPacketOthers);
if(formattedMessageAutoReply != "")
recipiant.SendPacket(PacketBuilder.CreateChat(formattedMessageAutoReply, chatSide));
if (channel == Chat.ChatChannel.Dm) if (channel == Chat.ChatChannel.Dm)
recipiant.SendPacket(playDmSound); recipiant.SendPacket(playDmSound);
} }
// Send to sender // Send to sender
sender.SendPacket(chatPacketSender); sender.SendPacket(chatPacketSender);
if (formattedMessageSenderAutoReply != "")
sender.SendPacket(PacketBuilder.CreateChat(formattedMessageSenderAutoReply, chatSide));
} }
public static void OnClickPacket(GameClient sender, byte[] packet) public static void OnClickPacket(GameClient sender, byte[] packet)
{ {
@ -5926,9 +5945,19 @@ namespace HISP.Server
returnedMsg = Messages.FormatRanchClickMessage(Database.GetUsername(ranch.OwnerId), title); returnedMsg = Messages.FormatRanchClickMessage(Database.GetUsername(ranch.OwnerId), title);
} }
} }
if(GetUsersAt(x,y, false, true).Length > 0) // Player here? User[] users = GetUsersAt(x, y, false, true);
if (users.Length > 0) // Player here?
{ {
returnedMsg = Messages.FormatPlayerHereMessage(GetUsersAt(x, y, false, true)[0].Username); string usernameStr = "";
for(int i = 0; i < users.Length; i++)
{
usernameStr += users[i].Username;
if (i + 1 < users.Length)
usernameStr += ", ";
}
returnedMsg = Messages.FormatPlayerHereMessage(usernameStr);
} }
byte[] tileInfoPacket = PacketBuilder.CreateClickTileInfoPacket(returnedMsg); byte[] tileInfoPacket = PacketBuilder.CreateClickTileInfoPacket(returnedMsg);