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.

221

Thursday, April 15th 2010, 9:42am

Quoted from "Sixpax;256978"

You're exactly right. I missed a closing paren. That line should read:

Source code

1
elseif (health <= .90) and (not ChkBuff("player", "Regenerate")) then
I updated the code where I first posted this as well.

Good catch.



If I make the above line into

elseif (not ChkBuff("player", "Regenerate")) then

Will it cast the spell without checking health and only checking if the buff is up ? I just like to cast regenerate before a fight instead of when im already damaged.

222

Thursday, April 15th 2010, 3:24pm

Yes, it will cast it without doing a health check.

223

Friday, April 16th 2010, 5:27am

I think the problem with that is that if you want to use any other heals, if Regen is above ANY of the other heals that do have a HP check or any other check then it will just keep casting regen since there is nothing to disqualify it and move the engine on to another spell

If there is something like where the eng can create a self made cooldown where it won't try to use it again til after X seconds that could work.

That's all I can think of, and not sure that is even possible.

224

Friday, April 16th 2010, 8:52am

I got it to work. So here it is for anyone else if you would like to use it.

This will cast Regenerate. If you have the regenerate buff it will only cast urgent heal. This for my priest secondary class thus no other heals are present.




function CastOnUnit(thisunit,spell)
if UnitExists(thisunit) then
FocusUnit(1,"target")
TargetUnit(thisunit)
CastSpellByName(spell)
TargetUnit("focus1")
FocusUnit(1,"")
end
end








function Heals()
local health = PctH("player")


if (not ChkBuff("player", "Regenerate")) then
CastOnUnit("player", "Regenerate")
else
CastOnUnit("player", "Urgent Heal")


end
end

225

Friday, April 16th 2010, 9:05am

This one is a little too complicated for me to work out so hopefully someone can help.

I have this to cast my instants.

function Instants(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill = { ['name'] = "Fireball", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Rising Tide", ['use'] = (not friendly) }

MyCombat(Skill,arg1)
end



I need to add Pheonix to this but I need to it only cast if the target is within range. The range is 120 and if I dont use it at the right time can make the spell useless.

Could someone add a range check for me please ?

226

Friday, April 16th 2010, 3:35pm

Quoted from "Ryum;257631"

I think the problem with that is that if you want to use any other heals, if Regen is above ANY of the other heals that do have a HP check or any other check then it will just keep casting regen since there is nothing to disqualify it and move the engine on to another spell


Actually he's checking to see if the person already has Regenerate, and if so it skips it. So it will only cast Regen once, not repeatedly.

Quoted from "Ryum;257631"

If there is something like where the eng can create a self made cooldown where it won't try to use it again til after X seconds that could work.

That's all I can think of, and not sure that is even possible.


Interesting idea and I have come across some situations where that would be helpful. Let me see what I can come up with.

227

Friday, April 16th 2010, 4:00pm

Quoted from "smoopid;257658"

This one is a little too complicated for me to work out so hopefully someone can help.

I have this to cast my instants.

function Instants(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill = { ['name'] = "Fireball", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Rising Tide", ['use'] = (not friendly) }

MyCombat(Skill,arg1)
end



I need to add Pheonix to this but I need to it only cast if the target is within range. The range is 120 and if I dont use it at the right time can make the spell useless.

Could someone add a range check for me please ?


The only way to do a range check anymore is with GetActionUsable() since they disabled UnitDistance(). What's worse is the GetActionUsable() check for Phoenix ignores your target's distance since it's not something you cast directly on the target (damages everything in a straight line). If you had another spell with a range of 120 we could do the check with that instead, but there aren't any others that I know of.

So yeah, not gonna happen. :(

228

Saturday, April 17th 2010, 8:35am

Hello i need some help with this
I have a scout / warden and i was wondering if anyone knows how to make it so it will cast snipe when i have the Hidden Peril buff active

I tried (chkBuff("player","Hidden Peril")) } but that did not work, and actually made the whole macro not work, it would do nothing just sit there like i did not ever press the button.

thanks in advance
Deadatzero M/P retired
Redrabbit S/WD active

A punishment to some, a gift to others, and to many the ultimate favor.

229

Saturday, April 17th 2010, 9:28am

Hi, was wondering if anyone might have a solution to the problem I described in post #218 in regards to the W/R function. Someone gave an answer to #3 but I haven't had a chance to test it yet. My main concern was #1 though. Any ideas?

Tallial

Beginner

Posts: 0

Location: Osha

  • Send private message

230

Sunday, April 18th 2010, 10:04pm

Quoted from "deadatzero;257926"

Hello i need some help with this
I have a scout / warden and i was wondering if anyone knows how to make it so it will cast snipe when i have the Hidden Peril buff active

I tried (chkBuff("player","Hidden Peril")) } but that did not work, and actually made the whole macro not work, it would do nothing just sit there like i did not ever press the button.

thanks in advance


i=i+1; Skill = { ['name'] = "Snipe", ['use'] = (string.find(pbuffs,"Hidden Peril") ) }

is what I use

231

Monday, April 19th 2010, 6:53am

Quoted from "Sixpax;257685"

Interesting idea and I have come across some situations where that would be helpful. Let me see what I can come up with.


Yes, as a Scout this would be VERY useful, as many of our spells don't have cooldowns (or very short ones) it would give better control over skill rotation. for example, if i put wind arrow above shot, then shot will never be used, but if i put shot above wind arrow, then wind arrow is rarely used. a cooldown system would allow shot and windarrow to be alternated :D

232

Monday, April 19th 2010, 1:46pm

Quoted from "bobhica;257932"

Hi, was wondering if anyone might have a solution to the problem I described in post #218 in regards to the W/R function. Someone gave an answer to #3 but I haven't had a chance to test it yet. My main concern was #1 though. Any ideas?


Sorry about that, I missed that post. Try swapping the Keen Attack and Open Flank lines. That way it will put Keen Attack at a higher priority than Open Flank.

As far as the rage potions, it's probably best just to do those manually because using them is very situational.

233

Monday, April 19th 2010, 3:11pm

Quoted from "delve;257265"

Here's a stupid question that I've probably missed somewhere.
Is there a way to query the mana cost of a spell? For example, at lvl 15 Fireball costs 72 mana, but at level 16 it costs 75.

How can I get this number so that hypothetically I can configure the script to only cast Fireball when I have enough mana to still cast Heal twice afterward? As in the following...

Source code

1
   i=i+1; Skill[i] = { ['name'] = "Fireball",       ['use'] = ( (not friendly) and (mana >=(Healcost*2 + Fireballcost)) ) }


There's no way I know of to query the mana cost of a spell. The best you could do is write your own code to return the mana cost based on the TP level of the spell, but you'd have to define all the values for starting and incremental mana costs for each spell.

234

Monday, April 19th 2010, 3:14pm

Quoted from "redcrux;258359"

Yes, as a Scout this would be VERY useful, as many of our spells don't have cooldowns (or very short ones) it would give better control over skill rotation. for example, if i put wind arrow above shot, then shot will never be used, but if i put shot above wind arrow, then wind arrow is rarely used. a cooldown system would allow shot and windarrow to be alternated :D


I did investigate this some and my initial reaction is it wouldn't be reliable because there's no way to tell if a skill fired successfully. So the code would think you used the skill but since you didn't the timer would start and you'd be out of luck trying to use it again until the timer expired.

235

Monday, April 19th 2010, 5:46pm

Quoted from "Sixpax;258426"

There's no way I know of to query the mana cost of a spell. The best you could do is write your own code to return the mana cost based on the TP level of the spell, but you'd have to define all the values for starting and incremental mana costs for each spell.


I was afraid of that. I'll see what I can do, thanks.

236

Tuesday, April 20th 2010, 8:31am

edit.

237

Tuesday, April 20th 2010, 9:21am

Quoted from "Sixpax;258409"

Sorry about that, I missed that post. Try swapping the Keen Attack and Open Flank lines. That way it will put Keen Attack at a higher priority than Open Flank.

As far as the rage potions, it's probably best just to do those manually because using them is very situational.


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

238

Tuesday, April 20th 2010, 11:08pm

I am getting a "target too far away" screen msg using this

Source code

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

   i=i+1; Skill[i] = { ['name'] = "Frost Arrow",    ['use'] = (not ChkBuff("player","Frost Arrow")) }
   i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (PctH("target") >= .75)) }
   i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = (not friendly) }
-- i=i+1; Skill[i] = { ['name'] = "Combo Shot",     ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Shot",           ['use'] = (not friendly) }
-- i=i+1; Skill[i] = { ['name'] = "Blind Stab",     ['use'] = ((not friendly) and (energy >=35) and (not string.find(tbuffs,"Blind") and (arg2 == "melee"))) } 
-- i=i+1; Skill[i] = { ['name'] = "Shadowstab",     ['use'] = ((not friendly) and (energy >=35) and (not string.find(tbuffs,"Bleed") and (arg2 == "melee"))) }
   i=i+1; Skill[i] = { ['name'] = "Weak Spot",      ['use'] = ((not friendly) and (focus >= 30)) }
-- i=i+1; Skill[i] = { ['name'] = "Sapping Arrow",  ['use'] = (not friendly) }
   i=i+1; Skill[i] = { ['name'] = "Wind Arrows",    ['use'] = ((not friendly) and (focus >= 15)) }
-- i=i+1; Skill[i] = { ['name'] = "Snipe",          ['use'] = (not friendly) }

   MyCombat(Skill,arg1)
end


For the longest time I would spam out my screen with Cool down msg but I have since got a better feel for the timing, but the too far away msg remains.
I have completely taken out the melee attacks, and have been taking out attacks on and off to see if any one of them will stop the msg, but so far no luck.

jsalemi

Trainee

Posts: 133

Location: VA, USA

  • Send private message

239

Wednesday, April 21st 2010, 12:55am

Do you have "click to move" turned on in the game interface?

240

Wednesday, April 21st 2010, 2:31am

Two questions:

1. how to check a skill is still in cooldown? I think if the macro use a "cooldown" skill, it will waste the time?

2. for the target buffcheck, will it mix with other team members in a party? for example, 3 rogue in a group, what happen to the "bleed" effect check?