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.

341

Wednesday, April 28th 2010, 2:46pm

Source code

1
2
i=i+1; Skill[i] = { ['name'] = "Action: 1",    ['use'] = (PctH("player") < .80) }
i=i+1; Skill[i] = { ['name'] = "Action: 21",    ['use'] = ((not combat) and (PctM("player") < .80)) }


ok im using the first hotbar button on the first and second hotbars. I checked the location number with ntbuff so I have the correct numbers for the hotbar.
I am not getting an error any more but I get these messages. Any dea's ?

Skill not available: Action: 1
Skill not available: Action: 21

So close yet so far :)

342

Wednesday, April 28th 2010, 2:51pm

You are probably using the old version of the MyCombat() function. Grab the updated code for that from the first post and overwrite yours.

343

Thursday, April 29th 2010, 12:05am

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
g_skill = {}
function Msg(outstr,a1,a2,a3)
   DEFAULT_CHAT_FRAME:AddMessage(tostring(outstr),a1,a2,a3)
end
function ReadSkills()
   g_skill = {}
   local skillname,slot
   Msg("- Reading Class Skills")
   for page = 2,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
ReadSkills() -- Read skills into g_skill table at login
function PctH(tgt)
   return (UnitHealth(tgt)/UnitMaxHealth(tgt))
end
function ChkBuff(tgt,buffname)
   local cnt = 1
   local buffcmd = UnitBuff
   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)
   while buff ~= nil do
      if string.gsub(buff, "(%()(.)(%))", "%2") == buffname then
         return true
      end
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end
   return false
end
function BuffList(tgt)
   local cnt = 1
   local buffcmd = UnitBuff
   local buffstr = "/"
   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)
   while buff ~= nil do
      buffstr = buffstr..buff.."/"
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end
   return string.gsub(buffstr, "(%()(.)(%))", "%2")
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
   else
      Msg("Skill not available: "..skillname)
      return false
   end
end
function MyCombat(Skill,arg1)
   local spell_name = UnitCastingTime("player")
   local talktome = false
 
   if (arg1 == "v1") or (arg1 == "v2") then
      talktome = true
   end
   if spell_name ~= nil then
      if (arg1 == "v2") then Msg("- ['..spell_name..']",0,1,1) end
      return false
   end
   for x,tbl in ipairs(Skill) do
      if CD(Skill[x].name) and Skill[x].use then
         if talktome then Msg("- "..Skill[x].name) end
         CastSpellByName(Skill[x].name)
         return true
      end
   end
   if (arg1 == "v2") then Msg("- IDLE") end
   return false
end
function RogueScout(arg1,arg2)
   local Skill = {}
   local i = 0
   local energy = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
 
   i=i+1; Skill[i] = { ['name'] = "Action: 79",    ['use'] = (PctH("player") < .60) }
   i=i+1; Skill[i] = { ['name'] = "Action: 80",    ['use'] = (PctH("player") < .85) }
   i=i+1; Skill[i] = { ['name'] = "Combat Master",  ['use'] = ((not string.find(pbuffs,"Combat Master")) and (not string.find(pbuffs,"Informer"))) }
-- i=i+1; Skill[i] = { ['name'] = "Sneak Attack",   ['use'] = ((not friendly) and (energy >=30) and (arg2=="behind") and (not combat)) }
-- i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = (not friendly) }
-- i=i+1; Skill[i] = { ['name'] = "Wound Attack",   ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed") and string.find(tbuffs,"Grievous Wound")) }
-- i=i+1; Skill[i] = { ['name'] = "Low Blow",       ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed")) }
-- i=i+1; Skill[i] = { ['name'] = "Blind Spot",     ['use'] = ((not friendly) and (energy >=25) and (arg2=="behind")) }
-- i=i+1; Skill[i] = { ['name'] = "Shadowstab",     ['use'] = ((not friendly) and (energy >=35)) }
-- i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) }
   MyCombat(Skill,arg1)
end

So I have the code listed above in the MyFunctions.lua file and the script below as my macro ingame

"/run ScoutRogue()"

When I press the hotkey absolutely nothing happens:(
No errors, no glitches, no messages, nothing...... I know I'm doing something wrong, just don't know what lol

344

Thursday, April 29th 2010, 2:05am

Quoted from "Sixpax;264091"

You are close and gave me the idea to fix it perfectly... The 3rd value returned from GetActionInfo is a count of that item. If it's a skill it's always a 1, so it will work for both.

Anyway, I incorporated the Action and Item use code into post #1 of this thread now and removed it from post #162 so I don't have to maintain it in two places. Be sure to get the updated version of MyCombat() from there.



so no local definition is needed anymore?

anyway, super thanks!

345

Thursday, April 29th 2010, 2:08am

Quoted from "Imortalisle;265947"

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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
g_skill = {}
function Msg(outstr,a1,a2,a3)
   DEFAULT_CHAT_FRAME:AddMessage(tostring(outstr),a1,a2,a3)
end
function ReadSkills()
   g_skill = {}
   local skillname,slot
   Msg("- Reading Class Skills")
   for page = 2,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
ReadSkills() -- Read skills into g_skill table at login
function PctH(tgt)
   return (UnitHealth(tgt)/UnitMaxHealth(tgt))
end
function ChkBuff(tgt,buffname)
   local cnt = 1
   local buffcmd = UnitBuff
   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)
   while buff ~= nil do
      if string.gsub(buff, "(%()(.)(%))", "%2") == buffname then
         return true
      end
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end
   return false
end
function BuffList(tgt)
   local cnt = 1
   local buffcmd = UnitBuff
   local buffstr = "/"
   if UnitCanAttack("player",tgt) then
      buffcmd = UnitDebuff
   end
   local buff = buffcmd(tgt,cnt)
   while buff ~= nil do
      buffstr = buffstr..buff.."/"
      cnt = cnt + 1
      buff = buffcmd(tgt,cnt)
   end
   return string.gsub(buffstr, "(%()(.)(%))", "%2")
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
   else
      Msg("Skill not available: "..skillname)
      return false
   end
end
function MyCombat(Skill,arg1)
   local spell_name = UnitCastingTime("player")
   local talktome = false
 
   if (arg1 == "v1") or (arg1 == "v2") then
      talktome = true
   end
   if spell_name ~= nil then
      if (arg1 == "v2") then Msg("- ['..spell_name..']",0,1,1) end
      return false
   end
   for x,tbl in ipairs(Skill) do
      if CD(Skill[x].name) and Skill[x].use then
         if talktome then Msg("- "..Skill[x].name) end
         CastSpellByName(Skill[x].name)
         return true
      end
   end
   if (arg1 == "v2") then Msg("- IDLE") end
   return false
end
function RogueScout(arg1,arg2)
   local Skill = {}
   local i = 0
   local energy = UnitMana("player")
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
 
   i=i+1; Skill[i] = { ['name'] = "Action: 79",    ['use'] = (PctH("player") < .60) }
   i=i+1; Skill[i] = { ['name'] = "Action: 80",    ['use'] = (PctH("player") < .85) }
   i=i+1; Skill[i] = { ['name'] = "Combat Master",  ['use'] = ((not string.find(pbuffs,"Combat Master")) and (not string.find(pbuffs,"Informer"))) }
-- i=i+1; Skill[i] = { ['name'] = "Sneak Attack",   ['use'] = ((not friendly) and (energy >=30) and (arg2=="behind") and (not combat)) }
-- i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = (not friendly) }
-- i=i+1; Skill[i] = { ['name'] = "Wound Attack",   ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed") and string.find(tbuffs,"Grievous Wound")) }
-- i=i+1; Skill[i] = { ['name'] = "Low Blow",       ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed")) }
-- i=i+1; Skill[i] = { ['name'] = "Blind Spot",     ['use'] = ((not friendly) and (energy >=25) and (arg2=="behind")) }
-- i=i+1; Skill[i] = { ['name'] = "Shadowstab",     ['use'] = ((not friendly) and (energy >=35)) }
-- i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) }
   MyCombat(Skill,arg1)
end
So I have the code listed above in the MyFunctions.lua file and the script below as my macro ingame

"/run ScoutRogue()"

When I press the hotkey absolutely nothing happens:(
No errors, no glitches, no messages, nothing...... I know I'm doing something wrong, just don't know what lol


this might be a typo and it might be your problem. these two names should be the same. just thought i would point that out

function RogueScout(arg1,arg2)
"/run ScoutRogue()"

346

Thursday, April 29th 2010, 10:51am

compiled list of functions

Hi Sixpack and everyone else who contributes.

I was curious if it might be possible to keep an updated compiled list of complete functions for different class comboes since this engine has become quite popular and this thread is now over 35 pages to sort through. With addons like uberflex not working anymore, this engine will only continue to become more and more used as dps try to maximize their efficiency, and it would be nice to just be able to look for your class combo that has already been made and then customize it to your taste. Anyhow, just an idea, and thank you for a well organized combat engine.

347

Thursday, April 29th 2010, 11:05am

Quoted from "bobhica;266130"

Hi Sixpack and everyone else who contributes.

I was curious if it might be possible to keep an updated compiled list of complete functions for different class comboes since this engine has become quite popular and this thread is now over 35 pages to sort through. With addons like uberflex not working anymore, this engine will only continue to become more and more used as dps try to maximize their efficiency, and it would be nice to just be able to look for your class combo that has already been made and then customize it to your taste. Anyhow, just an idea, and thank you for a well organized combat engine.



agreed. is there no way to search this forum?

348

Thursday, April 29th 2010, 11:07am

Quoted from "Imortalisle;265947"

Source code

1
function RogueScout(arg1,arg2)
So I have the code listed above in the MyFunctions.lua file and the script below as my macro ingame

"/run ScoutRogue()"

When I press the hotkey absolutely nothing happens:(
No errors, no glitches, no messages, nothing...... I know I'm doing something wrong, just don't know what lol


Try /run RogueScout()

jsalemi

Trainee

Posts: 133

Location: VA, USA

  • Send private message

349

Thursday, April 29th 2010, 2:19pm

Quoted from "QthePhysicist;266143"

agreed. is there no way to search this forum?


Of course there is -- there's a drop-down menu at or near the top of every page that lets you search the forum you're in. Each thread also has an option to search that thread.

350

Thursday, April 29th 2010, 2:40pm

Will this work?

Source code

1
   i=i+1; Skill[i] = { ['name'] = "Action: 43",                     ['use'] = (((PctM("player") <= .66) and (not string.find(pbuffs,"Elemental Spirit Stone"))) or (PctM("player") <= .10)) }


I want it to use mana potions at 2/3s of my mana but let them run all the way before using it again, unless I get down really low, then just spam them like crazy. Just wondering if bufflist works for potions.

351

Thursday, April 29th 2010, 3:33pm

Quoted from "Calico;266223"

Will this work?

Source code

1
   i=i+1; Skill[i] = { ['name'] = "Action: 43",                     ['use'] = (((PctM("player") <= .66) and (not string.find(pbuffs,"Elemental Spirit Stone"))) or (PctM("player") <= .10)) }
I want it to use mana potions at 2/3s of my mana but let them run all the way before using it again, unless I get down really low, then just spam them like crazy. Just wondering if bufflist works for potions.


Short answer: Yes.

Long answer: Everything in the "use" definition gets evaluated before you even pass your custom built Skill table to the MyCombat() function. Once it gets passed to the MyCombat() function "use" is just a true or false.

Also, you're free to have multiple lines for the same action/skill if that helps with complex definitions like this. So instead of what you have (which will work just fine), you could also do this:

Source code

1
2
   i=i+1; Skill[i] = { name = "Action: 43",      use = ((PctM("player") <= .66) and (not string.find(pbuffs,"Elemental Spirit Stone"))) }
   i=i+1; Skill[i] = { name = "Action: 43",      use = (PctM("player") <= .10) }

352

Thursday, April 29th 2010, 3:37pm

Quoted from "Imortalisle;265947"

So I have the code listed above in the MyFunctions.lua file and the script below as my macro ingame

"/run ScoutRogue()"

When I press the hotkey absolutely nothing happens:(
No errors, no glitches, no messages, nothing...... I know I'm doing something wrong, just don't know what lol


In addition to what others have pointed out (macro should be: "/run RogueScout()"), you also need to get the updated version of the MyCombat() function from post #1 of this thread in order for the "Action: #" definitions to work.

353

Thursday, April 29th 2010, 3:40pm

Quoted from "QthePhysicist;266143"

agreed. is there no way to search this forum?


When browsing this thread, you can click on "Search this thread" at the top of the page and then you can look for whatever you need.

354

Thursday, April 29th 2010, 3:49pm

Thanks again Sixpax, I actually build them separately and then combine them together to keep it clean, It gets confusing as to the priority order when I have many copies of the same skill.

355

Thursday, April 29th 2010, 4:11pm

Quoted from "QthePhysicist;266001"

so no local definition is needed anymore?


Correct. For any "Action: #" definitions, the MyCombat() function performs the following checks before it tries to use it:

1) GetActionUsable(#) is true, meaning the skill/item is ready to be used. Oddly enough this will return true for potions that are cooling down (thus the reason for check #2).
2) Second return value from GetActionCooldown(#) is 0, meaning the skill/item is not on cooldown.
3) First return value from GetActionInfo(#) is not nil, meaning it's not an empty hotbar slot.
4) Third return value from GetActionInfo(#) is > 0. I believe that will only return 0 if it's an item you no longer posses (i.e. you ran out of potions). This will be a 1 if the hotbar slot points to a skill.

One thing to be aware of, "Action: #" works for all items, not just potions. So for those of you who play a Knight and use a macro to switch from 2H to 1H+shield to do WWS, you *should* be able to mimic that with this (assuming 2H is on hotbar #1, 1H is on hotbar #2, and shield is on hotbar #3):

Source code

1
2
3
4
5
6
7
local shield = (GetEquipSlotInfo(17) ~= nil)
local sword = (GetEquipSlotInfo(16) ~= nil)
local WWScd = CD("Whirlwind Shield")
i=i+1; Skill[i] = { name = "Action: 3",        use = (WWScd and (not shield)) }
i=i+1; Skill[i] = { name = "Action: 2",        use = (WWScd and (not sword)) }
i=i+1; Skill[i] = { name = "Action: 1",        use = ((not WWScd) and shield) }
i=i+1; Skill[i] = { name = "Whirlwind Shield", use = ((not friendly) and shield) }
I'm not sure what the mainhand slot number is for GetEquipSlotInfo()... I guessed at 16, so please test that for the correct slot number.

356

Thursday, April 29th 2010, 9:00pm

this switching weapons thing could be nice. i will try it soon. thanks for the clarification on the action part.

as for the thread, what I'd REALLY like to do is jump straight to one post, say for example to post #162, without scrolling up or back to it. is that possible

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

357

Thursday, April 29th 2010, 9:03pm

Quoted from "QthePhysicist;266441"

this switching weapons thing could be nice. i will try it soon. thanks for the clarification on the action part.

as for the thread, what I'd REALLY like to do is jump straight to one post, say for example to post #162, without scrolling up or back to it. is that possible

no easy way I know of, but the post number to the right of your post is clickable to show that post.

i.e.

Source code

1
http://forum.us.runesofmagic.com/showpost.php?p=266441&postcount=356


to make it inside the thread, change showpost to showthread.
http://forum.us.runesofmagic.com/showpos…1&postcount=356
http://forum.us.runesofmagic.com/showthr…1&postcount=356

T

358

Thursday, April 29th 2010, 10:35pm

I believe I came up with a rogue function that is not dependent on the "behind" function but instead uses your buffs and states and the targets debuffs to fire.


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
28
29
30
31
32
33
34
function RogueKnight(arg1)
   local Skill = {}
   local i = 0
   local friendly = (not UnitCanAttack("player", "target"))
   local energy = UnitMana("player")
   local mana = UnitSkill("player")
   local combat = GetPlayerCombatState()
   local health

   if friendly then
      health = PctH("target")
   else
      health = PctH("player")
   end

   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")

    i=i+1; Skill[i] = { ['name'] = "Assassins Rage",    ['use'] = ((combat) and (not string.find(pbuffs,"Assassins Rage"))) }
    i=i+1; Skill[i] = { ['name'] = "Enhanced Armor",    ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
    i=i+1; Skill[i] = { ['name'] = "Poison",    ['use'] = ((not combat) and (not string.find(pbuffs,"Poisonous"))) }
    i=i+1; Skill[i] = { ['name'] = "Poison Protection",    ['use'] = ((not combat) and (not string.find(pbuffs,"Poison Protection"))) }
    i=i+1; Skill[i] = { ['name'] = "Premeditation",        ['use'] = ((not combat) and (not string.find(pbuffs,"Hide")) and (not string.find(pbuffs,"Premeditation"))) }
    i=i+1; Skill[i] = { ['name'] = "Hide",        ['use'] = ((not combat) and (not string.find(pbuffs,"Hide"))) }
    i=i+1; Skill[i] = { ['name'] = "Sneak Attack",   ['use'] = ((not combat)  and (energy >=100) and (not friendly) and (string.find(pbuffs,"Hide"))) }
    i=i+1; Skill[i] = { ['name'] = "Blind Spot",     ['use'] = ((combat) and (not friendly) and (energy >=70) and (string.find(tbuffs,"Sneak Attack  Stun"))) }
    i=i+1; Skill[i] = { ['name'] = "Low Blow",       ['use'] = ((combat) and (not friendly) and (energy >=35) and (string.find(tbuffs,"Blind Spot Bleed"))) }
    i=i+1; Skill[i] = { ['name'] = "Wound Attack",   ['use'] = ((combat) and (not friendly) and (energy >=35) and (string.find(tbuffs,"Blind Spot Bleed")) and (string.find(tbuffs,"Grievous Wound"))) }
    i=i+1; Skill[i] = { ['name'] = "Wound Attack",   ['use'] = ((combat) and (not friendly) and (energy >=35) and (string.find(tbuffs,"Bleed")) and (string.find(tbuffs,"Grievous Wound"))) }
    i=i+1; Skill[i] = { ['name'] = "Low Blow",       ['use'] = ((combat) and (not friendly) and (energy >=35) and (string.find(tbuffs,"Bleed"))) }
    i=i+1; Skill[i] = { ['name'] = "Shadowstab",     ['use'] = ((combat) and (not friendly) and (energy >=35) and (not string.find(tbuffs,"Bleed"))) }
    i=i+1; Skill[i] = { ['name'] = "Disarmament",          ['use'] = ((combat) and (energy <=35) and (not string.find(tbuffs,"Disarmament IV"))) }

    MyCombat(Skill,arg1)

Please provide feedback. thanks

359

Friday, April 30th 2010, 12:22am

Quoted from "gjunk1;266501"

I believe I came up with a rogue function that is not dependent on the "behind" function but instead uses your buffs and states and the targets debuffs to fire.

Please provide feedback. thanks


Here's the only problem with trying to make the positional attacks work that way... if you happen to get into a situation where you're not in the right position (behind the target) then the code will get stuck at that skill and not perform any skills after it. Quite frequently, I'll move in behind a target to execute Sneak Attack or Blind Spot and due to lag or whatever the position on my screen isn't where the server thinks I am so the rear attack won't fire.

360

Friday, April 30th 2010, 7:36am

I tried the function for MagePriest and the only thing it does for me is tells me which skills are not available and cast electric bolt and then nothing. I have tried different variations and also tried to remove electric bolt and got nothing. Really sucks!

This is how my code looks for reference


Quoted


function MagePriest(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local phealth = PctH("player")
local thealth = PctH("target")
local health, buffs

if friendly then
health = thealth
buffs = tbuffs
else
health = phealth
buffs = pbuffs
end

i=i+1; Skill = { ['name'] = "Action: 43", ['use'] = ((PctM("player") <= .66) and (not string.find (pbuffs,"Elemental Spirit Stone"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 43", ['use'] = (PctM("player") <= .10) }
i=i+1; Skill[i] = { ['name'] = "Holy Aura", ['use'] = (phealth <= .30) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = ((health <= .90) and (not string.find(buffs, "Regenerate"))) }
i=i+1; Skill[i] = { ['name'] = "Urgent heal", ['use'] = (health <= .70) }
i=i+1; Skill[i] = { ['name'] = "Elemental Weakness", ['use'] = ((not friendly) and (not string.find(tbuffs, "Elemental Weakness"))) }
i=i+1; Skill[i] = { ['name'] = "Magic Drain", ['use'] = ((not friendly) and (not string.find(tbuffs, "Drain"))) }
i=i+1; Skill[i] = { ['name'] = "Electric Bolt", ['use'] = ((not friendly) and (not string.find(tbuffs, "Electric Flux"))) }
i=i+1; Skill[i] = { ['name'] = "Fireball", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Lightning", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Rising Tide", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Flame", ['use'] = (not friendly) }

MyCombat(Skill,arg1)
end