Lay
TFS 1.2
- Joined
- Dec 7, 2012
- Messages
- 67
- Solutions
- 9
- Reaction score
- 29
Hey, ye its me again.
I made something like this:
and tried add this:
but got problems with 'target' or just script didnt work at all
rly dont know how to make ignore function for undead/ or monsters name, this look stupid when demon skeleton(etc) bleeding =/
In weapons.xml i must add all id's like this?:
or its easier way? (id, id, id) {}? in script? = D
I am a layman in these matters.
Thanks for help again.
I made something like this:
Lua:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
combat:setParameter(COMBAT_PARAM_BLOCKSHIELD, 1)
combat:setFormula(COMBAT_FORMULA_SKILL, 0, 0, 1, 0)
local condition = Condition(CONDITION_BLEEDING)
condition:setParameter(CONDITION_PARAM_DELAYED, 1)
condition:addDamage(3, 2000, -5)
condition:addDamage(4, 2000, -3)
condition:addDamage(10, 2000, -1)
local secondCombat = Combat()
secondCombat:setCondition(condition)
local ignoreMonsters = {
'Test'
}
function onUseWeapon(player, var)
local bleedHit = combat:execute(player, var)
if not bleedHit or ignored then
return false
end
local targetNum = var:getNumber()
if targetNum ~= 0 then
if math.random(100) <= 10 then
bleedHit = secondCombat:execute(player, var)
end
end
return bleedHit
end
and tried add this:
Lua:
isInArray(ignoreMonsters, target:getName())
rly dont know how to make ignore function for undead/ or monsters name, this look stupid when demon skeleton(etc) bleeding =/
In weapons.xml i must add all id's like this?:
XML:
<!-- Bleeding -->
<melee id="2400" script="bleeding.lua" />
<melee id="26578" script="bleeding.lua" />
or its easier way? (id, id, id) {}? in script? = D
I am a layman in these matters.
Thanks for help again.