var priority = 1
var combatPower = 0.0
var attributeName = "技能释放"
var attributeType = "CUSTOM"
var placeholder = "custom_example"
function onLoad(attr){
//设置自定义触发器名称
//"SKILL CAST" 玩家释放技能时
//"SKILL DAMAGE ENTITY" 技能伤害攻击怪物时
//"SKILL DAAMAGE PLAYER" 技能伤害攻击玩家时
attr.setCustomTrigger("SKILL CAST")
return attr
}
//触发 SkillAPI 技能时,输出 SkillAPI 技能名
function runCustom(attr, caster, target, params, source, handle) {
var name = params[0]
caster.sendMessage("触发 " + name + " 技能")
return true
}
//触发 SkillAPI 技能时,当技能名包含在数组内时,输出 SkillAPI 技能名
var skills = ["技能名0", "技能名1", "技能名2"]
function runCustom(attr, caster, target, params, source, handle) {
var name = params[0]
//判断此次释放技能是否为数组内技能名
if (skills.indexOf(name) != -1) {
caster.sendMessage("触发包含在数组内的 " + name + " 技能")
}
return true
}
//触发 SkillAPI 技能时,当技能名包含在数组内时,输出 SkillAPI 技能名
function runCustom(attr, caster, target, params, source, handle) {
var name = params[0]
var level = source.getSkill().getLevel()
if (level >= 3.0) {
caster.sendMessage("触发了技能等级大于等于3级的技能: " + name)
}
return true
}