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.

201

Wednesday, October 14th 2009, 8:12am

this should loop vampirearrow/shot/windarrow til a mob is dead

vamp arrow in slot 1
shot in slot 2
wind arrow in slot 3

this macro in slot 4:

Source code

1
/run if (UnitHealth("target")>=1) then UseAction(5);end;


and this macro in slot 5:

Source code

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

202

Friday, October 16th 2009, 3:30pm

i found this handy script on wiki but how do i make a macro out of it?

local state = GetPlayerCombatState();
if (state) then
SendChatMessage("I'm in combat.","SAY");
end;
Thanks:)

203

Sunday, October 18th 2009, 4:39am

Quoted from "Bulba;175788"

i found this handy script on wiki but how do i make a macro out of it?

local state = GetPlayerCombatState();
if (state) then
SendChatMessage("I'm in combat.","SAY");
end;
Thanks:)


Source code

1
/run if GetPlayerCombatState("true") then SendChatMessage("I'm in combat.","SAY");end;

204

Monday, October 19th 2009, 11:00am

Thanks, works great!

I have a questions though. Why do sometimes people write /run and some /script. Is it the same things and does one give an advantage over the other?

jsalemi

Trainee

Posts: 133

Location: VA, USA

  • Send private message

205

Monday, October 19th 2009, 2:46pm

Both /run and /script do the same thing -- it's a question of length. Macros are limited to 255 characters, so saving three by using /run can make the difference in a long one.

206

Monday, October 19th 2009, 3:45pm

Great, thanks.

Any chance you can help me with the following macro problem.

I see macros like:

/script if GetActionUsable(1) then UseAction(1) elseif GetActionUsable(2) then UseAction(2) elseif GetActionUsable(3) then UseAction(3);end

All over the place, but what that macro does is check for if fist is useable and if it is, it does not touch the rest. How would i make it check first one then use it, then still check second one and use it if usable, then third.

I was thinking of something like:

/script if GetActionUsable(1) then UseAction(1), if GetActionUsable(2) then UseAction(2), if GetActionUsable(3) then UseAction(3);end

But it does not work:(

207

Tuesday, October 20th 2009, 9:22am

well if you have it checking "fist" attack? first, it would always be usable so it would never get past that part

what skills are you trying to use, and in what order. might be easier to help if i know that

208

Tuesday, October 20th 2009, 2:45pm

I am trying to use 2 skills that are instant recast, but one used mana and one uses focus and both leave different effects on mob. This is why i would not just want to use one of them. I am currently using:

/cast spell 1
/wait 1
/cast spell 2
/wait 1

...but using the avaliability check seems more professional and would most likely omit the cooling down messages i still get sometimes.

I even tried:

/script if GetActionUsable(1) then UseAction(1);end
/script if GetActionUsable(2) then UseAction(2);end

does not seem to work though.

Thanks

209

Tuesday, October 20th 2009, 4:23pm

You'll have to put a /wait in between each skill. The problem then becomes what to do if the first skill isn't ready because you don't want a delay when using skill #2.

So you could try something like:[INDENT]/run if GetActionUsable(1) then UseAction(1) elseif GetActionUsable(2) then UseAction(2) end
/wait 1
/run if GetActionUsable(2) then UseAction(2) end[/INDENT]It's a bit redundant, but should work.

210

Tuesday, October 20th 2009, 5:41pm

Gona try it but yeh, if is a bit of redundant. I see why skill 2 would not work and always be false, because after skill1 launches, there would still be a global cooldown of slightly less then a sec. Meaning that the wait 1 (i use .9 which also works) you suggested would have to be there. The redundacy part would be....why would i then need to check for avaliability if I already know the cooldown time and could have it cast instead of checking;)

211

Thursday, October 22nd 2009, 3:43am

if they both leave effects on the monster and if you added the ChkBuff() function, you could do something like:

/wait 1
/run if not ChkBuff("target","skilleffect1") then CastSpellByName("skill1");UseAction(3);else CastSpellByName("skill2");end;

put this in slot 3 it will cast skill1 loop back and cast skill2

212

Friday, November 20th 2009, 1:00am

Reply Macro for last Whisper

Can anyone help? I want to create a macro that would Reply to the last Whisper I recieved with a given message. Is this possible?

213

Wednesday, November 25th 2009, 5:13am

Will this work

So heres the deal.. i have this macro
/cast Holy Strike
/wait 1
/cast Holy Strike
/wait 1
/cast Holy Strike
/wait 1
/cast Disarmament
/wait 1
/cast Disarmament
/wait 1
/cast Punishment
...

ok here's my problem. when i attack a mob and it dies before the macro is done, my guy keeps going back and try to attack it (the dead mob). Is there a way to check in between each attack to see if the mob is dead or not before proceeding with the macro?

I was wondering if something like this would work

/script if (UnitHealth("target")/UnitMaxHealth("target")=0) then UseAction(x); else CastBySpellName("Holy Strike") ... Where x is the macro to stop attacking.
i dont know how to continue this with the next strike as holy strike, then another holy strike, then Disarmament, and so forth.

214

Wednesday, November 25th 2009, 2:13pm

Quoted from "hcukk;192223"

So heres the deal.. i have this macro
/cast Holy Strike
/wait 1
/cast Holy Strike
/wait 1
/cast Holy Strike
/wait 1
/cast Disarmament
/wait 1
/cast Disarmament
/wait 1
/cast Punishment
...

ok here's my problem. when i attack a mob and it dies before the macro is done, my guy keeps going back and try to attack it (the dead mob). Is there a way to check in between each attack to see if the mob is dead or not before proceeding with the macro?

I was wondering if something like this would work

/script if (UnitHealth("target")/UnitMaxHealth("target")=0) then UseAction(x); else CastBySpellName("Holy Strike") ... Where x is the macro to stop attacking.
i dont know how to continue this with the next strike as holy strike, then another holy strike, then Disarmament, and so forth.


Try this (untested):

Source code

1
2
3
4
5
6
7
8
9
10
11
12
/run function UseAtk(atk); if  UnitChangeHealth("target")>0 then CastSpellByName(atk) end; end
/run UseAtk("Holy Strike")
/wait 1
/run UseAtk("Holy Strike")
/wait 1
/run UseAtk("Holy Strike")
/wait 1
/run UseAtk("Disarmament")
/wait 1
/run UseAtk("Disarmament")
/wait 1
/run UseAtk("Punishment")
When the target dies, it will just do waits, and since you can't run the same macro multiple times, you can just click it again on the next mob and the previous iteration stops.

215

Wednesday, November 25th 2009, 5:40pm

Quoted from "Sixpax;192315"

Try this (untested):

Source code

1
2
3
4
5
6
7
8
9
10
11
12
/run function UseAtk(atk); if  UnitChangeHealth("target")>0 then CastSpellByName(atk) end; end
/run UseAtk("Holy Strike")
/wait 1
/run UseAtk("Holy Strike")
/wait 1
/run UseAtk("Holy Strike")
/wait 1
/run UseAtk("Disarmament")
/wait 1
/run UseAtk("Disarmament")
/wait 1
/run UseAtk("Punishment")
When the target dies, it will just do waits, and since you can't run the same macro multiple times, you can just click it again on the next mob and the previous iteration stops.


Thanks for reply but it doesn't seem to work, an error comes up. "[string '/run function UseAtk(atk); if UnitChangeHealth('target')>0 then Cast...]:1 unexpected symbol near ';'"

does that mean the UseAtk function doesnt work?

216

Wednesday, November 25th 2009, 7:40pm

Sorry about that. I wasn't sure about the syntax for declaring functions in macros. Try it without the two semicolons on the first line.

217

Saturday, November 28th 2009, 5:59am

I came up with this for my Warden/Scout and figured I might as well put it out there. It basicly keeps Vampire Arrows and Shot down while attack or better yet... just bind to mouse wheel. Just save it as a .lua file in the ROM folder and then run it in a macro. I prefer this method to using the macro editor in-game.


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
local cd1, r1 = GetSkillCooldown(3,3)
local cd2, r2 = GetSkillCooldown(3,2)
local Cst = GetPlayerCombatState()
if (r2<.5) then
 if (r1<.5) then
  CastSpellByName("Vampire Arrows")
 end
 CastSpellByName("Shot")
else
 if (UnitSkill("player")>=35 and Cst) then
  CastSpellByName("Joint Blow")
 end
 CastSpellByName("Attack")
end


I do have a question though. Does anyone know how to do the following:

a) Target/cast onto your pet via macro.
b) Set your pet to attack or return to you via macro.

EDIT: modified code a bit to use Joint Blow as a Focus Dump for more dps.

218

Monday, November 30th 2009, 6:06pm

Quoted from "goblinlord;193149"

I do have a question though. Does anyone know how to do the following:

a) Target/cast onto your pet via macro.
b) Set your pet to attack or return to you via macro.


They added units for pets such as "playerpet", "party1pet", etc.

So you can target/cast on your own pet this way:

/run TargetUnit("playerpet")
/cast Spellname

They also added a function called UsePetAction(#) where # corresponds to the pet's hotbar skills. So to make him attack you do this:

/run UsePetAction(3)

if #3 is the pet's attack skill.

Posts: 23

Location: Whiteman AFB, MO

  • Send private message

219

Wednesday, December 9th 2009, 4:44am

Can someone tell me the script for cash shop bag and transmuter?

220

Thursday, December 10th 2009, 6:18pm

Quoted from "hardcoregarrett;197317"

Can someone tell me the script for cash shop bag and transmuter?


You mean to open them? I do see a function called OpenAccountBag(). You might try that. No idea on the transmuter though.