Ola pessoa do Tk, esta dando esse erro na distrito quando vou dialogar com o npc
Esse é bomber.lua
--[[
:::::::::::::::::::::::::::::::::::::
::: Script feita por Marshmello :::
::: Não remova os creditos Plase :::
:::::::::::::::::::::::::::::::::::::
]]
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
spawnPlayr = {
playerS1 = {x = 978, y = 467, z = 7}, --Lugar onde o player1 vai spawn
playerS2 = {x = 978, y = 447, z = 7}, --Lugar onde o player2 vai spawn
playerS3 = {x = 948, y = 447, z = 7}, --Lugar onde o player2 vai spawn
playerS4 = {x = 948, y = 467, z = 7},--Lugar onde o player3 vai spawn
}
-- não mexa daqui pra baixo
global = {
playerS1 = 14721,
playerS2 = 14722,
playerS3 = 14723,
playerS4 = 14722,
}
globalName = {
playerS1 = 14731,
playerS2 = 14732,
playerS3 = 14733,
playerS4 = 14732,
}
----------RESTO DAS CONFIGS ESTA NA LIB
local function puxarPlayers()
puxar1 = getCreatureByName(getGlobalStorageValue(globalName.playerS1))
puxar2 = getCreatureByName(getGlobalStorageValue(globalName.playerS2))
puxar2 = getCreatureByName(getGlobalStorageValue(globalName.playerS3))
puxar2 = getCreatureByName(getGlobalStorageValue(globalName.playerS4))
doTeleportThing(puxar1, spawnPlayr.playerS1)
doTeleportThing(puxar2, spawnPlayr.playerS2)
doTeleportThing(puxar3, spawnPlayr.playerS3)
doTeleportThing(puxar4, spawnPlayr.playerS4)
Bombermon.resetPlayerConfigs(puxar1)
Bombermon.resetPlayerConfigs(puxar2)
Bombermon.resetPlayerConfigs(puxar3)
Bombermon.resetPlayerConfigs(puxa4)
Bombermon.resetArea()
setGlobalStorageValue(global.playerS1, -1)
setGlobalStorageValue(global.playerS2, -1)
setGlobalStorageValue(global.playerS3, -1)
setGlobalStorageValue(global.playerS4, -1)
setPlayerStorageValue(puxar1, 14731,-1)
setPlayerStorageValue(puxar2, 14731,-1)
setPlayerStorageValue(puxar3, 14731,-1)
setPlayerStorageValue(puxar4, 14731,-1)
setPlayerStorageValue(puxar1, 77947, 1)
setPlayerStorageValue(puxar2, 77947, 1)
setPlayerStorageValue(puxar3, 77947, 1)
setPlayerStorageValue(puxar4, 77947, 1)
doPlayerSendTextMessage(puxar1, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
doPlayerSendTextMessage(puxar2, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
doPlayerSendTextMessage(puxar3, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
doPlayerSendTextMessage(puxar4, 22, "Para soltar a bomba digite (!bomb) ou adicione o comando em sua hotkey!")
end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
spawnPlayr = {
playerS1 = {x = 1079, y = 198, z = 8},
playerS2 = {x = 1057, y = 198, z = 8},
playerS3 = {x = 1057, y = 218, z = 8},
playerS4 = {x = 1079, y = 2018, z = 8},
}
global = {
playerS1 = 14721,
playerS2 = 14722,
playerS3 = 14723,
playerS4 = 14722,
}
globalName = {
playerS1 = 14731,
playerS2 = 14732,
playerS3 = 14733,
playerS4 = 14732,
}
if msgcontains(msg, 'sim') or msgcontains(msg, 'yes') then
local areaBomb = {fromx = 1057, fromy = 198, fromz = 8, tox = 1079, toy = 218, toz = 8}
local storage = 72821168
-- if getPlayerStorageValue(cid, storage) == 0 then
-- selfSay('Você precisa está logado no new client para jogar o bombermon', cid)
-- sendDialogNpc(cid, getNpcCid(),'Você precisa está logado no new client para jogar o bombermon')
-- return true
-- end
if #getPlayersInArea(areaBomb) > 0 then
selfSay('Você precisa esperar acabar uma rodada para entrar no bombermon', cid)
sendDialogNpc(cid, getNpcCid(),'Você precisa esperar acabar uma rodada para entrar no bombermon')
return true
end
if getPlayerStorageValue(cid,14731 ) > 0 then
selfSay('Você já está na fila, por favor aguarde', cid)
sendDialogNpc(cid, getNpcCid(),'Você já está na fila, por favor aguarde', cid)
return true
end
if getGlobalStorageValue(global.playerS1) == -1 and getGlobalStorageValue(global.playerS2) == -1 and getGlobalStorageValue(global.playerS3) == -1 and getGlobalStorageValue(global.playerS4) == -1 then
if doPlayerRemoveMoney(cid, Bombermon.Custo) then
if getGlobalStorageValue(844664) < 0 then
atualPremio = 0
else
atualPremio = getGlobalStorageValue(844664)
end
setGlobalStorageValue(844564, atualPremio + 1)
selfSay('Você entrou na fila de espera, Aguarde os outros jogadores para iniciar', cid)
sendDialogNpc(cid, getNpcCid(),'Você entrou na fila de espera, Aguarde os outros jogadores para iniciar')
setGlobalStorageValue(globalName.playerS1, getPlayerName(cid))
setGlobalStorageValue(global.playerS1, 1)
setPlayerStorageValue(cid, 14731,1)
addEvent(function()
puxarPlayers()
end, 5*1000)
else
selfSay('Você não tem 10 Hds para entrar no bombermon')
end
elseif getGlobalStorageValue(global.playerS1) == 1 and getGlobalStorageValue(global.playerS2) == -1 and getGlobalStorageValue(global.playerS3) == -1 and getGlobalStorageValue(global.playerS4) == -1 then
if doPlayerRemoveMoney(cid, Bombermon.Custo) then
if getGlobalStorageValue(844664) < 0 then
atualPremio = 0
else
atualPremio = getGlobalStorageValue(844664)
end
setGlobalStorageValue(844564, atualPremio + 1)
selfSay('Você entrou na fila de espera, Aguarde os outros jogadores para iniciar', cid)
sendDialogNpc(cid, getNpcCid(),'Você entrou na fila de espera, Aguarde os outros jogadores para iniciar')
setGlobalStorageValue(globalName.playerS2, getPlayerName(cid))
setGlobalStorageValue(global.playerS2, 1)
setPlayerStorageValue(cid, 14731,1)
else
selfSay('Você não tem 10 Hds para entrar no bombermon')
end
elseif getGlobalStorageValue(global.playerS1) == 1 and getGlobalStorageValue(global.playerS2) == 1 and getGlobalStorageValue(global.playerS3) == -1 and getGlobalStorageValue(global.playerS4) == -1 then
if doPlayerRemoveMoney(cid, Bombermon.Custo) then
if getGlobalStorageValue(844664) < 0 then
atualPremio = 0
else
atualPremio = getGlobalStorageValue(844664)
end
setGlobalStorageValue(844564, atualPremio + 1)
selfSay('Você entrou na fila de espera, Aguarde os outros jogadores para iniciar', cid)
sendDialogNpc(cid, getNpcCid(),'Você entrou na fila de espera, Aguarde os outros jogadores para iniciar')
setGlobalStorageValue(globalName.playerS3, getPlayerName(cid))
setGlobalStorageValue(global.playerS3, 1)
setPlayerStorageValue(cid, 14731,1)
else
selfSay('Você não tem 10 Hds para entrar no bombermon')
end
elseif getGlobalStorageValue(global.playerS1) == 1 and getGlobalStorageValue(global.playerS2) == 1 and getGlobalStorageValue(global.playerS3) == 1 and getGlobalStorageValue(global.playerS4) == -1 then
if doPlayerRemoveMoney(cid, Bombermon.Custo) then
if getGlobalStorageValue(844664) < 0 then
atualPremio = 0
else
atualPremio = getGlobalStorageValue(844664)
end
setGlobalStorageValue(844564, atualPremio + 1)
selfSay('o Jogo irar iniciar em 5 segundos Preparece!!', cid)
setGlobalStorageValue(globalName.playerS4, getPlayerName(cid))
setGlobalStorageValue(global.playerS4, 1)
setPlayerStorageValue(cid, 14731,1)
addEvent(function()
puxarPlayers()
end, 5*1000)
else
selfSay('Você não tem 10 Hds para entrar no bombermon')
end
end
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.