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.

jgill33

Beginner

Posts: 0

Location: Falls Church, VA

  • Send private message

921

Friday, July 23rd 2010, 1:21am

Hmmmm, I don't know what's causing it because I just used it and it is working just fine.

922

Friday, July 23rd 2010, 4:33am

Ok, when i try to run my code for ScoutKnight(with a macro /run ScoutKnight() ) it does absolutely nothing.
I am not sure if i have something in there that is interefering with it or not, I have been looking around the forums, and this thread looking for info about it and not understanding much of it lol.


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
function KnightScout(arg1,arg2)
   local Skill = {}
   local i = 0
   local friendly = (not UnitCanAttack("player","target"))
   local shield = (GetEquipSlotInfo(17) ~= nil)
   local combat = GetPlayerCombatState()
   local mana = PctM("player")
   local focus = UnitSkill("player")
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
   local tspell,ttime,telapsed = UnitCastingTime("target")

    
   
   i=i+1; Skill[i] = { ['name'] = "Throat Attack",        ['use'] = (not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and (focus >= 15)) }
   i=i+1; Skill[i] = { ['name'] = "Holy Seal",            ['use'] = (not string.find(pbuffs,"Holy Seal")) }
   i=i+1; Skill[i] = { ['name'] = "Enhanced Armor",       ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",       ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",                 ['use'] = (not friendly) }
 --i=i+1; Skill[i] = { ['name'] = "Charge",               ['use'] = (not friendly) }
 --i=i+1; Skill[i] = { ['name'] = "Hatred Strike",        ['use'] = (not string.find(pbuffs,"Hatred Strike")) and (arg2 == "tank")) }
 --i=i+1; Skill[i] = { ['name'] = "Threaten",             ['use'] = (string.find(tbuffs,"Holy Seals 3") and (not string.find(pbuffs,"Threaten")) and (arg2 == "tank")) }
   i=i+1; Skill[i] = { ['name'] = "Mana Return",          ['use'] = (string.find(tbuffs,"Holy Seals 3") and (mana <= .75)) }
   i=i+1; Skill[i] = { ['name'] = "Punishment",           ['use'] = (not friendly) and string.find(tbuffs,"Light Seal III")) }
   i=i+1; Skill[i] = { ['name'] = "Holy Strike",          ['use'] = (not friendly) }
 --i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield",     ['use'] = (shield and (not friendly) and (arg2 == "tank")) }
   MyCombat(Skill,arg1)
end




function ScoutKnight(arg1)

   local Skill = {}
   local i = 0
   local friendly = (not UnitCanAttack("player","target"))
   local combat = GetPlayerCombatState()
   local mana = PctM("player")
   local focus = UnitSkill("player")
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
   local tspell,ttime,telapsed = UnitCastingTime("target")

    if (not combat) then
   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",          ['use'] = (not string.find(pbuffs,"Frost Arrow")) }
   end

   i=i+1; Skill[i] = { ['name'] = "Throat Attack",        ['use'] = (not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and (focus >= 15)) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows",       ['use'] = (string.find(tbuffs, "Vampire Arrows") and focus >= 20)}
   i=i+1; Skill[i] = { ['name'] = "Shot",                 ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Joint Blow",           ['use'] = (string.find(tbuffs, "Joint Blow") and focus >= 15)}
   --i=i+1; Skill[i] = { ['name'] = "Punishment",           ['use'] = (not friendly) and string.find(tbuffs,"Light Seal III")) }
   --i=i+1; Skill[i] = { ['name'] = "Holy Strike",          ['use'] = (not friendly) }
   


   MyCombat(Skill,arg1)
end

jgill33

Beginner

Posts: 0

Location: Falls Church, VA

  • Send private message

923

Friday, July 23rd 2010, 4:53am

Quoted from "Urtho;310371"

Ok, when i try to run my code for ScoutKnight(with a macro /run ScoutKnight() ) it does absolutely nothing.
I am not sure if i have something in there that is interefering with it or not, I have been looking around the forums, and this thread looking for info about it and not understanding much of it lol.


You had a couple errors in your ScoutKnight() code. When using PctM or UnitMana, Mana refers to your primary class resource system not the specifically the mana resource system; and using PctS or UnitSkill gets your secondary class resource system. So I fixed that on your function.

Also had a missing '(' in your Throat Attack line that was causing a problem.

Also there's no need for the [] or "" around name and use, so I removed those.

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
function ScoutKnight(arg1)

    local Skill = {}
    local i = 0
    local friendly = (not UnitCanAttack("player","target"))
    local combat = GetPlayerCombatState()
    local mana = PctS("player")
    local focus = UnitMana("player")
    local pbuffs = BuffList("player")
    local tbuffs = BuffList("target")
    local tspell,ttime,telapsed = UnitCastingTime("target")

    if (not combat) then
        i=i+1; Skill[i] = { name = "Frost Arrow",          use = (not string.find(pbuffs,"Frost Arrow")) }
    end

   i=i+1; Skill[i] = { name = "Throat Attack",        use = ((not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and (focus >= 15)) }
   i=i+1; Skill[i] = { name = "Vampire Arrows",       use = (string.find(tbuffs, "Vampire Arrows") and (focus >= 20)) }
   i=i+1; Skill[i] = { name = "Shot",                 use = (not friendly) }
   i=i+1; Skill[i] = { name = "Joint Blow",           use = (string.find(tbuffs, "Joint Blow") and (focus >= 15)) }
   --i=i+1; Skill[i] = { name = "Punishment",           use = ((not friendly) and string.find(tbuffs,"Light Seal III")) }
   --i=i+1; Skill[i] = { name = "Holy Strike",          use = (not friendly) }
   
   MyCombat(Skill,arg1)
end

lokanu

Beginner

Posts: 14

Location: Classified.

  • Send private message

924

Friday, July 23rd 2010, 5:33am

Quoted from "Pharoh93;309838"

As you can see I did not create this - So i am trying to look it over, supposedly this function works but when I put it in and I /run it nothing happens, no errors or hick-ups its just like I am pushing an empty macro button. Any pointers for this?


Well, you said there were no errors, which leads me to believe it should work. My only guess is it's hanging somewhere in the code and not doing something.

Try running it one of these two ways:

Source code

1
/run RogueKnight("v1")


This prints to chat what skill it's currently trying to run, or try this:

Source code

1
/run RogueKnight("v2")


This prints to chat the current skill, as well as extra information for each button press even while a skill is currently being used. Hopefully this will tell you what line it's getting hung up on.

925

Friday, July 23rd 2010, 5:39am

jgill Got it fixed for me, forgot to add a function that it called >_<, But I tried /run RogueKnight ("v2") When it wouldn't work. Didn't Print :P

926

Friday, July 23rd 2010, 9:26pm

Quoted from "Pharoh93;310041"

Yeah I did install it, I already have a KnightRogue function/macro that I use all the time - it is just this RK that is giving me problems, and I don't know which part it is.


It could be that you haven't added the DebuffList() function to your .lua file. That's not something I have in the base code. Search this thread and you'll probably find where I posted it (was a special request).

However, if that is the case, then you should have been getting errors (red flashing icon around minimap) when you run it.

Edit: oops didn't see your last post... guess that was the problem after all.

927

Friday, July 23rd 2010, 11:40pm

First I can't figure out how to incorporate item set skills, i've been looking but no luck so far....

Also is there a way to check if Feint can be used?

I want to be able to cast throw shield if the target is far enough away, sort of a pulling thing. Any ideas?

here is my code

1-H W/K

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
function WK(arg1,arg2)

   local Skill = {}
   local i = 0
   local enemy = (UnitCanAttack("player","target") and (not UnitIsDeadOrGhost()))
   local rage = UnitMana("player") 
   local mana = UnitSkill("player")
   local pbuffs = BuffList("player")
   local tbuffs = BuffList("target")
   local health = PctH("player")

   i=i+1; Skill[i] = { ['name'] = "Survival Instinct", ['use'] = (health <= .24) }
   i=i+1; Skill[i] = { ['name'] = "Enhanced Armor",    ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
   i=i+1; Skill[i] = { ['name'] = "Blocking Stance",   ['use'] = (not string.find(pbuffs,"Blocking Stance")) }
   i=i+1; Skill[i] = { ['name'] = "Enraged",           ['use'] = (enemy and (rage < 20)) }
   i=i+1; Skill[i] = { ['name'] = "Thunder",           ['use'] = (enemy and (rage >= 15) and string.find(tbuffs,"Weakened")) }
   i=i+1; Skill[i] = { ['name'] = "Open Flank",        ['use'] = (enemy and (rage >= 10) and string.find(tbuffs,"Vulnerable")) }
   i=i+1; Skill[i] = { ['name'] = "Punishment",        ['use'] = (enemy and string.find(tbuffs,"Light Seal III")) }
   i=i+1; Skill[i] = { ['name'] = "Slash",             ['use'] = (enemy and (rage >= 30) and (not string.find(tbuffs,"Bleed"))) }
   i=i+1; Skill[i] = { ['name'] = "Probing Attack",    ['use'] = (enemy and (rage >= 20) and (not string.find(tbuffs,"Vulnerable"))) }
   i=i+1; Skill[i] = { ['name'] = "Holy Strike",       ['use'] = (enemy) }

   MyCombat(Skill,arg1)
end

jsalemi

Trainee

Posts: 133

Location: VA, USA

  • Send private message

928

Saturday, July 24th 2010, 12:46am

Quoted from "SNeekey;310856"

First I can't figure out how to incorporate item set skills, i've been looking but no luck so far....



Unfortunately, these skills can't be addressed directly yet. You have to put the item set skill on your action bar, and then use the "name= Action: #" construct. The # is the slot # of the skill on your action bar.

929

Saturday, July 24th 2010, 7:30pm

not sure why im getting:
Interface/Addons/MyFunctions\Functions.lua [string '?']:5 ')' expected (to close '(' at line 4) near 'local'

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
function WarriorScout(arg1)
	local i=0
	local Skill={}
	local pHe = PctH("player")
	local rage = UnitMana("player")
	local focus = UnitSkill("player")
	local tBl = BuffTimeLeft("target","Bleed")
	local tSB = BuffTimeLeft("target","Skull Broken")
	if ((UnitCanAttack("player","target")) and (not UnitIsDeadOrGhost("target"))) then
		i=i+1;Skill[i]={name="Action:50",use=(pHe < 25)}-------------------------------------Survival Instinct
		i=i+1;Skill[i]={name="Action:23",use=((focus > 50) and (tSB < 1))}-------------------Skull Bash
		i=i+1;Skill[i]={name="Action:25",use=((focus > 50) and (tSB > 1))}-------------------Stun Shot
		i=i+1;Skill[i]={name="Action:22",use=((rage > 25) and (tBl > 0))}--------------------Tactical Strike
		i=i+1;Skill[i]={name="Action:21",use=(rage > 50)}------------------------------------Slash
		i=i+1;Skill[i]={name="Action:28",use=true}-------------------------------------------Shot
		i=i+1;Skill[i]={name="Action:31",use=(rage < 50)}------------------------------------Enrageed
		i=i+1;Skill[i]={name="Action:33",use=((focus > 50) and (rage < 50) and (tSB > 3 ))}--Sword of Breath
		i=i+1;Skill[i]={name="Action:32",use=((focus > 50) and (rage < 50) and (tSB > 3 ))}--Aim for the Wound
		i=i+1;Skill[i]={name="Action:29",use=(focus == 100)}---------------------------------Vampire Arrows
		i=i+1;Skill[i]={name="Action:30",use=true}-------------------------------------------Attack
	end
	MyCombat(Skill,arg1)
end

lokanu

Beginner

Posts: 14

Location: Classified.

  • Send private message

930

Saturday, July 24th 2010, 7:36pm

Quoted from "blurterblurter;311179"

not sure why im getting:
Interface/Addons/MyFunctions\Functions.lua [string '?']:5 ')' expected (to close '(' at line 4) near 'local'


I didn't see any missing parenthesis at first glance, is this at the top of your Functions.lua? If not, then you want to look at line 4 at the top. I'm betting the error isn't in the code you listed.

931

Saturday, July 24th 2010, 7:48pm

got it, thanks man, error was somewhere else

932

Sunday, July 25th 2010, 6:20am

So far this is the beast that has come about due to a lot of attempts to code - I have been running into a few problems with this code when I get to low HP - When Vanish is cast the mobs do not reset right away and they hang up for a second in front of you - If you click the macro again then you are taken out of vanish and you have promptly defeated the purpose of using vanish.

I have tried Various Wait() functions I have found while google'ing and it seems that the wait command does not pause the macro but instead it freezes my game - For the exact amount of time put in the macro, then resumes and continues on its way...

The code I have tried with the most success is in the
--Vanish
Section of the code, At the moment it checks for the buff Enhanced Armor because i didn't want to test this macro with a 10 minute timer that also requires me to be in combat. Could that be the problem?

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
112
113
114
115
116
function DebuffList(tgt)
   local cnt = 1
   local buffcmd = UnitDebuff
   local buffstr = "/"

   if UnitCanAttack("player",tgt) then
      buffcmd = UnitBuff
   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 wait(seconds)
  local start = os.time()
  repeat until os.time() > start + seconds
end

function RogueKnight(arg1, arg2)
    local Skill = {}
    local i = 0

    --Player Data
    local health = PctH("player")   
    local energy = UnitMana("player")
    local mana = PctS("player")
    local pbuffs = BuffList("player")
    local dbuffs = DebuffList("player")   
    local poisoned = string.find(dbuffs,"Poison")
    local afraid = string.find(dbuffs,"Fear")
    local horrified = string.find(dbuffs,"Horror")
    local lion = string.find(pbuffs,"Lion's Protection")
    
    --Combat State 
    local combat = GetPlayerCombatState()
    
    --Target Data
    local enemy = UnitCanAttack("player","target")
    local tbuffs = BuffList("target")
    local tspell,ttime,telapsed = UnitCastingTime("target")
    local tDead = UnitIsDeadOrGhost()
    local tBleed = string.find(tbuffs,"Bleed" or "Blind Spot Bleed" or "Sneak Attack Bleed")
    local tWound = string.find(tbuffs,"Grievous Wound")
    local tDisarmed = string.find(tbuffs,"Disarmament IV")
    
    --Interrupt List
    local ilist = "/Crimson Whirl/Counter/Fireball/Thunderstorm/Spell of Doom/Flame"

    --Equipment and Pet Protection
    if (health <= .15) then
        SwapEquipmentItem()
        for i=1,3 do
            if (IsPetSummoned(i) == true) then
                ReturnPet(i);
            end
        end        
    end
	
    --Vanish
    i=i+1; Skill[i] = { name = "Vanish",  use = ((health < .25) and (UnitDebuff("player",1) == nil)) }
    if string.find(pbuffs,"Enhanced Armor") then Wait(5) 
    end
	
    --Interrupt
    --i=i+1; Skill[i] = { name = "Shadow Prison",  use = (enemy and (tspell ~= nil) and string.find(ilist,tspell) and (arg2=="interrupt")) }

    --Cures
    i=i+1; Skill[i] = { name = "Poison Protection",  use = (poisoned) }
    --i=i+1; Skill[i] = { name = "Courageous Guard",   use = (afraid or horrified) }

    --Premed
    i=i+1; Skill[i] = { name = "Premeditation",  use = ((not combat) and (not string.find(pbuffs,"Premeditation"))) }
    
    --Healing
    --i=i+1; Skill[i] = { name = "Power of the Lion",      use = (lion and (health < .80)) }
	i=i+1; Skill[i] = { name = "Action: 40(HP Pot)",  use = (health < .40) }

    --Common Buffs
    i=i+1; Skill[i] = { name = "Enhanced Armor",     use = ((not string.find(pbuffs,"Enhanced Armor")) and (mana > .05)) }
    i=i+1; Skill[i] = { name = "Lion's Protection",  use = ((not lion) and (mana > .05)) }
	i=i+1; Skill[i] = { name = "Poison",  use = ((not combat) and (not string.find(pbuffs,"Poisonous"))) }
	--i=i+1; Skill[i] = { name = "Searing Light",      use = ((not string.find(pbuffs,"Searing Light")) and (mana > .1)) }
    --i=i+1; Skill[i] = { name = "Evasion",            use = (combat and (health <= .9)) }
    
    --Rare Buffs
    if ((arg2 == "boss") and combat) then
        --i=i+1; Skill[i] = { name = "Informer",        use = (not string.find(pbuffs,"Informer")) }
        i=i+1; Skill[i] = { name = "Assassins Rage",  use = (true) }
    end
    
    --Attacks from behind
    if ((arg2 == "behind") and enemy) then
        i=i+1; Skill[i] = { name = "Sneak Attack",  use = ((not combat) and (energy >= 30)) }
        i=i+1; Skill[i] = { name = "Blind Spot",    use = ((energy >= 25) and (not (string.find(tbuffs,"Blind Spot Bleed")))) }
    end

    --Main Attacks
    if enemy then    
        i=i+1; Skill[i] = { name = "Wound Attack",  use = ((energy >= 35) and tBleed and tWound) }
        i=i+1; Skill[i] = { name = "Low Blow",      use = ((energy >= 30) and tBleed and (not tWound)) }
		i=i+1; Skill[i] = { name = "Shadowstab",    use = ((energy >= 20) and (not tBleed)) }
		i=i+1; Skill[i] = { name = "Disarmament",   use = (((not tDisarmed) or (BuffTimeLeft("target","Disarmament") <= 2))) }
        
    end
    
    --Normal Attack or Loot
    i=i+1; Skill[i] = { name = "Attack",                 use = (enemy or tDead) }

    MyCombat(Skill,arg1)
end

lokanu

Beginner

Posts: 14

Location: Classified.

  • Send private message

933

Sunday, July 25th 2010, 11:02am

Quoted from "Pharoh93;311375"

So far this is the beast that has come about due to a lot of attempts to code - I have been running into a few problems with this code when I get to low HP - When Vanish is cast the mobs do not reset right away and they hang up for a second in front of you - If you click the macro again then you are taken out of vanish and you have promptly defeated the purpose of using vanish.

I have tried Various Wait() functions I have found while google'ing and it seems that the wait command does not pause the macro but instead it freezes my game - For the exact amount of time put in the macro, then resumes and continues on its way...

The code I have tried with the most success is in the
--Vanish
Section of the code, At the moment it checks for the buff Enhanced Armor because i didn't want to test this macro with a 10 minute timer that also requires me to be in combat. Could that be the problem?


The reason your Wait function has problems is because it's not letting the game resume for those 5 seconds. You need to let the macro run, just not during the wait cycle. Now, I'm not sure the best way to place your wait into the engine so I'll just explain how to do it, and then list the a modification that should work like you had intended in your code.

First we want to keep track of our wait cycle outside of the function, so the game can continue and come back to the function as it pleases (to prevent locking up). So put this at the very top outside of all the functions:

Source code

1
local wait = 0


Next we want to change your function to set the wait cycle appropriately. I dubbed it CEwait for "Combat Engine wait" so as not to confuse others thinking it's a generic wait function.

Source code

1
2
3
function CEwait(seconds)
  wait = os.time() + seconds -- current time + wait time
end


All this does is set wait to the time the cycle should stop, in your case, 5 seconds in the future. Now we need our function to skip all actions during the wait cycle. So at the beginning of the function we'll add this:

Source code

1
2
3
if(os.time() < wait)then
    return -- If we're still in wait cycle, skip running and let the game continue
end


And then setting and starting the wait cycle in your rotation:

Source code

1
2
3
4
if string.find(pbuffs,"Enhanced Armor") then
    CEwait(5)
    return -- Skip function and start wait cycle
end


I'm boggled here as to why you're checking for "Enhanced Armor" ... I would think you'd check for the Vanish 20 second buff, but I left it as you had it. It's 5 am and I'm tired.

That's it! Here it is all together. So as long as I didn't make any silly typos it should work as you intended.

Cheers!

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
112
113
114
115
116
117
118
119
120
121
122
123
local wait = 0

function DebuffList(tgt)
   local cnt = 1
   local buffcmd = UnitDebuff
   local buffstr = "/"

   if UnitCanAttack("player",tgt) then
      buffcmd = UnitBuff
   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 CEwait(seconds)
  wait = os.time() + seconds -- current time + wait time
end

function RogueKnight(arg1, arg2)
    if(os.time() < wait)then
        return -- If we're still in wait cycle, skip running and let the game continue
    end

    local Skill = {}
    local i = 0

    --Player Data
    local health = PctH("player")   
    local energy = UnitMana("player")
    local mana = PctS("player")
    local pbuffs = BuffList("player")
    local dbuffs = DebuffList("player")   
    local poisoned = string.find(dbuffs,"Poison")
    local afraid = string.find(dbuffs,"Fear")
    local horrified = string.find(dbuffs,"Horror")
    local lion = string.find(pbuffs,"Lion's Protection")
    
    --Combat State 
    local combat = GetPlayerCombatState()
    
    --Target Data
    local enemy = UnitCanAttack("player","target")
    local tbuffs = BuffList("target")
    local tspell,ttime,telapsed = UnitCastingTime("target")
    local tDead = UnitIsDeadOrGhost()
    local tBleed = string.find(tbuffs,"Bleed" or "Blind Spot Bleed" or "Sneak Attack Bleed")
    local tWound = string.find(tbuffs,"Grievous Wound")
    local tDisarmed = string.find(tbuffs,"Disarmament IV")
    
    --Interrupt List
    local ilist = "/Crimson Whirl/Counter/Fireball/Thunderstorm/Spell of Doom/Flame"

    --Equipment and Pet Protection
    if (health <= .15) then
        SwapEquipmentItem()
        for i=1,3 do
            if (IsPetSummoned(i) == true) then
                ReturnPet(i);
            end
        end        
    end
	
    --Vanish
    i=i+1; Skill[i] = { name = "Vanish",  use = ((health < .25) and (UnitDebuff("player",1) == nil)) }
    if string.find(pbuffs,"Enhanced Armor") then
        CEwait(5)
        return -- Skip function and start wait cycle
    end
	
    --Interrupt
    --i=i+1; Skill[i] = { name = "Shadow Prison",  use = (enemy and (tspell ~= nil) and string.find(ilist,tspell) and (arg2=="interrupt")) }

    --Cures
    i=i+1; Skill[i] = { name = "Poison Protection",  use = (poisoned) }
    --i=i+1; Skill[i] = { name = "Courageous Guard",   use = (afraid or horrified) }

    --Premed
    i=i+1; Skill[i] = { name = "Premeditation",  use = ((not combat) and (not string.find(pbuffs,"Premeditation"))) }
    
    --Healing
    --i=i+1; Skill[i] = { name = "Power of the Lion",      use = (lion and (health < .80)) }
	i=i+1; Skill[i] = { name = "Action: 40(HP Pot)",  use = (health < .40) }

    --Common Buffs
    i=i+1; Skill[i] = { name = "Enhanced Armor",     use = ((not string.find(pbuffs,"Enhanced Armor")) and (mana > .05)) }
    i=i+1; Skill[i] = { name = "Lion's Protection",  use = ((not lion) and (mana > .05)) }
	i=i+1; Skill[i] = { name = "Poison",  use = ((not combat) and (not string.find(pbuffs,"Poisonous"))) }
	--i=i+1; Skill[i] = { name = "Searing Light",      use = ((not string.find(pbuffs,"Searing Light")) and (mana > .1)) }
    --i=i+1; Skill[i] = { name = "Evasion",            use = (combat and (health <= .9)) }
    
    --Rare Buffs
    if ((arg2 == "boss") and combat) then
        --i=i+1; Skill[i] = { name = "Informer",        use = (not string.find(pbuffs,"Informer")) }
        i=i+1; Skill[i] = { name = "Assassins Rage",  use = (true) }
    end
    
    --Attacks from behind
    if ((arg2 == "behind") and enemy) then
        i=i+1; Skill[i] = { name = "Sneak Attack",  use = ((not combat) and (energy >= 30)) }
        i=i+1; Skill[i] = { name = "Blind Spot",    use = ((energy >= 25) and (not (string.find(tbuffs,"Blind Spot Bleed")))) }
    end

    --Main Attacks
    if enemy then    
        i=i+1; Skill[i] = { name = "Wound Attack",  use = ((energy >= 35) and tBleed and tWound) }
        i=i+1; Skill[i] = { name = "Low Blow",      use = ((energy >= 30) and tBleed and (not tWound)) }
		i=i+1; Skill[i] = { name = "Shadowstab",    use = ((energy >= 20) and (not tBleed)) }
		i=i+1; Skill[i] = { name = "Disarmament",   use = (((not tDisarmed) or (BuffTimeLeft("target","Disarmament") <= 2))) }
        
    end
    
    --Normal Attack or Loot
    i=i+1; Skill[i] = { name = "Attack",                 use = (enemy or tDead) }

    MyCombat(Skill,arg1)
end

934

Sunday, July 25th 2010, 5:59pm

Thank you very much for the thorough explaination, the reason I left it as "enhanced armor" is because I was messing with my code trying to get it to work and Vanish is on a 10 minute timer so i needed a buff for the wait function to check to that was more readily available. :)

lokanu

Beginner

Posts: 14

Location: Classified.

  • Send private message

935

Monday, July 26th 2010, 6:16am

Quoted from "Pharoh93;311592"

Thank you very much for the thorough explaination, the reason I left it as "enhanced armor" is because I was messing with my code trying to get it to work and Vanish is on a 10 minute timer so i needed a buff for the wait function to check to that was more readily available. :)


Well hopefully it worked out okay for you. I would probably suggest putting the wait time slightly less, say 3 seconds or so. That should be long enough to prevent breaking Vanish, but short enough to not lock it out entirely and still be comfortable. That's more personal opinion though, I like having total control of my character and I find there are cases where "I wish I hadn't done that" comes into play.

936

Monday, July 26th 2010, 7:24am

Hi everyone.

I'm a newbie at RoM and rather "older" than a teenager. Okay so I'm old.

I'm going to roll a Priest to level 10 and then choose a Knight secondary class. I will probably then switch and use Knight as my primary class. I think this combo is as fast/solid as my reflexes can manage.

Now I've read a lot of this thread and it has me straining to understand what I need to do to create an engine.

As such and I do ask humbly, would someone who is talented in this area please provide a macro I can use on the Priest as primary and then a macro for the Knight / Priest from level 10 onwards.

I would very much appreciate this and I'm sure others in the same "code illiterate" mentality as me can also use.

Thanks very much.

HuBu

Beginner

Posts: 6

Location: Florida

  • Send private message

937

Monday, July 26th 2010, 2:41pm

Quoted from "dassimo;311856"

Hi everyone.

I'm a newbie at RoM and rather "older" than a teenager. Okay so I'm old.

I'm going to roll a Priest to level 10 and then choose a Knight secondary class. I will probably then switch and use Knight as my primary class. I think this combo is as fast/solid as my reflexes can manage.

Now I've read a lot of this thread and it has me straining to understand what I need to do to create an engine.

As such and I do ask humbly, would someone who is talented in this area please provide a macro I can use on the Priest as primary and then a macro for the Knight / Priest from level 10 onwards.

I would very much appreciate this and I'm sure others in the same "code illiterate" mentality as me can also use.

Thanks very much.


http://forum.us.runesofmagic.com/showthread.php?t=43764

I posted a working code for the k/p combo here. let me know if you have questions.

Is there a way to detect if multiple mobs are hitting you? I would like my 'whirlwind shield' to only hit if there are multiple mobs on me. tia.

938

Monday, July 26th 2010, 5:49pm

Quoted from "Pharoh93;311375"

So far this is the beast that has come about due to a lot of attempts to code - I have been running into a few problems with this code when I get to low HP - When Vanish is cast the mobs do not reset right away and they hang up for a second in front of you - If you click the macro again then you are taken out of vanish and you have promptly defeated the purpose of using vanish.


Why not just put a check near the top of your function to see if you have low health and the vanish/hide buff in effect, and if so, just return from the function so nothing gets executed?

939

Monday, July 26th 2010, 6:12pm

Quoted from "dassimo;311856"

Hi everyone.

I'm a newbie at RoM and rather "older" than a teenager. Okay so I'm old.

I'm going to roll a Priest to level 10 and then choose a Knight secondary class. I will probably then switch and use Knight as my primary class. I think this combo is as fast/solid as my reflexes can manage.

Now I've read a lot of this thread and it has me straining to understand what I need to do to create an engine.

As such and I do ask humbly, would someone who is talented in this area please provide a macro I can use on the Priest as primary and then a macro for the Knight / Priest from level 10 onwards.

I would very much appreciate this and I'm sure others in the same "code illiterate" mentality as me can also use.

Thanks very much.


i dont mean to sound like a douch or anything but this addon is quite code intensive, and even if you use a premade code, you will need to tweak it to your own preferences and tweak it for each situation. so if you dont have the skills or reflexes to play normaly and dont have the ability to learn a bit of coding then you probably wont have much success in this game. gotta have one or the other unfortunately :(
----------------------------
Artemis - Vexxx [60/50] S/Wd
----------------------------

940

Monday, July 26th 2010, 6:38pm

Quoted from "redcrux;312078"

i dont mean to sound like a douch or anything but this addon is quite code intensive, and even if you use a premade code, you will need to tweak it to your own preferences and tweak it for each situation. so if you dont have the skills or reflexes to play normaly and dont have the ability to learn a bit of coding then you probably wont have much success in this game. gotta have one or the other unfortunately :(


Not necessarily. They can just post the pre-made code they're using and how they want it modified... there are several people who can do coding that will be happy to help. Also, the parts that they probably need to tweak (skill names, skill order. skill conditions) are fairly straightforward, so unless they're doing something completely out of the ordinary, they could probably figure out 80-90% on their own just by looking at other people's examples.