Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(In line code line wrap?)
Line 138: Line 138:
   
 
--[[User:Okori|Okori]] 04:51, 12 September 2006 (EDT)
 
--[[User:Okori|Okori]] 04:51, 12 September 2006 (EDT)
  +
  +
== In line code line wrap? ==
  +
  +
Is there a way in WikiLand to have the code wrap without inserting linefeeds and breaking the script? The page looks pretty funky with all the giant one liners...

Revision as of 09:01, 12 September 2006

Warlock Amplify Curse

How would one create a macro to cast Amplify Curse then Curse of Agony? I tried doing the same way I would do a shaman instant cast heal macro, but Amplify Curse owuld never cast. Am I doing something wrong? --Orionriver 1532, 17 Aug 2006 (PST)

UnitCreatureType

Does anyone know if there is a way to tell if the mob you are fighting is a certain type? I ask because I'm trying to find away to create a macro that will use either Ability warrior sunder [Sunder Armor] or Ability gouge [Rend] based on the type of mob since elementals are Immune to Rend. --BaldMonkey 16:12, 16 Aug 2005 (EDT)

listed on seperate lines for ease of reading Okay well I sort of figured out how to get what I wanted done using this line...

/script uct=UnitCreatureType(%t);
if ( (uct == Elemental) or (uct == Mechanical)) then CastSpellByName("Sunder Armor(Rank 3)");
else CastSpellByName("Rend(Rank 4)");
end;

The only problem is that well it doesn't cut it since I now noticed that Treants are Elemental yet they are not immune to Rend. This leads me to want to creat a whole sort of function I can run that will check. My question is now this. Is there a way to make a custom function? Maybe a file I can save to the Add-On directory like a custom mod. --BaldMonkey 09:13, 18 Aug 2005 (EDT)

Bandage script

Someone submitted the following:

The bandage script doesn't work. I add the correct slot number behind "ActionID" (example: ActionID36), but there is always an error message, something like "usage: (ActionID, [CheckCursor]). -- Carcelia

But it does work for me. In the above use 36, not ActionID36. Make sure the bandages are in action bar 3 slot 12. -- Reikobi

I added a new script, that should work, for bandage DracoBlue

Series of spells with one macro?

Can you cast a series of spells with a macro? --- Fandyllic 10:57 AM PST 14 Mar 2005

No. Multiple spell cannot be cast. -- AlexanderYoshi 23:09, 15 Mar 2005 (EST)

/cast Holy Light

There is a Problem with: /cast Holy Light(Rank 3) /script TargetByName("player");

When you selected a Friendly player, the Cast will go on him. Instead of you. So what I did is: /script TargetByName("player") /cast Holy Light(Rank 3) /script TargetLastPlayer();

Which works as expected for me..

Resetting instances

[ Laisren; 19 Jun 2005] Regarding the following text: "What this does is resetting instances, and is very useful for mages that grinds DM East for example. Change PlayerInAGroup to the nick of a player who is in a group, and make this macro. When you press it, the instance is reset. "
Can someone please translate this into English? Thanks.

Since some recent patch, you can now right-click your character portrait and get reset on the drop down. Ravenasque 23:39, 6 September 2006 (EDT)

Conditional spellcasting

--Brinebold 11:57, 4 Sep 2005 (EDT)Anyone know if its possible to cast a spell on the party member that meets a specific condition? For example cast flasheal rank 3 on party member with lowest % HP? I'm still new to writing macros and using mods.

Distance to target?

Is there any way to count the distant from your target?

I think that the API does not allow such a macro because Blizzard thinks it's cheeting.--Scalp 16:57, 18 August 2006 (EDT)

<<< Holy Light on Plague Spreader >>>

Is there a good macro where you can have the desired effect of being able to heal yourself or someone like you while keeping your enemy targeted? Here's a macro I use:

/cast Holy Light
/s <<< Holy Light on %t >>>

I think that's it. I wrote it some time ago, and updated it just after the patch, to remove the rank. It still heals whoever I want it to, but it always says the name of the baddie that I'm fighting. To alleviate that, I have to select my heal target first, then use the heal macro, then reselect my target. It's rather annoying, when I could just as easily hit the macro button and hit F2 or whatever.

How can I run the macro, then select my target, and it say that I'm healing the real heal target? I've wondered about API CameraOrSelectOrMoveStart, but I don't know how to use that. And I'm not familiar with hooking functions. This would be a great help. Thanks. Schmidt talk 08:22, 10 Oct 2005 (EDT)

Waiting

still new to macro's and scripting, but is it possible to make it WAIT to finish the spell, because i want it todo a series of spells with a little pause.

(There is no way to cast more than one spell in a single macro, otherwise you could just press one button and have all of your fight do itself.)

Selfcast Spells

I've had various problems with selfcast macros, in that they'd change my target in different ways under some circumstances (the common one being if the spell failed to cast because it was still in cooldown, but other things as well). I finally came up with the following, which I've never had a problem with:

/script local p, t = "player", "target";
local i = UnitCanAssist(p, t) and not UnitIsUnit(p, t);
if (i) then TargetUnit(p) end;
CastSpellByName("Purify");
if (SpellIsTargeting()) then SpellTargetUnit(p)
elseif (i) then TargetLastTarget()
end

It may seem a bit long, but you can remove almost all of the spaces (next to parentheses, semicolons, commas, or equal signs), which should allow the spell name to be as long as necessary.

I'm not sure the local declarations are necessary, but I prefer to be conservative when scripting in a language I'm not familiar with. Also, I've used UnitCanAssist(), but there're a number of similar functions which might also work, like UnitIsFriend(), or UnitCanCooperate() - I'm not really sure about the differences between those.

Always attack on Button hit

Trying to figure out a script that puts you on "attack" mode when you press a button. and then performs an attack.

Basically this is the macro :

  • /script if(UnitAffectingCombat("player")==nil) then AttackTarget();end;
  • /script if(UnitMana("Player")>=10) and (IsUsableAction(18)) then CastSpellByName("Riposte");end;
  • /script if(UnitMana("Player")>=40) then CastSpellByName("Sinister Strike");end;

If you are not in combat it "should" make you auto attack your nearest target. ( doesn't seem to work though ) otherwise, it checks if you have 10 energy, then uses Riposte if its available, and will use Sinister strike if you have 40 energy after that. Anyone have an idea? CJ 03:54, 3 Mar 2006 (EST)

-You can cut down on character useage by using >9 rather then >=10, and similarly >39 instead of >=40. Since rogue energy only comes in whole interegers, the two are equivlant. User:Ravenasque 1338, 6th July 2006 (CST)

Does it have a "delay" script?

I don't want to cast several spells in one macro. What I want to achive is,say somthing,delay for a while,say somthing.

Just like this: /say la lalalalal ala /delay 5sec /y palapalapala

Is it possible?

Thanks a lot!


-There isn't a native command, but cosmos offers /in, which can cause a chat delay. Still doesn't work with spell casting, but it would be what you are looking for.

Trinket Macro

Hello, i got these 2 trinkets, the ZG one, and badge of the swarm guard. Using either one of them causes no global cooldown on the other. Now i manually use them at the same time, so i would like to have a macro that just uses both. its got something to do with /script useinventoryitem but thats as far as i get, any help is appreciated :)

Quest Objectives Macro

Has anyone actually gotten this to work? Do you have to have your quest log open and the quest selected in the frame? Or do you have to turn on tracking for the quest? I keep trying but get an error message. -thermalnoise

/script SelectGossipAvailableQuest(1)
/script CompleteQuest()
/script GetQuestReward()

Enjoy Ravenasque 23:32, 6 September 2006 (EDT)


The script you have there is for the quest turn in but your question seems to be about the macro to post your quest objectives to the party... That script is here.

/script i = GetNumQuestLeaderBoards(); for j = 1, i, 1 do a1, a2, a3 = GetQuestLogLeaderBoard(j); SendChatMessage(a1, "PARTY"); end;

This script works for me if I have tracking turned on for a quest. Turn on tracking by shift clicking the quest in the quest log. It only works for the last quest added to the tracker. Hope that answers your question.

--Okori 04:51, 12 September 2006 (EDT)

In line code line wrap?

Is there a way in WikiLand to have the code wrap without inserting linefeeds and breaking the script? The page looks pretty funky with all the giant one liners...