Ir para conteúdo
  • Cadastre-se

(Resolvido)Erro de Exasuted?!


Ir para solução Resolvido por ikaroangelo21,

Posts Recomendados

[Error - TalkAction Interface]
data/talkactions/scripts/bless.lua:onSay
Description:
data/lib/034-exhaustion.lua:17: attempt to compare number with string
stack traceback:
        data/lib/034-exhaustion.lua:17: in function 'get'
        data/talkactions/lib/talkactions.lua:3: in function 'checkExhausted'
        data/talkactions/scripts/bless.lua:2: in function <data/talkactions/scripts/bless.lua:1>
Screenshot_1.thumb.png.f8b4cfd90b110c70180876c06c13a068.png

 

Funcionava normal mas do nada paro o que pode ser?

 

 

Engraçado que apenas 1 player causa isso no servidor, consequência não derruba OT nem nada, porem o coitado não consegue mais fazer bless! A lembrando ele usa comando de Bless via elfbot.

function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 2)) then
	return true
end

if (getPlayerBlessing(cid,1)) then
	return doPlayerSendTextMessage(cid,25,"Você já possui bless.")
end
	
	local position = getCreaturePosition(cid)
	if getPlayerLevel(cid) <= 79 then
		if getPlayerMoney(cid) >= 50000 then
			if doPlayerRemoveMoney(cid, 50000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
				
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 50k!")
		end
		
	elseif getPlayerLevel(cid) >= 80 and getPlayerLevel(cid) <= 99 then
		if getPlayerMoney(cid) >= 65000 then
			if doPlayerRemoveMoney(cid, 65000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 65k!")
		end
		
	elseif getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 129 then
		if getPlayerMoney(cid) >= 80000 then
			if doPlayerRemoveMoney(cid, 80000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 80k!")
		end
		
	elseif getPlayerLevel(cid) >= 130 and getPlayerLevel(cid) <= 199 then
		if getPlayerMoney(cid) >= 100000 then
			if doPlayerRemoveMoney(cid, 100000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 100k!")
		end
		
	elseif getPlayerLevel(cid) >= 200 then
		if getPlayerMoney(cid) >= 150000 then
			if doPlayerRemoveMoney(cid, 150000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 150k!")
		end
    end
    return true
end

Script da Bless usado no talkations!

Editado por Pifafa (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Em 27/03/2020 em 22:33, Pifafa disse:

[Error - TalkAction Interface]
data/talkactions/scripts/bless.lua:onSay
Description:
data/lib/034-exhaustion.lua:17: attempt to compare number with string
stack traceback:
        data/lib/034-exhaustion.lua:17: in function 'get'
        data/talkactions/lib/talkactions.lua:3: in function 'checkExhausted'
        data/talkactions/scripts/bless.lua:2: in function <data/talkactions/scripts/bless.lua:1>
Screenshot_1.thumb.png.f8b4cfd90b110c70180876c06c13a068.png

 

Funcionava normal mas do nada paro o que pode ser?

 

 

Engraçado que apenas 1 player causa isso no servidor, consequência não derruba OT nem nada, porem o coitado não consegue mais fazer bless! A lembrando ele usa comando de Bless via elfbot.


function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 2)) then
	return true
end

if (getPlayerBlessing(cid,1)) then
	return doPlayerSendTextMessage(cid,25,"Você já possui bless.")
end
	
	local position = getCreaturePosition(cid)
	if getPlayerLevel(cid) <= 79 then
		if getPlayerMoney(cid) >= 50000 then
			if doPlayerRemoveMoney(cid, 50000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
				
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 50k!")
		end
		
	elseif getPlayerLevel(cid) >= 80 and getPlayerLevel(cid) <= 99 then
		if getPlayerMoney(cid) >= 65000 then
			if doPlayerRemoveMoney(cid, 65000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 65k!")
		end
		
	elseif getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 129 then
		if getPlayerMoney(cid) >= 80000 then
			if doPlayerRemoveMoney(cid, 80000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 80k!")
		end
		
	elseif getPlayerLevel(cid) >= 130 and getPlayerLevel(cid) <= 199 then
		if getPlayerMoney(cid) >= 100000 then
			if doPlayerRemoveMoney(cid, 100000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 100k!")
		end
		
	elseif getPlayerLevel(cid) >= 200 then
		if getPlayerMoney(cid) >= 150000 then
			if doPlayerRemoveMoney(cid, 150000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 150k!")
		end
    end
    return true
end

Script da Bless usado no talkations!

 

Tenta assim: 

 

function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 20)) then
	return true
end

if (getPlayerBlessing(cid,1)) then
	return doPlayerSendTextMessage(cid,25,"Você já possui bless.")
end
	
	local position = getCreaturePosition(cid)
	if getPlayerLevel(cid) <= 79 then
		if getPlayerMoney(cid) >= 50000 then
			if doPlayerRemoveMoney(cid, 50000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
				
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 50k!")
		end
		
	elseif getPlayerLevel(cid) >= 80 and getPlayerLevel(cid) <= 99 then
		if getPlayerMoney(cid) >= 65000 then
			if doPlayerRemoveMoney(cid, 65000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 65k!")
		end
		
	elseif getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 129 then
		if getPlayerMoney(cid) >= 80000 then
			if doPlayerRemoveMoney(cid, 80000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 80k!")
		end
		
	elseif getPlayerLevel(cid) >= 130 and getPlayerLevel(cid) <= 199 then
		if getPlayerMoney(cid) >= 100000 then
			if doPlayerRemoveMoney(cid, 100000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 100k!")
		end
		
	elseif getPlayerLevel(cid) >= 200 then
		if getPlayerMoney(cid) >= 150000 then
			if doPlayerRemoveMoney(cid, 150000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 150k!")
		end
    end
    return true
end

 

Link para o post
Compartilhar em outros sites
5 horas atrás, ikaroangelo21 disse:

Tenta assim: 

 


function onSay(cid, words, param)
if(not checkExhausted(cid, 666, 20)) then
	return true
end

if (getPlayerBlessing(cid,1)) then
	return doPlayerSendTextMessage(cid,25,"Você já possui bless.")
end
	
	local position = getCreaturePosition(cid)
	if getPlayerLevel(cid) <= 79 then
		if getPlayerMoney(cid) >= 50000 then
			if doPlayerRemoveMoney(cid, 50000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
				
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 50k!")
		end
		
	elseif getPlayerLevel(cid) >= 80 and getPlayerLevel(cid) <= 99 then
		if getPlayerMoney(cid) >= 65000 then
			if doPlayerRemoveMoney(cid, 65000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 65k!")
		end
		
	elseif getPlayerLevel(cid) >= 100 and getPlayerLevel(cid) <= 129 then
		if getPlayerMoney(cid) >= 80000 then
			if doPlayerRemoveMoney(cid, 80000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 80k!")
		end
		
	elseif getPlayerLevel(cid) >= 130 and getPlayerLevel(cid) <= 199 then
		if getPlayerMoney(cid) >= 100000 then
			if doPlayerRemoveMoney(cid, 100000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 100k!")
		end
		
	elseif getPlayerLevel(cid) >= 200 then
		if getPlayerMoney(cid) >= 150000 then
			if doPlayerRemoveMoney(cid, 150000) then
				for b=1, 5 do
					doPlayerAddBlessing(cid, b)
				end
					
				doPlayerSendTextMessage(cid, 27, "Você comprou 'All Blessings'.")
				doCreatureSay(cid, "Blessed!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(position, 49)
			else
				doPlayerSendTextMessage(cid,25,"ERROR! Please contact the administrator.")
			end
		else
			doPlayerSendTextMessage(cid,25,"Você não tem dinheiro suficiente. Você precisa de 150k!")
		end
    end
    return true
end

 

 

Obrigado pela ajuda, mas descobri que o que faz da erro no ot é uma Lib vou posta pra você ver, talvez saiba o que é!
Pelo que entendo ela seta errado na database, criando um simbolos em alguns player, deixando eles eternamente exausted!

 

034-exhaustion.lua

uma lib!

 

exhaustion =
{
	check = function (cid, storage)
		if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
			return false
		end

		return getCreatureStorage(cid, storage) >= os.time()
	end,

	get = function (cid, storage)
		if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
			return false
		end

		local exhaust = getCreatureStorage(cid, storage)
		if(exhaust > 0) then
			local left = exhaust - os.time()
			if(left >= 0) then
				return left
			end
		end

		return false
	end,

	set = function (cid, storage, time)
		doCreatureSetStorage(cid, storage, os.time() + time)
	end,

	make = function (cid, storage, time)
		local exhaust = exhaustion.get(cid, storage)
		if(not exhaust) then
			exhaustion.set(cid, storage, time)
			return true
		end

		return false
	end
}

obrigado por tenta ajudar!

Link para o post
Compartilhar em outros sites
  • Solução
14 minutos atrás, Pifafa disse:

Obrigado pela ajuda, mas descobri que o que faz da erro no ot é uma Lib vou posta pra você ver, talvez saiba o que é!
Pelo que entendo ela seta errado na database, criando um simbolos em alguns player, deixando eles eternamente exausted!

 

034-exhaustion.lua

uma lib!

 


exhaustion =
{
	check = function (cid, storage)
		if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
			return false
		end

		return getCreatureStorage(cid, storage) >= os.time()
	end,

	get = function (cid, storage)
		if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
			return false
		end

		local exhaust = getCreatureStorage(cid, storage)
		if(exhaust > 0) then
			local left = exhaust - os.time()
			if(left >= 0) then
				return left
			end
		end

		return false
	end,

	set = function (cid, storage, time)
		doCreatureSetStorage(cid, storage, os.time() + time)
	end,

	make = function (cid, storage, time)
		local exhaust = exhaustion.get(cid, storage)
		if(not exhaust) then
			exhaustion.set(cid, storage, time)
			return true
		end

		return false
	end
}

obrigado por tenta ajudar!

 

exhaustion =
{
	check = function (cid, storage)
		if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
			return false
		end

		return getPlayerStorageValue(cid, storage) >= os.time()
	end,

	get = function (cid, storage)
		if(getPlayerFlagValue(cid, PLAYERFLAG_HASNOEXHAUSTION)) then
			return false
		end

		local exhaust = getPlayerStorageValue(cid, storage)
		if(exhaust > 0) then
			local left = exhaust - os.time()
			if(left >= 0) then
				return left
			end
		end

		return false
	end,

	set = function (cid, storage, time)
		setPlayerStorageValue(cid, storage, os.time() + time)
	end,

	make = function (cid, storage, time)
		local exhaust = exhaustion.get(cid, storage)
		if(not exhaust) then
			exhaustion.set(cid, storage, time)
			return true
		end

		return false
	end
}

 

Link para o post
Compartilhar em outros sites
1 minuto atrás, ikaroangelo21 disse:

Funções:

 


doCreatureSetStorage

setPlayerStorageValue

 

Vou testa, mas devido esse problema acabei, modificando variooos scripts até você aparece para me ajuda kkk ( teria algum problema meu ot fica sem isso?)

Fez isso!
image.png.287a70a00421a2d0500f3718e30cc5af.png

Criando então exausted para sempre na pessoa!

Link para o post
Compartilhar em outros sites
Em 29/03/2020 em 19:42, Pifafa disse:

Vou testa, mas devido esse problema acabei, modificando variooos scripts até você aparece para me ajuda kkk ( teria algum problema meu ot fica sem isso?)

Fez isso!
image.png.287a70a00421a2d0500f3718e30cc5af.png

Criando então exausted para sempre na pessoa!

 

E em players?

Link para o post
Compartilhar em outros sites
19 horas atrás, ikaroangelo21 disse:

E em players?

 

Player Storages.

Cria aquilo ali, hoje notei que apareceu aparentemente mesmo erro agora para uma outra situação.

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo