Hey,
my deathknight.cfg is working pretty good and might be usefull for somebody:
Code:
####################
# Profile Settings #
####################
maxreach=24
engage_dist=24
reach=3
DontStopWhenSelectTarget=1
mobLevelDiffUpper=4
foodPercent=0.40
###########
# Actions #
###########
################
# Pet Commands #
################
defact= act:RaiseDead slot:2 key:3 hassummon:n cooldown:1.5 js:checkRaiseDeadCooldown()
#defact= act:sendPet slot:ctrl key:1 cooldown:0.5 // useless
#####################
# Fighting Commands #
#####################
defact= act:BoneShield slot:2 key:2 cooldown:1.5 prevacttime:60
defact= act:DeathGrip slot:1 key:1 cooldown:1.5 prevacttime:25 js:checkDeathGrip()
defact= act:PlagueStrike slot:1 key:2 cooldown:1.5
defact= act:IcyTouch slot:1 key:3 cooldown:1.5
defact= act:BloodStrike slot:1 key:4 cooldown:1.5
defact= act:ScourgeStrike slot:1 key:5 cooldown:1.5 js:checkScourgeStrike()
defact= act:DeathStrike slot:1 key:6 cooldown:1.5
defact= act:DeathCoil slot:1 key:7 cooldown:1.5 js:checkDeathCoil()
defact= act:Pestilence slot:1 key:8 cooldown:1.5 prevacttime:10 js:checkPestilence()
defact= act:Gargoyle slot:1 key:9 cooldown:1.5 prevacttime:180 js:checkGargoyle()
defact= act:fight key:t slot:key
###############
# Other Stuff #
###############
defact= act:approach predefined:approach distge:4 dist:4 approachcheck:checkTarget()
defact= act:reachCombat js:ReachCombatDistance()
defact= act:wait1s cooldown:1 distle:5
defact= act:lootapproach predefined:lootapproach distle:25 distge:5 dist:5
defact= act:loot predefined:loot distle:5
defact= act:food slot:2 key:4 cooldown:1
defact= act:mount slot:2 key:1
####################
# Combat Sequences #
####################
#############
# PreCombat #
#############
precombat= act:RaiseDead
precombat= act:BoneShield
precombat= act:fight
#precombat= act:sendPet // useless
precombat= act:DeathGrip
precombat= act:approach
##########
# Combat #
##########
combatseq= act:approach
combatseq= act:PlagueStrike
combatseq= act:IcyTouch
combatseq= act:BloodStrike
combatseq= act:Pestilence
combatseq= act:ScourgeStrike
combatseq= act:DeathCoil
combatseq= act:Gargoyle
########
# Loot #
########
lootseq= act:lootapproach
lootseq= act:wait1s
lootseq= act:loot
lootseq= act:wait1s
###########
# Scripts #
###########
<script>
function checkDeathGrip(){
var target = me.target;
var distance = Math.sqrt(Math.pow(target.x-me.x,2)+Math.pow(target.y-me.y,2));
if (distance < 0) distance * -1;
if (distance > 5) {
wowjs.wowLog("Mob is more than 5 yards away; Death Grip!");
pulled = true;
return true;
}
wowjs.wowLog("Mob is in melee range.");
pulled = false;
return false;
}
function checkDeathCoil() {
if (me.runic >= 40) {
wowjs.wowLog("DeathCoil!");
return true;
}
return false;
}
function checkScourgeStrike() {
var lifePrecent = me.health/me.maxhealth;
if (lifePrecent < 0.6) {
wowjs.wowLog("Do DeathStrike instead of ScourgeStrike!");
me.wowDoFightAction("DeathStrike");
return false;
}
return true;
}
function checkPestilence() {
var attacking = me.wowGetAttackingMobs();
var attackingnumber = 0;
var done = 0;
var i = 0;
while (done != 1) {
if (attacking[i] != null) {
attackingnumber++;
}else{
done = 1;
}
i++;
}
if (attackingnumber > 1) return true;
return false;
}
function checkGargoyle() {
var lifePrecent = me.health/me.maxhealth;
if (lifePrecent > 0.5) return false;
if (me.runic < 50) return false;
var attacking = me.wowGetAttackingMobs();
var attackingnumber = 0;
var done = 0;
var i = 0;
while (done != 1) {
if (attacking[i] != null) {
attackingnumber++;
}else{
done = 1;
}
i++;
}
if (attackingnumber > 1) return true;
return false;
}
var RaiseDeadCooldown = 0;
function checkRaiseDeadCooldown() {
var curTime = me.curTime;
if (curTime - RaiseDeadCooldown > 300) {
wowjs.wowLog("RaiseDead past 5min cooldown");
RaiseDeadCooldown = curTime;
return true;
}
return false;
}
function checkTarget()
{
var mytarget = me.target;
if (mytarget != null)
{
me.wowLog("checking my target " + mytarget.name);
if (me.fighterMode=='BG')
{
me.wowLog("bg mode, attack all ");
return true;
}
var target = mytarget.target;
if (target != null)
{
me.wowLog("checking my target is targeting " + target.name);
var targetme = target.wowIsSameObj(me);
var targetpet = target.wowIsSameObj(me.wowGetSummon());
if (targetme || targetpet)
{
//if target me or pet, it is ok
me.wowLog("he is attacking me");
return true;
}
else
{
//abort fight
me.wowAbortCurFight = true;
me.wowLog("he is attacking OTHERS " + target.name);
return false;
}
}
}
return true;
}
</script>