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 542
  • 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.

Mostrar conteúdo oculto

 

Postado
  Em 21/01/2017 em 04:45, 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
  Em 21/01/2017 em 13:15, 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!!!!

  Em 21/01/2017 em 13:15, 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