Olá galera
O que é: Já jogou algum servidor de pokemon que tenha boost system? Pois é, não é isso que temos aqui. É quase, mas é pra Tibia mesmo, com algumas diferenças. É um mod em que ao usar um item (configurável) no seu summon, ele ganha 1 boost level e fica mais forte.
Script:
<?xml version="1.0" encoding="UTF-8"?> <mod name="Summon Boost System" version="2.0" author="LuckOake" contact="none" enabled="yes"> ----------------------------------------------------------------------- <config name="boost"><![CDATA[ bstor = 17824 -- Storage do boost percent = 20 -- Quantos por cento a vida do summon aumentará ao receber o Boost maxboost = 50 -- Level máximo de boosting function isSummon(cid) return isMonster(cid) and isPlayer(getCreatureMaster(cid)) end function getBoostingLevel(cid) return getCreatureStorage(cid, bstor) == -1 and 0 or getCreatureStorage(cid, bstor) end function doCreatureBoost(cid, levels) for i = 1, levels do setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)*(percent/100+1)) end doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) return doCreatureSetStorage(cid, bstor, getBoostingLevel(cid)+levels) end ]]></config> ----------------------------------------------------------------------- <action actionid="6310" allowfaruse="1" event="script"><![CDATA[ domodlib('boost') local pos = getCreaturePos(itemEx.uid) if not isSummon(itemEx.uid) then doPlayerSendCancel(cid, "You can only boost a summon.") return true elseif getCreatureMaster(itemEx.uid) ~= cid then doPlayerSendCancel(cid, "You can only boost your own summon.") return true elseif getBoostingLevel(itemEx.uid) >= maxboost then doPlayerSendCancel(cid, "Your summon is already at the max boosting level ("..maxboost..").") return true end doCreatureBoost(itemEx.uid, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You've boosted your "..getCreatureName(itemEx.uid)..". It's boosting level is now "..getBoostingLevel(itemEx.uid)..".") doSendAnimatedText(pos, "BOOST +"..tostring(getBoostingLevel(itemEx.uid)), TEXTCOLOR_YELLOW) registerCreatureEvent(itemEx.uid, "AttackBoost") doSendDistanceShoot(getCreaturePos(cid), pos, 3) doSendMagicEffect(getCreaturePos(itemEx.uid), 36) doRemoveItem(item.uid, 1) return true ]]></action> ----------------------------------------------------------------------- <event type="attack" name="AttackBoost" event="script"><![CDATA[ function onAttack(cid, target) registerCreatureEvent(target, "StatsBoost") return true end ]]></event> ----------------------------------------------------------------------- <event type="statschange" name="StatsBoost" event="script"><![CDATA[ local overflow_protection = {} function onStatsChange(cid, attacker, type, combat, value) domodlib('boost') if type == STATSCHANGE_HEALTHLOSS and value >= 1 then if overflow_protection[attacker] then overflow_protection[attacker] = nil return true end local dmg = math.floor(value*(getBoostingLevel(attacker)/10+1)) overflow_protection[attacker] = true doPlayerSendTextMessage(getCreatureMaster(attacker), MESSAGE_STATUS_DEFAULT, "Your "..getCreatureName(attacker).." deals "..dmg-value.." boost damage to "..(getMonsterInfo(getCreatureName(cid)).description)..".") doTargetCombatHealth(attacker, cid, combat, -dmg, -dmg, CONST_ME_NONE) return false end return true end ]]></event> </mod>
Configurando:
Você só precisa configurar aqui:
bstor = 17824 -- Storage do boost percent = 20 -- Quantos por cento a vida do summon aumentará ao receber o Boost maxboost = 50 -- Level máximo de boosting
E aqui:
<action itemid="6310" allowfaruse="1" event="script"><!--[CDATA[
No lugar de 6310, você coloca o ID do seu item de Boost.
E se souber o que está fazendo, pode também editar a fórmula do dano extra do boost:
local dmg = math.floor(value*(getBoostingLevel(attacker)/10+1))
Imagens:
Boosting:
--------------------------------------------------------------------------
Exemplo de ataque de um minotaur com boosting level 15:
Change Log (Versão 2.0):
- Todos os bugs corrigidos e sistema aprimorado
Créditos:
- LuckOake (Pelo Sistema) - Brun123 (Pela ajuda com o StatsChange)