Postado Junho 14, 2017 7 anos Fala Galera blz? Eu estou Criando um servidor, e sou novato. Quanto eu tendo criar o npc com o comando /n da o segunte erro. [Error - TalkAtcion Interface] data/talkactions/scripts/creature.lua:onSay Description: <LuaInterface::luaDoCreateNpc> Npc with nome " " not found. Segue Abaixo meu createure.lua function onSay(cid, words, param, channel) local func = doCreateMonster if(words:sub(2, 2) == "n") then func = doCreateNpc end local pid = cid local t = string.explode(param, ",") if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end local position = getCreaturePosition(pid) local effect = CONST_ME_MAGIC_RED local ret = func(t[1], position, false, true) if(tonumber(ret) == nil) then effect = CONST_ME_POFF doPlayerSendDefaultCancel(cid, (ret == false and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM)) end doSendMagicEffect(position, effect) return true end Muitor Obrigado. Se caso necessitem de alguma coisa a mais me avisa que eu posto.
Postado Junho 14, 2017 7 anos Teste com este: function onSay(cid, words, param, channel) local func = doCreateMonster if(words:sub(2, 2) == "n") then func = doCreateNpc end local pid, t = cid, string.explode(param, ",") if(t[2]) then pid = getPlayerByNameWildcard(t[2]) if(not pid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.") return true end end local position, effect = getCreaturePosition(pid), CONST_ME_MAGIC_RED errors(false) local ret = func(t[1], position) errors(true) if(tonumber(ret) == nil) then effect = CONST_ME_POFF doPlayerSendDefaultCancel(cid, (not ret and RETURNVALUE_NOTPOSSIBLE or RETURNVALUE_NOTENOUGHROOM)) end doSendMagicEffect(position, effect) return true end Editado Junho 14, 2017 7 anos por lordzetros (veja o histórico de edições) Feliz daquele que ensina o que sabe, e aprende o que ensina.
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.