I am trying to see if the player is already mounted or not. While doing some research on this, I came across this event called
For example. Let's say I have a player which is not mounted right now and I press CTRL + R to activate the mount then the script below displays
SOLVED:
I was not trying to get the updated outfit using
basically all I had to do was change from
onChangeOutfit. When I tried printing the lookMount value it gave the PREVIOUS value instead of what the player currently has.For example. Let's say I have a player which is not mounted right now and I press CTRL + R to activate the mount then the script below displays
lookMount 0 (mounted), when I remove the mount it gives the lookMount which should have fetched the first time I activated it. Not sure how this onChangeOutfit behaves. Is it not updating correctly?
LUA:
function Creature:onChangeOutfit(outfit)
local pleb = Creature(self)
if(pleb:isPlayer()) then
pleb:say(tostring(pleb:getOutfit().lookMount), TALKTYPE_MONSTER_SAY, false, 0, pleb:getPosition())
end
return true
end
SOLVED:
I was not trying to get the updated outfit using
outfit parameter.basically all I had to do was change from
pleb:getOutfit().lookMount to outfit.lookMount
Last edited: