Ir para conteúdo

Featured Replies

Postado

aí galera beleza , alguém poderia me ajudar a colocar delay nessa action

 

 

 

function onUse(cid, item, frompos, item2, topos)

if getPlayerLevel(cid) >= 13 and getPlayerLevel(cid) < 17 then
 doRemoveItem(item.uid, 1)
 doSendMagicEffect(topos,8)
  doPlayerSay(cid," 200 experiance Up",19)
  doPlayerAddExp(cid, 200)

elseif getPlayerLevel(cid) > 16 and getPlayerLevel(cid) < 20 then
 doRemoveItem(item.uid, 1)
 doSendMagicEffect(topos,8)
  doPlayerSay(cid," 100 experiance Up",19)
  doPlayerAddExp(cid, 100)

elseif getPlayerLevel(cid) > 19 and getPlayerLevel(cid) < 23 then
 doRemoveItem(item.uid, 1)
 doSendMagicEffect(topos,8)
  doPlayerSay(cid," 50 experiance Up",19)
  doPlayerAddExp(cid, 50)

elseif getPlayerLevel(cid) > 22 then
 doRemoveItem(item.uid, 0)
 doSendMagicEffect(topos,2)
  doPlayerSay(cid," Desculpe, Mas você atingiu o level Máximo",19)
  doPlayerAddExp(cid, 0)

end
end

 

Mas queria colocar delay em uma parte só da script vou por uma foto pra explicar melhor

 

Editado por helix758 (veja o histórico de edições)

Postado
function onUse(cid, item, frompos, item2, topos)

local exstorage = 45718 -- any empty storage
local time = 5*60 -- hr*min*seg (5 min = 5*60)

	if exhaustion.check(cid, exstorage) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você precisa esperar antes de usar novamente.")
		return TRUE
	end

	if getPlayerLevel(cid) >= 13 and getPlayerLevel(cid) < 17 then
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(topos,8)
		doPlayerSay(cid," 200 experiance Up",19)
		doPlayerAddExp(cid, 200)

	elseif getPlayerLevel(cid) > 16 and getPlayerLevel(cid) < 20 then
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(topos,8)
		doPlayerSay(cid," 100 experiance Up",19)
		doPlayerAddExp(cid, 100)

	elseif getPlayerLevel(cid) > 19 and getPlayerLevel(cid) < 23 then
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(topos,8)
		doPlayerSay(cid," 50 experiance Up",19)
		doPlayerAddExp(cid, 50)

	elseif getPlayerLevel(cid) > 22 then
		exhaustion.set(cid, exstorage, time)
		doRemoveItem(item.uid, 0)
		doSendMagicEffect(topos,2)
		doPlayerSay(cid," Desculpe, Mas você atingiu o level Máximo",19)
		doPlayerAddExp(cid, 0)
	end
end

 

asdukeeh.jpg

Postado
  • Autor
1 hora atrás, DukeeH disse:

function onUse(cid, item, frompos, item2, topos)

local exstorage = 45718 -- any empty storage
local time = 5*60 -- hr*min*seg (5 min = 5*60)

	if exhaustion.check(cid, exstorage) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você precisa esperar antes de usar novamente.")
		return TRUE
	end

	if getPlayerLevel(cid) >= 13 and getPlayerLevel(cid) < 17 then
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(topos,8)
		doPlayerSay(cid," 200 experiance Up",19)
		doPlayerAddExp(cid, 200)

	elseif getPlayerLevel(cid) > 16 and getPlayerLevel(cid) < 20 then
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(topos,8)
		doPlayerSay(cid," 100 experiance Up",19)
		doPlayerAddExp(cid, 100)

	elseif getPlayerLevel(cid) > 19 and getPlayerLevel(cid) < 23 then
		doRemoveItem(item.uid, 1)
		doSendMagicEffect(topos,8)
		doPlayerSay(cid," 50 experiance Up",19)
		doPlayerAddExp(cid, 50)

	elseif getPlayerLevel(cid) > 22 then
		exhaustion.set(cid, exstorage, time)
		doRemoveItem(item.uid, 0)
		doSendMagicEffect(topos,2)
		doPlayerSay(cid," Desculpe, Mas você atingiu o level Máximo",19)
		doPlayerAddExp(cid, 0)
	end
end

mas tipo cara, queria só pra essa parte


elseif getPlayerLevel(cid) > 22 then
		exhaustion.set(cid, exstorage, time)
		doRemoveItem(item.uid, 0)
		doSendMagicEffect(topos,2)
		doPlayerSay(cid," Desculpe, Mas você atingiu o level Máximo",19)
		doPlayerAddExp(cid, 0)

e também não funciona 

Sem título.png

Editado por helix758 (veja o histórico de edições)

Postado
20 horas atrás, helix758 disse:

e também não funciona 

Sem título.png

Algum erro? Não entendi bem o delay só nessa parte, eu botei um exhaust ali, então só vai dar delay se o player for level maior que 22, caso contrario não vai ter delay.

asdukeeh.jpg

Postado
  • Autor
14 horas atrás, DukeeH disse:

Algum erro? Não entendi bem o delay só nessa parte, eu botei um exhaust ali, então só vai dar delay se o player for level maior que 22, caso contrario não vai ter delay.

esquece o que eu disse, Funcionou 100% , apenas eu testei na conta god por isso não foi :D 

dps coloco um negocio mole na sua mão :D 

Editado por helix758 (veja o histórico de edições)

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.8k

Informação Importante

Confirmação de Termo