Quoted from "baritonejohn;300789"
Hi,im getting an error message with my macro.this error message is the same as with my rogue macro i tried to make which makes we wonder.i copied macro from page 1 of this thread. The error message is ...
[string] "?"]: 188 '}' expected near ')' .
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
function ScoutRogue(arg1)
local Skill = {}
local i=0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(2)
i=i+1; Skill[i] = { name = "Autoshot", use = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { name = "Combo Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly) and (focus >=30)) }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Piercing Arrow", use = (not friendly) }
i=i+1; Skill[i] = { name = "Wind Arrows", use = ((not friendly) and (focus >=15)) }
MyCombat(Skill,arg1)
end
|
Quoted from "jgill33;300293"
Thanks for the suggestions, but I usually don't carry spare arrows with me and I still want to use the function if I don't have ammo and can't use Shot. However, I like the idea of equipping them if I have them, so how's this for an ammo check:
|
|
Source code |
1 |
if (string.find(name," Arrow$")) then |
Quoted from "blurterblurter;301562"
RE: Attempting to get a position relative to target.
This does seem to be testing the condition, any help appreciated
|
|
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 RogueScout(arg1)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local tbuffs = BuffList("target")
local front = UnitIsUnit("player", "targettarget")
local bleed = BuffTimeLeft("target","Bleed")
local wound = BuffTimeLeft("target","Grievous Wound")
if ((UnitCanAttack("player","target")) and (PctH("target")>0)) then
i=i+1;Skill[i]={name="Action:25(Shot)", use=true}
i=i+1;Skill[i]={name="Action:23(WA)", use=((energy >= 35) and (wound > 1) and (bleed > 1))}
i=i+1;Skill[i]={name="Action:22(LB)", use=((energy >= 35) and (wound < 1) and (bleed > 1))}
i=i+1;Skill[i]={name="Action:54(BStab)", use=(front and (energy >= 50) and (BuffTimeLeft("target","Blind") < 1))}
i=i+1;Skill[i]={name="Action:29(BSpot)", use=((not front) and (energy >= 25) and (bleed < 1))}
i=i+1;Skill[i]={name="Action:21(SS)", use=((energy >= 35) and (bleed < 3))}
i=i+1;Skill[i]={name="Action:26(Vamp)", use=(BuffTimeLeft("target","Vampire Arrows") < 1)}
i=i+1;Skill[i]={name="Action:30(Atk)", use=true}
end
MyCombat(Skill,arg1)
end
|
|
|
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 RogueScout(arg1)
local i = 0
local Skill = {}
local tbuffs = BuffList("target")
local focus = UnitSkill("player")
local energy = UnitMana("player")
local blind = BuffTimeLeft("target","Blind")
local bleed = BuffTimeLeft("target","Bleed")
local front = UnitIsUnit("player","targettarget")
local vamp = BuffTimeLeft("target","Vampire Arrows")
local wound = BuffTimeLeft("target","Grievous Wound")
if ((UnitCanAttack("player","target")) and (PctH("target")>0)) then
i=i+1;Skill[i]={name="Action:25(Shot)", use=true}
i=i+1;Skill[i]={name="Action:23(WA)", use=((energy > 35) and (wound > 1) and (bleed > 1))}
i=i+1;Skill[i]={name="Action:22(LB)", use=((energy > 35) and (wound < 3) and (bleed > 2))}
i=i+1;Skill[i]={name="Action:29(BSp)", use=((energy > 35) and (bleed < 3) and (front))}
i=i+1;Skill[i]={name="Action:54(BSt)", use=((energy > 35) and (blind < 3) and (not front))}
i=i+1;Skill[i]={name="Action:21(SS)", use=((energy > 35) and (bleed < 3))}
i=i+1;Skill[i]={name="Action:26(VA)", use=((focus > 35) and (vamp < 3))}
i=i+1;Skill[i]={name="Action:30(Atk)", use=true}
end
MyCombat(Skill,arg1)
end
|
Quoted from "Sixpax;301566"
That error usually means you have too many closing parentheses on the same line.
Try this:
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16function ScoutRogue(arg1) local Skill = {} local i=0 local focus = UnitMana("player") local friendly = (not UnitCanAttack("player","target")) local a1,a2,a3,a4,a5,ASon = GetActionInfo(2) i=i+1; Skill[i] = { name = "Autoshot", use = ((not friendly) and (not ASon)) } i=i+1; Skill[i] = { name = "Combo Shot", use = (not friendly) } i=i+1; Skill[i] = { name = "Vampire Arrows", use = ((not friendly) and (focus >=30)) } i=i+1; Skill[i] = { name = "Shot", use = (not friendly) } i=i+1; Skill[i] = { name = "Piercing Arrow", use = (not friendly) } i=i+1; Skill[i] = { name = "Wind Arrows", use = ((not friendly) and (focus >=15)) } MyCombat(Skill,arg1) end
Quoted from "baritonejohn;302119"
this is what i tried the first few times before adding all those parenthesis and whatnot as what i posted here. ..so let me make sure, i went to romcurse downloaded using there zip thingy then i just went into the lua and went to bottom and started writing code..sounds simple just wanna make sure. any other suggestions...thanks for your time!!
Quoted from "venomous42;303813"
i switched over from w/s to w/r. so i had to re-do my macro. i copied one from here. the problem im having, is im only level 35 on the rogue side, so im missing splitting chop. so i deleted out of the macro because i was getting yellow text spammed in my chat about it being missing. after deleting it, that seems ok. but the problem im having now is Keen Attack is being spammed in my chat now, about it being missing or not ready. i never got anything in my chat before when i was playing the w/s. how do i get rid of those warnings in my chat. its making it hard to see any chat from the group, when its being filled up with the warning as fast as i spam the macro. i could use a good macro from a end game raider if possible.
|
|
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 mage(arg1,arg2)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tgt = "player"
if friendly then
tgt = "target"
end
local health = PctH(tgt)
i=i+1; Skill[i] = { ['name'] = "Intensification", ['use'] = (not string.find(pbuffs,"Intensification")) }
i=i+1; Skill[i] = { ['name'] = "Recover", ['use'] = (health <= .75) }
i=i+1; Skill[i] = { ['name'] = "Electrostatic Charge", ['use'] = (PctH("player") <= .60) }
i=i+1; Skill[i] = { ['name'] = "Mother Earth's Protection", ['use'] = (PctH("player") <= .50) }
i=i+1; Skill[i] = { ['name'] = "Flame", ['use'] = ((not friendly) and (PctH("target") == 1)) }
i=i+1; Skill[i] = { ['name'] = "Fireball", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Flame", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Earth Pulse", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Purgatory Fire", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Lightning", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
Quoted
What I am trying to figure out is why Fireball, Earth Pulse and Lightning doesnt cast. just seems looks like it loops Flame and I'm clueless at this point
Quoted from "zubris1205;304518"
First off... GREAT LITTLE ADD-ON!
What I am trying to figure out is why Fireball, Earth Pulse and Lightning doesnt cast. just seems looks like it loops Flame and I'm clueless at this point
Quoted from "zubris1205;304518"
What I am trying to figure out is why Fireball, Earth Pulse and Lightning doesnt cast. just seems looks like it loops Flame and I'm clueless at this point
|
|
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 |
function mage(arg1,arg2)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local phealth = PctH("player")
local thealth = PctH("target")
local health
if friendly then
health = thealth
else
health = phealth
end
i=i+1; Skill[i] = { name = "Intensification", use = (not string.find(pbuffs,"Intensification")) }
i=i+1; Skill[i] = { name = "Electrostatic Charge", use = (phealth <= .60) }
i=i+1; Skill[i] = { name = "Mother Earth's Protection", use = (health <= .50) }
i=i+1; Skill[i] = { name = "Recover", use = (health <= .75) }
i=i+1; Skill[i] = { name = "Flame", use = ((not friendly) and (thealth == 1)) }
i=i+1; Skill[i] = { name = "Fireball", use = (not friendly) }
i=i+1; Skill[i] = { name = "Earth Pulse", use = (not friendly) }
i=i+1; Skill[i] = { name = "Purgatory Fire", use = (not friendly) }
i=i+1; Skill[i] = { name = "Lightning", use = (not friendly) }
i=i+1; Skill[i] = { name = "Flame", use = (not friendly) }
MyCombat(Skill,arg1)
end
|
Quoted from "Sixpax;304552"
In addition to what redcrux posted, because the first Flame line is checking to see if the target's health is full, you have to wait for the initial Flame to land before running it again. Then it will skip that line (since the target took damage) and skip to Fireball. Nothing past the 2nd Flame line will run because Flame will always be ready to cast.
Give this one a try and see if it works better:
![]()
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 29function mage(arg1,arg2) local Skill = {} local i = 0 local mana = UnitMana("player") local friendly = (not UnitCanAttack("player","target")) local pbuffs = BuffList("player") local phealth = PctH("player") local thealth = PctH("target") local health if friendly then health = thealth else health = phealth end i=i+1; Skill[i] = { name = "Intensification", use = (not string.find(pbuffs,"Intensification")) } i=i+1; Skill[i] = { name = "Electrostatic Charge", use = (phealth <= .60) } i=i+1; Skill[i] = { name = "Mother Earth's Protection", use = (health <= .50) } i=i+1; Skill[i] = { name = "Recover", use = (health <= .75) } i=i+1; Skill[i] = { name = "Flame", use = ((not friendly) and (thealth == 1)) } i=i+1; Skill[i] = { name = "Fireball", use = (not friendly) } i=i+1; Skill[i] = { name = "Earth Pulse", use = (not friendly) } i=i+1; Skill[i] = { name = "Purgatory Fire", use = (not friendly) } i=i+1; Skill[i] = { name = "Lightning", use = (not friendly) } i=i+1; Skill[i] = { name = "Flame", use = (not friendly) } MyCombat(Skill,arg1) end
Quoted from "Sixpax;304497"
The engine only generates the "Skill not available" message when it tries to actually use the skill, so you probably weren't seeing it before because some other skill that you do have was firing.
My advise is go through the function that you're using and comment out any attacks that you don't have. Just up a double dash in front of the line. That way once you do acquire the skill, you can just uncomment the line.
|
|
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 RogueScout(arg1, arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local focus = UnitSkill("player")
local friendly = (not UnitCanAttack("player", "target"))
local combat = GetPlayerCombatState()
local tspell,ttime,telapsed = UnitCastingTime("target")
local pbuffs = BuffList("player")
local tbuffs = BuffList("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 = "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
|
Quoted from "shawnis;304858"
What I would like to do is add a function to it which in the first part, right after throat attack, it will check my range to the target and if it's greater than like 49 then it will cast Vampire Arrows and then Shot if VA is on CD, and I would also still like to leave VA and Shot at the bottom without the check so it will also use it in my DPS rotation while I'm closer than 49.
Quoted from "shawnis;304858"
Second thing I would like to do: Is it possible to check if your target is an attackable Player and NOT and NPC (for a pvp server) and if so, make it only cast a spell if that's the case? For example, I'd like to add Shadow Prison in right after my Sneak Attack / Blind Spot, maybe even another line after that which will use Energy Theif if my energy goes below a certain amount + I'm in combat + I'm within 49 of my target.
If anyone can help me get this working, I'd very much appreciate it.
|
|
Source code |
1 |
(UnitIsPlayer("target") and UnitCanAttack("player","target"))
|
Quoted from "Sixpax;304552"
In addition to what redcrux posted, because the first Flame line is checking to see if the target's health is full, you have to wait for the initial Flame to land before running it again. Then it will skip that line (since the target took damage) and skip to Fireball. Nothing past the 2nd Flame line will run because Flame will always be ready to cast.
Give this one a try and see if it works better:
![]()
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 29function mage(arg1,arg2) local Skill = {} local i = 0 local mana = UnitMana("player") local friendly = (not UnitCanAttack("player","target")) local pbuffs = BuffList("player") local phealth = PctH("player") local thealth = PctH("target") local health if friendly then health = thealth else health = phealth end i=i+1; Skill[i] = { name = "Intensification", use = (not string.find(pbuffs,"Intensification")) } i=i+1; Skill[i] = { name = "Electrostatic Charge", use = (phealth <= .60) } i=i+1; Skill[i] = { name = "Mother Earth's Protection", use = (health <= .50) } i=i+1; Skill[i] = { name = "Recover", use = (health <= .75) } i=i+1; Skill[i] = { name = "Flame", use = ((not friendly) and (thealth == 1)) } i=i+1; Skill[i] = { name = "Fireball", use = (not friendly) } i=i+1; Skill[i] = { name = "Earth Pulse", use = (not friendly) } i=i+1; Skill[i] = { name = "Purgatory Fire", use = (not friendly) } i=i+1; Skill[i] = { name = "Lightning", use = (not friendly) } i=i+1; Skill[i] = { name = "Flame", use = (not friendly) } MyCombat(Skill,arg1) end
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Electric Bolt", ['use'] = ((not friendly) and (not string.find(tbuffs, "Electric Bolt"))) }
|