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.

61

Wednesday, March 3rd 2010, 2:39pm

Try removing the mana check altogether from MR to rule that out. Also, run this to see what value you get:

/run Msg(UnitMana("player"))

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

62

Wednesday, March 3rd 2010, 2:50pm

i got a whole number, not %, 4604 was the number.

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

63

Wednesday, March 3rd 2010, 2:52pm

and yup, removed mana check and it worked.


T

64

Wednesday, March 3rd 2010, 2:53pm

Was it returning a percent before? I always thought it was the real value. You can define a PctM function like we do with PctH...

Source code

1
2
3
function PctM(tgt)
   return (UnitMana(tgt)/UnitMaxMana(tgt))
end
Then in your function you'd have:

Source code

1
mana = PctM("player")

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

65

Wednesday, March 3rd 2010, 2:57pm

I honestly dont know what it was presenting with before, I know .99 used to work fine, .50 used to work fine too, and anyone's primary pool worked fine that way before. But let me add your code and see what gives.

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

66

Wednesday, March 3rd 2010, 3:02pm

That worked thank you kindly! It would be nice if the Dev team provided the info on what they change with their patch notes so addon authors have a clue were to find things that changed so they can fix it.


T

67

Wednesday, March 3rd 2010, 9:55pm

Quoted from "Sixpax;237068"

While technically either way works, using ChkBuff takes longer to execute if you're using it multiple times in your function. Every time you execute ChkBuff, it goes through each and every one of the buffs on the specified unit looking for the buff/debuff. By storing a string of buffs one time at the beginning of the function and then just using string.find, it only has to make 1 pass through the unit's buffs/debuffs. Remember that every time you run your function, it builds that table, so if you're spamming it 2-3 times per second, any improvements in execution time help to prevent overlap.

One other caveat to using the string.find method is you don't need the full buff/debuff name. For instance, if you're looking for any debuff with the word "Bleed" in it, you'd have to do multiple ChkBuffs (one for each bleed name) but only one string.find. If you do want to use string.find to find the exact full name of the buff/debuff, use slashes before and after the string as that is the delimiter. Example: string.find(tbuffs,"/Shadowstab Bleed/")


That makes sense, thanks Sixpax.

Updated my code. Can't wait to test it tonight :)

68

Thursday, March 4th 2010, 1:49pm

Quoted from "Tigsman;237101"

It would be nice if the Dev team provided the info on what they change with their patch notes so addon authors have a clue were to find things that changed so they can fix it.


The odd part is they didn't change Disarmament and Light Seal debuffs to follow this convention.

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

69

Thursday, March 4th 2010, 2:11pm

Quoted from "Sixpax;237449"

The odd part is they didn't change Disarmament and Light Seal debuffs to follow this convention.

yup, which makes this change so odd.

70

Thursday, March 4th 2010, 3:10pm

In light of this recent problem with buff/debuff names changing, for those of you using this combat engine I wrote this macro to display a list of all the buffs on yourself and the buffs/debuffs on your target to verify the names.

Source code

1
2
/run Msg("Player: "..BuffList("player"))
/run if UnitExists("target") and (not UnitIsUnit("player","target")) then Msg("Target: "..BuffList("target")) end

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

71

Thursday, March 4th 2010, 4:06pm

kewl, i'll give it a whirl next time in game


T

72

Thursday, March 4th 2010, 6:58pm

Quoted from "Sixpax;230375"



  • I put in Throat Attack to go off whenever the target is casting a spell. I do this on my R/S and love it. You may prefer to use TA manually because you want to interrupt specific spells, in which case you can just delete that line or comment it out.
[LIST]
[/LIST] Is it possible to have TA be triggered when the cast bar reads a certain spell?

73

Thursday, March 4th 2010, 7:55pm

Quoted from "foreshard;237545"

Is it possible to have TA be triggered when the cast bar reads a certain spell?


Definitely. What I would suggest if you want to specify which spells to interrupt is defining a list of them as a string (using a delimiter like "/") and then checking the spell being cast against that.

So in your class function you'd have:

Source code

1
2
3
4
   local interrupt_list = "/Fireball/Thunderstorm/Spell of Doom/"
   local tspell,ttime,telapsed = UnitCastingTime("target")

   i=i+1; Skill[i] = { ['name'] = "Throat Attack",  ['use'] = ((not friendly) and string.find(interrupt_list,tspell)) }

74

Sunday, March 7th 2010, 6:06am

Not sure if this came up as a question yet, but i'll ask since it isnt a big one. toggle auto shot. possible? or will such function turn it on and off since there isnt a buff to check... or is there?

75

Sunday, March 7th 2010, 2:23pm

I hope I don't sound too stupid, but how in the heck do I make a .toc file or a .lua file? Furthest I've gotten in computer programming is Visual Basic in high school(yah I suck) I'd really like to make this function file.

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

76

Sunday, March 7th 2010, 2:33pm

make a text file and change the extension as needed is one way.

I use a powerful text editor to make my files, but I can do it just fine in Notepad.


T

77

Sunday, March 7th 2010, 6:43pm

Quoted from "Tigsman;239616"

make a text file and change the extension as needed is one way.

I use a powerful text editor to make my files, but I can do it just fine in Notepad.


T


Do note that in order to change the file extensions you first have to convince Windows that you're competent enough to be shown the file extensions. That's in the options menu somewhere, though I forget where exactly.

Tigsman

Trainee

Posts: 126

Location: ATL

Occupation: Fixing Things

  • Send private message

78

Sunday, March 7th 2010, 6:48pm

in XP, explorer window:tools>folder options>view

but even without that, when saving, select file type: All files, and put your own extension on it from within Notepad.

T

79

Sunday, March 7th 2010, 10:36pm

Quoted from "foreshard;239523"

Not sure if this came up as a question yet, but i'll ask since it isnt a big one. toggle auto shot. possible? or will such function turn it on and off since there isnt a buff to check... or is there?


The only way I know to do this is check the status of the Autoshot icon to tell if it is running. So you'll have to specify the quickbar slot for your Autoshot skill.

I'm assuming you are using this with the combat engine, so here's how that code would look:

Source code

1
2
3
   local a1,a2,a3,a4,a5,ASon = GetActionInfo(#)  -- # is your Autoshot slot number

   i=i+1; Skill[i] = { ['name'] = "Autoshot",       ['use'] = ((not friendly) and (not ASon)) }
So just replace # with your Autoshot quickbar slot number.

80

Sunday, March 7th 2010, 11:00pm

Awesome work!!! Also, great tutorial. I really appreciate how you broke down the pieces so that I could understand this.

The problem I'm having, however, is that mine doesn't seem to recognize when I'm in combat, and if my buff fails while I'm fighting, it stops to rebuff.

Thoughts??

Here is the meat:

i=i+1; Skill = { ['name'] = "Poison", ['use'] = ((not combat) and (not string.find(pbuffs,"Poison"))) }
i=i+1; Skill[i] = { ['name'] = "Magic Barrier", ['use'] = ((not combat) and (not string.find(pbuffs,"Magic Barrier"))) }
i=i+1; Skill[i] = { ['name'] = "Quickness Aura", ['use'] = ((not combat) and (not string.find(pbuffs,"Quickness Aura"))) }
i=i+1; Skill[i] = { ['name'] = "Holy Aura", ['use'] = (PctH("player") <= .30) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = (PctH("player") <= .85) and (not string.find(pbuffs,"Regenerate")) }
i=i+1; Skill[i] = { ['name'] = "Urgent Heal", ['use'] = (PctH("player") <= .75) }
i=i+1; Skill[i] = { ['name'] = "Sneak Attack", ['use'] = ((not friendly) and (energy >=30) and (arg2=="behind")) }
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)) }

Also, There is a problem when I'm using that macro to heal, it just keeps casting regenerate and not urgent heal. I'm R/P btw and thanks again!