Ir para conteúdo

Featured Replies

Postado

ola galerinha do tk, gostaria de um comando em talkactions que os player possa usar 1x por dia 

 

!machete   = ganha uma machete so pode ser usado dps de 24h

!shovel  = ganha uma shovel so pode ser usada dps de 24h

!rope = ganha uma rope so pode ser usada dps de 24h

 

é 

 

!stamina   = quando tiver com stamina abaixo de 10h utilizar esse comando para em chela toda 

 

ficarei muito grato quem fazer não e muito complexo se alguém deixar algumas funções para fazer de base tb serve ai eu faço resto abraço!  :laugh:

I like

  • Respostas 10
  • Visualizações 512
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • function onSay(cid, words, param, channel) if words == "!machete" then if getCreatureStorage(cid, 32301) - os.time() <= 0 then doCreatureSetStorage(cid, 32301, os.time() + (60 * 60 * 24))

  • Fiz minha versão mais simples e fiz outro !stamina pois o do caronte não vai fazer o que o tu pede : local items = { ["!machete"] = {32301, 2420}, ["!shovel"] = {32302, 2554}, ["!rope"] = {32303,

  • troca return false por return true

Postado
!stamina   = quando tiver com stamina abaixo de 10h utilizar esse comando para em chela toda 

 

OPSSSSS, 

Confundi stamina com soul ¬¬ , já to fazendo.

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Postado
function onSay(cid, words, param, channel)

if words == "!machete" then
   if getCreatureStorage(cid, 32301) - os.time() <= 0 then
     doCreatureSetStorage(cid, 32301,  os.time() + (60 * 60 * 24))
     doPlayerAddItem(cid, 2420, 1)
   else 
    doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32301) - os.time() ) / 60 / 60)  .. " hours, to get another ".. string.sub(words, 2) .."." )
      return true
   end

elseif words == "!shovel" then
   if getCreatureStorage(cid, 32302) - os.time() <= 0 then
     doCreatureSetStorage(cid, 32302,  os.time() + 60 * 60 * 24)
     doPlayerAddItem(cid, 2554, 1)
   else
     doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32302) - os.time() ) / 60 / 60) .. " hours, to get another ".. string.sub(words, 2) ..".")
      return true
   end

elseif words == "!rope" then
   if getCreatureStorage(cid, 32303) - os.time() <= 0 then
     doCreatureSetStorage(cid, 32303,  os.time() + 60 * 60 * 24)
     doPlayerAddItem(cid, 2120, 1)
   else
     doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32303) - os.time() ) / 60 / 60) .. " hours, to get another ".. string.sub(words, 2) ..".")
       return true
   end

elseif words == "!stamina" then
   if getCreatureStorage(cid, 32304) - os.time() <= 0 then
     doCreatureSetStorage(cid, 32304,  os.time() + 60 * 60 * 24)
     doPlayerAddStamina(cid, 60*10)
   else
     doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32304) - os.time() ) / 60 / 60) .. " hours, to get another ".. string.sub(words, 2) .." charge.")
       return true
   end
end
return true
end
<talkaction log="yes" words="!machete;!shovel;!rope;!stamina" event="script" value="gettools.lua"/>

Me enrolei numas partes, masss, ta aí...

Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado).

 

Tópicos:


 

yNlhRVC.png

 

55px-Judo_yellow_belt.svg.png

Postado
  • Autor
function onSay(cid, words, param, channel)

if words == "!machete" then
	if getCreatureStorage(cid, 32301) - os.time() <= 0 then
		doCreatureSetStorage(cid, 32301,  os.time() + (60 * 60 * 24))
		doPlayerAddItem(cid, 2420, 1)
	else 
		doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32301) - os.time() ) / 60 / 60)  .. " hours, to get another ".. string.sub(words, 2) .."." )
		return true
	end

elseif words == "!shovel" then
	if getCreatureStorage(cid, 32302) - os.time() <= 0 then
		doCreatureSetStorage(cid, 32302,  os.time() + 60 * 60 * 24)
		doPlayerAddItem(cid, 2554, 1)
	else
		doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32302) - os.time() ) / 60 / 60) .. " hours, to get another ".. string.sub(words, 2) ..".")
		return true
	end

elseif words == "!rope" then
	if getCreatureStorage(cid, 32303) - os.time() <= 0 then
		doCreatureSetStorage(cid, 32303,  os.time() + 60 * 60 * 24)
		doPlayerAddItem(cid, 2120, 1)
	else
		doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32303) - os.time() ) / 60 / 60) .. " hours, to get another ".. string.sub(words, 2) ..".")
		return true
	end

elseif words == "!stamina" then
	if getCreatureStorage(cid, 32304) - os.time() <= 0 then
		doCreatureSetStorage(cid, 32304,  os.time() + 60 * 60 * 24)
		doPlayerAddStamina(cid, 60*10)
	else
		doPlayerSendCancel(cid, "You need wait " ..  math.floor((getCreatureStorage(cid, 32304) - os.time() ) / 60 / 60) .. " hours, to get another ".. string.sub(words, 2) .." charge.")
		return true
	end
end
return true
end 
<talkaction log="yes" words="!machete;!shovel;!rope;!stamina" event="script" value="gettools.lua"/>

Me enrolei numas partes, masss, ta aí...

 

brigadão mesmo ´parece que ta tudo certo só n sei stamina tem algum comando com god que tira stamina para eu fazer test ou via mysql ? 

I like

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo