What's new

-Skrypt Spell dmg buff

Status
Not open for further replies.

Czopeq

Advanced User
Joined
Jun 29, 2015
Messages
191
Reaction score
6
Witam poszukuj? spella kt?ry daje %buffa do dmg
Pr?bowa?em czego? takiego:
[LUA]function onStatsChange(cid, attacker, type, combat, value)
local damage = math.ceil(value+(value*0.5)) --5%
if isPlayer(attacker) and (not (attacker == cid)) then
if(exhaustion.check(attacker, 120117)) then
if (type == STATSCHANGE_HEALTHLOSS) then
doSendAnimatedText(getCreaturePosition(cid),damage, 108)
doCreatureAddHealth(cid, -damage)
elseif (type == STATSCHANGE_MANALOSS) then
doSendAnimatedText(getCreaturePosition(cid),damage, 5)
doCreatureAddMana(cid, -damage)
return false
end
end
end
return true
end[/LUA]
Gdzie exhaustion by?o w spellu to dalej nie dzia?a, no i nie wiem jak to zrobic :c
 

buchaLL

bez spiny, luźno
Joined
Aug 2, 2011
Messages
1,013
Reaction score
68
Age
27
Odp: Spell dmg buff

Poprzez storage.
W spellu ustawiasz storage, dodajesz efekt IN_FiGHT na czas trwania bonusu i event po kt?rym zmienisz storage.
I skrypt na buffa.
[lua]function onStatsChange(cid, attacker, type, combat, value)
local damage = math.ceil(value+(value*0.5)) --5%
if isPlayer(attacker) and (not (attacker == cid)) then
if getPlayerStorageValue(cid, 1234555555555) == 1 then
if (type == STATSCHANGE_HEALTHLOSS) then
doSendAnimatedText(getCreaturePosition(cid),damage , 108)
doCreatureAddHealth(cid, -damage)
elseif (type == STATSCHANGE_MANALOSS) then
doSendAnimatedText(getCreaturePosition(cid),damage , 5)
doCreatureAddMana(cid, -damage)
return false
end
end
end
return true
end[/lua]
 

Czopeq

Advanced User
Joined
Jun 29, 2015
Messages
191
Reaction score
6
Odp: Spell dmg buff

@up
Skrypt jako tako dzia?a... tylko, ?e nie zwi?ksza hita o 3% tylko dodaje dodatkowy hit kt?ry jest wzmocniony o 3% i wtedy bije si? podw?jne hity 100 + 103... no i dzia?a tylko na ludzi :eek:

---------- Tre?? dodana o 20:57 ----------

ten dmg ofc zrobi?em
zmieni?em to:
[LUA]local damage = math.ceil(value+(value*0.5)) --5%[/LUA]
na to:
[LUA]local damage = math.ceil(value*0.5) --5%[/LUA]
 
Status
Not open for further replies.
Top