From e44307991dcabc38110f788964d0e7fec83dca6c Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Thu, 24 Feb 2022 15:45:00 -0600
Subject: [PATCH 1/4] Arrange meta.xml client scripts by name
---
meta.xml | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/meta.xml b/meta.xml
index 33f8807f..e41b8fd1 100644
--- a/meta.xml
+++ b/meta.xml
@@ -25,7 +25,6 @@
-
@@ -112,26 +111,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 7daa6927704988c2cb6a660d9a5021c0d24ba4fc Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Thu, 24 Feb 2022 15:45:30 -0600
Subject: [PATCH 2/4] Offload colour replace to client
---
scripts/client/chatbox.js | 8 +-
scripts/server/colour.js | 367 -----------
scripts/server/locale.js | 3 -
scripts/server/messaging.js | 29 +-
scripts/shared/gamedata.js | 1 +
scripts/shared/utilities.js | 1228 +++++++++++++++++++++++++++++++++++
6 files changed, 1243 insertions(+), 393 deletions(-)
delete mode 100644 scripts/server/colour.js
diff --git a/scripts/client/chatbox.js b/scripts/client/chatbox.js
index 37526c4b..d74eb237 100644
--- a/scripts/client/chatbox.js
+++ b/scripts/client/chatbox.js
@@ -46,11 +46,13 @@ function unBindChatBoxKeys() {
// ===========================================================================
function receiveChatBoxMessageFromServer(messageString, colour) {
- if(bottomMessageIndex => chatBoxHistory.length-1) {
- message(messageString, colour);
+ let colouredString = replaceColoursInMessage(messageString);
+
+ if(bottomMessageIndex >= chatBoxHistory.length-1) {
+ message(colouredString, colour);
bottomMessageIndex = chatBoxHistory.length-1;
}
- addToChatBoxHistory(messageString, colour);
+ addToChatBoxHistory(colouredString, colour);
}
// ===========================================================================
diff --git a/scripts/server/colour.js b/scripts/server/colour.js
deleted file mode 100644
index 3ffe0889..00000000
--- a/scripts/server/colour.js
+++ /dev/null
@@ -1,367 +0,0 @@
-// ===========================================================================
-// Vortrex's Roleplay Resource
-// https://github.com/VortrexFTW/gtac_roleplay
-// ===========================================================================
-// FILE: colour.js
-// DESC: Provides colours, functions and usage
-// TYPE: Server (JavaScript)
-// ===========================================================================
-
-let serverColours = {
- hex: {
- byType: {
- talkMessage: "C8C8C8",
- shoutMessage: "FFFFC8",
- whisperMessage: "828282",
- doActionMessage: "B19CD9",
- meActionMessage: "B19CD9",
- errorMessage: "ED4337",
- syntaxMessage: "C8C8C8",
- normalMessage: "FFFFFF",
- alertMessage: "FFFF00",
- successMessage: "00B400",
- clanChatMessage: "00BE00",
- businessBlue: "0099FF",
- houseGreen: "11CC11",
- clanOrange: "FF9900",
- vehiclePurple: "960096",
- jobYellow: "FFFF00",
- },
- byName: {
- white: "FFFFFF",
- black: "000000",
- red: "FF0000",
- yellow: "FFFF00",
- royalBlue: "0000FF",
- teal: "00FFFF",
- orange: "FF8000",
- softRed: "ED4337",
- softGreen: "32CD32",
- lightPurple: "960096",
- lightGrey: "C8C8C8",
- mediumGrey: "969696",
- darkGrey: "404040",
- policeBlue: "3250C8",
- medicPink: "DB7093",
- firefighterRed: "CD3C3C",
- busDriverGreen: "32A032",
- taxiDriverYellow: "F0E664",
- deliveryPurple: "B19CD9",
- civilianWhite: "C8C8C8",
- burntYellow: "D2D200",
- burntOrange: "D27800",
- bankGreen: "00B400",
- softYellow: "EAC67E",
- businessBlue: "0099FF",
- houseGreen: "11CC11",
- clanOrange: "FF9900",
- vehiclePurple: "960096",
- jobYellow: "FFFF00",
- },
- },
-
- byType: {
- talkMessage: toColour(200, 200, 200),
- shoutMessage: toColour(255, 255, 200),
- whisperMessage: toColour(130, 130, 130),
- doActionMessage: toColour(177, 156, 217, 255),
- meActionMessage: toColour(177, 156, 217, 255),
- errorMessage: toColour(237, 67, 55, 255),
- syntaxMessage: toColour(200, 200, 200, 255),
- normalMessage: toColour(255, 255, 255, 255),
- alertMessage: toColour(255, 255, 0, 255),
- successMessage: toColour(0, 180, 0, 255),
- clanChatMessage: toColour(0, 190, 0, 255),
- },
- byName: {
- white: toColour(255, 255, 255, 255),
- black: toColour(0, 0, 0, 255),
- red: toColour(255, 0, 0, 255),
- yellow: toColour(255, 255, 0, 255),
- royalBlue: toColour(0, 0, 255, 255),
- teal: toColour(0, 255, 255, 255),
- orange: toColour(255, 128, 0, 255),
- softRed: toColour(205, 60, 60, 255),
- softGreen: toColour(50, 205, 50, 255),
- lightPurple: toColour(150, 0, 150, 255),
- lightGrey: toColour(200, 200, 200, 255),
- mediumGrey: toColour(150, 150, 150, 255),
- darkGrey: toColour(64, 64, 64, 255),
- policeBlue: toColour(50, 80, 200, 255),
- medicPink: toColour(219, 112, 147, 255),
- firefighterRed: toColour(205, 60, 60, 255),
- busDriverGreen: toColour(50, 160, 50, 255),
- taxiDriverYellow: toColour(240, 230, 100, 255),
- deliveryPurple: toColour(177, 156, 217, 255),
- civilianWhite: toColour(200, 200, 200, 255),
- burntYellow: toColour(210, 210, 0, 255),
- burntOrange: toColour(210, 120, 0, 255),
- bankGreen: toColour(0, 150, 0, 255),
- softYellow: toColour(234, 198, 126, 255),
- businessBlue: toColour(0, 153, 255, 255),
- houseGreen: toColour(17, 204, 17, 255),
- clanOrange: toColour(255, 153, 0, 255),
- },
-};
-
-// ===========================================================================
-
-function getServerColours() {
- return serverColours;
-}
-
-// ===========================================================================
-
-function getColourByType(typeName) {
- return getServerColours().byType[typeName];
-}
-
-// ===========================================================================
-
-function getColourByName(colourName) {
- return getServerColours().byName[colourName];
-}
-
-// ===========================================================================
-
-function getHexColourByName(colourName) {
- //let rgbaColour = getServerColours().byName[colourName];
- //let rgbaArray = rgbaArrayFromToColour(rgbaColour);
- //return rgbToHex(rgbaArray[0], rgbaArray[1], rgbaArray[2]);
-
- return `#${getServerColours().hex.byName[colourName]}`;
-}
-
-// ===========================================================================
-
-function getHexColourByType(colourName) {
- //let rgbaColour = getServerColours().byType[colourName];
- //let rgbaArray = rgbaArrayFromToColour(rgbaColour);
- //return rgbToHex(rgbaArray[0], rgbaArray[1], rgbaArray[2]);
-
- return `#${getServerColours().hex.byType[colourName]}`;
-}
-
-// ===========================================================================
-
-function getPlayerColour(client) {
- if(getPlayerData(client) != false) {
- if(!isPlayerLoggedIn(client)) {
- return getColourByName("darkGrey");
- } else {
- if(isPlayerWorking(client)) {
- return getJobData(getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client).job)).colour;
- }
- }
- }
-
- return getColourByName("civilianWhite");
-}
-
-// ===========================================================================
-
-/**
- * Gets the red/green colour depending on bool (red = false, green = true) for inline use in chatbox messages
- *
- * @param {Boolean} boolValue The boolean value
- * @return {String} Red or green inline HEX colour string
- *
- */
-function getBoolRedGreenInlineColour(boolValue) {
- return (!boolValue) ? "{softRed}" : "{softGreen}";
-}
-
-// ===========================================================================
-
-/**
- * Gets an array of RGB colour values from a HEX colour string
- *
- * @param {String} hexColour Hex colour string
- * @return {Array} 3-slot array where each slot is an RGB colour value
- *
- */
-function hexToRgb(h) {
- return [
- '0x'+h[1]+h[2]|0,
- '0x'+h[3]+h[4]|0,
- '0x'+h[5]+h[6]|0
- ];
-}
-
-// ===========================================================================
-
-/**
- * Gets a HEX colour string from RGB values, without brackets (example: #FFFFFF)
- *
- * @param {Number} red Red RGB value
- * @param {Number} green Green RGB value
- * @param {Number} blue Blue RGB value
- * @return {String} HEX colour string
- *
- */
-function rgbToHex(r, g, b) {
- return "#"+((1<<24)+(r<<16)+(g<<8)+ b).toString(16).slice(1);
-}
-
-// ===========================================================================
-
-/**
- * Gets the current colour for a player (affected by job and status)
- *
- * @param {Client} client Player client
- * @return {Number} Colour integer
- *
- */
-function getClientChatColour(client) {
- let tempJob = getPlayerCurrentSubAccount(client).job;
- if(tempJob != -1) {
- if(getPlayerData(client).isWorking) {
- return getJobData(tempJob).jobColour;
- }
- }
- return getColourByName("white");
-}
-
-// ===========================================================================
-
-/**
- * Gets a toColour-created colour integer with random RGB values (alpha is always 255)
- *
- * @return {Number} Colour integer
- *
- */
-function getRandomRGB() {
- return toColour.apply(null, [
- getRandom(0, 255),
- getRandom(0, 255),
- getRandom(0, 255),
- 255
- ]);
-}
-
-// ===========================================================================
-
-/**
- * Gets a hex formatting colour by name for use inline in chatbox messages (example: [#FFFFFF]).
- *
- * @param {String} colourName - Colour name
- * @return {String} HEX-formatted colour string with brackets
- *
- */
-function getInlineChatColourByName(colourName) {
- return `{${colourName}}`;
-}
-
-// ===========================================================================
-
-/**
- * Gets a hex formatting colour by type for use inline in chatbox messages (example: [#FFFFFF]).
- *
- * @param {String} colourName - Colour type
- * @return {String} HEX-formatted colour string with brackets
- *
- */
-function getInlineChatColourByType(colourName) {
- return `{${colourName}}`;
-}
-
-// ===========================================================================
-
-/**
- * Gets an array of RGBA colour values from a toColour integer.
- *
- * @param {Number} colour - Colour integer created by toColour
- * @return {Array} 4-slot array where each slot is an RGBA colour value
- *
- */
-function rgbaArrayFromToColour(colour) {
- //return [
- // (colour >> 24) & 0xFF, // red
- // (colour >> 16) & 0xFF,
- // (colour >> 8) & 0xFF,
- // colour & 0xFF // alpha
- //];
- return [
- (colour >> 16) & 0xFF, // red
- (colour >> 8) & 0xFF,
- colour & 0xFF,
- (colour >> 24) & 0xFF// alpha
- ];
-}
-
-// ===========================================================================
-
-function hexFromToColour(colour) {
- let rgba = rgbaArrayFromToColour(colour);
- return rgbToHex(rgba[0], rgba[1], rgba[2]);
-}
-
-// ===========================================================================
-
-function replaceColoursInMessage(messageText) {
- if(messageText == null) {
- return "";
- }
-
- let tempFind = `{RESETCOLOUR}`;
- let tempRegex = new RegExp(tempFind, 'g');
- messageText = messageText.replace(tempRegex, "[/#]");
-
- tempFind = `{ALTCOLOUR}`;
- tempRegex = new RegExp(tempFind, 'g');
- messageText = messageText.replace(tempRegex, "[#C8C8C8]");
-
- tempFind = `{MAINCOLOUR}`;
- tempRegex = new RegExp(tempFind, 'g');
- messageText = messageText.replace(tempRegex, "[#FFFFFF]");
-
- for(let i in getServerColours().hex.byName) {
- let find = `{${i}}`;
- let re = new RegExp(find, 'g');
- messageText = messageText.replace(re, `[#${getServerColours().hex.byName[i]}]`);
- }
-
- for(let i in getServerColours().hex.byType) {
- let find = `{${i}}`;
- let re = new RegExp(find, 'g');
- messageText = messageText.replace(re, `[#${getServerColours().hex.byType[i]}]`);
- }
-
- return messageText;
-}
-
-// ===========================================================================
-
-function removeColoursInMessage(messageText) {
- if(messageText == null) {
- return "";
- }
-
- let tempFind = `{RESETCOLOUR}`;
- let tempRegex = new RegExp(tempFind, 'g');
- messageText = messageText.replace(tempRegex, "");
-
- tempFind = `{ALTCOLOUR}`;
- tempRegex = new RegExp(tempFind, 'g');
- messageText = messageText.replace(tempRegex, "");
-
- tempFind = `{MAINCOLOUR}`;
- tempRegex = new RegExp(tempFind, 'g');
- messageText = messageText.replace(tempRegex, "");
-
- for(let i in getServerColours().hex.byName) {
- let find = `{${i}}`;
- let re = new RegExp(find, 'g');
- messageText = messageText.replace(re, "");
- }
-
- for(let i in getServerColours().hex.byType) {
- let find = `{${i}}`;
- let re = new RegExp(find, 'g');
- messageText = messageText.replace(re, "");
- }
-
- return messageText;
-}
-
-// ===========================================================================
\ No newline at end of file
diff --git a/scripts/server/locale.js b/scripts/server/locale.js
index f10c0b02..a45ef9e8 100644
--- a/scripts/server/locale.js
+++ b/scripts/server/locale.js
@@ -34,8 +34,6 @@ function getLocaleString(client, stringName, ...args) {
submitBugReport(client, `(AUTOMATED REPORT) Locale string "${stringName}" is missing for "${getPlayerLocaleName(client)}"`);
}
- tempString = replaceColoursInMessage(tempString);
-
for(let i = 1; i <= args.length; i++) {
tempString = tempString.replace(`{${i}}`, args[i-1]);
}
@@ -47,7 +45,6 @@ function getLocaleString(client, stringName, ...args) {
function getGroupedLocaleString(client, stringName, index, ...args) {
let tempString = getRawGroupedLocaleString(stringName, getPlayerData(client).locale, index);
- tempString = replaceColoursInMessage(tempString);
for(let i = 1; i <= args.length; i++) {
tempString = tempString.replace(`{${i}}`, args[i-1]);
diff --git a/scripts/server/messaging.js b/scripts/server/messaging.js
index 91a5608f..e27eb770 100644
--- a/scripts/server/messaging.js
+++ b/scripts/server/messaging.js
@@ -33,19 +33,19 @@ function messageAdminAction(messageText) {
*
*/
function messagePlayerNormal(client, messageText, colour = COLOUR_WHITE) {
- if(isConsole(client) || client == null) {
- logToConsole(LOG_INFO, `${removeColoursInMessage(messageText)}`);
- }
+ //if(isConsole(client) || client == null) {
+ // logToConsole(LOG_INFO, `${removeColoursInMessage(messageText)}`);
+ //}
- sendChatBoxMessageToPlayer(client, `${replaceColoursInMessage(messageText)}`, colour);
+ sendChatBoxMessageToPlayer(client, messageText, colour);
return true;
}
// ===========================================================================
function messageAdmins(messageText, colour = getColourByName("softRed")) {
- let plainMessage = removeColoursInMessage(messageText);
- console.warn(`๐ก๏ธ ${plainMessage}`);
+ //let plainMessage = removeColoursInMessage(messageText);
+ //console.warn(`๐ก๏ธ ${plainMessage}`);
let clients = getClients();
for(let i in clients) {
@@ -54,9 +54,9 @@ function messageAdmins(messageText, colour = getColourByName("softRed")) {
}
}
- if(getServerConfig().discordConfig.sendAdminEvents) {
- messageDiscordAdminChannel(plainMessage);
- }
+ //if(getServerConfig().discordConfig.sendAdminEvents) {
+ // messageDiscordAdminChannel(plainMessage);
+ //}
}
// ===========================================================================
@@ -236,17 +236,6 @@ function clearChatBox(client) {
// ===========================================================================
-function replaceEmojiInString(messageString) {
- for(let i in emojiReplaceString) {
- while(messageString.indexOf(emojiReplaceString[i][0]) != -1) {
- messageString = messageString.replace(emojiReplaceString[i][0], emojiReplaceString[i][1]);
- }
- }
- return messageString;
-}
-
-// ===========================================================================
-
function messagePlayerHelpContent(client, messageString) {
messagePlayerNormal(client, `{clanOrange}โข {MAINCOLOUR}${messageString}`);
}
diff --git a/scripts/shared/gamedata.js b/scripts/shared/gamedata.js
index 6c44119e..497dcdbb 100644
--- a/scripts/shared/gamedata.js
+++ b/scripts/shared/gamedata.js
@@ -5355,3 +5355,4 @@ let gameData = {
],
};
+// ===========================================================================
\ No newline at end of file
diff --git a/scripts/shared/utilities.js b/scripts/shared/utilities.js
index 808ccb91..1cd8fd4a 100644
--- a/scripts/shared/utilities.js
+++ b/scripts/shared/utilities.js
@@ -170,6 +170,963 @@ let cardinalDirections = [
// ===========================================================================
+let serverColours = {
+ hex: {
+ byType: {
+ talkMessage: "C8C8C8",
+ shoutMessage: "FFFFC8",
+ whisperMessage: "828282",
+ doActionMessage: "B19CD9",
+ meActionMessage: "B19CD9",
+ errorMessage: "ED4337",
+ syntaxMessage: "C8C8C8",
+ normalMessage: "FFFFFF",
+ alertMessage: "FFFF00",
+ successMessage: "00B400",
+ clanChatMessage: "00BE00",
+ businessBlue: "0099FF",
+ houseGreen: "11CC11",
+ clanOrange: "FF9900",
+ vehiclePurple: "960096",
+ jobYellow: "FFFF00",
+ },
+ byName: {
+ white: "FFFFFF",
+ black: "000000",
+ red: "FF0000",
+ yellow: "FFFF00",
+ royalBlue: "0000FF",
+ teal: "00FFFF",
+ orange: "FF8000",
+ softRed: "ED4337",
+ softGreen: "32CD32",
+ lightPurple: "960096",
+ lightGrey: "C8C8C8",
+ mediumGrey: "969696",
+ darkGrey: "404040",
+ policeBlue: "3250C8",
+ medicPink: "DB7093",
+ firefighterRed: "CD3C3C",
+ busDriverGreen: "32A032",
+ taxiDriverYellow: "F0E664",
+ deliveryPurple: "B19CD9",
+ civilianWhite: "C8C8C8",
+ burntYellow: "D2D200",
+ burntOrange: "D27800",
+ bankGreen: "00B400",
+ softYellow: "EAC67E",
+ businessBlue: "0099FF",
+ houseGreen: "11CC11",
+ clanOrange: "FF9900",
+ vehiclePurple: "960096",
+ jobYellow: "FFFF00",
+ },
+ },
+
+ byType: {
+ talkMessage: toColour(200, 200, 200),
+ shoutMessage: toColour(255, 255, 200),
+ whisperMessage: toColour(130, 130, 130),
+ doActionMessage: toColour(177, 156, 217, 255),
+ meActionMessage: toColour(177, 156, 217, 255),
+ errorMessage: toColour(237, 67, 55, 255),
+ syntaxMessage: toColour(200, 200, 200, 255),
+ normalMessage: toColour(255, 255, 255, 255),
+ alertMessage: toColour(255, 255, 0, 255),
+ successMessage: toColour(0, 180, 0, 255),
+ clanChatMessage: toColour(0, 190, 0, 255),
+ },
+ byName: {
+ white: toColour(255, 255, 255, 255),
+ black: toColour(0, 0, 0, 255),
+ red: toColour(255, 0, 0, 255),
+ yellow: toColour(255, 255, 0, 255),
+ royalBlue: toColour(0, 0, 255, 255),
+ teal: toColour(0, 255, 255, 255),
+ orange: toColour(255, 128, 0, 255),
+ softRed: toColour(205, 60, 60, 255),
+ softGreen: toColour(50, 205, 50, 255),
+ lightPurple: toColour(150, 0, 150, 255),
+ lightGrey: toColour(200, 200, 200, 255),
+ mediumGrey: toColour(150, 150, 150, 255),
+ darkGrey: toColour(64, 64, 64, 255),
+ policeBlue: toColour(50, 80, 200, 255),
+ medicPink: toColour(219, 112, 147, 255),
+ firefighterRed: toColour(205, 60, 60, 255),
+ busDriverGreen: toColour(50, 160, 50, 255),
+ taxiDriverYellow: toColour(240, 230, 100, 255),
+ deliveryPurple: toColour(177, 156, 217, 255),
+ civilianWhite: toColour(200, 200, 200, 255),
+ burntYellow: toColour(210, 210, 0, 255),
+ burntOrange: toColour(210, 120, 0, 255),
+ bankGreen: toColour(0, 150, 0, 255),
+ softYellow: toColour(234, 198, 126, 255),
+ businessBlue: toColour(0, 153, 255, 255),
+ houseGreen: toColour(17, 204, 17, 255),
+ clanOrange: toColour(255, 153, 0, 255),
+ },
+};
+
+let serverEmoji = [
+ [":hash:", "#"],
+ [":zero:", "0"],
+ [":one:", "1"],
+ [":two:", "2"],
+ [":three:", "3"],
+ [":four:", "4"],
+ [":five:", "5"],
+ [":six:", "6"],
+ [":seven:", "7"],
+ [":eight:", "8"],
+ [":nine:", "9"],
+ [":copyright:", "ยฉ"],
+ [":registered:", "ยฎ"],
+ [":bangbang:", "โผ"],
+ [":interrobang:", "โ"],
+ [":tm:", "โข"],
+ [":information_source:", "โน"],
+ [":left_right_arrow:", "โ"],
+ [":arrow_up_down:", "โ"],
+ [":arrow_upper_left:", "โ"],
+ [":arrow_upper_right:", "โ"],
+ [":arrow_lower_right:", "โ"],
+ [":arrow_lower_left:", "โ"],
+ [":leftwards_arrow_with_hook:", "โฉ"],
+ [":arrow_right_hook:", "โช"],
+ [":watch:", "โ"],
+ [":hourglass:", "โ"],
+ [":fast_forward:", "โฉ"],
+ [":rewind:", "โช"],
+ [":arrow_double_up:", "โซ"],
+ [":arrow_double_down:", "โฌ"],
+ [":alarm_clock:", "โฐ"],
+ [":hourglass_flowing_sand:", "โณ"],
+ [":m:", "โ"],
+ [":black_small_square:", "โช"],
+ [":white_small_square:", "โซ"],
+ [":arrow_forward:", "โถ"],
+ [":arrow_backward:", "โ"],
+ [":white_medium_square:", "โป"],
+ [":black_medium_square:", "โผ"],
+ [":white_medium_small_square:", "โฝ"],
+ [":black_medium_small_square:", "โพ"],
+ [":sunny:", "โ"],
+ [":cloud:", "โ"],
+ [":telephone:", "โ"],
+ [":ballot_box_with_check:", "โ"],
+ [":umbrella:", "โ"],
+ [":coffee:", "โ"],
+ [":point_up:", "โ"],
+ [":relaxed:", "โบ"],
+ [":aries:", "โ"],
+ [":taurus:", "โ"],
+ [":gemini:", "โ"],
+ [":cancer:", "โ"],
+ [":leo:", "โ"],
+ [":virgo:", "โ"],
+ [":libra:", "โ"],
+ [":scorpius:", "โ"],
+ [":sagittarius:", "โ"],
+ [":capricorn:", "โ"],
+ [":aquarius:", "โ"],
+ [":pisces:", "โ"],
+ [":spades:", "โ "],
+ [":clubs:", "โฃ"],
+ [":hearts:", "โฅ"],
+ [":diamonds:", "โฆ"],
+ [":hotsprings:", "โจ"],
+ [":recycle:", "โป"],
+ [":wheelchair:", "โฟ"],
+ [":anchor:", "โ"],
+ [":warning:", "โ "],
+ [":zap:", "โก"],
+ [":white_circle:", "โช"],
+ [":black_circle:", "โซ"],
+ [":soccer:", "โฝ"],
+ [":baseball:", "โพ"],
+ [":snowman:", "โ"],
+ [":partly_sunny:", "โ
"],
+ [":ophiuchus:", "โ"],
+ [":no_entry:", "โ"],
+ [":church:", "โช"],
+ [":fountain:", "โฒ"],
+ [":golf:", "โณ"],
+ [":sailboat:", "โต"],
+ [":tent:", "โบ"],
+ [":fuelpump:", "โฝ"],
+ [":scissors:", "โ"],
+ [":white_check_mark:", "โ
"],
+ [":airplane:", "โ"],
+ [":envelope:", "โ"],
+ [":fist:", "โ"],
+ [":raised_hand:", "โ"],
+ [":v:", "โ"],
+ [":pencil2:", "โ"],
+ [":black_nib:", "โ"],
+ [":heavy_check_mark:", "โ"],
+ [":heavy_multiplication_x:", "โ"],
+ [":sparkles:", "โจ"],
+ [":eight_spoked_asterisk:", "โณ"],
+ [":eight_pointed_black_star:", "โด"],
+ [":snowflake:", "โ"],
+ [":sparkle:", "โ"],
+ [":x:", "โ"],
+ [":negative_squared_cross_mark:", "โ"],
+ [":question:", "โ"],
+ [":grey_question:", "โ"],
+ [":grey_exclamation:", "โ"],
+ [":exclamation:", "โ"],
+ [":heart:", "โค"],
+ [":heavy_plus_sign:", "โ"],
+ [":heavy_minus_sign:", "โ"],
+ [":heavy_division_sign:", "โ"],
+ [":arrow_right:", "โก"],
+ [":curly_loop:", "โฐ"],
+ [":arrow_heading_up:", "โคด"],
+ [":arrow_heading_down:", "โคต"],
+ [":arrow_left:", "โฌ
"],
+ [":arrow_up:", "โฌ"],
+ [":arrow_down:", "โฌ"],
+ [":black_large_square:", "โฌ"],
+ [":white_large_square:", "โฌ"],
+ [":star:", "โญ"],
+ [":o:", "โญ"],
+ [":wavy_dash:", "ใฐ"],
+ [":part_alternation_mark:", "ใฝ"],
+ [":congratulations:", "ใ"],
+ [":secret:", "ใ"],
+ [":mahjong:", "๐"],
+ [":black_joker:", "๐"],
+ [":a:", "๐
ฐ"],
+ [":b:", "๐
ฑ"],
+ [":o2:", "๐
พ"],
+ [":parking:", "๐
ฟ"],
+ [":ab:", "๐"],
+ [":cl:", "๐"],
+ [":cool:", "๐"],
+ [":free:", "๐"],
+ [":id:", "๐"],
+ [":new:", "๐"],
+ [":ng:", "๐"],
+ [":ok:", "๐"],
+ [":sos:", "๐"],
+ [":up:", "๐"],
+ [":vs:", "๐"],
+ [":cn:", "๐จ ๐ณ"],
+ [":de:", "๐ฉ ๐ช"],
+ [":es:", "๐ช ๐ธ"],
+ [":fr:", "๐ซ ๐ท"],
+ [":uk:", "๐ฌ ๐ง"],
+ [":it:", "๐ฎ ๐น"],
+ [":jp:", "๐ฏ ๐ต"],
+ [":kr:", "๐ฐ ๐ท"],
+ [":ru:", "๐ท ๐บ"],
+ [":us:", "๐บ ๐ธ"],
+ [":koko:", "๐"],
+ [":sa:", "๐"],
+ [":u7121:", "๐"],
+ [":u6307:", "๐ฏ"],
+ [":u7981:", "๐ฒ"],
+ [":u7a7a:", "๐ณ"],
+ [":u5408:", "๐ด"],
+ [":u6e80:", "๐ต"],
+ [":u6709:", "๐ถ"],
+ [":u6708:", "๐ท"],
+ [":u7533:", "๐ธ"],
+ [":u5272:", "๐น"],
+ [":u55b6:", "๐บ"],
+ [":ideograph_advantage:", "๐"],
+ [":accept:", "๐"],
+ [":cyclone:", "๐"],
+ [":foggy:", "๐"],
+ [":closed_umbrella:", "๐"],
+ [":night_with_stars:", "๐"],
+ [":sunrise_over_mountains:", "๐"],
+ [":sunrise:", "๐
"],
+ [":city_sunset:", "๐"],
+ [":city_sunrise:", "๐"],
+ [":rainbow:", "๐"],
+ [":bridge_at_night:", "๐"],
+ [":ocean:", "๐"],
+ [":volcano:", "๐"],
+ [":milky_way:", "๐"],
+ [":earth_asia:", "๐"],
+ [":new_moon:", "๐"],
+ [":first_quarter_moon:", "๐"],
+ [":waxing_gibbous_moon:", "๐"],
+ [":full_moon:", "๐"],
+ [":crescent_moon:", "๐"],
+ [":first_quarter_moon_with_face:", "๐"],
+ [":star2:", "๐"],
+ [":stars:", "๐ "],
+ [":chestnut:", "๐ฐ"],
+ [":seedling:", "๐ฑ"],
+ [":palm_tree:", "๐ด"],
+ [":cactus:", "๐ต"],
+ [":tulip:", "๐ท"],
+ [":cherry_blossom:", "๐ธ"],
+ [":rose:", "๐น"],
+ [":hibiscus:", "๐บ"],
+ [":sunflower:", "๐ป"],
+ [":blossom:", "๐ผ"],
+ [":corn:", "๐ฝ"],
+ [":ear_of_rice:", "๐พ"],
+ [":herb:", "๐ฟ"],
+ [":four_leaf_clover:", "๐"],
+ [":maple_leaf:", "๐"],
+ [":fallen_leaf:", "๐"],
+ [":leaves:", "๐"],
+ [":mushroom:", "๐"],
+ [":tomato:", "๐
"],
+ [":eggplant:", "๐"],
+ [":grapes:", "๐"],
+ [":melon:", "๐"],
+ [":watermelon:", "๐"],
+ [":tangerine:", "๐"],
+ [":banana:", "๐"],
+ [":pineapple:", "๐"],
+ [":apple:", "๐"],
+ [":green_apple:", "๐"],
+ [":peach:", "๐"],
+ [":cherries:", "๐"],
+ [":strawberry:", "๐"],
+ [":hamburger:", "๐"],
+ [":pizza:", "๐"],
+ [":meat_on_bone:", "๐"],
+ [":poultry_leg:", "๐"],
+ [":rice_cracker:", "๐"],
+ [":rice_ball:", "๐"],
+ [":rice:", "๐"],
+ [":curry:", "๐"],
+ [":ramen:", "๐"],
+ [":spaghetti:", "๐"],
+ [":bread:", "๐"],
+ [":fries:", "๐"],
+ [":sweet_potato:", "๐ "],
+ [":dango:", "๐ก"],
+ [":oden:", "๐ข"],
+ [":sushi:", "๐ฃ"],
+ [":fried_shrimp:", "๐ค"],
+ [":fish_cake:", "๐ฅ"],
+ [":icecream:", "๐ฆ"],
+ [":shaved_ice:", "๐ง"],
+ [":ice_cream:", "๐จ"],
+ [":doughnut:", "๐ฉ"],
+ [":cookie:", "๐ช"],
+ [":chocolate_bar:", "๐ซ"],
+ [":candy:", "๐ฌ"],
+ [":lollipop:", "๐ญ"],
+ [":custard:", "๐ฎ"],
+ [":honey_pot:", "๐ฏ"],
+ [":cake:", "๐ฐ"],
+ [":bento:", "๐ฑ"],
+ [":stew:", "๐ฒ"],
+ [":egg:", "๐ณ"],
+ [":fork_and_knife:", "๐ด"],
+ [":tea:", "๐ต"],
+ [":sake:", "๐ถ"],
+ [":wine_glass:", "๐ท"],
+ [":cocktail:", "๐ธ"],
+ [":tropical_drink:", "๐น"],
+ [":beer:", "๐บ"],
+ [":beers:", "๐ป"],
+ [":ribbon:", "๐"],
+ [":gift:", "๐"],
+ [":birthday:", "๐"],
+ [":jack_o_lantern:", "๐"],
+ [":christmas_tree:", "๐"],
+ [":santa:", "๐
"],
+ [":fireworks:", "๐"],
+ [":sparkler:", "๐"],
+ [":balloon:", "๐"],
+ [":tada:", "๐"],
+ [":confetti_ball:", "๐"],
+ [":tanabata_tree:", "๐"],
+ [":crossed_flags:", "๐"],
+ [":bamboo:", "๐"],
+ [":dolls:", "๐"],
+ [":flags:", "๐"],
+ [":wind_chime:", "๐"],
+ [":rice_scene:", "๐"],
+ [":school_satchel:", "๐"],
+ [":mortar_board:", "๐"],
+ [":carousel_horse:", "๐ "],
+ [":ferris_wheel:", "๐ก"],
+ [":roller_coaster:", "๐ข"],
+ [":fishing_pole_and_fish:", "๐ฃ"],
+ [":microphone:", "๐ค"],
+ [":movie_camera:", "๐ฅ"],
+ [":cinema:", "๐ฆ"],
+ [":headphones:", "๐ง"],
+ [":art:", "๐จ"],
+ [":tophat:", "๐ฉ"],
+ [":circus_tent:", "๐ช"],
+ [":ticket:", "๐ซ"],
+ [":clapper:", "๐ฌ"],
+ [":performing_arts:", "๐ญ"],
+ [":video_game:", "๐ฎ"],
+ [":dart:", "๐ฏ"],
+ [":slot_machine:", "๐ฐ"],
+ [":_8ball:", "๐ฑ"],
+ [":game_die:", "๐ฒ"],
+ [":bowling:", "๐ณ"],
+ [":flower_playing_cards:", "๐ด"],
+ [":musical_note:", "๐ต"],
+ [":notes:", "๐ถ"],
+ [":saxophone:", "๐ท"],
+ [":guitar:", "๐ธ"],
+ [":musical_keyboard:", "๐น"],
+ [":trumpet:", "๐บ"],
+ [":violin:", "๐ป"],
+ [":musical_score:", "๐ผ"],
+ [":running_shirt_with_sash:", "๐ฝ"],
+ [":tennis:", "๐พ"],
+ [":ski:", "๐ฟ"],
+ [":basketball:", "๐"],
+ [":checkered_flag:", "๐"],
+ [":snowboarder:", "๐"],
+ [":runner:", "๐"],
+ [":surfer:", "๐"],
+ [":trophy:", "๐"],
+ [":football:", "๐"],
+ [":swimmer:", "๐"],
+ [":house:", "๐ "],
+ [":house_with_garden:", "๐ก"],
+ [":office:", "๐ข"],
+ [":post_office:", "๐ฃ"],
+ [":hospital:", "๐ฅ"],
+ [":bank:", "๐ฆ"],
+ [":atm:", "๐ง"],
+ [":hotel:", "๐จ"],
+ [":love_hotel:", "๐ฉ"],
+ [":convenience_store:", "๐ช"],
+ [":school:", "๐ซ"],
+ [":department_store:", "๐ฌ"],
+ [":factory:", "๐ญ"],
+ [":izakaya_lantern:", "๐ฎ"],
+ [":japanese_castle:", "๐ฏ"],
+ [":european_castle:", "๐ฐ"],
+ [":snail:", "๐"],
+ [":snake:", "๐"],
+ [":racehorse:", "๐"],
+ [":sheep:", "๐"],
+ [":monkey:", "๐"],
+ [":chicken:", "๐"],
+ [":boar:", "๐"],
+ [":elephant:", "๐"],
+ [":octopus:", "๐"],
+ [":shell:", "๐"],
+ [":bug:", "๐"],
+ [":ant:", "๐"],
+ [":bee:", "๐"],
+ [":beetle:", "๐"],
+ [":fish:", "๐"],
+ [":tropical_fish:", "๐ "],
+ [":blowfish:", "๐ก"],
+ [":turtle:", "๐ข"],
+ [":hatching_chick:", "๐ฃ"],
+ [":baby_chick:", "๐ค"],
+ [":hatched_chick:", "๐ฅ"],
+ [":bird:", "๐ฆ"],
+ [":penguin:", "๐ง"],
+ [":koala:", "๐จ"],
+ [":poodle:", "๐ฉ"],
+ [":camel:", "๐ซ"],
+ [":dolphin:", "๐ฌ"],
+ [":mouse:", "๐ญ"],
+ [":cow:", "๐ฎ"],
+ [":tiger:", "๐ฏ"],
+ [":rabbit:", "๐ฐ"],
+ [":cat:", "๐ฑ"],
+ [":dragon_face:", "๐ฒ"],
+ [":whale:", "๐ณ"],
+ [":horse:", "๐ด"],
+ [":monkey_face:", "๐ต"],
+ [":dog:", "๐ถ"],
+ [":pig:", "๐ท"],
+ [":frog:", "๐ธ"],
+ [":hamster:", "๐น"],
+ [":wolf:", "๐บ"],
+ [":bear:", "๐ป"],
+ [":panda_face:", "๐ผ"],
+ [":pig_nose:", "๐ฝ"],
+ [":feet:", "๐พ"],
+ [":eyes:", "๐"],
+ [":ear:", "๐"],
+ [":nose:", "๐"],
+ [":lips:", "๐"],
+ [":tongue:", "๐
"],
+ [":point_up_2:", "๐"],
+ [":point_down:", "๐"],
+ [":point_left:", "๐"],
+ [":point_right:", "๐"],
+ [":punch:", "๐"],
+ [":wave:", "๐"],
+ [":ok_hand:", "๐"],
+ [":thumbsup:", "๐"],
+ [":thumbsdown:", "๐"],
+ [":clap:", "๐"],
+ [":open_hands:", "๐"],
+ [":crown:", "๐"],
+ [":womans_hat:", "๐"],
+ [":eyeglasses:", "๐"],
+ [":necktie:", "๐"],
+ [":shirt:", "๐"],
+ [":jeans:", "๐"],
+ [":dress:", "๐"],
+ [":kimono:", "๐"],
+ [":bikini:", "๐"],
+ [":womans_clothes:", "๐"],
+ [":purse:", "๐"],
+ [":handbag:", "๐"],
+ [":pouch:", "๐"],
+ [":mans_shoe:", "๐"],
+ [":athletic_shoe:", "๐"],
+ [":high_heel:", "๐ "],
+ [":sandal:", "๐ก"],
+ [":boot:", "๐ข"],
+ [":footprints:", "๐ฃ"],
+ [":bust_in_silhouette:", "๐ค"],
+ [":boy:", "๐ฆ"],
+ [":girl:", "๐ง"],
+ [":man:", "๐จ"],
+ [":woman:", "๐ฉ"],
+ [":family:", "๐ช"],
+ [":couple:", "๐ซ"],
+ [":cop:", "๐ฎ"],
+ [":dancers:", "๐ฏ"],
+ [":bride_with_veil:", "๐ฐ"],
+ [":person_with_blond_hair:", "๐ฑ"],
+ [":man_with_gua_pi_mao:", "๐ฒ"],
+ [":man_with_turban:", "๐ณ"],
+ [":older_man:", "๐ด"],
+ [":older_woman:", "๐ต"],
+ [":baby:", "๐ถ"],
+ [":construction_worker:", "๐ท"],
+ [":princess:", "๐ธ"],
+ [":japanese_ogre:", "๐น"],
+ [":japanese_goblin:", "๐บ"],
+ [":ghost:", "๐ป"],
+ [":angel:", "๐ผ"],
+ [":alien:", "๐ฝ"],
+ [":space_invader:", "๐พ"],
+ [":robot_face:", "๐ค"],
+ [":imp:", "๐ฟ"],
+ [":skull:", "๐"],
+ [":information_desk_person:", "๐"],
+ [":guardsman:", "๐"],
+ [":dancer:", "๐"],
+ [":lipstick:", "๐"],
+ [":nail_care:", "๐
"],
+ [":massage:", "๐"],
+ [":haircut:", "๐"],
+ [":barber:", "๐"],
+ [":syringe:", "๐"],
+ [":pill:", "๐"],
+ [":kiss:", "๐"],
+ [":love_letter:", "๐"],
+ [":ring:", "๐"],
+ [":gem:", "๐"],
+ [":couplekiss:", "๐"],
+ [":bouquet:", "๐"],
+ [":couple_with_heart:", "๐"],
+ [":wedding:", "๐"],
+ [":heartbeat:", "๐"],
+ [":broken_heart:", "๐"],
+ [":two_hearts:", "๐"],
+ [":sparkling_heart:", "๐"],
+ [":heartpulse:", "๐"],
+ [":cupid:", "๐"],
+ [":blue_heart:", "๐"],
+ [":green_heart:", "๐"],
+ [":yellow_heart:", "๐"],
+ [":purple_heart:", "๐"],
+ [":gift_heart:", "๐"],
+ [":revolving_hearts:", "๐"],
+ [":heart_decoration:", "๐"],
+ [":diamond_shape_with_a_dot_inside:", "๐ "],
+ [":bulb:", "๐ก"],
+ [":anger:", "๐ข"],
+ [":bomb:", "๐ฃ"],
+ [":zzz:", "๐ค"],
+ [":boom:", "๐ฅ"],
+ [":sweat_drops:", "๐ฆ"],
+ [":droplet:", "๐ง"],
+ [":dash:", "๐จ"],
+ [":poop:", "๐ฉ"],
+ [":muscle:", "๐ช"],
+ [":dizzy:", "๐ซ"],
+ [":speech_balloon:", "๐ฌ"],
+ [":white_flower:", "๐ฎ"],
+ [":_100:", "๐ฏ"],
+ [":moneybag:", "๐ฐ"],
+ [":currency_exchange:", "๐ฑ"],
+ [":heavy_dollar_sign:", "๐ฒ"],
+ [":credit_card:", "๐ณ"],
+ [":yen:", "๐ด"],
+ [":dollar:", "๐ต"],
+ [":money_with_wings:", "๐ธ"],
+ [":chart:", "๐น"],
+ [":seat:", "๐บ"],
+ [":computer:", "๐ป"],
+ [":briefcase:", "๐ผ"],
+ [":minidisc:", "๐ฝ"],
+ [":floppy_disk:", "๐พ"],
+ [":cd:", "๐ฟ"],
+ [":dvd:", "๐"],
+ [":file_folder:", "๐"],
+ [":open_file_folder:", "๐"],
+ [":page_with_curl:", "๐"],
+ [":page_facing_up:", "๐"],
+ [":date:", "๐
"],
+ [":calendar:", "๐"],
+ [":card_index:", "๐"],
+ [":chart_with_upwards_trend:", "๐"],
+ [":chart_with_downwards_trend:", "๐"],
+ [":bar_chart:", "๐"],
+ [":clipboard:", "๐"],
+ [":pushpin:", "๐"],
+ [":round_pushpin:", "๐"],
+ [":paperclip:", "๐"],
+ [":straight_ruler:", "๐"],
+ [":triangular_ruler:", "๐"],
+ [":bookmark_tabs:", "๐"],
+ [":ledger:", "๐"],
+ [":notebook:", "๐"],
+ [":notebook_with_decorative_cover:", "๐"],
+ [":closed_book:", "๐"],
+ [":book:", "๐"],
+ [":green_book:", "๐"],
+ [":blue_book:", "๐"],
+ [":orange_book:", "๐"],
+ [":books:", "๐"],
+ [":name_badge:", "๐"],
+ [":scroll:", "๐"],
+ [":pencil:", "๐"],
+ [":telephone_receiver:", "๐"],
+ [":pager:", "๐"],
+ [":fax:", "๐ "],
+ [":satellite:", "๐ก"],
+ [":loudspeaker:", "๐ข"],
+ [":mega:", "๐ฃ"],
+ [":outbox_tray:", "๐ค"],
+ [":inbox_tray:", "๐ฅ"],
+ [":package:", "๐ฆ"],
+ [":e_mail:", "๐ง"],
+ [":incoming_envelope:", "๐จ"],
+ [":envelope_with_arrow:", "๐ฉ"],
+ [":mailbox_closed:", "๐ช"],
+ [":mailbox:", "๐ซ"],
+ [":postbox:", "๐ฎ"],
+ [":newspaper:", "๐ฐ"],
+ [":iphone:", "๐ฑ"],
+ [":calling:", "๐ฒ"],
+ [":vibration_mode:", "๐ณ"],
+ [":mobile_phone_off:", "๐ด"],
+ [":signal_strength:", "๐ถ"],
+ [":camera:", "๐ท"],
+ [":video_camera:", "๐น"],
+ [":tv:", "๐บ"],
+ [":radio:", "๐ป"],
+ [":vhs:", "๐ผ"],
+ [":arrows_clockwise:", "๐"],
+ [":loud_sound:", "๐"],
+ [":battery:", "๐"],
+ [":electric_plug:", "๐"],
+ [":mag:", "๐"],
+ [":mag_right:", "๐"],
+ [":lock_with_ink_pen:", "๐"],
+ [":closed_lock_with_key:", "๐"],
+ [":key:", "๐"],
+ [":lock:", "๐"],
+ [":unlock:", "๐"],
+ [":bell:", "๐"],
+ [":bookmark:", "๐"],
+ [":link:", "๐"],
+ [":radio_button:", "๐"],
+ [":back:", "๐"],
+ [":end:", "๐"],
+ [":on:", "๐"],
+ [":soon:", "๐"],
+ [":top:", "๐"],
+ [":underage:", "๐"],
+ [":keycap_ten:", "๐"],
+ [":capital_abcd:", "๐ "],
+ [":abcd:", "๐ก"],
+ [":_1234:", "๐ข"],
+ [":symbols:", "๐ฃ"],
+ [":abc:", "๐ค"],
+ [":fire:", "๐ฅ"],
+ [":flashlight:", "๐ฆ"],
+ [":wrench:", "๐ง"],
+ [":hammer:", "๐จ"],
+ [":nut_and_bolt:", "๐ฉ"],
+ [":knife:", "๐ช"],
+ [":gun:", "๐ซ"],
+ [":crystal_ball:", "๐ฎ"],
+ [":six_pointed_star:", "๐ฏ"],
+ [":beginner:", "๐ฐ"],
+ [":trident:", "๐ฑ"],
+ [":black_square_button:", "๐ฒ"],
+ [":white_square_button:", "๐ณ"],
+ [":red_circle:", "๐ด"],
+ [":large_blue_circle:", "๐ต"],
+ [":large_orange_diamond:", "๐ถ"],
+ [":large_blue_diamond:", "๐ท"],
+ [":small_orange_diamond:", "๐ธ"],
+ [":small_blue_diamond:", "๐น"],
+ [":small_red_triangle:", "๐บ"],
+ [":small_red_triangle_down:", "๐ป"],
+ [":arrow_up_small:", "๐ผ"],
+ [":arrow_down_small:", "๐ฝ"],
+ [":clock1:", "๐"],
+ [":clock2:", "๐"],
+ [":clock3:", "๐"],
+ [":clock4:", "๐"],
+ [":clock5:", "๐"],
+ [":clock6:", "๐"],
+ [":clock7:", "๐"],
+ [":clock8:", "๐"],
+ [":clock9:", "๐"],
+ [":clock10:", "๐"],
+ [":clock11:", "๐"],
+ [":clock12:", "๐"],
+ [":mount_fuji:", "๐ป"],
+ [":tokyo_tower:", "๐ผ"],
+ [":statue_of_liberty:", "๐ฝ"],
+ [":japan:", "๐พ"],
+ [":moyai:", "๐ฟ"],
+ [":grin:", "๐"],
+ [":joy:", "๐"],
+ [":smiley:", "๐"],
+ [":smile:", "๐"],
+ [":sweat_smile:", "๐
"],
+ [":laughing:", "๐"],
+ [":wink:", "๐"],
+ [":blush:", "๐"],
+ [":yum:", "๐"],
+ [":relieved:", "๐"],
+ [":heart_eyes:", "๐"],
+ [":smirk:", "๐"],
+ [":unamused:", "๐"],
+ [":sweat:", "๐"],
+ [":pensive:", "๐"],
+ [":confounded:", "๐"],
+ [":kissing_heart:", "๐"],
+ [":kissing_closed_eyes:", "๐"],
+ [":stuck_out_tongue_winking_eye:", "๐"],
+ [":stuck_out_tongue_closed_eyes:", "๐"],
+ [":disappointed:", "๐"],
+ [":angry:", "๐ "],
+ [":rage:", "๐ก"],
+ [":cry:", "๐ข"],
+ [":persevere:", "๐ฃ"],
+ [":triumph:", "๐ค"],
+ [":disappointed_relieved:", "๐ฅ"],
+ [":fearful:", "๐จ"],
+ [":weary:", "๐ฉ"],
+ [":sleepy:", "๐ช"],
+ [":tired_face:", "๐ซ"],
+ [":sob:", "๐ญ"],
+ [":cold_sweat:", "๐ฐ"],
+ [":scream:", "๐ฑ"],
+ [":astonished:", "๐ฒ"],
+ [":flushed:", "๐ณ"],
+ [":dizzy_face:", "๐ต"],
+ [":mask:", "๐ท"],
+ [":smile_cat:", "๐ธ"],
+ [":joy_cat:", "๐น"],
+ [":smiley_cat:", "๐บ"],
+ [":heart_eyes_cat:", "๐ป"],
+ [":smirk_cat:", "๐ผ"],
+ [":kissing_cat:", "๐ฝ"],
+ [":pouting_cat:", "๐พ"],
+ [":crying_cat_face:", "๐ฟ"],
+ [":scream_cat:", "๐"],
+ [":no_good:", "๐
"],
+ [":ok_woman:", "๐"],
+ [":bow:", "๐"],
+ [":see_no_evil:", "๐"],
+ [":hear_no_evil:", "๐"],
+ [":speak_no_evil:", "๐"],
+ [":raising_hand:", "๐"],
+ [":raised_hands:", "๐"],
+ [":person_frowning:", "๐"],
+ [":person_with_pouting_face:", "๐"],
+ [":pray:", "๐"],
+ [":rocket:", "๐"],
+ [":railway_car:", "๐"],
+ [":bullettrain_side:", "๐"],
+ [":bullettrain_front:", "๐
"],
+ [":metro:", "๐"],
+ [":station:", "๐"],
+ [":bus:", "๐"],
+ [":busstop:", "๐"],
+ [":ambulance:", "๐"],
+ [":fire_engine:", "๐"],
+ [":police_car:", "๐"],
+ [":taxi:", "๐"],
+ [":red_car:", "๐"],
+ [":blue_car:", "๐"],
+ [":truck:", "๐"],
+ [":ship:", "๐ข"],
+ [":speedboat:", "๐ค"],
+ [":traffic_light:", "๐ฅ"],
+ [":construction:", "๐ง"],
+ [":rotating_light:", "๐จ"],
+ [":triangular_flag_on_post:", "๐ฉ"],
+ [":door:", "๐ช"],
+ [":no_entry_sign:", "๐ซ"],
+ [":smoking:", "๐ฌ"],
+ [":no_smoking:", "๐ญ"],
+ [":bike:", "๐ฒ"],
+ [":walking:", "๐ถ"],
+ [":mens:", "๐น"],
+ [":womens:", "๐บ"],
+ [":restroom:", "๐ป"],
+ [":baby_symbol:", "๐ผ"],
+ [":toilet:", "๐ฝ"],
+ [":wc:", "๐พ"],
+ [":bath:", "๐"],
+ [":articulated_lorry:", "๐"],
+ [":kissing_smiling_eyes:", "๐"],
+ [":pear:", "๐"],
+ [":bicyclist:", "๐ด"],
+ [":rabbit2:", "๐"],
+ [":clock830:", "๐ฃ"],
+ [":train:", "๐"],
+ [":oncoming_automobile:", "๐"],
+ [":expressionless:", "๐"],
+ [":smiling_imp:", "๐"],
+ [":frowning:", "๐ฆ"],
+ [":no_mouth:", "๐ถ"],
+ [":baby_bottle:", "๐ผ"],
+ [":non_potable_water:", "๐ฑ"],
+ [":open_mouth:", "๐ฎ"],
+ [":last_quarter_moon_with_face:", "๐"],
+ [":do_not_litter:", "๐ฏ"],
+ [":sunglasses:", "๐"],
+ [":loop:", "โฟ"],
+ [":last_quarter_moon:", "๐"],
+ [":grinning:", "๐"],
+ [":euro:", "๐ถ"],
+ [":clock330:", "๐"],
+ [":telescope:", "๐ญ"],
+ [":globe_with_meridians:", "๐"],
+ [":postal_horn:", "๐ฏ"],
+ [":stuck_out_tongue:", "๐"],
+ [":clock1030:", "๐ฅ"],
+ [":pound:", "๐ท"],
+ [":two_men_holding_hands:", "๐ฌ"],
+ [":tiger2:", "๐
"],
+ [":anguished:", "๐ง"],
+ [":vertical_traffic_light:", "๐ฆ"],
+ [":confused:", "๐"],
+ [":repeat:", "๐"],
+ [":oncoming_police_car:", "๐"],
+ [":tram:", "๐"],
+ [":dragon:", "๐"],
+ [":earth_americas:", "๐"],
+ [":rugby_football:", "๐"],
+ [":left_luggage:", "๐
"],
+ [":sound:", "๐"],
+ [":clock630:", "๐ก"],
+ [":dromedary_camel:", "๐ช"],
+ [":oncoming_bus:", "๐"],
+ [":horse_racing:", "๐"],
+ [":rooster:", "๐"],
+ [":rowboat:", "๐ฃ"],
+ [":customs:", "๐"],
+ [":repeat_one:", "๐"],
+ [":waxing_crescent_moon:", "๐"],
+ [":mountain_railway:", "๐"],
+ [":clock930:", "๐ค"],
+ [":put_litter_in_its_place:", "๐ฎ"],
+ [":arrows_counterclockwise:", "๐"],
+ [":clock130:", "๐"],
+ [":goat:", "๐"],
+ [":pig2:", "๐"],
+ [":innocent:", "๐"],
+ [":no_bicycles:", "๐ณ"],
+ [":light_rail:", "๐"],
+ [":whale2:", "๐"],
+ [":train2:", "๐"],
+ [":earth_africa:", "๐"],
+ [":shower:", "๐ฟ"],
+ [":waning_gibbous_moon:", "๐"],
+ [":steam_locomotive:", "๐"],
+ [":cat2:", "๐"],
+ [":tractor:", "๐"],
+ [":thought_balloon:", "๐ญ"],
+ [":two_women_holding_hands:", "๐ญ"],
+ [":full_moon_with_face:", "๐"],
+ [":mouse2:", "๐"],
+ [":clock430:", "๐"],
+ [":worried:", "๐"],
+ [":rat:", "๐"],
+ [":ram:", "๐"],
+ [":dog2:", "๐"],
+ [":kissing:", "๐"],
+ [":helicopter:", "๐"],
+ [":clock1130:", "๐ฆ"],
+ [":no_mobile_phones:", "๐ต"],
+ [":european_post_office:", "๐ค"],
+ [":ox:", "๐"],
+ [":mountain_cableway:", "๐ "],
+ [":sleeping:", "๐ด"],
+ [":cow2:", "๐"],
+ [":minibus:", "๐"],
+ [":clock730:", "๐ข"],
+ [":aerial_tramway:", "๐ก"],
+ [":speaker:", "๐"],
+ [":no_bell:", "๐"],
+ [":mailbox_with_mail:", "๐ฌ"],
+ [":no_pedestrians:", "๐ท"],
+ [":microscope:", "๐ฌ"],
+ [":bathtub:", "๐"],
+ [":suspension_railway:", "๐"],
+ [":crocodile:", "๐"],
+ [":mountain_bicyclist:", "๐ต"],
+ [":waning_crescent_moon:", "๐"],
+ [":monorail:", "๐"],
+ [":children_crossing:", "๐ธ"],
+ [":clock230:", "๐"],
+ [":busts_in_silhouette:", "๐ฅ"],
+ [":mailbox_with_no_mail:", "๐ญ"],
+ [":leopard:", "๐"],
+ [":deciduous_tree:", "๐ณ"],
+ [":oncoming_taxi:", "๐"],
+ [":lemon:", "๐"],
+ [":mute:", "๐"],
+ [":baggage_claim:", "๐"],
+ [":twisted_rightwards_arrows:", "๐"],
+ [":sun_with_face:", "๐"],
+ [":trolleybus:", "๐"],
+ [":evergreen_tree:", "๐ฒ"],
+ [":passport_control:", "๐"],
+ [":new_moon_with_face:", "๐"],
+ [":potable_water:", "๐ฐ"],
+ [":high_brightness:", "๐"],
+ [":low_brightness:", "๐
"],
+ [":clock530:", "๐ "],
+ [":hushed:", "๐ฏ"],
+ [":grimacing:", "๐ฌ"],
+ [":water_buffalo:", "๐"],
+ [":neutral_face:", "๐"],
+ [":clock1230:", "๐ง"],
+ [":P", "๐" ],
+ [":)", "๐" ],
+ [":D", "๐" ],
+ [":o", "๐ฎ" ],
+ [":O", "๐ฎ" ],
+ [":(", "โน๏ธ" ],
+ [":|", "๐" ],
+];
+
+// ===========================================================================
+
+// ===========================================================================
+
function makeLargeNumberReadable(num) {
return new Number(num).toLocaleString("en-US");
}
@@ -1459,4 +2416,275 @@ function getConsoleClient() {
}
}
+// ===========================================================================
+
+function getServerColours() {
+ return serverColours;
+}
+
+// ===========================================================================
+
+function getColourByType(typeName) {
+ return getServerColours().byType[typeName];
+}
+
+// ===========================================================================
+
+function getColourByName(colourName) {
+ return getServerColours().byName[colourName];
+}
+
+// ===========================================================================
+
+function getHexColourByName(colourName) {
+ //let rgbaColour = getServerColours().byName[colourName];
+ //let rgbaArray = rgbaArrayFromToColour(rgbaColour);
+ //return rgbToHex(rgbaArray[0], rgbaArray[1], rgbaArray[2]);
+
+ return `#${getServerColours().hex.byName[colourName]}`;
+}
+
+// ===========================================================================
+
+function getHexColourByType(colourName) {
+ //let rgbaColour = getServerColours().byType[colourName];
+ //let rgbaArray = rgbaArrayFromToColour(rgbaColour);
+ //return rgbToHex(rgbaArray[0], rgbaArray[1], rgbaArray[2]);
+
+ return `#${getServerColours().hex.byType[colourName]}`;
+}
+
+// ===========================================================================
+
+function getPlayerColour(client) {
+ if(getPlayerData(client) != false) {
+ if(!isPlayerLoggedIn(client)) {
+ return getColourByName("darkGrey");
+ } else {
+ if(isPlayerWorking(client)) {
+ return getJobData(getJobIndexFromDatabaseId(getPlayerCurrentSubAccount(client).job)).colour;
+ }
+ }
+ }
+
+ return getColourByName("civilianWhite");
+}
+
+// ===========================================================================
+
+/**
+ * Gets the red/green colour depending on bool (red = false, green = true) for inline use in chatbox messages
+ *
+ * @param {Boolean} boolValue The boolean value
+ * @return {String} Red or green inline HEX colour string
+ *
+ */
+function getBoolRedGreenInlineColour(boolValue) {
+ return (!boolValue) ? "{softRed}" : "{softGreen}";
+}
+
+// ===========================================================================
+
+/**
+ * Gets an array of RGB colour values from a HEX colour string
+ *
+ * @param {String} hexColour Hex colour string
+ * @return {Array} 3-slot array where each slot is an RGB colour value
+ *
+ */
+function hexToRgb(h) {
+ return [
+ '0x'+h[1]+h[2]|0,
+ '0x'+h[3]+h[4]|0,
+ '0x'+h[5]+h[6]|0
+ ];
+}
+
+// ===========================================================================
+
+/**
+ * Gets a HEX colour string from RGB values, without brackets (example: #FFFFFF)
+ *
+ * @param {Number} red Red RGB value
+ * @param {Number} green Green RGB value
+ * @param {Number} blue Blue RGB value
+ * @return {String} HEX colour string
+ *
+ */
+function rgbToHex(r, g, b) {
+ return "#"+((1<<24)+(r<<16)+(g<<8)+ b).toString(16).slice(1);
+}
+
+// ===========================================================================
+
+/**
+ * Gets the current colour for a player (affected by job and status)
+ *
+ * @param {Client} client Player client
+ * @return {Number} Colour integer
+ *
+ */
+function getClientChatColour(client) {
+ let tempJob = getPlayerCurrentSubAccount(client).job;
+ if(tempJob != -1) {
+ if(getPlayerData(client).isWorking) {
+ return getJobData(tempJob).jobColour;
+ }
+ }
+ return getColourByName("white");
+}
+
+// ===========================================================================
+
+/**
+ * Gets a toColour-created colour integer with random RGB values (alpha is always 255)
+ *
+ * @return {Number} Colour integer
+ *
+ */
+function getRandomRGB() {
+ return toColour.apply(null, [
+ getRandom(0, 255),
+ getRandom(0, 255),
+ getRandom(0, 255),
+ 255
+ ]);
+}
+
+// ===========================================================================
+
+/**
+ * Gets a hex formatting colour by name for use inline in chatbox messages (example: [#FFFFFF]).
+ *
+ * @param {String} colourName - Colour name
+ * @return {String} HEX-formatted colour string with brackets
+ *
+ */
+function getInlineChatColourByName(colourName) {
+ return `{${colourName}}`;
+}
+
+// ===========================================================================
+
+/**
+ * Gets a hex formatting colour by type for use inline in chatbox messages (example: [#FFFFFF]).
+ *
+ * @param {String} colourName - Colour type
+ * @return {String} HEX-formatted colour string with brackets
+ *
+ */
+function getInlineChatColourByType(colourName) {
+ return `{${colourName}}`;
+}
+
+// ===========================================================================
+
+/**
+ * Gets an array of RGBA colour values from a toColour integer.
+ *
+ * @param {Number} colour - Colour integer created by toColour
+ * @return {Array} 4-slot array where each slot is an RGBA colour value
+ *
+ */
+function rgbaArrayFromToColour(colour) {
+ //return [
+ // (colour >> 24) & 0xFF, // red
+ // (colour >> 16) & 0xFF,
+ // (colour >> 8) & 0xFF,
+ // colour & 0xFF // alpha
+ //];
+ return [
+ (colour >> 16) & 0xFF, // red
+ (colour >> 8) & 0xFF,
+ colour & 0xFF,
+ (colour >> 24) & 0xFF// alpha
+ ];
+}
+
+// ===========================================================================
+
+function hexFromToColour(colour) {
+ let rgba = rgbaArrayFromToColour(colour);
+ return rgbToHex(rgba[0], rgba[1], rgba[2]);
+}
+
+// ===========================================================================
+
+function replaceColoursInMessage(messageText) {
+ if(messageText == null) {
+ return "";
+ }
+
+ let tempFind = `{RESETCOLOUR}`;
+ let tempRegex = new RegExp(tempFind, 'g');
+ messageText = messageText.replace(tempRegex, "[/#]");
+
+ tempFind = `{ALTCOLOUR}`;
+ tempRegex = new RegExp(tempFind, 'g');
+ messageText = messageText.replace(tempRegex, "[#C8C8C8]");
+
+ tempFind = `{MAINCOLOUR}`;
+ tempRegex = new RegExp(tempFind, 'g');
+ messageText = messageText.replace(tempRegex, "[#FFFFFF]");
+
+ for(let i in getServerColours().hex.byName) {
+ let find = `{${i}}`;
+ let re = new RegExp(find, 'g');
+ messageText = messageText.replace(re, `[#${getServerColours().hex.byName[i]}]`);
+ }
+
+ for(let i in getServerColours().hex.byType) {
+ let find = `{${i}}`;
+ let re = new RegExp(find, 'g');
+ messageText = messageText.replace(re, `[#${getServerColours().hex.byType[i]}]`);
+ }
+
+ return messageText;
+}
+
+// ===========================================================================
+
+function removeColoursInMessage(messageText) {
+ if(messageText == null) {
+ return "";
+ }
+
+ let tempFind = `{RESETCOLOUR}`;
+ let tempRegex = new RegExp(tempFind, 'g');
+ messageText = messageText.replace(tempRegex, "");
+
+ tempFind = `{ALTCOLOUR}`;
+ tempRegex = new RegExp(tempFind, 'g');
+ messageText = messageText.replace(tempRegex, "");
+
+ tempFind = `{MAINCOLOUR}`;
+ tempRegex = new RegExp(tempFind, 'g');
+ messageText = messageText.replace(tempRegex, "");
+
+ for(let i in getServerColours().hex.byName) {
+ let find = `{${i}}`;
+ let re = new RegExp(find, 'g');
+ messageText = messageText.replace(re, "");
+ }
+
+ for(let i in getServerColours().hex.byType) {
+ let find = `{${i}}`;
+ let re = new RegExp(find, 'g');
+ messageText = messageText.replace(re, "");
+ }
+
+ return messageText;
+}
+
+// ===========================================================================
+
+function replaceEmojiInString(messageString) {
+ for(let i in emojiReplaceString) {
+ while(messageString.indexOf(emojiReplaceString[i][0]) != -1) {
+ messageString = messageString.replace(emojiReplaceString[i][0], emojiReplaceString[i][1]);
+ }
+ }
+ return messageString;
+}
+
// ===========================================================================
\ No newline at end of file
From 41542493d895942e12406ea19006afdd6a00fc0e Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Fri, 25 Feb 2022 05:28:46 -0600
Subject: [PATCH 3/4] Add interior positions for IV
---
scripts/shared/gamedata.js | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/scripts/shared/gamedata.js b/scripts/shared/gamedata.js
index 497dcdbb..d22f28e4 100644
--- a/scripts/shared/gamedata.js
+++ b/scripts/shared/gamedata.js
@@ -4386,7 +4386,34 @@ let gameData = {
},
{ // GTA IV
-
+ Office2: [toVector3(-1153.30, 417.37, 5.578), 0],
+ House1: [toVector3(-426.16, 1466.52, 38.971), 0],
+ House2: [toVector3(-969.77, 883.27, 18.817), 0],
+ House3: [toVector3(95.75, 851.68, 45.051), 0],
+ House4: [toVector3(603.04, 1404.06, 17.479), 0],
+ House5: [toVector3(892.56, -502.13, 19.407), 0],
+ House6: [toVector3(-524.09, 830.54, 23.627), 0],
+ House7: [toVector3(806.36, 146.68, 29.243), 0],
+ House8: [toVector3(356.91, 1511.28, 21.432), 0],
+ House9: [toVector3(1319.40, -847.02, 8.872), 0],
+ House10: [toVector3(1331.40, 126.60, 36.558), 0],
+ House11: [toVector3(1387.81, 622.66, 35.857), 0],
+ House12: [toVector3(932.74, -189.29, 35.143), 0],
+ House13: [toVector3(-1397.85, 1473.89, 26.447), 0],
+ House14: [toVector3(806.36, 146.68, 29.243), 0],
+ House15: [toVector3(-526.49, 829.41, 23.627), 0],
+ Gym: [toVector3(403.31, 1480.32, 11.834), 0],
+ PoliceStation: [toVector3(-406.52, 286.57, 13.682), 0],
+ FancyRestaurant: [toVector3(-118.24, -259.06, 12.654), 0],
+ Basement: [toVector3(1304.38, -856.66, 5.490), 0],
+ Office1: [toVector3(-409.31, 285.49, 18.592), 0],
+ Office2: [toVector3(-1153.30, 417.37, 5.578), 0],
+ Office3: [toVector3(817.64, -259.77, 15.343), 0],
+ Office4: [toVector3(-86.35, 56.70, 75.953), 0],
+ HospitalRoom: [toVector3(1240.00, 192.44, 33.553), 0],
+ Church: [toVector3(-286.72, -282.36, 15.632), 0],
+ Prison: [toVector3(-1082.69, -364.05, 7.404), 0],
+ Ship: [toVector3(-336.53, -1494.56, 9.945), 0],
},
{}, // GTA IV EFLC
From 36cecc1955218d57106afc8bcde4d1a8cb28b7cf Mon Sep 17 00:00:00 2001
From: Vortrex <3858226+VortrexFTW@users.noreply.github.com>
Date: Fri, 25 Feb 2022 05:29:00 -0600
Subject: [PATCH 4/4] Vehicle fires
---
scripts/client/event.js | 1 +
scripts/client/utilities.js | 15 +++++++++++++++
2 files changed, 16 insertions(+)
diff --git a/scripts/client/event.js b/scripts/client/event.js
index 03ae0839..c2c9b340 100644
--- a/scripts/client/event.js
+++ b/scripts/client/event.js
@@ -95,6 +95,7 @@ function onProcess(event, deltaTime) {
processGameSpecifics();
processNearbyPickups();
processVehiclePurchasing();
+ processVehicleFires();
}
// ===========================================================================
diff --git a/scripts/client/utilities.js b/scripts/client/utilities.js
index 478530ee..bbf48cb2 100644
--- a/scripts/client/utilities.js
+++ b/scripts/client/utilities.js
@@ -901,4 +901,19 @@ function setVehiclePurchaseState(state, vehicleId, position) {
vehiclePurchasePosition = position;
}
+// ===========================================================================
+
+function processVehicleFires() {
+ let vehicles = getElementsByType(ELEMENT_VEHICLE);
+ for(let i in vehicles) {
+ if(vehicles[i].isSyncer) {
+ if(!doesEntityDataExist(vehicles[i], "vrr.fire")) {
+ triggerNetworkEvent("vrr.vehFire", vehicles[i].id);
+ } else {
+ vehicles[i].health = 249;
+ }
+ }
+ }
+}
+
// ===========================================================================
\ No newline at end of file