BO
suporte scripts

Boost Summon

Por Boguemon, 13 de nov. de 2016 em Resolvidos

boost
summon
8.71
tfs.4
4
1.3k
BoguemonB
13 de novembro de 2016 às 16:11

Olá, o Adriano Swatt estava fazendo um script pra mim, mas devido a alguns problemas e aos corres do dia-a-dia ele não teve tempo de terminar, gostaria da ajuda para terminar esse script...

 

O script consiste em:

O boost é ativado ao summonar o monstro e não usando algum item como ja vi em outro post

O cálculo do dano adicionado é feito através da soma do level e do ML, o resultado disso se toma como porcentagem a adicionar no dano que o monstro iria hitar, ex; level = 50 + ML = 35, result = 85, o hit do monstro ficaria 350(exemplo) + 85% dos 350, o mesmo serve no caso do monstro se auto healar (MONK por exemplo), mas o boost é pra qualquer summon

A vida do monstro segue a mesma logica só que ao invés do hit aumentar é a vida obviamente

 

local eventName = "00testing"local percent_limit = 500function onStatsChange(cid, attacker, type, combat, value)	print('LUTA OCORRENDO')	if type == STATSCHANGE_HEALTHLOSS and value >= 1 then			-- print('LIST TARGET: '..getMonsterTargetList(attacker)[1]..'') -- Retorna UID			registerCreatureEvent(getCreatureTarget(attacker), eventName)			print('REGISTRANDO EVENTO EM: '..getCreatureName(attacker):lower()..' ATACANDO UM '..getCreatureName(getCreatureTarget(attacker)):lower()..'.')		if getCreatureMaster(attacker) then			ownSummon = getCreatureMaster(attacker)			print('TEMOS: '..getCreatureName(attacker):lower()..' ATACANDO UM '..getCreatureName(cid):lower()..'.')			if isPlayer(ownSummon) then				local overflow_protection = {}				if overflow_protection[attacker] then					overflow_protection[attacker] = nil					return true				end				getML = getPlayerMagLevel(ownSummon)				getLvL = getPlayerLevel(ownSummon)				addDMG = getML + getLvL -- Percent				if addDMG < percent_limit then					percDMG = math.floor(value*(addDMG/100))					newValue = (value+percDMG)					print('True Value: '..value..' // PercDMG: '..percDMG..' // NewValue: '..newValue..' [ML: '..getML..'/ LVL: '..getLvL..].')				else					percDMG = math.floor(value*(percent_limit/100))					newValue = (value+percDMG)					print('True Value: '..value..' // PercDMG: '..percDMG..' // NewValue: '..newValue..' [ML: '..getML..'/ LVL: '..getLvL..].')				end				overflow_protection[attacker] = true				doPlayerSendTextMessage(ownSummon, MESSAGE_STATUS_DEFAULT, "Your "..getCreatureName(attacker).." deals "..newValue.." [hit "..value.." + "..percDMG.." boost damage] to "..(getMonsterInfo(getCreatureName(cid)).description)..".")				doTargetCombatHealth(attacker, cid, combat, -newValue, -newValue, CONST_ME_NONE)				return false			else				print('SUMMON ISN\'T BY PLAYER // ATTACKER: '..getCreatureName(attacker)..' -> CID: '..getCreatureName(cid)..'.')			end		else			print('NOT IS A SUMMON // ATTACKER: '..getCreatureName(attacker)..' -> CID: '..getCreatureName(cid)..'.')		end	else		print('SEM PERDA DE VIDA // CID: '..getCreatureName(cid)..'.')	endreturn trueend

 

BoguemonB
14 de novembro de 2016 às 23:38

bump

2 semanas depois...
BoguemonB
22 de novembro de 2016 às 22:29

Bump

Luga03L
23 de novembro de 2016 às 08:35

Utilize o botão @UP que fica logo acima no tópico, Evite floodar o tópico!!