• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Help with npc function farewellCallback(cid) please

rudger

Active Member
Joined
Oct 1, 2010
Messages
273
Solutions
1
Reaction score
45
Location
The Netherlands
How come this script doesn't work?:

LUA:
function farewellCallback(cid)
if getPlayerSex(cid) == 1 then
npcHandler:setMessage(MESSAGE_FAREWELL, 'Good bye, Sir.')
elseif getPlayerSex(cid) == 0 then
npcHandler:setMessage(MESSAGE_FAREWELL, 'Good bye, Mam.')
else
npcHandler:setMessage(MESSAGE_FAREWELL, 'Good byeee.')

end
return true
end

Console error:

Code:
internalGetPlayerInfo<>. Player not found. info = 18
 
try this
Code:
if msgcontains(msg, 'bye') then 
if getPlayerSex(cid) == 1 then
npcHandler:say('Bye sir.')
else
npcHandler:say('Bye mam.')
talk_state = 0
end
return TRUE
end

i hope this will help you

king regards jeffry,
 
Last edited by a moderator:
Back
Top