Ir para conteúdo

Featured Replies

Postado

TFS 0,4 rev 3777 tibia client version 8,6

Hello, i need help to make talkaction to this exp mod:

 

But anything i tries doesnt work, or it gets LUACREATURENOTFOUND or no errors in console,or shows some pretty strange amounts ;x 

 

those are my tries , ofc i added to mod talkaction etc ;p

if getPlayerStorageValue(cid, config.storage) == 1  then

  doPlayerSendCancel(cid, "The EXP POTION Effect Ends in ".. getPlayerStorageValue(cid, config.storage, os.time()+config.time)..". ")
  
  
  
  
    doPlayerSendCancel(cid, "The EXP POTION Effect Ends in "..config.time..". ") to pokazuje ciagle config.time
	
	
	
	
	function onSay(cid)
if isPlayer then
  if getPlayerStorageValue(cid, config.register) == 1 and getPlayerStorageValue(cid, config.storage) >= os.time() then

    doPlayerSendCancel(cid, "The EXP POTION Effect Ends in "..getPlayerStorageValue(cid, config.storage, os.time()+config.time)..". ")
	
	
	
	
	
	
	function onSay(cid)
if isPlayer then

if exhaustion.check(cid, config.storage, os.time()+config.time) then
		doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Your bonus experience is still active. Left: ' ..exhaustion.get(cid, config.storage, os.time()+config.time) ..' seconds.')
	
	else
	doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'You havent used any exp boost!')
	end
	end
	return true


end



  if getPlayerStorageValue(cid, config.register) == 1 and getPlayerStorageValue(cid, config.storage) >= os.time() then

    doPlayerSendCancel(cid, "The EXP POTION Effect Ends in "..getPlayerStorageValue(cid,os.time()+config.time)..". ")
	
	to sie ENDS IN -1
	creaturenot found
	
	
	
		function onSay(cid)
if isPlayer then
  if getPlayerStorageValue(cid, config.register) == 1 and getPlayerStorageValue(cid, config.storage) >= os.time() then
local  i == (config.time*60-(os.time()-getPlayerStorageValue(cid, storage)))
    doPlayerSendCancel(cid, "The EXP POTION Effect Ends in ".. getPlayerStorageValue(cid, config.time)..". ")
doPlayerSendCancel ((config.time*60-(os.time()-getPlayerStorageValue(cid, storage)))-i)*1000, cid, "O Efeito da Potion Termina em "..a..".")
	
	else
	    doPlayerSendCancel(cid, "The EXP POTION isnt active. ")
	end
	end
	return true
	end

 

Postado
  • Autor

Ok i have solved the problem by adding and using this talkaction:

 

function onSay(cid)


 

 

local last = math.floor((getPlayerStorageValue(cid, 10000) - os.time())/60)  -- minutes

local last2 = ((getPlayerStorageValue(cid, 10000) - os.time()))  -- seconds

 

 

 

 

 

 

if isPlayer then

if getPlayerStorageValue(cid, config.register) == 1 then

    doPlayerSendCancel(cid, 'Your bonus experience time  : '.. last2.. ' seconds.')

end

 

if getPlayerStorageValue(cid, config.register) == 0 then

        doPlayerSendCancel(cid, 'You dont have any exp bonus!')

        end

    end

    return true

end[/CODE]

 

But got another problem, even if i use:

    doPlayerSendCancel(cid, 'Your bonus experience time  : '.. last.. ' : '.. last2.. ' .')

 

It show me:

 

Your bonus experience time 2:120

So here is the problem how to convert it to show hh:mm:ss

Like it should be time 2:00 then 1:59 etc ;p not to count both together, please help ;x

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo