Action tips (cont'd)

This commit is contained in:
Vortrex
2022-08-22 14:26:48 -05:00
parent c4f8afecc0
commit 9e44f4d2fa
5 changed files with 31 additions and 14 deletions

View File

@@ -44,7 +44,9 @@ function playPlayerAnimationCommand(command, params, client) {
return false; return false;
} }
messagePlayerTip(client, getLocaleString(client, "AnimationStopCommandTip", "{ALTCOLOUR}/stopanim{MAINCOLOUR}")); if (hasPlayerSeenActionTip(client, "AnimationStop")) {
messagePlayerTip(client, getIndexedLocaleString(client, "ActionTips", "AnimationStopTip", "{ALTCOLOUR}/stopanim{MAINCOLOUR}"));
}
makePlayerPlayAnimation(client, animationSlot, animationPositionOffset); makePlayerPlayAnimation(client, animationSlot, animationPositionOffset);
} }
@@ -66,6 +68,8 @@ function stopPlayerAnimationCommand(command, params, client) {
getPlayerData(client).animationForced = false; getPlayerData(client).animationForced = false;
//setPlayerMouseCameraState(client, false); //setPlayerMouseCameraState(client, false);
markPlayerActionTipSeen(client, "AnimationStop");
} }
// =========================================================================== // ===========================================================================

View File

@@ -2670,12 +2670,16 @@ function buyFromBusinessCommand(command, params, client) {
//messagePlayerSuccess(client, `You bought ${amount} {ALTCOLOUR}${itemName} {MAINCOLOUR}for ${totalCost} ${priceEach}`); //messagePlayerSuccess(client, `You bought ${amount} {ALTCOLOUR}${itemName} {MAINCOLOUR}for ${totalCost} ${priceEach}`);
meActionToNearbyPlayers(client, `buys a ${itemName}`); meActionToNearbyPlayers(client, `buys a ${itemName}`);
if (doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand("inv")) { if (!hasPlayerSeenActionTip(client, "ViewInventory")) {
let keyData = getPlayerKeyBindForCommand("inv"); if (doesPlayerHaveKeyBindsDisabled(client) && doesPlayerHaveKeyBindForCommand("inv")) {
messagePlayerNewbieTip(client, getLocaleString(client, "ViewInventoryKeyPressTip", `{ALTCOLOUR}${getKeyNameFromId(keyData.key)}{MAINCOLOUR}`)); let keyData = getPlayerKeyBindForCommand("inv");
} else { messagePlayerActionTip(client, getIndexedLocaleString(client, "ActionTips", "ViewInventory", `{ALTCOLOUR}${getKeyNameFromId(keyData.key)}{MAINCOLOUR}`));
messagePlayerNewbieTip(client, getLocaleString(client, "ViewInventoryCommandTip", `{ALTCOLOUR}/inv{MAINCOLOUR}`)); } else {
messagePlayerActionTip(client, getIndexedLocaleString(client, "ActionTips", "ViewInventory", `{ALTCOLOUR}/inv{MAINCOLOUR}`));
}
} }
markPlayerActionTipSeen(client, "ViewInventory");
} }
// =========================================================================== // ===========================================================================

View File

@@ -217,7 +217,10 @@ function privateMessageCommand(command, params, client) {
getPlayerData(targetClient).privateMessageReplyTo = client; getPlayerData(targetClient).privateMessageReplyTo = client;
messagePlayerPrivateMessage(targetClient, client, messageText); messagePlayerPrivateMessage(targetClient, client, messageText);
messagePlayerTip(client, getLocaleString(client, "PrivateMessageReplyCommandTip", "{ALTCOLOUR}/reply{MAINCOLOUR}"))
if (hasPlayerSeenActionTip(targetClient, "ReplyToDirectMessage")) {
messagePlayerTip(targetClient, getIndexedLocaleString(targetClient, "ActionTips", "ReplyToDirectMessage", "{ALTCOLOUR}/reply{MAINCOLOUR}"));
}
} }
// =========================================================================== // ===========================================================================
@@ -240,6 +243,8 @@ function replyToLastPrivateMessageCommand(command, params, client) {
getPlayerData(targetClient).privateMessageReplyTo = client; getPlayerData(targetClient).privateMessageReplyTo = client;
messagePlayerPrivateMessage(targetClient, client, messageText); messagePlayerPrivateMessage(targetClient, client, messageText);
markPlayerActionTipSeen(client, "ReplyToDirectMessage");
} }
// =========================================================================== // ===========================================================================

View File

@@ -405,14 +405,14 @@ function hasPlayerSeenActionTip(client, seenActionTipFlagName) {
if (hasBitFlag(getPlayerData(client).accountData.seenActionTips, seenActionTipFlagValue)) { if (hasBitFlag(getPlayerData(client).accountData.seenActionTips, seenActionTipFlagValue)) {
return true; return true;
} else {
return false;
} }
return false;
} }
// =========================================================================== // ===========================================================================
function playerHasSeenActionTip(client, seenActionTipFlagName) { function markPlayerActionTipSeen(client, seenActionTipFlagName) {
let seenActionTipFlagValue = getSeenActionTipsValue(seenActionTipFlagName); let seenActionTipFlagValue = getSeenActionTipsValue(seenActionTipFlagName);
getPlayerData(client).accountData.seenActionTips = addBitFlag(getPlayerData(client).accountData.seenActionTips, seenActionTipFlagValue); getPlayerData(client).accountData.seenActionTips = addBitFlag(getPlayerData(client).accountData.seenActionTips, seenActionTipFlagValue);

View File

@@ -1394,11 +1394,15 @@ function jobEquipmentCommand(command, params, client) {
givePlayerJobEquipment(client, equipmentId - 1); givePlayerJobEquipment(client, equipmentId - 1);
//messagePlayerSuccess(client, `You have been given the ${equipments[equipmentId-1].name} equipment`); //messagePlayerSuccess(client, `You have been given the ${equipments[equipmentId-1].name} equipment`);
meActionToNearbyPlayers(client, `grabs the ${jobEquipmentData.name} equipment from the locker`); meActionToNearbyPlayers(client, `grabs the ${jobEquipmentData.name} equipment from the locker`);
if (doesPlayerHaveKeyBindForCommand(client, "inv")) { if (!hasPlayerSeenActionTip(client, "JobEquipmentInventory")) {
messagePlayerTip(client, getLocaleString(client, "JobEquipmentInventoryKeyBindTip", toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "inv").key)))); if (doesPlayerHaveKeyBindForCommand(client, "inv")) {
} else { messagePlayerTip(client, getIndexedLocaleString(client, "ActionTips", "JobEquipmentInventory", toUpperCase(getKeyNameFromId(getPlayerKeyBindForCommand(client, "inv").key))));
messagePlayerTip(client, getLocaleString(client, "JobEquipmentInventoryCommandTip", "/inv")); } else {
messagePlayerTip(client, getIndexedLocaleString(client, "ActionTips", "JobEquipmentInventory", "/inv"));
}
markPlayerActionTipSeen(client, "JobEquipmentInventory");
} }
} }
// =========================================================================== // ===========================================================================