|
|
Source code |
1 2 |
/run if IsShiftKeyDown() then CastSpellByName("Savage Power"); wait = .5; CastSpellByName("Power of the Oak"); end
/run if not IsShiftKeyDown() then TargetUnit("player"); end
|
This post has been edited 5 times, last edit by "13lack13ox" (Apr 8th 2014, 2:50am) with the following reason: Seems to be no longer about the wait command and more about general macro syntax.
|
|
Source code |
1 2 |
PetFrame:Show() PetFrame_SetSelected(i) |
|
|
Source code |
1 |
/run if (IsShiftKeyDown() == true) then PetFrame:Show(); PetFrame_SetSelected(3); elseif (IsShiftKeyDown() == false) and (IsPetSummoned(3) == true) then ReturnPet(3); else SummonPet(3); end |
This post has been edited 1 times, last edit by "13lack13ox" (Apr 6th 2014, 4:51am)
Thought I'd comment on a couple of things about this macro. There isn't anything wrong with it per-se, just that you can reduce the size and remove a few redundant things.Thank you very much, very informative xD.
Thanks again btw =P. So with the pet frame, here is what I came up with. Combined another macro I saw for summoning/dismissing. Added shift key modifier to open petframe with pet selected.
![]()
Source code
1 /run if (IsShiftKeyDown() == true) then PetFrame:Show(); PetFrame_SetSelected(3); elseif (IsShiftKeyDown() == false) and (IsPetSummoned(3) == true) then ReturnPet(3); else SummonPet(3); end
Seems to work just fine.![]()
|
|
Source code |
1 |
... if IsShiftKeyDown() then ... |
|
|
Source code |
1 |
... elseif IsPetSummoned(3) then ... |
|
|
Source code |
1 |
/run if IsShiftKeyDown() then PetFrame:Show() PetFrame_SetSelected(3) elseif IsPetSummoned(3) then ReturnPet(3) else SummonPet(3) end |
|
|
Source code |
1 |
/run if IsShiftKeyDown() then if IsPetSummoned(3) then ReturnPet(3); else SummonPet(3); end elseif IsPetSummoned(1) then ReturnPet(1); else SummonPet(1); end |
This post has been edited 1 times, last edit by "13lack13ox" (Apr 6th 2014, 6:03pm)
You can also check the Ctrl and Alt key with IsCtrlKeyDown() and IsAltKeyDown() for even more options. Can even make a table of pets to summon based on this.Nice thx, I'm slowly getting my head around all the more advanced things you can do in this game. Also I guess if you have lot's of pets (^.^) you can make it summon 2 different ones.
![]()
Source code
1 /run if IsShiftKeyDown() then if IsPetSummoned(3) then ReturnPet(3); else SummonPet(3); end elseif IsPetSummoned(1) then ReturnPet(1); else SummonPet(1); end
|
|
Source code |
1 2 |
/run _pet = 1 + (IsAltKeyDown() and 1 or 0) + (IsCtrlKeyDown() and 2 or 0) /run if IsShiftKeyDown() then ReturnPet(_pet) else SummonPet(_pet) end |


|
|
Source code |
1 2 |
/run _mnt = 1 + (IsAltKeyDown() and 1 or 0) + (IsCtrlKeyDown() and 2 or 0)
/run if IsShiftKeyDown() then UseItemByName("Potion: Galloping Gale") else PartnerFrame_CallPartner(2, _mnt) end
|
This post has been edited 4 times, last edit by "13lack13ox" (Apr 7th 2014, 5:24am)
As it stands, your macro will either use the item if the shift key is held down, or summon a mount if it isn't. Since you mention that you want it to use the item then summon, the if is rather redundant. Instead, you could do something like:Amazing! xD As a Pet-O-Holic I'm gonna enjoy using that one! Very nice! *Saved*
Might have a hand at trying this with mounts, and if shift is down use Galloping Gale and call partner. Though this is a bit more complicated, cus PartnerFrame_CallPartner(2, x) need two variables. but for purposes of mounts it's only really 1 As for the use item if shift+key then call the partner based on which key + shift is used. Well Im wrapping my head around that one for a bit.
Holy Moly, I think I just now wrapped it! I'll post up a result soon... Eh my test failed.. still trying...
Well the best I could come up with is this
![]()
Source code
1 2/run _mnt = 1 + (IsAltKeyDown() and 1 or 0) + (IsCtrlKeyDown() and 2 or 0) /run if IsShiftKeyDown() then UseItemByName("Potion: Galloping Gale") else PartnerFrame_CallPartner(2, _mnt) end
cant use waits inline
Really you did all the hard work and supplied the "trickery" thx again. Will be using for the Greater Good.![]()
|
|
Source code |
1 2 3 4 |
/run _mnt = 1 + (IsAltKeyDown() and 1 or 0) + (IsCtrlKeyDown() and 2 or 0) + (IsShiftKeyDown() and 4 or 0) /use Potion: Galloping Gale /wait 0.5 /run PartnerFrame_CallPartner(2, _mnt) |
|
|
Source code |
1 2 3 4 |
_mnt = 1 + (either 1 or 0 based on the Alt key state) + (either 2 or 0 based on the Ctrl key state) + (either 4 or 0 based on the Shift key state) |
This post has been edited 1 times, last edit by "13lack13ox" (Apr 10th 2014, 1:34am)
|
|
Source code |
1 2 3 |
/run if IsShiftKeyDown() then CastSpellByName("Summon Spirit of the Oak") elseif IsCtrlKeyDown() then CastSpellByName("Summon Nature Crystal") else CastSpellByName("Summon Oak Walker") end
/wait 2.5
/run TargetUnit("pet") if UnitName("target")=="Nature Crystal" then UsePetAction(5, true) UsePetAction(6, true) else UsePetAction(5, true) end
|
This post has been edited 13 times, last edit by "13lack13ox" (Apr 10th 2014, 1:35am)
Again please don't mind me I am just trying to get a grasp on all the cool things that are opening up to me. Now that I relapse... (stupid spell checker) REALIZE what all you can achieve with lua in this game. Heading off to learn (HAHA! If that's even possible!) and read all the useful information that was given to me here in this thread. Again thx everyone for helping me get a grasp on the potential of lua. It's amazing! This post has been edited 1 times, last edit by "13lack13ox" (Apr 10th 2014, 1:42am)
).