• 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!

Npc only sell to Men

psychosisneamia

~Beginner~
Joined
Jun 7, 2012
Messages
162
Reaction score
7
Does anyone have a script I can look at to see how to make a npc only talk to a certain gender? I want to be able to build the npc from scratch but I need to see how the function is used. Thanks in advance!
 
After the msgcontains line, you can check for gender.
Code:
if getPlayerSex(cid) == 1 then -- other versions
    -- blabla
end

if player:getSex() == 1 then -- TFS 1.0
    -- blabla
end
It's like the same as checking for storage value, the npc will only respond is the gender is 1, which is male.

If it should only greet males, so not talk to females at all
http://otland.net/threads/npc-mission.211063/#post-2022377
 
Back
Top