Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
JP5
- a lesser mummy

- Posts: 70
- Joined: Tue Jul 06, 2004 10:32 pm
Post
by JP5 » Tue Nov 23, 2004 2:59 pm
Aro.
Edit1: changed ${Me.Spell[....].ID} to ${Me.Gem[....].ID}
Edit2: Macro working, with new features. See below.
Code: Select all
|twitch.mac
| Twitch one person with both of your twitch spells.
| Use "Ctrl \" combo to start twitching or stop twitching.
#event OOM "#*#Insufficient Mana#*#"
|--------------------------------------
|--- SUB: Main
|--------------------------------------
Sub Main
/declare Twitch1Slot int outer
/declare Twitch2Slot int outer
/declare Ready1 bool outer FALSE
/declare Ready2 bool outer FALSE
/declare Ready1Timer timer outer
/declare Ready2Timer timer outer
/declare TwitchToggle int outer 0
/declare TwitchToggleChange int outer 0
|--- Custombind routine
/squelch /custombind delete TwichToggle
/squelch /custombind add TwitchToggle
/squelch /custombind set TwitchToggle /varset TwitchToggleChange 1
/bind TwitchToggle Ctrl+\
|-------------------------------------------------
|--- which slots do you use for Sedulous/Covetous?
/varset Twitch1Slot 7
/varset Twitch2Slot 8
|-------------------------------------------------
/if (${String[${Me.Gem["Sedulous Subversion"]}].NotEqual[NULL]}) {
/varset Ready1 TRUE
} else /varset Ready1 FALSE
/if (${String[${Me.Gem["Covetous Subversion"]}].NotEqual[NULL]}) {
/varset Ready2 TRUE
} else /varset Ready2 FALSE
:retry1
/delay 1
/if (${Ready1}==FALSE) {
/memspell ${Twitch1Slot} "Sedulous Subversion"
/varset Ready1Timer 80
}
:loop1
/delay 1
/if (!${String[${Me.Gem["Sedulous Subversion"]}].NotEqual[NULL]}) /if (${Ready1Timer}<1) /goto :retry1
/if (${String[${Me.Gem["Sedulous Subversion"]}].NotEqual[NULL]}) /goto :next
/goto :loop1
:next
:retry2
/delay 1
/if (${Ready2}==FALSE) {
/memspell ${Twitch2Slot} "Covetous Subversion"
/varset Ready2Timer 80
}
:loop2
/delay 1
/if (!${String[${Me.Gem["Covetous Subversion"]}].NotEqual[NULL]}) /if (${Ready2Timer}<1) /goto :retry2
/if (${String[${Me.Gem["Covetous Subversion"]}].NotEqual[NULL]}) /goto :ready
/goto :loop2
:ready
/call TwitchTarget
/return
|--------------------------------------
|--- SUB: TwitchTarget
|--------------------------------------
Sub TwitchTarget
/echo To toggle twitching, press Ctrl+\
|--- Main Twitching Loop.
:twitchloop
/doevents
/delay 1
/if (${TwitchToggleChange}==1) {
/varset TwitchToggle ${If[${TwitchToggle}==1,0,1]}
/varset TwitchToggleChange 0
}
/if (${Target.Type.Equal[PC]}) {
/if (${TwitchToggle}==1) {
/if (${Me.SpellReady[Sedulous Subversion]}) /if (${String[${Me.Casting}].Equal[NULL]}) /cast "Sedulous Subversion"
}
}
/doevents
/delay 1
/if (${TwitchToggleChange}==1) {
/varset TwitchToggle ${If[${TwitchToggle}==1,0,1]}
/varset TwitchToggleChange 0
}
/if (${Target.Type.Equal[PC]}) {
/if (${TwitchToggle}==1) {
/if (${Me.SpellReady[Covetous Subversion]}) /if (${String[${Me.Casting}].Equal[NULL]}) /cast "Covetous Subversion"
}
}
/goto :twitchloop
|--- End Main Twitching Loop.
/return
|--------------------------------------
|--- EVENT: OOM
|--------------------------------------
Sub Event_OOM
/echo Twitching stopped due to OOM. Press Ctrl \ at any time to resume.
/varset TwitchToggle 0
/return
Last edited by
JP5 on Tue Nov 23, 2004 11:01 pm, edited 4 times in total.
-
Cr4zyb4rd
- Plugins Czar
- Posts: 1449
- Joined: Tue Jul 20, 2004 11:46 am
Post
by Cr4zyb4rd » Tue Nov 23, 2004 3:39 pm
Lovely, now how about a subject and some verbiage so I'm not forced to parse an entire macro to know what (if anything) you're trying to communicate with this post?
-
Fibby
- a lesser mummy

- Posts: 58
- Joined: Mon Nov 15, 2004 2:18 am
Post
by Fibby » Tue Nov 23, 2004 3:54 pm
Pretty basic.. Mem's two twitch spells in slots 7&8 if they aren't already memmed.. and chain casts them over and over again.
Things of note:
No self mana check
Doesn't re-mem the spells that it forgot to mem the twitches
Few other things.. but I'm not gonna spend that much time looking at it

True genius is not knowing all the answers
It's knowing where to find them.
-
Arune
- a hill giant

- Posts: 216
- Joined: Sat Jul 03, 2004 1:51 pm
Post
by Arune » Tue Nov 23, 2004 4:21 pm
Doesn't have an array for people that need twitch. Doesn't use incoming chat to determine if Nec needs to twitch.
-
JP5
- a lesser mummy

- Posts: 70
- Joined: Tue Jul 06, 2004 10:32 pm
Post
by JP5 » Tue Nov 23, 2004 6:02 pm
Macro is meant to be used while the user is at the keys. It casts Sedulous Subversion and Covetous Subversion on the target. It doesn't need an array, but it DOES need something to stop the spam that would result if you were OOM. Thanks for that.
Amazing how much attention an empty title draws
Code: Select all
|twitch.mac
| Twitch one person with both of your twitch spells.
| End it using /endmacro. make a custombind if you want....
-
Arune
- a hill giant

- Posts: 216
- Joined: Sat Jul 03, 2004 1:51 pm
Post
by Arune » Wed Nov 24, 2004 2:04 am
That is what I am saying. Process incoming chat from a raid for the following:
twitch
feed me
mana pls
etc.
Build an array from the 1st person that says it and twitch him, if another asks, add him to the array. Set a total number you twitch each person and empty the array when you are done. This frees up the useless need ofr targeting. 8)
-
JP5
- a lesser mummy

- Posts: 70
- Joined: Tue Jul 06, 2004 10:32 pm
Post
by JP5 » Wed Nov 24, 2004 2:57 pm
Although I don't like the idea of using incoming chat to control the macro. I'm actually at the keys when I raid, this is just to provide a convenient way to automatically cast.
But, the idea of an array isn't too bad, although it might be a little too complex.. Complex things start getting hard to use and that's not what I want.
Thinking about how it would work, it would be something like:
/declare TwitchTarget[8] string outer
/declare TwitchAdd int outer 0
.....
/custombind add TwitchAdd
/noparse /custombind set TwitchAdd /varset TwitchAdd 1
/bind TwitchAdd Ctrl++
.....
in main loop
/if (${TwitchAdd}==1) {
/varset TwitchTarget[${freeslot}] ${Target.ID}
/varset TwitchAdd 0
}
.....
Ok having written that, there are a TON of complications which would make the macro disfunctional. Like, you have to make sure the target isn't already on the list,
you have to have a /for to in order to monitor the number of times you've twitched someone.... which is hard to do because in my loop, it repeats like 10000 times while the spell is casting. There is no extra loop to wait for a spell to cast before it goes onto the next one.
Deleting Array members...
Bleh bleh bleh...
If someone can write it and still have the macro be functional, that's fine, but post it as a different Twitch.mac, because it's completely different from this macro (which is built with the fact that I am present at raids in mind).