You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1,921

Wednesday, June 27th 2012, 7:55am

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function WarlockChampion(arg1)
    local Skill = {}
    local i = 0
    local focus = UnitMana("player")
    local rage = UnitSkill("player")
    local PsiPoints, PsiStatus = GetSoulPoint()
    local friendly = (not UnitCanAttack("player", "target"))
    local combat = GetPlayerCombatState()
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")

   i=i+1; Skill[i] = { ['name'] = "Willpower Blade",                      use = (PsiPoints >= 6) }
   i=i+1; Skill[i] = { ['name'] = "Sublimation Weave Curse",              use = ((not combat) and (not string.find(pbuffs,"Sublimation Weave Curse"))) }
   i=i+1; Skill[i] = { ['name'] = "Mind Rune",                            use = ((not combat) and (not string.find(pbuffs,"Mind Rune"))) }
   i=i+1; Skill[i] = { ['name'] = "Saces's Fury",                         use = ((rage >= 10) and (not string.find(pbuffs,"Saces's Fury"))) }
   i=i+1; Skill[i] = { ['name'] = "Weakening Weave Curse",                use = ((not friendly) and (focus >= 20) and (not string.find(tbuffs, "Weakened"))) }
   i=i+1; Skill[i] = { ['name'] = "Heart Collection Strike",              use = ((not friendly) and (focus <= 50)) }
   i=i+1; Skill[i] = { ['name'] = "Warp Charge",                          use = ((not friendly) and (focus >= 30) and (not string.find(pbuffs, "Warp Charge"))) }
   i=i+1; Skill[i] = { ['name'] = "Puzzlement",                           use = ((not friendly) and (focus >= 20)) }
   i=i+1; Skill[i] = { ['name'] = "Energy Influx Strikes",                use = ((not friendly) and (rage >= 30) and (string.find(tbuffs, "Electrocution"))) }
   i=i+1; Skill[i] = { ['name'] = "Electrocution",                        use = ((not friendly) and (rage >= 20) and (not string.find(tbuffs, "Electrocution"))) }   
   i=i+1; Skill[i] = { ['name'] = "Soul Pain",                            use = ((not friendly) and (focus >= 15) and (not string.find(tbuffs, "Soul Pain"))) }
   i=i+1; Skill[i] = { ['name'] = "Perception Extraction",                use = ((not friendly) and (focus >= 15) and (not string.find(pbuffs, "Perception Extraction"))) }
   i=i+1; Skill[i] = { ['name'] = "Psychic Arrows",                       use = ((not friendly) and (focus >= 20)) }

   MyCombat(Skill,arg1)
end


Is what i have and it works however when i try to add Saces's Impulse using what you posted its not going off.
-[EvilEmpires]-
Cocheech - RIP
Ricknight - R/M/S/Wd
Necrotix - WL/C/M
Yamanight D/W/Wd
Nightmareknight K/W/M/P

1,922

Thursday, June 28th 2012, 7:07am

Please post your CustomFunctions.lua file so we can see what's going on. When you post it please use the code # tags.

1,923

Monday, July 9th 2012, 9:25am

is there a scout/warden dps rotation rotation? i tried searching through this thread but i couldn't find anything because of how many pages there were.
Govinda - Bteam
Duvalier M/W/K/R/P/S
Bazzinga WL/CH/M/W/R/P
:beer:

rachel75

Beginner

Posts: 30

Location: Somewhere .....

  • Send private message

1,924

Thursday, July 12th 2012, 5:22am

I got it to work. You have too many s's. It is just "Saces' Fury"
xbabzx ~ 85W/85M/61WD
Heretic ~ Reni

Nerf ~ 77W/77M/60R (Retired)
Eternal ~ Palenque

Click me, you know you wanna

1,925

Wednesday, August 1st 2012, 3:26pm

I tried searching for this answer first, but the search function is weird right now. I'm making a s/k macro for siege. My dilemma is the order. I want to do.something like check if range =x use disarm if range > x use piercing then move to the rotation. Every attempt I've made has failed. Anyone have solutions? I apologize if this.has been addressed, stupid search keeps failing me.
Another paying customer on hiatus until some changes are made.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,926

Wednesday, August 1st 2012, 4:19pm

Depends on what exactly you are trying to do. Range checks are a pain because Runewaker disabled the distance functions. However, if what you want is to use a skill if you are close enough to use it, then there is a bit of a workaround.

First, you need to put the skill in question onto an action bar slot, then at the top of your DIYCE function, add

Source code

1
    local inRange = GetActionUsable([I][B]slot #[/B][/I])

where slot # is the action bar slot number you put the skill into. They are numbered from left to rigth, top to bottom as follows:

  • Main action bar: 1-20
  • Upper action bar (above main action bar): 21-40
  • Right action bar (vertical bar on right of screen if enabled): 41-60
  • Left action bar (vertical bar to the left of right bar if enabled): 61-80



Once done, you should be able to set a couple of skill lines using this. For example (skill names may not be correct)

Source code

1
2
i=i+1; Skill[i] = { name = "Disarm", use = inRange }
i=i+1; Skill[i] = { name = "Piercing", use = not inRange }
2013... The year from hell....

1,927

Wednesday, August 1st 2012, 7:10pm

Edit: Nvm, just realized this is diyce v1 thread...

1,928

Monday, August 13th 2012, 2:59pm

i downloaded diyce 2.2 to a folder i made in addons caled diyce2. inside that there was a folder called diyce2. i opened that and there was 3 files,
customfunctions LUA FILE
diyce LUA FILE
diyce TOC FILE
APON OPENING THEM IN ORDER,THIS IS WHAT I FOUND.
customfunctions LUA FILE local WHITE = "|cffffffff"
local SILVER = "|cffc0c0c0"
local GREEN = "|cff00ff00"
local LTBLUE = "|cffa0a0ff"
function DIYCE_DebugSkills(skillList)
DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Skill List:")

for i,v in ipairs(skillList) do
DEFAULT_CHAT_FRAME:AddMessage(SILVER.." ['..WHITE..i..SILVER..']: "..LTBLUE.."\" "..WHITE..v.name..LTBLUE.."\" use = "..WHITE..(v.use and "true" or "false"))
end
DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end
function DIYCE_DebugBuffList(buffList)
DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Buff List:")

for k,v in pairs(buffList) do
-- We ignore numbered entries because both the ID and name
-- are stored in the list. This avoids doubling the output.
if type(k) ~= "number" then
DEFAULT_CHAT_FRAME:AddMessage(SILVER.." ['..WHITE..k..SILVER..']: "..LTBLUE.."id: "..WHITE..v.id..LTBLUE.." stack: "..WHITE..v.stack..LTBLUE.." time: "..WHITE..v.time)
end
end

DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end
local silenceList = {
['Annihilation'] = true,
['King Bug Shock'] = true,
['Mana Rift'] = true,
['Dream of Gold'] = true,
['Flame'] = true,
['Flame Spell'] = true,
['Wave Bomb'] = true,
['Silence'] = true,
['Recover'] = true,
['Restore Life'] = true,
['Heal'] = true,
['Curing Shot'] = true,
['Leaves of Fire'] = true,
['Urgent Heal'] = true,
}

function PriestFairySequence(arg1)
local Skill = {}
local Skill2 = {}
local i = 0
local FairyExists = UnitExists("playerpet")
local FairyBuffs = BuffList("playerpet")
local combat = GetPlayerCombatState()
--Determine Class-Combo
mainClass, subClass = UnitClassToken( "player" )
--Summon Fairy
if (not FairyExists) and (not combat) then
if mainClass == "AUGUR" then
if subClass == "THIEF" then
Skill = {
{ name = "Shadow Fairy", use = true },
}
elseif subClass == "RANGER" then
Skill = {
{ name = "Water Fairy", use = true },
}
elseif subClass == "MAGE" then
Skill = {
{ name = "Wind Fairy", use = true },
}
elseif subClass == "KNIGHT" then
Skill = {
{ name = "Light Fairy", use = true },
}
elseif subClass == "WARRIOR" then
Skill = {
{ name = "Fire Fairy", use = true },
}
end
end
end

--Cast Halo
if FairyExists then
if mainClass == "AUGUR" then
if subClass == "THIEF" then
if (not FairyBuffs[503459]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Wraith Halo)", use = true },
}
end
elseif subClass == "RANGER" then
if (not FairyBuffs[503457]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Frost Halo)", use = true },
}
end
elseif subClass == "MAGE" then
if (not FairyBuffs[503461]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Windrider Halo)", use = true },
}
end
elseif subClass == "KNIGHT" then
if (not FairyBuffs[503507]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Devotion Halo)", use = true },
}
end
elseif subClass == "WARRIOR" then
if (not FairyBuffs[503455]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Accuracy Halo)", use = true },
}
end
end

--Cast Conceal
if (not MyCombat(Skill, arg1)) then
if (not FairyBuffs[503753]) then
if (arg1 == "v1") then
Msg("- Activating Conceal", 0, 1, 1)
end
Skill2 = {
{ name = "Pet Skill: 7 (Conceal)", use = true },
}
end
end
end
end

if (not MyCombat(Skill, arg1)) then
MyCombat(Skill2, arg1)
end
end

function KillSequence(arg1, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--healthpot = # of actionbar slot for health potions
--manapot = # of actionbar slot for mana potions
--foodslot = # of actionbar slot for food (add more args for more foodslots if needed)
local Skill = {}
local Skill2 = {}
local i = 0

-- Player and target status.
local combat = GetPlayerCombatState()
local enemy = UnitCanAttack("player","target")
local EnergyBar1 = UnitMana("player")
local EnergyBar2 = UnitSkill("player")
local pctEB1 = PctM("player")
local pctEB2 = PctS("player")
local tbuffs = BuffList("target")
local pbuffs = BuffList("player")
local tDead = UnitIsDeadOrGhost("target")
local behind = (not UnitIsUnit("player", "targettarget"))
local melee = GetActionUsable(13) -- # is your melee range spell slot number
local a1,a2,a3,a4,a5,ASon = GetActionInfo(14) -- # is your Autoshot slot number
local phealth = PctH("player")
local thealth = PctH("target")
local LockedOn = UnitExists("target")
local boss = UnitSex("target") > 2
local elite = UnitSex("target") == 2
local party = GetNumPartyMembers() >= 2

--Determine Class-Combo
mainClass, subClass = UnitClassToken( "player" )
--Silence Logic
local tSpell,tTime,tElapsed = UnitCastingTime("target")
local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)

--Potion Checks
healthpot = healthpot or 0
manapot = manapot or 0

--Equipment and Pet Protection
if phealth <= .04 then
--SwapEquipmentItem() --Note: Remove the first double dash to re-enable equipment protection.
for i=1,6 do
if (IsPetSummoned(i) == true) then
ReturnPet(i);
end
end
end

--Check for level 1 mobs, if it is, drop target and acquire a new one.
if (LockedOn and (UnitLevel("target") < 2)) then
TargetUnit("")
return
end

--Begin Player Skill Sequences

--Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT,
--Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR

-- Class: Warrior/Mage
if mainClass == "WARRIOR" and subClass == "MAGE" then
local SurpriseAttack = GetActionUsable(14)

--Potions and Buffs
Skill = {
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Survival Instinct", use = (phealth <= .30) and combat },
{ name = "Sense of Danger", use = (phealth <= .30) and combat },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
{ name = "Action: "..Healslot, use = (phealth < .70) and (not combat) and (not party) },
{ name = "Action: "..HoTslot, use = (phealth < .80) and (not party) },
{ name = "Intensification", use = (pctEB2 >= .05) and (not pbuffs['Intensification']) and boss and enemy },
{ name = "Aggressiveness", use = boss and enemy },
{ name = "Electric Attack", use = (pctEB2 >= .05) and ((not pbuffs['Electric Attack']) or (pbuffs['Electric Attack'].time <= 45)) },
}

--Combat
if enemy then
Skill2 = {
{ name = "Silence", use = (silenceThis) },
{ name = "Surprise Attack", use = SurpriseAttack },
{ name = "Enraged", use = (EnergyBar1 <= 30) and (boss or elite) },
{ name = "Electrical Rage", use = (EnergyBar1 >= 15) and (pctEB2 >=.05) and (not pbuffs['High Voltage III']) },
{ name = "Thunder Sword", use = (pctEB2 >= .05) },
{ name = "Lightning's Touch", use = (pctEB2 >= .05) },
{ name = "Attack", use = (thealth == 1) },
}
end
--Class: Rogue/Priest
elseif mainClass == "THIEF" and subClass == "AUGUR" then

--Potions and Buffs
Skill = {
{ name = "Regenerate", use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
{ name = "Magic Barrier", use = (pctEB2 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
{ name = "Quickness Aura", use = (pctEB2 >= .05) and ((not pbuffs['Quickness Aura']) or (pbuffs['Quickness Aura'].time <= 45)) },
{ name = "Poison", use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45))},
}

--Combat
if enemy then
Skill2 = {
{ name = "Premeditation", use = (not combat) and boss and (EnergyBar1 >= 50) },
{ name = "Slowing Poison", use = boss },
{ name = "Informer", use = boss },
{ name = "Fervent Attack", use = boss },
{ name = "Assassins Rage", use = boss },
{ name = "Kick", use = (pctEB2 >= .05) },
{ name = "Sneak Attack", use = (EnergyBar1 >= 20) and boss and behind and party },
{ name = "Blind Spot Attack", use = (EnergyBar1 >= 20) and boss and behind and party },
{ name = "Shadowstab", use = (EnergyBar1 >= 20) and (not tbuffs[620313]) },
{ name = "Low Blow", use = (EnergyBar1 >= 30) and (tbuffs[620313]) and (not tbuffs[500704]) },
{ name = "Wound Attack", use = (EnergyBar1 >= 35) },
{ name = "Shadowstab", use = (EnergyBar1 >= 20) },
{ name = "Attack", use = (thealth == 1) },
}
end

--Class: Knight/Scout (not in use yet)
--elseif mainClass == "KNIGHT" and subClass == "RANGER" then
--Class: All other knights
elseif mainClass == "KNIGHT" then

--Potions and Buffs
Skill = {
{ name = "Holy Seal", use = (pctEB1 >= .05) and (not pbuffs['Holy Seal']) },
{ name = "Enhanced Armor", use = (pctEB1 >= .05) and (not pbuffs['Enhanced Armor']) },
{ name = "Resolution", use = (combat and (phealth <= .60)) },
{ name = "Action: "..healthpot, use = (phealth <= .40) },
{ name = "Action: "..manapot, use = (pctEB1 <= .20) },
{ name = "Holy Shield", use = (phealth <= .10) },
}

--Combat
if enemy then
Skill2 = {
{ name = "Threaten", use = boss and party and (tbuffs['Holy Seals 3'])},
{ name = "Hatred Strike", use = boss and party},
{ name = "Whirlwind Shield", use = party and shield},
{ name = "Mana Return", use = (tbuffs['Holy Seals 3']) and (pctEB1 <= .40) },
{ name = "Holy Strike", use = (pctEB1 >= .05)},
}
end

--ADD MORE CLASS COMBOS HERE.
--USE AN "ELSEIF" TO CONTINUE WITH MORE CLASS COMBOS.
--THE NEXT "END" STATEMENT IS THE END OF THE CLASS COMBOS STATEMENTS.
--DO NOT POST BELOW THE FOLLOWING "END" STATEMENT!
end
--End Player Skill Sequences

if (arg1=="debugskills") then --Used for printing the skill table, and true/false usability
DIYCE_DebugSkills(Skill)
DIYCE_DebugSkills(Skill2)
elseif (arg1=="debugpbuffs") then --Used for printing your buff names, and buffID
DIYCE_DebugBuffList(pbuffs)
elseif (arg1=="debugtbuffs") then --Used for printing target buff names, and buffID
DIYCE_DebugBuffList(tbuffs)
elseif (arg1=="debugall") then --Used for printing all of the above at the same time
DIYCE_DebugSkills(Skill)
DIYCE_DebugSkills(Skill2)
DIYCE_DebugBuffList(pbuffs)
DIYCE_DebugBuffList(tbuffs)
end

if (not MyCombat(Skill, arg1)) then
MyCombat(Skill2, arg1)
end

--Select Next Enemy
if (tDead) then
TargetUnit("")
return
end
if mainClass == "RANGER" and (not party) then --To keep scouts from pulling mobs without meaning to.
if (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
elseif mainClass ~= "RANGER" then --Let all other classes auto target.
if (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
end
end
diyce lua file -- DIY Combat Engine version 2.2
local g_skill = {}
local g_lastaction = ""
function Msg(outstr,a1,a2,a3)
DEFAULT_CHAT_FRAME:AddMessage(tostring(outstr),a1,a2,a3)
end
function ReadSkills()
g_skill = {}
local skillname,slot
for page = 1,4 do
slot = 1
skillname = GetSkillDetail(page,slot)
repeat
local a1,a2,a3,a4,a5,a6,a7,a8,skillusable = GetSkillDetail(page,slot)
if skillusable then
g_skill[skillname] = { ['page'] = page, ['slot'] = slot }
end
slot = slot + 1
skillname = GetSkillDetail(page,slot)
until skillname == nil
end
end
-- Read Skills on Log-In/Class Change/Level-Up
local DIYCE_EventFrame = CreateUIComponent("Frame","DIYCE_EventFrame","UIParent")
DIYCE_EventFrame:SetScripts("OnEvent", [=[
if event == 'PLAYER_SKILLED_CHANGED' then
ReadSkills()
end
]=] )
DIYCE_EventFrame:RegisterEvent("PLAYER_SKILLED_CHANGED")
function PctH(tgt)
return (UnitHealth(tgt)/UnitMaxHealth(tgt))
end
function PctM(tgt)
return (UnitMana(tgt)/UnitMaxMana(tgt))
end
function PctS(tgt)
return (UnitSkill(tgt)/UnitMaxSkill(tgt))
end
function CancelBuff(buffname)
local i = 1
local buff = UnitBuff("player",i)
while buff ~= nil do
if buff == buffname then
CancelPlayerBuff(i)
return true
end
i = i + 1
buff = UnitBuff("player",i)
end
return false
end
function BuffList(tgt)
local list = {}
local buffcmd = UnitBuff
local infocmd = UnitBuffLeftTime
if UnitCanAttack("player",tgt) then
buffcmd = UnitDebuff
infocmd = UnitDebuffLeftTime
end
-- There is a max of 100 buffs/debuffs per unit apparently
for i = 1,100 do
local buff, _, stackSize, ID = buffcmd(tgt, i)
local timeRemaining = infocmd(tgt,i)
if buff then
-- Ad to list by name
list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining, id = ID }
-- We also list by ID in case two different buffs/debuffs have the same name.
list[ID] = {stack = stackSize, time = timeRemaining, name = buff:gsub("(%()(.)(%))", "%2") }
else
break
end
end
return list
end
function CD(skillname)
local firstskill = GetSkillDetail(2,1)
if (g_skill[firstskill] == nil) or (g_skill[firstskill].page ~= 2) then
ReadSkills()
end
if g_skill[skillname] ~= nil then
local tt,cd = GetSkillCooldown(g_skill[skillname].page,g_skill[skillname].slot)
return cd <= 0.4
elseif skillname == nil then
return false
else
Msg("Skill not available: "..skillname) --Comment this line out if you do not wish to recieve this error message.
return
end
end
function MyCombat(Skill, arg1)
local spell_name = UnitCastingTime("player")
local talktome = ((arg1 == "v1") or (arg1 == "v2"))
local action,actioncd,actiondef,actioncnt

if spell_name ~= nil then
if (arg1 == "v2") then Msg("- ['..spell_name..']", 0, 1, 1) end
return true
end
for x,tbl in ipairs(Skill) do

local useit = type(Skill[x].use) ~= "function" and Skill[x].use or (type(Skill[x].use) == "function" and Skill[x].use() or false)
if useit then
if string.find(Skill[x].name, "Action:") then
action = tonumber((string.gsub(Skill[x].name, "(Action:)( *)(%d+)(.*)", "%3")))
_1,actioncd = GetActionCooldown(action)
actiondef,_1,actioncnt = GetActionInfo(action)
if GetActionUsable(action) and (actioncd == 0) and (actiondef ~= nil) and (actioncnt > 0) then
if talktome then Msg("- "..Skill[x].name) end
UseAction(action)
return true
end
elseif string.find(Skill[x].name, "Custom:") then
action = string.gsub(Skill[x].name, "(Custom:)( *)(.*)", "%3")
if CustomAction(action) then
return true
end
elseif string.find(Skill[x].name, "Item:") then
action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
if talktome then Msg("- "..Skill[x].name) end
UseItemByName(action)
return true
elseif CD(Skill[x].name) then
if talktome then Msg("- "..Skill[x].name) end
CastSpellByName(Skill[x].name)
return true
elseif string.find(Skill[x].name, "Pet Skill:") then
action = string.gsub(Skill[x].name, "(Pet Skill:)( *)(%d+)(.*)", "%3")
UsePetAction(action)
if (arg1 == "v2") then Msg(Skill[x].name.." has been fully processed") end
return true
end
end
end
if (arg1 == "v2") then Msg("- [IDLE]", 0, 1, 1) end

return false
end
function CustomAction(action)
if CD(action) then
if IsShiftKeyDown() then Msg("- "..action) end
g_lastaction = action
CastSpellByName(action)
return true
else
return false
end
end
function BuffTimeLeft(tgt, buffname)
local cnt = 1
local buff = UnitBuff(tgt,cnt)
while buff ~= nil do
if string.find(buff,buffname) then
return UnitBuffLeftTime(tgt,cnt)
end
cnt = cnt + 1
buff = UnitBuff(tgt,cnt)
end
return 0
end
function BuffParty(arg1,arg2)
-- arg1 = Quickbar slot # for targetable, instant-cast buff without a cooldown (eg. Amp Attack) for range checking.
-- arg2 = buff expiration time cutoff (in seconds) for refreshing buffs, default is 45 seconds.
local selfbuffs = { "Soul Bond", "Enhanced Armor", "Holy Seal" }
local groupbuffs = { "Grace of Life", "Amplified Attack", "Angel's Blessing", "Essence of Magic", "Magic Barrier", "Blessed Spring Water", "Fire Ward", "Savage Blessing", "Concentration Prayer", "Shadow Fury" }
local buffrefresh = arg2 or 45 -- Refresh buff time (seconds)
local spell = UnitCastingTime("player") -- Spell being cast?
local vocal = IsShiftKeyDown() -- Generate feedback if Shift key held
if (spell ~= nil) then
return
end
if vocal then Msg("- Checking self buffs on "..UnitName("player")) end
for i,buff in ipairs(selfbuffs) do
if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("player",buff) <= buffrefresh) then
if vocal then Msg("- Casting "..buff.." on "..UnitName("player")) end
TargetUnit("player")
CastSpellByName(buff)
return
end
end
if vocal then Msg("- Checking group buffs on "..UnitName("player")) end
for i,buff in ipairs(groupbuffs) do
if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("player",buff) <= buffrefresh) then
if vocal then Msg("- Casting "..buff.." on "..UnitName("player")) end
TargetUnit("player")
CastSpellByName(buff)
return
end
end
for num=1,GetNumPartyMembers()-1 do
TargetUnit("party"..num)
if GetActionUsable(arg1) and (UnitHealth("party"..num) > 0) then
if vocal then Msg("- Checking group buffs on "..UnitName("party"..num)) end
for i,buff in ipairs(groupbuffs) do
if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("target",buff) <= buffrefresh) then
if UnitIsUnit("target","party"..num) then
if vocal then Msg("- Casting "..buff.." on "..UnitName("target")) end
CastSpellByName(buff)
return
else
if vocal then Msg("- Error: "..UnitName("target").." != "..UnitName("party"..num)) end
end
end
end
else
if vocal then Msg("- Player "..UnitName("party"..num).." out of range or dead.") end
end
end
if vocal then Msg("- Nothing to do.") end
end
diyce toc file DIYCE.lua
CustomFunctions.lua

ok i started the game and made a macro and called it /run killSequence
when i manually targeted a beast i got an interface execution error that said error amount 1/1 [string 'killsequence']:1:'=' expected near '<eof>'
i think i did it right, and i must admit, im a sothern redneck thats not to good with thies kind of things. plz help so i can do better in game.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,929

Tuesday, August 14th 2012, 4:13am

OK, two problems (well three, but I'll get to that last one in a bit).

First problem, you didn't decompress the add-on in the correct folder. The diyce2 folder that is created by decompressing the .zip should be in the interface\addons folder, not in another sub-folder called diyce2. Move all the contents from the sub-folder up one level. If you don't do this, the game will simply not find and load the add-on.

Second, you are not calling the KillSequence function correctly. Your macro should be

Source code

1
/run KillSequence()

Note the parentheses at the end. This is needed since KillSequence is a function (or it will be once the first problem is resolved).

Now as promised, the third problem.
This is the DIYCE 1 thread. The DIYCE 2 thread is here: http://forum.us.runesofmagic.com/showthread.php?t=65376

And now a request:
Please, please, please use code tags when posting code in the forums. If you don't, the forum will make a complete mess of the post (as can be seen with the code in your post). To use code tags, add [noparse]

Source code

1
[/noparse][/B] and [B][noparse]
[/noparse]
around the code itself. For a list of other tags you can use in your posts (though some have been disabled, notably the color tags) see this link: http://forum.us.runesofmagic.com/misc.php?do=bbcode or click the words BB code at the bottom of any thread (in the Posting Permissons box).
2013... The year from hell....

1,930

Tuesday, August 14th 2012, 9:55pm

ok i moved it to the addon folder and changed the name to () i think im ready to use it, do i need to add some attack info?if so ware can i download that and ware do i put it? thanks for your time.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,931

Tuesday, August 14th 2012, 10:48pm

I've posted my reply in the DIYCE 2 thread as it is more appropriate there.
2013... The year from hell....

1,932

Wednesday, August 15th 2012, 12:20pm

how do i find it?
help plz

1,933

Monday, August 20th 2012, 2:49pm

ok i need diyce 2.2 help. downloaded it and got it to the right place, not to sure how to add thwe rest , i tryed and keep getting a global error message saying attempt to call global kill sequence a nil value. i added what i cut and paisted to the my custom functions folder
local WHITE = "|cffffffff"
local SILVER = "|cffc0c0c0"
local GREEN = "|cff00ff00"
local LTBLUE = "|cffa0a0ff"
function DIYCE_DebugSkills(skillList)
DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Skill List:")

for i,v in ipairs(skillList) do
DEFAULT_CHAT_FRAME:AddMessage(SILVER.." ['..WHITE..i..SILVER..']: "..LTBLUE.."\" "..WHITE..v.name..LTBLUE.."\" use = "..WHITE..(v.use and "true" or "false"))
end
DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end
function DIYCE_DebugBuffList(buffList)
DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Buff List:")

for k,v in pairs(buffList) do
-- We ignore numbered entries because both the ID and name
-- are stored in the list. This avoids doubling the output.
if type(k) ~= "number" then
DEFAULT_CHAT_FRAME:AddMessage(SILVER.." ['..WHITE..k..SILVER..']: "..LTBLUE.."id: "..WHITE..v.id..LTBLUE.." stack: "..WHITE..v.stack..LTBLUE.." time: "..WHITE..v.time)
end
end

DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end
local silenceList = {
['Annihilation'] = true,
['King Bug Shock'] = true,
['Mana Rift'] = true,
['Dream of Gold'] = true,
['Flame'] = true,
['Flame Spell'] = true,
['Wave Bomb'] = true,
['Silence'] = true,
['Recover'] = true,
['Restore Life'] = true,
['Heal'] = true,
['Curing Shot'] = true,
['Leaves of Fire'] = true,
['Urgent Heal'] = true,
}

function PriestFairySequence(arg1)
local Skill = {}
local Skill2 = {}
local i = 0
local FairyExists = UnitExists("playerpet")
local FairyBuffs = BuffList("playerpet")
local combat = GetPlayerCombatState()
--Determine Class-Combo
mainClass, subClass = UnitClassToken( "player" )
--Summon Fairy
if (not FairyExists) and (not combat) then
if mainClass == "AUGUR" then
if subClass == "THIEF" then
Skill = {
{ name = "Shadow Fairy", use = true },
}
elseif subClass == "RANGER" then
Skill = {
{ name = "Water Fairy", use = true },
}
elseif subClass == "MAGE" then
Skill = {
{ name = "Wind Fairy", use = true },
}
elseif subClass == "KNIGHT" then
Skill = {
{ name = "Light Fairy", use = true },
}
elseif subClass == "WARRIOR" then
Skill = {
{ name = "Fire Fairy", use = true },
}
end
end
end

--Cast Halo
if FairyExists then
if mainClass == "AUGUR" then
if subClass == "THIEF" then
if (not FairyBuffs[503459]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Wraith Halo)", use = true },
}
end
elseif subClass == "RANGER" then
if (not FairyBuffs[503457]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Frost Halo)", use = true },
}
end
elseif subClass == "MAGE" then
if (not FairyBuffs[503461]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Windrider Halo)", use = true },
}
end
elseif subClass == "KNIGHT" then
if (not FairyBuffs[503507]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Devotion Halo)", use = true },
}
end
elseif subClass == "WARRIOR" then
if (not FairyBuffs[503455]) then
if (arg1 == "v1") then
Msg("- Activating Halo", 0, 1, 1)
end
Skill = {
{ name = "Pet Skill: 6 (Accuracy Halo)", use = true },
}
end
end

--Cast Conceal
if (not MyCombat(Skill, arg1)) then
if (not FairyBuffs[503753]) then
if (arg1 == "v1") then
Msg("- Activating Conceal", 0, 1, 1)
end
Skill2 = {
{ name = "Pet Skill: 7 (Conceal)", use = true },
}
end
end
end
end

if (not MyCombat(Skill, arg1)) then
MyCombat(Skill2, arg1)
end
end

function KillSequence(arg1, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--healthpot = # of actionbar slot for health potions
--manapot = # of actionbar slot for mana potions
--foodslot = # of actionbar slot for food (add more args for more foodslots if needed)
local Skill = {}
local Skill2 = {}
local i = 0

-- Player and target status.
local combat = GetPlayerCombatState()
local enemy = UnitCanAttack("player","target")
local EnergyBar1 = UnitMana("player")
local EnergyBar2 = UnitSkill("player")
local pctEB1 = PctM("player")
local pctEB2 = PctS("player")
local tbuffs = BuffList("target")
local pbuffs = BuffList("player")
local tDead = UnitIsDeadOrGhost("target")
local behind = (not UnitIsUnit("player", "targettarget"))
local melee = GetActionUsable(13) -- # is your melee range spell slot number
local a1,a2,a3,a4,a5,ASon = GetActionInfo(14) -- # is your Autoshot slot number
local phealth = PctH("player")
local thealth = PctH("target")
local LockedOn = UnitExists("target")
local boss = UnitSex("target") > 2
local elite = UnitSex("target") == 2
local party = GetNumPartyMembers() >= 2

--Determine Class-Combo
mainClass, subClass = UnitClassToken( "player" )
--Silence Logic
local tSpell,tTime,tElapsed = UnitCastingTime("target")
local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)

--Potion Checks
healthpot = healthpot or 0
manapot = manapot or 0

--Equipment and Pet Protection
if phealth <= .04 then
--SwapEquipmentItem() --Note: Remove the first double dash to re-enable equipment protection.
for i=1,6 do
if (IsPetSummoned(i) == true) then
ReturnPet(i);
end
end
end

--Check for level 1 mobs, if it is, drop target and acquire a new one.
if (LockedOn and (UnitLevel("target") < 2)) then
TargetUnit("")
return
end

--Begin Player Skill Sequences

--Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT,
--Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR

-- Class: Warrior/Mage
if mainClass == "WARRIOR" and subClass == "MAGE" then
local SurpriseAttack = GetActionUsable(14)

--Potions and Buffs
Skill = {
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Survival Instinct", use = (phealth <= .30) and combat },
{ name = "Sense of Danger", use = (phealth <= .30) and combat },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
{ name = "Action: "..Healslot, use = (phealth < .70) and (not combat) and (not party) },
{ name = "Action: "..HoTslot, use = (phealth < .80) and (not party) },
{ name = "Intensification", use = (pctEB2 >= .05) and (not pbuffs['Intensification']) and boss and enemy },
{ name = "Aggressiveness", use = boss and enemy },
{ name = "Electric Attack", use = (pctEB2 >= .05) and ((not pbuffs['Electric Attack']) or (pbuffs['Electric Attack'].time <= 45)) },
}

--Combat
if enemy then
Skill2 = {
{ name = "Silence", use = (silenceThis) },
{ name = "Surprise Attack", use = SurpriseAttack },
{ name = "Enraged", use = (EnergyBar1 <= 30) and (boss or elite) },
{ name = "Electrical Rage", use = (EnergyBar1 >= 15) and (pctEB2 >=.05) and (not pbuffs['High Voltage III']) },
{ name = "Thunder Sword", use = (pctEB2 >= .05) },
{ name = "Lightning's Touch", use = (pctEB2 >= .05) },
{ name = "Attack", use = (thealth == 1) },
}
end
--Class: Rogue/Priest
elseif mainClass == "THIEF" and subClass == "AUGUR" then

--Potions and Buffs
Skill = {
{ name = "Regenerate", use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
{ name = "Magic Barrier", use = (pctEB2 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
{ name = "Quickness Aura", use = (pctEB2 >= .05) and ((not pbuffs['Quickness Aura']) or (pbuffs['Quickness Aura'].time <= 45)) },
{ name = "Poison", use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45))},
}

--Combat
if enemy then
Skill2 = {
{ name = "Premeditation", use = (not combat) and boss and (EnergyBar1 >= 50) },
{ name = "Slowing Poison", use = boss },
{ name = "Informer", use = boss },
{ name = "Fervent Attack", use = boss },
{ name = "Assassins Rage", use = boss },
{ name = "Kick", use = (pctEB2 >= .05) },
{ name = "Sneak Attack", use = (EnergyBar1 >= 20) and boss and behind and party },
{ name = "Blind Spot Attack", use = (EnergyBar1 >= 20) and boss and behind and party },
{ name = "Shadowstab", use = (EnergyBar1 >= 20) and (not tbuffs[620313]) },
{ name = "Low Blow", use = (EnergyBar1 >= 30) and (tbuffs[620313]) and (not tbuffs[500704]) },
{ name = "Wound Attack", use = (EnergyBar1 >= 35) },
{ name = "Shadowstab", use = (EnergyBar1 >= 20) },
{ name = "Attack", use = (thealth == 1) },
}
end

--Class: Knight/Scout (not in use yet)
--elseif mainClass == "KNIGHT" and subClass == "RANGER" then
--Class: All other knights
elseif mainClass == "KNIGHT" then

--Potions and Buffs
Skill = {
{ name = "Holy Seal", use = (pctEB1 >= .05) and (not pbuffs['Holy Seal']) },
{ name = "Enhanced Armor", use = (pctEB1 >= .05) and (not pbuffs['Enhanced Armor']) },
{ name = "Resolution", use = (combat and (phealth <= .60)) },
{ name = "Action: "..healthpot, use = (phealth <= .40) },
{ name = "Action: "..manapot, use = (pctEB1 <= .20) },
{ name = "Holy Shield", use = (phealth <= .10) },
}

--Combat
if enemy then
Skill2 = {
{ name = "Threaten", use = boss and party and (tbuffs['Holy Seals 3'])},
{ name = "Hatred Strike", use = boss and party},
{ name = "Whirlwind Shield", use = party and shield},
{ name = "Mana Return", use = (tbuffs['Holy Seals 3']) and (pctEB1 <= .40) },
{ name = "Holy Strike", use = (pctEB1 >= .05)},
}
end

--ADD MORE CLASS COMBOS HERE. elseif mainClass == "THIEF" and subClass == "RANGER" then

Skill = {
{ name = "Combat Master", use = ((not pbuffs['Combat Master')) }
{ name = 'Action: 62', use = ((not pbuffs['Yawaka's Blessing')) }
{ name = 'Action: 69', use = ((not pbuffs['Unbridled Enthusiasm')) } -- Speed Potion
{ name = 'Poison', use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45)) },
}

if enemy then
Skill2 = {
{ name = "Blind Spot", use = (EnergyBar1 >= 20) and boss and behind and (pbuffs['Energy Thief'] or pbuffs['Premeditation']) },
{ name = "Shadowstab", use = (EnergyBar1 >= 20) and (not tbuffs[620313]) },
{ name = "Low Blow", use = (EnergyBar1 >= 25) and (tbuffs[620313]) and ((not tbuffs[500704]) or pbuffs['Energy Thief']) },
{ name = "Wound Attack", use = (EnergyBar1 >= 35) },
{ name = "Vampire Arrows", use = (thealth > 1) },
{ name = "Shot", use = (not EnergyBar1 >= 20) },
{ name = "Wrist Attack", use = (EnergyBar2 >= 50) and boss },
{ name = "Throat Attack", use = (EnergyBar2 >= 50) and (boss or elite) and silenceThis },
{ name = "Attack", use = (thealth == 1) },
}
end
--USE AN "ELSEIF" TO CONTINUE WITH MORE CLASS COMBOS.
--THE NEXT "END" STATEMENT IS THE END OF THE CLASS COMBOS STATEMENTS.
--DO NOT POST BELOW THE FOLLOWING "END" STATEMENT!
end
--End Player Skill Sequences

if (arg1=="debugskills") then --Used for printing the skill table, and true/false usability
DIYCE_DebugSkills(Skill)
DIYCE_DebugSkills(Skill2)
elseif (arg1=="debugpbuffs") then --Used for printing your buff names, and buffID
DIYCE_DebugBuffList(pbuffs)
elseif (arg1=="debugtbuffs") then --Used for printing target buff names, and buffID
DIYCE_DebugBuffList(tbuffs)
elseif (arg1=="debugall") then --Used for printing all of the above at the same time
DIYCE_DebugSkills(Skill)
DIYCE_DebugSkills(Skill2)
DIYCE_DebugBuffList(pbuffs)
DIYCE_DebugBuffList(tbuffs)
end

if (not MyCombat(Skill, arg1)) then
MyCombat(Skill2, arg1)
end

--Select Next Enemy
if (tDead) then
TargetUnit("")
return
end
if mainClass == "RANGER" and (not party) then --To keep scouts from pulling mobs without meaning to.
if (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
elseif mainClass ~= "RANGER" then --Let all other classes auto target.
if (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
end
end
what am i doing wrong?

wneter

Trainee

Posts: 67

Location: Maidstone, Saskatchewan, Canada

Occupation: Computer tech

  • Send private message

1,934

Friday, November 9th 2012, 2:17am

Good day all, I am looking for the coding that will allow me to use Shadow Prison then my bow shots after it. I am still using diyce version 1.4. I have tried using some of the code i have found by searching through this and a few other forums but have not found one that works. It will cast Shadow Prison but will not follow with the other attacks, it will only cast shadow prison. I am not recieving any error codes when using this so im sure it is just something im missing in the coding to allow it to pass shadow prison once it is cast upon the target. I would appreciate it is someone might have some ideas. Thanks in advance :)
Straitarrow, 87/87/60 R/K/M
Guildleader of Straitheart (Level 12) Osha
Straitheart is a NON Drama guild, not endgame, but we love to help people get started and watch them grow in the game. If you play on Osha and are looking for a nice place to hang your hat, send me a whisper or ingame mail and we can have a chat :ninja:
Take care out there and good hunting all :)

HookerBoots

Beginner

Posts: 21

Location: California

Occupation: USMC

  • Send private message

1,935

Wednesday, December 5th 2012, 2:50pm

Can I put in my code to keep using frost arrow until my target has the debuff of Frost Slowdown? If anyone knows what I need to put please let me know, thanks.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,936

Wednesday, December 5th 2012, 3:15pm

You would need to add something like the following to your skill list (names of skill and debuff must exactly match what the game uses):

Source code

1
{ name = "Frost Arrow", use = not string.find(tbuffs, "Frost Slowdown") },

It should be placed early (if not first) in the list so that DIYCE sees/tries the skill before attempting something else.
2013... The year from hell....

HookerBoots

Beginner

Posts: 21

Location: California

Occupation: USMC

  • Send private message

1,937

Wednesday, December 5th 2012, 4:44pm

Here is what I have, I tried putting what you said in but with ( name ="Wind Arrows" since that's the skill name and of course with the "Frost Slowdown" at the end since that is the debuff on the mob. When I did that my diyce would not work.
function ScoutKnight2(arg1,arg2)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local enemy = UnitCanAttack("player","target")
local a1,a2,a3,a4,a5,ASon = GetActionInfo(5) -- # is your Autoshot slot number
i=i+1; Skill = { name = "Wind Arrows", use = (enemy and (focus >= 75)) }
i=i+1; Skill[i] = { name = "Piercing Arrow", use = enemy }
i=i+1; Skill[i] = { name = "Autoshot", use = (not ASon) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = (enemy and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Reflected Shot", use = enemy }
i=i+1; Skill[i] = { name = "Combo Shot", use = enemy }
i=i+1; Skill[i] = { name = "Shot", use = enemy }
i=i+1; Skill[i] = { name = "Disarmament Arrow", use = enemy }

MyCombat(Skill,arg1)
end

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,938

Wednesday, December 5th 2012, 5:19pm

My bad, been a while since I played with the old DIYCE.

You need to also add this near the top (with the other local variable definitions)

Source code

1
    local tbuffs = BuffList("target")


(BTW, please use code tags when posting code in the forums otherwise the code ends up a mess. See this page on how to do this).

Also, since you have a few other conditions on your Wind Arrows skill, it would become:

Source code

1
    i=i+1; Skill[i] = { name = "Wind Arrows", use = enemy and focus >= 75 and not string.find(tbuffs, "Frost Slowdown") }


P.S. I'm also assuming that this is the old version of the BuffList function since I had posted about changes to it in this thread that would affect how it works, but I don't know which one you are using.
2013... The year from hell....

HookerBoots

Beginner

Posts: 21

Location: California

Occupation: USMC

  • Send private message

1,939

Wednesday, December 5th 2012, 6:33pm

I think I am using DIYCE 1.4 and thank you it's working perfectly now.

1,940

Monday, December 10th 2012, 1:56pm

Quoted from "bobhica;258907"

That would not work because then Open Flank would never fire off and therefore Splitting Chop would never get used since it requires it. I came up with something that does seem to work though.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
function WarriorRogue(arg1)
    local Skill = {}
    local i = 0
    local friendly = (not UnitCanAttack("player", "target"))
    local rage = UnitMana("player")
    local energy = UnitSkill("player")
    local combat = GetPlayerCombatState()
    local tbuffs = BuffList("target")

    i=i+1; Skill[i] = { ['name'] = "Survival Instinct",  ['use'] = (PctH("player") < .25) }
    i=i+1; Skill[i] = { ['name'] = "Enraged",            ['use'] = (rage < 50) }
    i=i+1; Skill[i] = { ['name'] = "Splitting Chop",     ['use'] = ((not friendly) and (rage >= 15) and (string.find(tbuffs,"Weakened"))) }
    i=i+1; Skill[i] = { ['name'] = "Open Flank",         ['use'] = ((not friendly) and (rage >= 10) and (string.find(tbuffs,"Vulnerable")) and CD("Splitting Chop")) }
    i=i+1; Skill[i] = { ['name'] = "Keen Attack",        ['use'] = ((not friendly) and (energy >= 20) and (string.find(tbuffs,"Vulnerable"))) }
    i=i+1; Skill[i] = { ['name'] = "Probing Attack",     ['use'] = ((not friendly) and (rage >= 20)) }
    i=i+1; Skill[i] = { ['name'] = "Blood Dance",        ['use'] = ((not friendly) and (PctH("player") >= 0.8)) }
    i=i+1; Skill[i] = { ['name'] = "Slash",              ['use'] = ((not friendly) and (rage >= 40)) }
    i=i+1; Skill[i] = { ['name'] = "Shadowstab",         ['use'] = (not friendly) }

    MyCombat(Skill,arg1)
end


ive taken a liking to this script is there any way thunder could be put into the rotation when splitting chop is on cool down?