Postado Novembro 27, 2014 10 anos Olá galera do TK.com 100º Post Estou com um problema com este NPC, o Remeres Map Editor(RME) não o abre. Aqui está o scripter dele: O .Lua local tab = { city1 = {x = 46, y = 138, z = 7}, city2 = {x = 47, y = 138, z = 7}, city3 = {x = 48, y = 138, z = 7}, city4 = {x = 49, y = 138, z = 7}, city5 = {x = 45, y = 141, z = 7}, city6 = {x = 50, y = 140, z = 7}, } 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 ts = talkState[talkUser] local tef = doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) if (msgcontains(msg, 'kanto')) then ts = 1 selfSay('Quer começar sua jornada em Kanto? La voce podera escolher Charmander,Squirtle,Bulbasaur.', cid) elseif (msgcontains(msg, 'johto')) then ts = 2 selfSay('Quer começar sua jornada em Johto? La voce podera escolher Cyndaquil,Totodile,Chikorita.', cid) elseif (msgcontains(msg, 'hoenn')) then ts = 3 selfSay('Quer começar sua jornada em Hoenn? La voce podera escolher Torchic,Mudkip,Treecko.', cid) elseif (msgcontains(msg, 'sinnoh')) then ts = 4 selfSay('Quer começar sua jornada em Sinnoh? La voce podera escolher Chimchar,Piplup,Turtwig.', cid) elseif (msgcontains(msg, 'unova')) then ts = 5 selfSay('Quer começar sua jornada em Unova? La voce podera escolher Tepig,Snivy,Oshawott.', cid) elseif (msgcontains(msg, 'kalos')) then ts = 6 selfSay('Quer começar sua jornada em Kalos? La voce podera escolher Fennekin,Froakie,Chespin.', cid) elseif (msgcontains(msg, 'yes')) then if (ts == 1) then doTeleportThing(cid, tab.kantos) tef elseif (ts == 2) then doTeleportThing(cid, tab.johto) tef elseif (ts == 3) then doTeleportThing(cid, tab.hoenn) tef elseif (ts == 4) then doTeleportThing(cid, tab.sinnoh) tef elseif (ts == 5) then doTeleportThing(cid, tab.unova) tef elseif (ts == 6) then doTeleportThing(cid, tab.kalos) tef end selfSay('Boa Jornada!', cid) elseif (msgcontains(msg, 'no') and ts > 0) then ts = 0 selfSay('Ok, aguardo sua decisao!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) O .xml <npc name="Professor" script="professor.lua" walkinterval="2000" floorchange="0" speed="0"> <health now="1000" max="1000"/> <look type="1419" head="94" body="45" legs="45" feet="90" addons="0"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME| Aonde voce quer começar sua jornada {kanto}, {johto}, {hoenn}, {sinnoh}, {unova} ou {kalos}?" /> </parameters> </npc> Agradeço desde já Rep+ pra quem ajudar. UP! #UP Editado Novembro 27, 2014 10 anos por Gabriel Linha (veja o histórico de edições) Atensiosamente, Gabriel L.
Postado Novembro 27, 2014 10 anos Ué, aqui carregou normalmente, mas tenta assim: lua ocal tab = { city1 = {x = 46, y = 138, z = 7}, city2 = {x = 47, y = 138, z = 7}, city3 = {x = 48, y = 138, z = 7}, city4 = {x = 49, y = 138, z = 7}, city5 = {x = 45, y = 141, z = 7}, city6 = {x = 50, y = 140, z = 7} } 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 ts = talkState[talkUser] local tef = doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) if (msgcontains(msg, 'kanto')) then ts = 1 selfSay('Quer começar sua jornada em Kanto? La voce podera escolher Charmander,Squirtle,Bulbasaur.', cid) elseif (msgcontains(msg, 'johto')) then ts = 2 selfSay('Quer começar sua jornada em Johto? La voce podera escolher Cyndaquil,Totodile,Chikorita.', cid) elseif (msgcontains(msg, 'hoenn')) then ts = 3 selfSay('Quer começar sua jornada em Hoenn? La voce podera escolher Torchic,Mudkip,Treecko.', cid) elseif (msgcontains(msg, 'sinnoh')) then ts = 4 selfSay('Quer começar sua jornada em Sinnoh? La voce podera escolher Chimchar,Piplup,Turtwig.', cid) elseif (msgcontains(msg, 'unova')) then ts = 5 selfSay('Quer começar sua jornada em Unova? La voce podera escolher Tepig,Snivy,Oshawott.', cid) elseif (msgcontains(msg, 'kalos')) then ts = 6 selfSay('Quer começar sua jornada em Kalos? La voce podera escolher Fennekin,Froakie,Chespin.', cid) elseif (msgcontains(msg, 'yes')) then if (ts == 1) then doTeleportThing(cid, tab.kantos) tef elseif (ts == 2) then doTeleportThing(cid, tab.johto) tef elseif (ts == 3) then doTeleportThing(cid, tab.hoenn) tef elseif (ts == 4) then doTeleportThing(cid, tab.sinnoh) tef elseif (ts == 5) then doTeleportThing(cid, tab.unova) tef elseif (ts == 6) then doTeleportThing(cid, tab.kalos) tef end selfSay('Boa Jornada!', cid) elseif (msgcontains(msg, 'no') and ts > 0) then ts = 0 selfSay('Ok, aguardo sua decisao!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Ajudei? De nada \o/ Att Rusherzin
Postado Novembro 28, 2014 10 anos Autor Ué, aqui carregou normalmente, mas tenta assim: lua ocal tab = { city1 = {x = 46, y = 138, z = 7}, city2 = {x = 47, y = 138, z = 7}, city3 = {x = 48, y = 138, z = 7}, city4 = {x = 49, y = 138, z = 7}, city5 = {x = 45, y = 141, z = 7}, city6 = {x = 50, y = 140, z = 7} } 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 ts = talkState[talkUser] local tef = doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT) if (msgcontains(msg, 'kanto')) then ts = 1 selfSay('Quer começar sua jornada em Kanto? La voce podera escolher Charmander,Squirtle,Bulbasaur.', cid) elseif (msgcontains(msg, 'johto')) then ts = 2 selfSay('Quer começar sua jornada em Johto? La voce podera escolher Cyndaquil,Totodile,Chikorita.', cid) elseif (msgcontains(msg, 'hoenn')) then ts = 3 selfSay('Quer começar sua jornada em Hoenn? La voce podera escolher Torchic,Mudkip,Treecko.', cid) elseif (msgcontains(msg, 'sinnoh')) then ts = 4 selfSay('Quer começar sua jornada em Sinnoh? La voce podera escolher Chimchar,Piplup,Turtwig.', cid) elseif (msgcontains(msg, 'unova')) then ts = 5 selfSay('Quer começar sua jornada em Unova? La voce podera escolher Tepig,Snivy,Oshawott.', cid) elseif (msgcontains(msg, 'kalos')) then ts = 6 selfSay('Quer começar sua jornada em Kalos? La voce podera escolher Fennekin,Froakie,Chespin.', cid) elseif (msgcontains(msg, 'yes')) then if (ts == 1) then doTeleportThing(cid, tab.kantos) tef elseif (ts == 2) then doTeleportThing(cid, tab.johto) tef elseif (ts == 3) then doTeleportThing(cid, tab.hoenn) tef elseif (ts == 4) then doTeleportThing(cid, tab.sinnoh) tef elseif (ts == 5) then doTeleportThing(cid, tab.unova) tef elseif (ts == 6) then doTeleportThing(cid, tab.kalos) tef end selfSay('Boa Jornada!', cid) elseif (msgcontains(msg, 'no') and ts > 0) then ts = 0 selfSay('Ok, aguardo sua decisao!', cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) O RME ainda não está abrindo o Npc Atensiosamente, Gabriel L.
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.