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.

241

Tuesday, March 16th 2010, 12:38am

Quoted from "LordKaedric;112901"


/script UseAction(1,1)
/Cast Spellname

The numbers in the UseAction() command relate to the tab and position of the skill on your skill window. Regardless of your class, the Attack skill will always be the first skill on the first tab.


If you want to save characters in your macro you can use
/run UseSkill (1,1);

/run and /script serve the same function, just as UseAction and UseSkill both relate to the skill position on the tabs.

242

Tuesday, March 16th 2010, 12:52am

Thanks jsalemi, you have solved my problem :).

243

Sunday, March 28th 2010, 5:19pm

Hey I am working on my first macro and am running into some snags. Any help would be appreciated.

I am a P/S and I want to create an alternate heal spell that will cast heal and then immediately check vamp arrow to see if it is cooled down, if it is cooled down I want it to cast vamp arrow, if it is not, then I want it to cast rising tide.

Should be simple so ideally I would want it to look like this:

/cast Heal
/wait .5
/run if (GetActionUsable(3)) then UseAction (3); else UseAction (2); end
/wait .5

This doesn't work. Like wise "/run UseAction (20)" doesn't work either for line one. I have fiddled with the wait times and nothing happens. I can either get it to just cast Heal or just do the Vamp arrow/rissing tide cast, but not both.

Help please!

Jeremy

244

Sunday, March 28th 2010, 6:48pm

ok ignore my last question, i got it to work like this:


/run UseAction (21)
/wait 3
/run if (GetActionUsable(3)) then UseAction (3); elseif (GetActionUsable(1)) then UseAction (1); else UseAction (2); end
/wait 1

[where 21=Heal, 3=Vampire Arrows, 2=Rising Tide, 1=Bone Chill]


Here is my NEW question:

I would prefer for my "elseif" statement could check and see if my target already is bone chilled, and if it is not then move on to rising tide. My use of the GetActionUsable is pointless because bone chill does not have a cool down.

So, what command could I use to check and see if my target is in bone chill?

Thanks a ton!

jsalemi

Trainee

Posts: 133

Location: VA, USA

  • Send private message

245

Sunday, March 28th 2010, 10:40pm

For the complexity you're getting too, I'd strongly suggest moving up to a custom function. Check out Sixpax's custom combat engine in the main Add-ons and Macros forum.

246

Monday, March 29th 2010, 5:04pm

Quoted from "jeremythuff;250543"

I would prefer for my "elseif" statement could check and see if my target already is bone chilled, and if it is not then move on to rising tide. My use of the GetActionUsable is pointless because bone chill does not have a cool down.

So, what command could I use to check and see if my target is in bone chill?


As jsalemi suggested, if you're getting into that much complexity I'd suggest either making your own custom functions (see link #1 in my sig) or jumping headlong into a full blown combat engine (see link #2 in my sig).

247

Tuesday, April 13th 2010, 2:26am

Ok I am thorougly confused on macros.
So #1: can someone create a (copy and pastable) macro for shadowstab, then low blow, then wound attack? (Also does it matter if I leveled up those skills? So would I write shadowstab +20???)
#2: (optional) Just any macros you think a noob rogue might need. :D

248

Tuesday, April 13th 2010, 2:59pm

Quoted from "petjocky;256454"

Ok I am thorougly confused on macros.
So #1: can someone create a (copy and pastable) macro for shadowstab, then low blow, then wound attack? (Also does it matter if I leveled up those skills? So would I write shadowstab +20???)


You don't use the "+20" on the skill names in macros, just the name itself. So a simplistic way to do the 3 attack combo is:

Source code

1
2
3
4
5
/cast Shadowstab
/wait 1.0
/cast Low Blow
/wait 1.0
/cast Wound Attack

249

Monday, April 26th 2010, 5:50pm

noob need help

this is what i have for a macro /script UseAction(2);wait 1;/script UseAction(3); and this is the message i get [string 'UseAction(2); /wait1; /script UseAction(3);']:1:unexpected symbol near '/' I am tired i have not been able to play since patch.I am trying too get over the death of Uber but i am stumped.I have looked over the fuorms over and over no luck if someone would be so kind as too point out my problem that would be great Ps I love the support and help we are getting from frogster they realy show they listen and value our wants and needs

250

Monday, April 26th 2010, 6:49pm

Quoted from "axeface;264446"

this is what i have for a macro /script UseAction(2);wait 1;/script UseAction(3); and this is the message i get [string 'UseAction(2); /wait1; /script UseAction(3);']:1:unexpected symbol near '/' I am tired i have not been able to play since patch.


Here's how your macro should look:

Source code

1
2
3
/script UseAction(2)
/wait 1
/script UseAction(3)

Quoted from "axeface;264446"

I am trying too get over the death of Uber but i am stumped.I have looked over the fuorms over and over no luck if someone would be so kind as too point out my problem that would be great Ps I love the support and help we are getting from frogster they realy show they listen and value our wants and needs


Might I suggest trying out the combat engine in my sig. I'll be glad to help you setup the code for your class combo if you need help.

251

Monday, April 26th 2010, 11:09pm

Me again

[LEFT]First thankyou. I have tried your combat engine.I think my problem is my notepad.I have noticed a big space bettween the combat engine and the scripts that i can not reproduce. this is what i have:):):):):):):) 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 PctM(tgt)
return (UnitMana(tgt)/UnitMaxMana(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,cast_max,cast_current = UnitCastingTime("player")
local talktome = ((arg1 == "v1") or (arg1 == "v2"))
local action,actioncd,actioncnt

if spell_name ~= nil then
if (arg1 == "v2") then Msg("- ['..spell_name..']",0,1,1) end
return true
end
for x,tbl in ipairs(Skill) do
if string.find(Skill[x].name, "Action:") then
if Skill[x].use then
action = tonumber((string.gsub(Skill[x].name, "(Action:)( *)(.*)", "%3")))
_1,actioncd = GetActionCooldown(action)
_1,_2,actioncnt = GetActionInfo(action)
if GetActionUsable(action) and (actioncd == 0) and (GetActionInfo(action) ~= nil) and (actioncnt > 0) then
if talktome then Msg("- "..Skill[x].name) end
UseAction(action)
return true
end
end
elseif string.find(Skill[x].name, "Item:") then
if Skill[x].use then
action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
if talktome then Msg("- "..Skill[x].name) end
UseItemByName(action)
return true
end
elseif 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
endfunction KWCombat(arg1,arg2)
local Skill = {}
local i = 0
local tgt = "player"
local rage = UnitSkill("player")
local friendly = (not UnitCanAttack("player","target"))
local shield = true
local health = PctH("player")
local tgtcast = UnitCastingTime("target")
if GetEquipSlotInfo(17) == nil then
shield = false
end
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill = { ['name'] = "Holy Shield", ['use'] = (health <= .20) }
i=i+1; Skill[i] = { ['name'] = "Resolution", ['use'] = (health <= .33) }
-- i=i+1; Skill[i] = { ['name'] = "Shield of Atonement", ['use'] = ((not friendly) and (health <= .40) and shield) }
-- i=i+1; Skill[i] = { ['name'] = "Shield of Valor", ['use'] = ((not friendly) and (health <= .50) and shield) }
-- i=i+1; Skill[i] = { ['name'] = "Shield of Discipline", ['use'] = ((not friendly) and (tgtcast ~= nil) and shield) }
i=i+1; Skill[i] = { ['name'] = "Enhanced Armor", ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
i=i+1; Skill[i] = { ['name'] = "Holy Seal", ['use'] = (not string.find(pbuffs,"Holy Seal")) }
i=i+1; Skill[i] = { ['name'] = "Threaten", ['use'] = (string.find(tbuffs,"Holy Seal III") and (not string.find(pbuffs,"Threaten")) and (arg2 == "threaten")) }
i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seal III")) }
i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield", ['use'] = ((not friendly) and shield) }
i=i+1; Skill[i] = { ['name'] = "Punishment", ['use'] = (string.find(tbuffs,"Light Seal III")) }
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = (not string.find(tbuffs,"Disarmament IV") and (arg2 == "disarm")) }
i=i+1; Skill[i] = { ['name'] = "Slash", ['use'] = ((not friendly) and (rage >=75)) }
i=i+1; Skill[i] = { ['name'] = "Holy Strike", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end[/LEFT]

252

Monday, April 26th 2010, 11:29pm

Quoted from "axeface;264606"

[LEFT]First thankyou. I have tried your combat engine.I think my problem is my notepad.I have noticed a big space bettween the combat engine and the scripts that i can not reproduce. this is what i have...


If you're having problems with Notepad, I'd suggest using Notepad++. You can download it here:

http://sourceforge.net/projects/notepad-plus/files/

I find it much better using that when working with code.
[/LEFT]

253

Tuesday, April 27th 2010, 12:19am

I will leave it be after this

[string 'ReadSkills()']:1 attempt to call global "ReadSkills" ( a nil value) Is the message i get now i used notepad++.It looks like all the other completes I have seen on fourm

254

Tuesday, April 27th 2010, 8:47pm

Quoted from "axeface;264645"

[string 'ReadSkills()']:1 attempt to call global "ReadSkills" ( a nil value) Is the message i get now i used notepad++.It looks like all the other completes I have seen on fourm


That error indicates it's not finding the ReadSkills function. So either you don't have the .lua and .toc files in the right place or your .lua file is fubar.

Make sure you have this path setup just as I type it for the combat engine:

Runes of Magic\Interface\AddOns\MyFunctions

After that, go to the combat engine thread and grab the .zip file at the bottom of the first post. Extract the two files in the .zip to that folder above.

Open the MyFunctions.lua with Notepad++ and add a blank line at the end. Then copy and paste the KWcombat code after that blank line.

Login and see if you still get that error.

255

Tuesday, April 27th 2010, 10:16pm

Thank you

I just Smashed my first Mob in almost a week ty.U make it so easy

256

Saturday, May 29th 2010, 10:42pm

Its been asked here a couple times, but not answered anywhere I can see:

How can I cancel a currently running macro? For instance, I target nearest enemy and hit my macro, then realize that was a mistake. I want to cancel running after the mob and attacking it. But if I try to run away, I keep turning around to attack until the macro ends.

I understand macros, but wonder if there is a cancel command, or at worse case just un-target the mob or target myself? I'd make it its own macro to hit incase I try to run the macro on the wrong target.

257

Tuesday, June 1st 2010, 5:27pm

Quoted from "Keeter;280858"

Its been asked here a couple times, but not answered anywhere I can see:

How can I cancel a currently running macro? For instance, I target nearest enemy and hit my macro, then realize that was a mistake. I want to cancel running after the mob and attacking it. But if I try to run away, I keep turning around to attack until the macro ends.

I understand macros, but wonder if there is a cancel command, or at worse case just un-target the mob or target myself? I'd make it its own macro to hit incase I try to run the macro on the wrong target.


I'm not sure this will work, but give it a try...

At the very top of your macro put this as the first line:

Source code

1
/run if IsShiftKeyDown() then return end
Now when you have the macro running and you want to cancel it, hold the Shift key and run it again.

Let me know if that works.

258

Wednesday, June 9th 2010, 6:45pm

ok i dont even have a clue about wat to do so if any1 wants to put that into an easier explination that would be great.
lol

259

Friday, June 11th 2010, 4:58pm

Quoted from "reyth98;286302"

ok i dont even have a clue about wat to do so if any1 wants to put that into an easier explination that would be great.
lol


Explanation of what? Macros in general?

260

Wednesday, July 14th 2010, 11:32pm

Is there a macro to do a range check.
Like if a monster is in a certain range run so and so script, if it isnt, it doesnt do anything?
Roleplayer in Govinda
Leader of the roleplay guild Immortal Covenant
Reagen -- 50/39 K/M-- Govinda
Xushin -- 29/54 W/M-- Govinda
Foroque -- 29/27 M/Wd --Govinda
Olan -- 22/27 P/K -- Govinda
Shivaa -- 40/40 P/S -- Govinda
Shayn -- 50/37 R/M -- Govinda
Raiden -- 22/0 M/x -- Govinda
Dieiyna -- 38/38 D/W -- Govinda