Postado Junho 17, 2015 10 anos então galera meu npc está todo configurado mais a unica coisa que ele fala é I have been expecting you alguem poderia me ajudar? meu script 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 if getPlayerStorageValue(cid, 157171) == 4 then return true end if((msgcontains(msg, 'hi') or msgcontains(msg, 'ola'))) then selfSay('Bem Vindo ao Mundo Pokemon! Voce gostaria de ser um mestre pokemon?', cid) talkState[talkUser] = 0 elseif((msgcontains(msg, 'yes') or msgcontains(msg, 'sim')) and (getDistanceToCreature(cid) <= 3))then doPlayerSetVocation(cid, 1) selfSay('Muito Bom! Agora me Fale qual sua cidade natal?', cid) talkState[talkUser] = 3 elseif((msgcontains(msg, 'Saffron')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 5) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Cerulean')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 4) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Fuchsia')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 9) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Lavender')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 7) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) elseif ((msgcontains(msg, 'Viridian')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 2) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Pewter')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 3) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Vermilion')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 8) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Cinnabar')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 10) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif ((msgcontains(msg, 'Celadon')) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 3)then doPlayerSetTown(cid, 6) selfSay('Agora escolha seu Pokemon Inicial? (Bulbasaur, Charmander ou Squirtle?)', cid) talkState[talkUser] = 4 elseif((msgcontains(msg, 'Charmander') ) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 4)then doPokemonToPlayer(cid, "Charmander") selfSay('Agora voce tem um pokemon e pode seguir sua Jornada, Ate Ate logo!', cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 157171, 4) elseif((msgcontains(msg, 'Bulbasaur') ) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 4)then doPokemonToPlayer(cid, "Bulbasaur") selfSay('Agora voce tem um pokemon e pode seguir sua Jornada, Ate Ate logo!', cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 157171, 4) elseif((msgcontains(msg, 'Squirtle') ) and (getDistanceToCreature(cid) <= 3) and talkState[talkUser] == 4)then doPokemonToPlayer(cid, "Squirtle") selfSay('Agora voce tem um pokemon e pode seguir sua Jornada, Ate Ate logo!', cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)), false) setPlayerStorageValue(cid, 157171, 4) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) oeço desculpas se estiver em local errado
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.