Postado Maio 16, 2015 10 anos Solução TFS 0.4 Como tem mount achei que fosse TFS 1.0, kk. Troquei as funções do script, testa ai: local t = { itemneed = 11367, -- Item necessário. mount = 23 -- MountID. } local storage = 55501 -- Storage, só mexa se necessário. 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 msg = msg:lower(); local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'kevnan') then if getPlayerStorageValue(cid, storage) < 1 then npcHandler:say("Ah você conhece meu filho Kevnan? Que ótimo conhecer você. A vários dias ele saiu em uma jornada perigosa e até então não tenho notícias dele, você sabe algo a respeito?", cid) talkState[talkUser] = 1 else npcHandler:say("Você por aqui novamente? Você já me ajudou vingando meu filho e sou muito grato por isso.", cid) talkState[talkUser] = 0 end elseif msgcontains(msg, 'yes') then if talkState[talkUser] == 1 then npcHandler:say('Você quer algo aqui? Meu filho usava lindas botas, a vários dias ele saiu em uma jornada perigosa e até então não tenho notícias dele.', cid) talkState[talkUser] = 2 end elseif msgcontains(msg, 'cavalo') then if talkState[talkUser] == 2 then if doPlayerRemoveItem(cid, t.itemneed, 1) then npcHandler:say('Nossa, você é realmente um guerreiro muito forte. Muito obrigado por vingar a morte do meu filho, como prometido aqui está a recompensa, o cavalo de fogo, este cavalo pertencia ao meu filho, sem dúvidas o melhor cavalo já visto, você merece. Caso você perda o cavalo, você poderá recuperar com um novo coração de ethershreck.', cid) doSendMagicEffect(getPlayerPosition(cid), 13) doPlayerAddMount(cid, t.mount) setPlayerStorageValue(cid, storage, 1) talkState[talkUser] = 0 else npcHandler:say('Traga-me o coração do monstro que derrotou meu filho que irei dar um brinde que meu filho gostava muito.', cid) talkState[talkUser] = 0 end end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) ➥ Regras | Seções OTServ | Seções BOT
Postado Julho 26, 2015 9 anos Olá, eu adicionei o script, mas quando eu vou falar com ele, ele só fala a primeira mensagem "Ola Otin, bem-vindo a minha casa. Em que posso ajudar? Já alterei a fala para " if msgcontains(msg, 'help') then" e também não fala nada.. Agradeço TFS 0.4 8.71
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.