SoulDark 0 Postado Março 4, 2011 Share Postado Março 4, 2011 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 :} Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/ Compartilhar em outros sites More sharing options...
0 Demonbholder 420 Postado Março 4, 2011 Share Postado Março 4, 2011 (editado) retired Editado Março 5, 2011 por Demonbholder Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008605 Compartilhar em outros sites More sharing options...
0 SoulDark 0 Postado Março 4, 2011 Autor Share Postado Março 4, 2011 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? Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008658 Compartilhar em outros sites More sharing options...
0 Demonbholder 420 Postado Março 5, 2011 Share Postado Março 5, 2011 (editado) retired Editado Março 5, 2011 por Demonbholder Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008705 Compartilhar em outros sites More sharing options...
0 SoulDark 0 Postado Março 5, 2011 Autor Share Postado Março 5, 2011 Aee agora deu certo valeu mano !!! agora vo tentar arrumar pra deixar healando tipo ; Lvl 600 -Sorc - Ml 125 - Healando 1.2k +- Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008809 Compartilhar em outros sites More sharing options...
0 Demonbholder 420 Postado Março 5, 2011 Share Postado Março 5, 2011 (editado) retired Editado Março 5, 2011 por Demonbholder Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008883 Compartilhar em outros sites More sharing options...
0 SoulDark 0 Postado Março 5, 2011 Autor Share Postado Março 5, 2011 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... Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008890 Compartilhar em outros sites More sharing options...
0 Demonbholder 420 Postado Março 5, 2011 Share Postado Março 5, 2011 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 Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008896 Compartilhar em outros sites More sharing options...
0 SoulDark 0 Postado Março 5, 2011 Autor Share Postado Março 5, 2011 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 Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008903 Compartilhar em outros sites More sharing options...
0 Demonbholder 420 Postado Março 5, 2011 Share Postado Março 5, 2011 Tranquilo, vou reportar para moverem, até mais. Link para o comentário https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/#findComment-1008938 Compartilhar em outros sites More sharing options...
Pergunta
SoulDark 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 :}
Link para o comentário
https://xtibia.com/forum/topic/152738-great-mana-potion-healando-por-quest%C3%A3o-de-mllevel/Compartilhar em outros sites
9 respostass a esta questão
Posts Recomendados