Added handling the "show text" param for emotes.

This commit is contained in:
Filip Maj 2019-06-08 17:37:14 -04:00
parent eb43a7523d
commit 89c6191710

View File

@ -2,6 +2,9 @@
EmoteStandardCommand Script EmoteStandardCommand Script
Returns the correct animation and log description when an emote is activated.
If 'motion' parameter is used, it returns the blank description id 10105
--]] --]]
emoteTable = { emoteTable = {
@ -63,7 +66,7 @@ emoteTable = {
}; };
function onEventStarted(player, actor, triggerName, emoteId, unknownArg1, arg2, arg3, targetId) function onEventStarted(player, actor, triggerName, emoteId, showText, arg2, arg3, targetId)
if (targetId == nil) then if (targetId == nil) then
targetId = 0; targetId = 0;
@ -72,7 +75,11 @@ function onEventStarted(player, actor, triggerName, emoteId, unknownArg1, arg2,
if (player:GetState() == 0 or player:GetState() == 11 or player:GetState() == 13) then if (player:GetState() == 0 or player:GetState() == 11 or player:GetState() == 13) then
emote = emoteTable[emoteId]; emote = emoteTable[emoteId];
if (emote ~= nil) then if (emote ~= nil) then
if showText == 1 then
player:doEmote(targetId, emote.animId, emote.descId); player:doEmote(targetId, emote.animId, emote.descId);
else
player:doEmote(targetId, emote.animId, 10105);
end
else else
player:SendMessage(0x20, "", string.format("Not implemented; EmoteId: %d", emoteId)); player:SendMessage(0x20, "", string.format("Not implemented; EmoteId: %d", emoteId));
end end