retired
Great Mana Potion Healando Por Questão De Ml/level
Por SoulDark, 04 de mar. de 2011 em Scripts
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Editado Março 5 por Demonbholder
Poxa cara, tanta gente aqui e só você dedicou 1 minuto do seu tempo a me ajudar =P
Cara, ficou muito melhor, só falta uma Coisa, não está almentando Conforme o Level e ML
sabe de mais algo?
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

retired
Editado Março 5 por Demonbholder
Aee agora deu certo valeu mano !!! agora vo tentar arrumar pra deixar healando tipo ;
Lvl
600 -Sorc - Ml 125 - Healando 1.2k +-
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

retired
Editado Março 5 por Demonbholder
Olha a base que deu Foi de ;
Lvl 80 Healando 400 +-
lvl 500 healando 800
lvl 700 healando 1k
Ai que está o problema, pois eu quero que siga um padrão de level, porque no lvl 80 tá healando demais, e no level alto pouco demais...
pra Simplificar SE POSSIVEL, Independente do Level usar a Mana Potion 12 Vezes pra healar toda mana...
Essa é a base que eu procuro... ![]()
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Fiz uma nova fórmula:
local EMPTY_POTION = 7590
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(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and
getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this
fluid.", TALKTYPE_ORANGE_1)
return TRUE
end
local formula, formu = (getPlayerMagLevel(cid) * 3 + getPlayerLevel(cid) * 2), (getPlayerMagLevel(cid) * 3 + getPlayerLevel(cid) * 3)
if doPlayerAddMana(itemEx.uid, math.ceil(math.random(formula, formu))) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, EMPTY_POTION)
return TRUE
end
OMG =DDD
Agora foi cara
criei uns Tests e deu isso;
Lvl
264 - Ml 67
Healando 800 +-
Lvl 759 Ml 92
Healando 2.1k +-
Se Todos os leveis seguir nesta mesma forma ta mto bom =D
Valeu mesmo ;~]
To querendo fazer um server parecido com o Collapser .. ta indo +- AUHAUHAUH
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Tranquilo, vou reportar para moverem, até mais.


info
Grupo: Campones
Registrado: 04/03/11
Posts: 15
Reputação: 0
Olá galera, eu to com um problema muito cruel...
Bom, eu jogo Collapser Otserv, creio que todos conheçam, e lá o Sistema de Mana Potion é feito pelo Level e Magic Level.
E assim, eu quero fazer um igual ou parecido... Seguinte esse é o Script da minha Great Mana Potion :
local EMPTY_POTION = 7590
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(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and
getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this
fluid.", TALKTYPE_ORANGE_1)
return TRUE
end
if doPlayerAddMana(itemEx.uid, math.ceil(math.random((SKILL__MAGLEVEL * 200) + SKILL__LEVEL) +
100)) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, EMPTY_POTION)
return TRUE
end
-----------------------------------
Esta parte :math.random((SKILL__MAGLEVEL * 200) + SKILL__LEVEL) +
100)
eu copiei de um Tópico em meio dos que andei dando uma olhada...
A mana Potion não Heala conforme o Level/ML, e tambem ela está Variando demais, em certos momentos ela heala 170 em outros 1.4k...
Bom, quero dizer que quem me ajudar com isso terá eterna gratidão :}