Ir para conteúdo

Featured Replies

Postado

Galera se alguém poder me ajudar a colocar exausted nessa script eu ficaria muito grato .

 

Script :

Citar

local exhaust = createConditionObject(CONDITION_EXHAUST) 
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) 

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if(not isPlayer(itemEx.uid)) then
return FALSE
end

if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end

doAddCondition(cid, exhaust)
doCreatureAddMana(itemEx.uid, (getCreatureMaxMana(itemEx.uid)))
doCreatureAddHealth(itemEx.uid, (getCreatureMaxHealth(itemEx.uid)))
doSendMagicEffect(getThingPos(itemEx.uid), 5)
doCreatureSay(itemEx.uid, "I feel powerful!", TALKTYPE_ORANGE_1) 
doRemoveItem(item.uid, 1)
return TRUE 
end

 

  • Respostas 5
  • Visualizações 546
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Esta é uma mensagem automática! Este tópico foi movido para a área correta. Pedimos que você leia as regras do fórum.  

  • local RemoveOnUse,storage,exausted = true,97777,30 function onUse(cid, item, fromPosition, itemEx, toPosition)  if getPlayerStorageValue(cid, storage) >= os.time() then return doPlayerSendCancel(c

Posted Images

Postado
  • Diretor

Esta é uma mensagem automática! Este tópico foi movido para a área correta.
Pedimos que você leia as regras do fórum.

Spoiler

This is an automated message! This topic has been moved to the correct area.
Please read the forum rules.

 

 

20230912_034613.png.cf49b650c34dd7d7b1f79bd49c70f53c.png

Eu sou um entusiasta da programação apaixonado por ajudar a comunidade open source a crescer. Sempre em busca de novos desafios e oportunidades para contribuir com meu código.  #OpenSource #Programação #Contribuição

 

Postado
6 horas atrás, leozincorsair disse:

Galera se alguém poder me ajudar a colocar exausted nessa script eu ficaria muito grato .

 

Script :

 

acredito eu que o lugar que se deve alterar é onde esta parte aqui : setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))  ( onde o - 100 é o valor que voce deve alterar para sua preferência).

Teste e deixe nos comentarios se te ajudei ou de um gostei ^^

Postado


local RemoveOnUse,storage,exausted = true,97777,30

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if getPlayerStorageValue(cid, storage) >= os.time() then
return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") end
if(not isPlayer(itemEx.uid)) then
return FALSE
end
doAddCondition(cid, exhaust)
doCreatureAddMana(itemEx.uid, (getCreatureMaxMana(itemEx.uid)))
doCreatureAddHealth(itemEx.uid, (getCreatureMaxHealth(itemEx.uid)))
doSendMagicEffect(getThingPos(itemEx.uid), 5)
doCreatureSay(itemEx.uid, "I feel powerful!", TALKTYPE_ORANGE_1) 
setPlayerStorageValue(cid, storage, os.time()+exausted) 
if RemoveOnUse == true then
doRemoveItem(item.uid, 1)
end
return TRUE 
end

 

Coloquei 30 segundos, se quiser trocar é em > true,97777,30

Postado
  • Autor
2 horas atrás, Noob II disse:

 


local RemoveOnUse,storage,exausted = true,97777,30

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if getPlayerStorageValue(cid, storage) >= os.time() then
return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") end
if(not isPlayer(itemEx.uid)) then
return FALSE
end
doAddCondition(cid, exhaust)
doCreatureAddMana(itemEx.uid, (getCreatureMaxMana(itemEx.uid)))
doCreatureAddHealth(itemEx.uid, (getCreatureMaxHealth(itemEx.uid)))
doSendMagicEffect(getThingPos(itemEx.uid), 5)
doCreatureSay(itemEx.uid, "I feel powerful!", TALKTYPE_ORANGE_1) 
setPlayerStorageValue(cid, storage, os.time()+exausted) 
if RemoveOnUse == true then
doRemoveItem(item.uid, 1)
end
return TRUE 
end

 

 

Coloquei 30 segundos, se quiser trocar é em > true,97777,30

+ REP , obrigado cara valeu mesmo!!!!

2 horas atrás, Noob II disse:

 


local RemoveOnUse,storage,exausted = true,97777,30

function onUse(cid, item, fromPosition, itemEx, toPosition) 
if getPlayerStorageValue(cid, storage) >= os.time() then
return doPlayerSendCancel(cid, "wait " .. getPlayerStorageValue(cid, storage) - os.time() .. " seconds to use this item again.") end
if(not isPlayer(itemEx.uid)) then
return FALSE
end
doAddCondition(cid, exhaust)
doCreatureAddMana(itemEx.uid, (getCreatureMaxMana(itemEx.uid)))
doCreatureAddHealth(itemEx.uid, (getCreatureMaxHealth(itemEx.uid)))
doSendMagicEffect(getThingPos(itemEx.uid), 5)
doCreatureSay(itemEx.uid, "I feel powerful!", TALKTYPE_ORANGE_1) 
setPlayerStorageValue(cid, storage, os.time()+exausted) 
if RemoveOnUse == true then
doRemoveItem(item.uid, 1)
end
return TRUE 
end

 

 

Coloquei 30 segundos, se quiser trocar é em > true,97777,30

So que apareceu esse erro na distro :

 

err.png

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