Postado Janeiro 13, 2012 13 anos bota esse 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(msgcontains(msg,'raças'))then selfSay('Eu vou lhe falar um pouco mais sobre as raças, qual você gostaria de conhecer melhor? {orc}, {dwarf}, {elf}',cid) if(msgcontains(msg,'orc'))then selfSay('Os orcs são uma raça muito forte, blá blaá blá',cid) selfSay('Você deseja {ser um orc}?',cid) if(msgcontains(msg,'ser um orc'))then if (getPlayerVocation(cid)==0)then doPlayerSetVocation(cid,1) doPlayerAddOutfit(cid,5, 1) doPlayerRemoveOutfit(cid,136, 1) else selfSay('Você já é de uma raça!',cid) end end end if(msgcontains(msg,'dwarf'))then selfSay('Os dwarfs são uma raça muito forte, blá blaá blá',cid) selfSay('Você deseja {ser um dwarf}?',cid) if(msgcontains(msg,'ser um dwarf'))then if (getPlayerVocation(cid)==0)then doPlayerSetVocation(cid,2) doPlayerAddOutfit(cid,69, 1) doPlayerRemoveOutfit(cid,136, 1) else selfSay('Você já é de uma raça!',cid) end end end if(msgcontains(msg,'elf'))then selfSay('Os dwarfs são uma raça muito forte, blá blaá blá',cid) selfSay('Você deseja {ser um elf}?',cid) if(msgcontains(msg,'ser um elf'))then if (getPlayerVocation(cid)==0)then doPlayerSetVocation(cid,3) doPlayerAddOutfit(cid,63, 1) doPlayerRemoveOutfit(cid,136, 1) else selfSay('Você já é de uma raça!',cid) end end end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Postado Janeiro 13, 2012 13 anos Autor Agora não deu falha nem uma ao iniciar o servidor, porém quando ele pergunta para mim saber mais sobre as raças, e eu respondo algumas delas, não acontece nada.
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.