🌀Passive Weapons
Atualizado
Atualizado
Faça uma doação e ajude a manter essa iniciativa ativa.
Make a donation and help keep this initiative active.
PT-BR: Bleeding + ExtraDamage: Aplicando Sangramento e Dano Extra no alvo, script totalmente configurável.
EN: Bleeding + ExtraDamage: Applying Bleeding and Extra Damage to the target, fully configurable script.
PT-BR: Teleport + Invisible: Enquanto estiver atacando a passiva teleporta o usuário para as costas do alvo, ao mesmo tempo aplicando invisibilidade cada um tem seu tempo de espera separado, com isso o teleporte e a invisibilidade podem ocorrer separadamente.
EN: Teleport + Invisible: While attacking, the passive teleports the user to the target's back, while applying invisibility each one has a separate cooldown time, so teleportation and invisibility can occur separately.
PT-BR: Stun + Muted: O verdadeiro stun, ao aplicar stun no alvo ele fica impossibilitado de andar ou falar, não é aplicado em bosses
EN: Stun + Muted: The true stun, when applying stun to the target, makes it impossible to walk or speak, it is not applied to bosses
local config = {
combat = COMBAT_PHYSICALDAMAGE, -- combatType do hit principal
passive = COMBAT_PHYSICALDAMAGE,
condition = CONDITION_ROOTED, -- condition que vai ser aplicada
muted = CONDITION_MUTED, -- condition muted
channelMuted = CONDITION_CHANNELMUTEDTICKS, -- condition channel muted
weaponType = WEAPON_SWORD, -- weapon Type
skill = SKILL_FIST, -- Skill chance para ativar a passiva
skillChance = 0.005, -- 0.005 = 0.5% / skill = 100 - skillChance = 0.5 = 50%
effect = CONST_ME_STUN, -- efeito ao teleportar
effectHit = CONST_ME_GROUNDSHAKER,
duration = 8, -- 20 = 20 segundos - tempo que vai durar o sangramento
cooldownPassive = 16, -- 10 = 10 seconds
cooldownStorage = 69995,
}
local sound = {
weapon = SOUND_EFFECT_TYPE_MELEE_ATK_CLUB,
cast = SOUND_EFFECT_TYPE_ITEM_MOVE_METALIC,
stun = SOUND_EFFECT_TYPE_ACTION_OBJECT_FALLING_DEPTH,
}
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, config.combat)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_IMPACTSOUND, sound.weapon)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local passive = Combat()
passive:setParameter(COMBAT_PARAM_TYPE, config.passive)
passive:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
passive:setParameter(COMBAT_PARAM_IMPACTSOUND, sound.weapon)
passive:setParameter(COMBAT_PARAM_CASTSOUND, sound.cast)
passive:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local condition = Condition(config.condition)
condition:setParameter(CONDITION_PARAM_TICKS, config.duration*1000)
condition:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
passive:addCondition(condition)
local conditionMuted = Condition(config.muted, config.channelMuted)
conditionMuted:setParameter(CONDITION_PARAM_TICKS, config.duration*1000)
passive:addCondition(conditionMuted)
function effectAndSound(player, variant)
if not player then return true end
local target = Monster(variant.number)
local targetPlayer = Player(variant.number)
if target then
local tile = Tile(target:getPosition())
local checkTarget = tile:getCreatureCount()
if checkTarget >= 1 then
target:getPosition():sendMagicEffect(config.effect)
target:getPosition():sendSingleSoundEffect(sound.stun, player:isInGhostMode() and nil or player)
return true
end
else
if not targetPlayer then return true end
local tile = Tile(targetPlayer:getPosition())
local checkTarget = tile:getCreatureCount()
if checkTarget >= 1 then
targetPlayer:getPosition():sendMagicEffect(config.effect)
targetPlayer:getPosition():sendSingleSoundEffect(sound.stun, player:isInGhostMode() and nil or player)
return true
end
return true
end
end
local wStun = Weapon(config.weaponType)
wStun.onUseWeapon = function(player, variant)
if not player then return true end
if player:getSkull() == SKULL_BLACK then
return false
end
local chance = math.random()
local skillChance = (player:getSkillLevel(config.skill) * config.skillChance)
local target = Monster(variant.number)
local targetPlayer = Player(variant.number)
local monsterType = target and target:getType()
if target and not target:isPlayer() then
if target:isMonster() then
local monsterType = target:getType()
if monsterType and monsterType:bossRaceId() == 1 then
return combat:execute(player, variant)
end
end
end
if chance <= skillChance then
addEvent(function()
if target then
if player:getStorageValue(config.cooldownStorage) - os.time() > 0 then
combat:execute(player, variant)
target:getPosition():sendMagicEffect(config.effectHit)
target:getPosition():sendSingleSoundEffect(sound.stun, player:isInGhostMode() and nil or player)
return true
end
if not target:getCondition(config.condition, config.conditionMuted) then
passive:execute(player, variant)
target:getPosition():sendMagicEffect(config.effectHit)
for i = 1, config.duration do
addEvent(function() effectAndSound(player, variant) end, 1000 * (i - 1))
end
end
elseif targetPlayer then
if player:getStorageValue(config.cooldownStorage) - os.time() > 0 then
combat:execute(player, variant)
targetPlayer:getPosition():sendMagicEffect(config.effectHit)
targetPlayer:getPosition():sendSingleSoundEffect(sound.stun, player:isInGhostMode() and nil or player)
return true
end
if not targetPlayer:getCondition(config.condition, config.conditionMuted) then
passive:execute(player, variant)
targetPlayer:getPosition():sendMagicEffect(config.effectHit)
for i = 1, config.duration do
addEvent(function() effectAndSound(player, variant) end, 1000 * (i - 1))
end
end
return true
end
player:setStorageValue(config.cooldownStorage, os.time() + config.cooldownPassive)
end, 500)
end
return combat:execute(player, variant)
end
wStun:id(3300) -- ItemId
wStun:vocation("Royal Paladin", true, true) -- Vocation, showDescription, lastVoc
wStun:level(5) -- Level
wStun:register()
local config = {
combat = COMBAT_PHYSICALDAMAGE, -- combatType do hit principal
passive = COMBAT_PHYSICALDAMAGE,
condition = CONDITION_INVISIBLE, -- condition que vai ser aplicada
weaponType = WEAPON_SWORD, -- weapon Type
skill = SKILL_FIST, -- Skill chance para ativar a passiva
skillChance = 0.005, -- 0.005 = 0.5% / skill = 100 - skillChance = 0.5 = 50%
duration = 0.5, -- 0.5 = 500 milleseconds
cooldownPassive = 10, -- 10 = 10 seconds
cooldownStorage = 69995,
effectTeleport = CONST_ME_WHITE_SMOKE, -- efeito ao teleportar
}
local sound = {
weapon = SOUND_EFFECT_TYPE_MELEE_ATK_SWORD,
cast = SOUND_EFFECT_TYPE_ITEM_MOVE_METALIC,
invisible = SOUND_EFFECT_TYPE_SPELL_INVISIBLE,
}
local direction = {
north = 0, -- /\ north = 0
east = 1, -- >> east = 1
south = 2, -- \/ south = 2
west = 3, -- << west = 3
}
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, config.combat)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_IMPACTSOUND, sound.weapon)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local passive = Combat()
passive:setParameter(COMBAT_PARAM_TYPE, config.passive)
passive:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
passive:setParameter(COMBAT_PARAM_IMPACTSOUND, sound.weapon)
passive:setParameter(COMBAT_PARAM_CASTSOUND, sound.cast)
passive:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local condition = Condition(config.condition)
condition:setParameter(CONDITION_PARAM_TICKS, config.duration*1000)
local wTeleport = Weapon(config.weaponType)
wTeleport.onUseWeapon = function(player, variant)
if player:getSkull() == SKULL_BLACK then
return false
end
if not player then return true end
local chance = math.random()
local skillChance = (player:getSkillLevel(config.skill) * config.skillChance)
local target = Monster(variant.number)
local targetPlayer = player:getTarget(variant.number)
local monsterType = target:getType()
if target:isMonster() and monsterType:bossRaceId() == 1 then return combat:execute(player, variant) end
if chance <= skillChance then
addEvent(function()
if target then
if player:getStorageValue(config.cooldownStorage) - os.time() > 0 then
player:addCondition(condition)
player:getPosition():sendSingleSoundEffect(sound.invisible, player:isInGhostMode() and nil or player)
return true
end
if not target:getCondition(config.condition) then
local position = target:getPosition()
player:addCondition(condition)
passive:execute(player, variant)
player:getPosition():sendMagicEffect(config.effectTeleport)
if target:getDirection() == direction.north then
position.y = position.y + 1
player:teleportTo(position)
elseif target:getDirection() == direction.east then
position.x = position.x - 1
player:teleportTo(position)
elseif target:getDirection() == direction.south then
position.y = position.y - 1
player:teleportTo(position)
elseif target:getDirection() == direction.west then
position.x = position.x + 1
player:teleportTo(position)
end
player:getPosition():sendSingleSoundEffect(sound.invisible, player:isInGhostMode() and nil or player)
end
elseif targetPlayer then
if player:getStorageValue(config.cooldownStorage) - os.time() > 0 then
player:addCondition(condition)
player:getPosition():sendSingleSoundEffect(sound.invisible, player:isInGhostMode() and nil or player)
return true
end
if not targetPlayer:getCondition(config.condition) then
local position = targetPlayer:getPosition()
player:addCondition(condition)
passive:execute(player, variant)
player:getPosition():sendMagicEffect(config.effectTeleport)
if targetPlayer:getDirection() == direction.north then
position.y = position.y + 1
player:teleportTo(position)
elseif targetPlayer:getDirection() == direction.east then
position.x = position.x - 1
player:teleportTo(position)
elseif targetPlayer:getDirection() == direction.south then
position.y = position.y - 1
player:teleportTo(position)
elseif targetPlayer:getDirection() == direction.west then
position.x = position.x + 1
player:teleportTo(position)
end
player:getPosition():sendSingleSoundEffect(sound.invisible, player:isInGhostMode() and nil or player)
end
return true
end
player:setStorageValue(config.cooldownStorage, os.time() + config.cooldownPassive)
end, 500)
end
return combat:execute(player, variant)
end
wTeleport:id(3300) -- ItemId
wTeleport:vocation("Royal Paladin", true, true) -- Vocation, showDescription, lastVoc
wTeleport:level(5) -- Level
wTeleport:register()
local config = {
combat = COMBAT_PHYSICALDAMAGE, -- combatType do hit principal
passive = COMBAT_PHYSICALDAMAGE,
condition = CONDITION_BLEEDING, -- condition que vai ser aplicada
weaponType = WEAPON_SWORD, -- weapon Type
skill = SKILL_FIST, -- Skill chance para ativar a passiva
skillChance = 0.005, -- 0.005 = 0.5% / skill = 100 - skillChance = 0.5 = 50%
duration = 15, -- 0.5 = 500 milleseconds
cooldownPassive = 30, -- 10 = 10 seconds
cooldownStorage = 69995,
effect = CONST_ME_EXPLOSIONAREA, -- efeito ao teleportar
periodDamage = 100, -- dano por segundo de sangramento
interval = 1, -- 1 = 1 segundo - intervalo de cada dano de sangramento
durationDamage = 10, -- 10 = 10 segundos - tempo que vai durar o dano extra que o alvo vai receber
extraDamage = 150, -- 150 = 50% extra damage
}
local sound = {
weapon = SOUND_EFFECT_TYPE_MELEE_ATK_SWORD,
cast = SOUND_EFFECT_TYPE_ITEM_MOVE_METALIC,
bleeding = SOUND_EFFECT_TYPE_MONSTER_SPELL_SINGLE_TARGET_BLEEDING,
}
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, config.combat)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setParameter(COMBAT_PARAM_IMPACTSOUND, sound.weapon)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local passive = Combat()
passive:setParameter(COMBAT_PARAM_TYPE, config.passive)
passive:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
passive:setParameter(COMBAT_PARAM_IMPACTSOUND, sound.weapon)
passive:setParameter(COMBAT_PARAM_CASTSOUND, sound.cast)
passive:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local condition = Condition(config.condition)
condition:setParameter(CONDITION_PARAM_PERIODICDAMAGE, -config.periodDamage)
condition:setParameter(CONDITION_PARAM_TICKS, config.duration*1000)
condition:setParameter(CONDITION_PARAM_TICKINTERVAL, config.interval*1000)
condition:setParameter(CONDITION_PARAM_FORCEUPDATE, true)
passive:addCondition(condition)
local extraDamage = Condition(CONDITION_ATTRIBUTES)
extraDamage:setParameter(CONDITION_PARAM_SUBID, 9999)
extraDamage:setParameter(CONDITION_PARAM_TICKS, config.durationDamage*1000)
extraDamage:setParameter(CONDITION_PARAM_BUFF_DAMAGERECEIVED, config.extraDamage)
passive:addCondition(extraDamage)
local wBleeding = Weapon(config.weaponType)
wBleeding.onUseWeapon = function(player, variant)
if player:getSkull() == SKULL_BLACK then
return false
end
if not player then return true end
local chance = math.random()
local skillChance = (player:getSkillLevel(config.skill) * config.skillChance)
local target = Monster(variant.number)
local targetPlayer = player:getTarget(variant.number)
local monsterType = target:getType()
if target:isMonster() and monsterType:bossRaceId() == 1 then return combat:execute(player, variant) end
if chance <= skillChance then
addEvent(function()
if target then
if player:getStorageValue(config.cooldownStorage) - os.time() > 0 then
combat:execute(player, variant)
player:getPosition():sendSingleSoundEffect(sound.bleeding, player:isInGhostMode() and nil or player)
return true
end
if not target:getCondition(config.condition) then
local position = target:getPosition()
passive:execute(player, variant)
target:getPosition():sendMagicEffect(config.effect)
target:getPosition():sendSingleSoundEffect(sound.bleeding, player:isInGhostMode() and nil or player)
end
elseif targetPlayer then
if player:getStorageValue(config.cooldownStorage) - os.time() > 0 then
combat:execute(player, variant)
player:getPosition():sendSingleSoundEffect(sound.bleeding, player:isInGhostMode() and nil or player)
return true
end
if not targetPlayer:getCondition(config.condition) then
local position = targetPlayer:getPosition()
passive:execute(player, variant)
targetPlayer:getPosition():sendMagicEffect(config.effect)
targetPlayer:getPosition():sendSingleSoundEffect(sound.bleeding, player:isInGhostMode() and nil or player)
end
return true
end
player:setStorageValue(config.cooldownStorage, os.time() + config.cooldownPassive)
end, 500)
end
return combat:execute(player, variant)
end
wBleeding:id(3300) -- ItemId
wBleeding:vocation("Royal Paladin", true, true) -- Vocation, showDescription, lastVoc
wBleeding:level(5) -- Level
wBleeding:register()