Hi guys, well this is my problem:
I'm trying to do something really simple:
If a girl says "hi" to an NPC it will respond "Hi Lady"
however if it's a boy the NPC will say "Hi Lord" but it isn't working for girls (says "Hi Lord" every time) :s someone know why?
and if someone could tell me how to print (GetPlayerSex (cid)) somewhere, so I would know what this variable contains.
im using TFS 0.2.12 (Mystic Spirit)
Thanks and sorry for the bad English.
I'm trying to do something really simple:
If a girl says "hi" to an NPC it will respond "Hi Lady"
however if it's a boy the NPC will say "Hi Lord" but it isn't working for girls (says "Hi Lord" every time) :s someone know why?
and if someone could tell me how to print (GetPlayerSex (cid)) somewhere, so I would know what this variable contains.
im using TFS 0.2.12 (Mystic Spirit)
Thanks and sorry for the bad English.
LUA:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
npcHandler:addModule(FocusModule:new())
if (getPlayerSex(cid) == 0) then -- tryed (0,1,-1) and still dosn't work
npcHandler:setMessage(MESSAGE_GREET, "Greetings! |PLAYERNAME|, What can i do for you, my Lady?") --if a girl player greets
else
npcHandler:setMessage(MESSAGE_GREET, "Greetings! |PLAYERNAME|, What can i do for you, my Lord? ") --if a boy player greets
end
local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)
shopModule:addBuyableItem({'brown backpack'}, 10519, 500, 'brown backpack')
shopModule:addBuyableItem({'brown bag'}, 10520, 100, 'brown bag')
npcHandler:addModule(FocusModule:new())
Last edited: