RA
dúvida

[Encerrado] Como aumento a velocidade entre eu usar uma potion e outra?

Por Rangelzimba, 07 de jan. de 2013 em Tópicos Sem Resposta

6
554
RangelzimbaR
07 de janeiro de 2013 às 18:44

To montando um ot, só por que as potions estao muito lentas

15790911
07 de janeiro de 2013 às 21:59

Não sei se posso estar lhe ajudando (também posso estar falando merda), mas acho que é alguma coisa relacionada a área em negrito:

Por exemplo na Great Health Potion:

local MIN = 500

local MAX = 700

local EMPTY_POTION = 7635

 

local exhaust = createConditionObject(CONDITION_EXHAUST)

setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

if isPlayer(itemEx.uid) == FALSE then

return FALSE

end

 

if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then

doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)

return TRUE

end

 

if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then

doCreatureSay(itemEx.uid, "Only knights of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)

return TRUE

end

 

if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then

return FALSE

end

 

doAddCondition(cid, exhaust)

doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)

doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) return TRUE

end

 

 

Não sei se usando numeros da pra fazer alguma alteração. Creio que essas condições você alteraria ou nas sources (possivel que não), ou então na quela area .svn da sua pasta liquids...

Espero que alguem possa estar esclareçendo sua duvida!

Editado Janeiro 7 por GuizitoG

SmiXS
08 de janeiro de 2013 às 09:24

Você pode usar este aqui, e editar no próprio script o tempo da exaustão:

local MIN = 500
local MAX = 700
local EMPTY_POTION = 7635
local time_exhaustion = 1 -- Tempo da exautão do player, em segundos.
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end
if exhaustion.get(cid, 1342) > 0 then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return TRUE
end
if((not(isKnight(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
doCreatureSay(itemEx.uid, "Only knights of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
return TRUE
end
if doCreatureAddHealth(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end
exhaustion.set(cid, 1342, time_exhaustion)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) return TRUE
end

 

Ou usar o script passado pelo GuzitoG e editar o 'config.lua' a parte:

timeBetweenExActions = 1 -- Tempo de exaustão

Editado Janeiro 8 por SmiX

15790911
08 de janeiro de 2013 às 12:44

Apesar de não saber se é 100% funcionau o método do SmiX, caso seja, recomendo que use o primeiro método (editar de potion em potion), pois editando pelo Config, iria causar um grande transtorno em todas as Actions do seu servidor!

1 mês depois...
StigalS
12 de fevereiro de 2013 às 12:46

Tópico movido para a seção de dúvidas e pedidos resolvidos.

5 anos depois...
StigalS
21 de abril de 2018 às 02:40
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.