Ir para conteúdo

Featured Replies

  • Respostas 17
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • 1º pedido: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npc

  • local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCre

  • Tente assim o 2° Pedido. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureA

Postado
  • Autor

apenas um erro que foi no do nome!!! 

 

deu este erro : OTSYS_SQLITE3_PREPARE(): SQLITE ERROR: no such column: gabriel (UPDATE players SET name = gabriel WHERE id = 2)

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

Postado

Na verdade o primeiro script é funcional sim, mas como ele não colocou a função pro char deslogar, o sex só é mudado ao deslogar, basta adiciona o :

doRemoveCreature(cid)

EQD4Qy4.gif

Postado
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
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
function creatureSayCallback(cid, type, msg)
    if not npcHandler:isFocused(cid) then
        return false
    end
    local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
    local price = xxx           --Preço para trocar de sexo.
    if msgcontains(msg:lower(), "change") or msgcontains(msg:lower(), "sex") then
        selfSay("Do you wanna change your sex? It will cost {"..price.." gold}.", cid)
        talkState[talkUser] = 1
        return true
    elseif msgcontains(msg:lower(), "yes") and talkState[talkUser] == 1 then
        if doPlayerRemoveMoney(cid, price) then
            doPlayerSetSex(cid, getPlayerSex(cid) == 0 and 1 or 0)
            selfSay("You sucefully changed your sex.", cid)
	    doRemoveCreature(cid)
            talkState[talkUser] = 0
            return true
        else
            selfSay("You do not have enough gold.", cid)
            talkState[talkUser] = 0
            return true
        end
    elseif msgcontains(msg:lower(), "no") and talkState[talkUser] == 1 then
        selfSay("Ok, bye.", cid)
        talkState[talkUser] = 0
        return true
    end
    return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())   

Dps da o feedback do tópico  do npc mendigo se funcionou ou não ... vou dar uma olhada no de change name e já edito aqui. 

EQD4Qy4.gif

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo