S
Shadow_
Guest
Hey there,
I was thinking about that testing sometimes be pain in ass when am alone and i need to do the monster exactly dies with XX count of spells or a team boss that dies exactly with 3-4 players so i decided to make that code so if i want to monster to die by 2 players just say !pvebalance 2 and then try if it died easily I then can to decrease it to be like !pvebalance 1.6 and that 0.4 difference multiply it to the monster health and defenses so it is exactly as i want it, i can be very useful for PVE balancing and it offers much time.
RED NOTE : Don't add this on a released server (it should be added only for admin testing and balancing shit)
Talkactions/talkactions.xml
Talkactions/scripts
pvebalance.lua
creaturescripts.xml
creaturescripts/scripts
pvebalance.lua
login.lua
events/scripts
creature.lua
under the function VV at the end of it add
PS: i might have added more registry than needed, because i didn't test it yet but im sure it will work with those bunch of registry, sorry for not using revscripts i didn't take a look on it yet + i didn't update my sources to when it was added
updates in mind : to add like id or another command with another storage to increase the monsters DMG for the player as this do the opposite.
I was thinking about that testing sometimes be pain in ass when am alone and i need to do the monster exactly dies with XX count of spells or a team boss that dies exactly with 3-4 players so i decided to make that code so if i want to monster to die by 2 players just say !pvebalance 2 and then try if it died easily I then can to decrease it to be like !pvebalance 1.6 and that 0.4 difference multiply it to the monster health and defenses so it is exactly as i want it, i can be very useful for PVE balancing and it offers much time.
RED NOTE : Don't add this on a released server (it should be added only for admin testing and balancing shit)
Talkactions/talkactions.xml
Code:
<talkaction words="!pvebalance" separator=" " script="pvebalance.lua"/>
pvebalance.lua
Lua:
function onSay(player, words, param)
local storage = 68935
local multiplier = tonumber(param)
player:setStorageValue(storage, multiplier)
return false
end
Code:
<event type="healthchange" name="pvebalance" script="pvebalance.lua" />
pvebalance.lua
Lua:
function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin)
if not creature or not attacker or creature == attacker then
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
if primaryType == COMBAT_HEALING or secondaryType == COMBAT_HEALING or primaryType == COMBAT_MANADRAIN or secondaryType == COMBAT_MANADRAIN then
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
local storage = player:getStorageValue(68935)
if attacker:isPlayer() and creature:isMonster() and storage > 0 then
primaryDamage = math.floor(primaryDamage - (primaryDamage * storage))
secondaryDamage = math.floor(secondaryDamage - (secondaryDamage * storage))
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
return primaryDamage, primaryType, secondaryDamage, secondaryType
end
Code:
player:registerEvent("pvebalance")
creature.lua
under the function VV at the end of it add
Code:
function Creature:onTargetCombat(target)
Code:
target:registerEvent("pvebalance")
self:registerEvent("pvebalance")
updates in mind : to add like id or another command with another storage to increase the monsters DMG for the player as this do the opposite.
Last edited by a moderator: