Ja testei varios Script alguns da erro outros nem da sinal de vida nem erro nem nada kkkk. Testei 1 aqui agora por npc você fala com ele e dps clica no bau ai da erro.
Erro
[10/05/2020 12:55:18] [Error - Npc interface]
[10/05/2020 12:55:18] datapack/npc/scripts/firstitems.lua:onCreatureSay
[10/05/2020 12:55:18] Description:
[10/05/2020 12:55:18] datapack/npc/scripts/firstitems.lua:22: attempt to call global 'getCatchMode' (a nil value)
[10/05/2020 12:55:18] stack traceback:
[10/05/2020 12:55:18] datapack/npc/scripts/firstitems.lua:22: in function <datapack/npc/scripts/firstitems.lua:9>
Arquivo
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 onThink() npcHandler:onThink() end
function onCreatureSay(cid, type1, msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if isInArray({"hi", "oi", "ola", "olá"}, msg:lower()) then
if getPlayerStorageValue(cid, 62364) >= 1 then
return doPlayerSendCancel(cid, "Quanto tempo! volte aqui sempre que puder")
end
selfSay("Olá "..getCreatureName(cid)..", seja bem vindo! gostaria de escolher algum pokémon?", cid)
talkState[talkUser] = 1
elseif talkState[talkUser] == 1 and isInArray({"yes", "sim", "help"}, msg:lower()) then
if getPlayerStorageValue(cid, 62364) >= 1 then
return doPlayerSendCancel(cid, "Quanto tempo! volte aqui sempre que puder")
end
local taskMode = getCatchMode(cid)
local pokemonsToCatch = getPokemonsToCatch(cid)
selfSay("Eu tenho aqui comigo do tipo fogo {Bulbasaur}, {Charmander} e {Squirtle}. Você gostaria de ter qual?", cid)
talkState[talkUser] = 2
elseif talkState[talkUser] == 2 and isInArray({"Bulbasaur", "Charmander", "Squirtle"}, doCorrectString(string.lower(msg))) then
if getPlayerStorageValue(cid, 62364) >= 1 then
return doPlayerSendCancel(cid, "Quanto tempo! volte aqui sempre que puder")
end
selfSay("O "..doCorrectString(msg).." é oficialmente seu primeiro pokémon.", cid)
selfSay("Você recebeu alguns itens que irá lhe ajudar em sua jornada.", cid)
createBall(cid, doCorrectString(msg), 0, "true")
doPlayerAddItem(cid, 2394,50)
doPlayerAddItem(cid, 2152, 15)
doPlayerAddItem(cid, 15774,10)
doPlayerAddItem(cid, 15814,1)
doTeleportThing(cid, {x = 993, y = 1022, z = 7})
setPlayerStorageValue(cid, 62364, 1)
talkState[talkUser] = 1
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())






info
Grupo: Campones
Registrado: 13/09/16
Posts: 96
Reputação: +4
Gênero: Masculino
Quando cria Nova conta vai para pegar o pokemon inicial, Clica no bau que tem as cordenadas no mapa tudo configurado, Ao clicar no bau o player e teletransportado para o CP de Saffron não ocorre nenhum erro, os itens iniciais tudo vem porem so o pokemon que não aparece. Não da erro nem nada, so que a pokebola do pokemon não aparece. Alguem pode me ajudar.
AHHH, Não sei se tem algo a ver mais na pasta mods do meu servidor tem um arquivo que eu removi chamado firstitems. Sera que ele e Essencial para o servidor?.
Aqui o arquivo se alguem quiser ver.
<?xml version="1.0" encoding="UTF-8"?>
<mod name="First Items" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">
<config name="firstitems_config">
<![CDATA[ config = {
storage = 30001,
items = {1988, 1987, 2382, 2120, 2580, 2550,}
-- 2382 (pokedex) ok
-- 2550 (order) ok
-- 1987 (bag) ok
-- 1988 (badge case) ok
-- 2120 (rope) ok
}
]]>
</config>
<event type="login" name="FirstItems" event="script">
<![CDATA[
domodlib('firstitems_config')
function onLogin(cid)
if getCreatureName(cid) == "Account Manager" then
doSetCreatureOutfit(cid, {lookType = 655}, -1)
return true
end
if getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid > 0 then
return true
end
for _, id in ipairs(config.items) do
doPlayerAddItem(cid, id, 1)
end
local bag = getPlayerItemById(cid, false, 1988).uid
doAddContainerItem(bag, 12267, 1)
doAddContainerItem(bag, 12266, 1)
doAddContainerItem(bag, 12264, 1)
doAddContainerItem(bag, 12265, 1)
doAddContainerItem(bag, 12263, 1)
doAddContainerItem(bag, 12262, 1)
doAddContainerItem(bag, 12261, 1)
doAddContainerItem(bag, 12260, 1)
return true
end
]]></event>
</mod>
Lembrando que quando criava uma nova conta o player aparecia sem Outfit não podia trocar, ficava sem nada tipo brilhante, igual quando ADM usa o comando /ghost.