Não ha necessidade disso.
getPlayerSex(cid)
PLAYERSEX_FEMALE = 0
PLAYERSEX_MALE = 1
e isso
ifgetPlayerSex(cid) == PLAYERSEX_FEMALE and (msgcontains(msg, 'hi','hello') then
deve ter espaço
if getPlayerSex(cid) == PLAYERSEX_FEMALE and (msgcontains(msg, 'hi','hello') then






info
Grupo: Campones
Registrado: 16/03/08
Posts: 42
Reputação: 0
Rapaiz, todo dia tenho uma dúvida
TFS: 0.4
Cliente: 8.6
Bom, eu queria criar um npc que quando o player fosse "male" ele falasse:
"Welcome Mr. |PLAYERNAME|, want look my pearls? {Trade} with me!"
e quando fosse "female" falasse:
"Welcome Mrs. |PLAYERNAME|, want look my pearls? {Trade} with me!
Ou seja, só muda o Mr. e o Mrs.
Eu percebi que não sei nada de LUA quando tentei fazer esse mísero script e não consegui
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 getPlayerSex(cid) PLAYERSEX_FEMALE = 0 PLAYERSEX_MALE = 1 ifgetPlayerSex(cid) == PLAYERSEX_FEMALE and (msgcontains(msg, 'hi','hello') then selfSay('Welcome Mrs. ' .. creatureGetName(cid) .. ',want to look my pearls? {Trade} with me!') else selfSay('Welcome Mr. ' .. creatureGetName(cid) .. 'want to look my pearls? {Trade} with me!') end npcHandler:addModule(FocusModule:new())Então, quem puder (e quiser) ajudar essa pobre alma que não sabe fazer nenhum script, por favor.