Gabriela's Twist.mac

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Gabriela
decaying skeleton
decaying skeleton
Posts: 5
Joined: Mon Jan 05, 2004 6:12 pm

Gabriela's Twist.mac

Post by Gabriela » Tue Jan 13, 2004 7:28 pm

Twist2.mac is great but it doesn't work on my system for some reason. It works fine when I am resting but whenever I turn on auto-attack it stops functioning. Also I have no use for the melee detection. The songs that I twist in combat are the same songs that I twist during down time.

The script works for me on my system. It should work for you too but it may require some fiddling. Here is why. I don't know how to use #event's. I could learn but I like my system better. The limitation with events is that for each reason a song stps you need a seperate #event. At the high level that could be missed notes, not ready to cast, stun, silence, etc.

Because of that though there are two vars you may need to customize, Delay and WatchNum. What WatchNum does is it sets the time that the script should loop while casting to make sure it is still casting. If not, the script assumes the song was stopped prematurely and it attempts to restart the song. The problem with doing it that way is that if there was no Delay what was happening was it would finish casting, think it had stopped prematurely and recast the spell. It was simply going too fast. So I had to add a delay. The tighter you make WatchNum to the ending of a song, the lower your delay can be. Generally I've found that if I drop WatchNum by 1 I can lower Delay by 2. This is where your mileage may vary though.

Code: Select all

| Twist.mac by Gabriela
| version date - Tuesday January 13 2004 -- 17:03 -05:00
|
| This is a revamp of my first attempt at macroing.  Unlike
| some of the other macros it has no detection for player state.
| It works for me though.  There are some numbers you _might_
| need to change.  For more on that reference the post.
| For now the syntax is:
|        /Macro Twist 123
|        /Macro Twist 1745
|        /Macro Twist STOP
|
| I use the STOP parameter for when I have the macro running and
| I want to mezz something.  My Mezz hotkey use to have to include
| /stopsong, endmacro, /attack off, /cast "lullaby of morell".
| Now it is just /macro twist STOP, /cast "lullaby of morell".  At
| some point I might add to it to give priority to songs or enable
| hot swapping of songs.  Just maybe!
|
| A big thanks to Raebis and dont_know_at_all on IRC for various
| help along the way.  I also referenced bits of Raebis's chant
| kiting macro to learn how to do the arrays and for loops.
#turbo 15

Sub Main(Songs)
  /zapvars

  /declare Song global
  /declare SongNum global
  /declare SongArray array
  /declare Watch timer
  /declare WatchNum global
  /declare Delay global
  /declare SongFor local
  /varset Song 1
  
  /if @Songs=="STOP" {
    /stopsong
    /attack off
    /return
  }

  /if n $strlen(@Songs)>="5" {
    /echo WARNING: This Macro has only been tested using four songs.  If you want to twist more it will require modification.  If you know enough about the scripting language to get it to twist five then you know enough to get rid of this message.
    /return
  }
  /if n $strlen(@Songs)=="4" { 
    /varset Delay 5
    /varset WatchNum 30
    /varset SongNum 4
    /echo Delay is: @Delay Watch is: @WatchNum
    /goto :SongList
  }

  /varset Delay 7
  /varset WatchNum 31
  /varset SongNum $strlen(@Songs)
  /echo Delay is: @Delay Watch is: @WatchNum

  :SongList
  /for SongFor 1 to @SongNum 
    /varset SongArray(@SongFor) $mid($calc(@SongFor-1),1,@Songs) 
    /echo Song @SongFor: $char(gem,@SongArray(@SongFor)) 
  /next SongFor

  :Loop
  /if n @Song==@SongNum {
    /call Cast @SongArray(@Song)
    /varset Song 1
    /goto :Loop
  }
  /call Cast @Song
  /varset Song $calc(@Song+1)
  /goto :Loop
/return 

Sub Cast
  :Start
  /stopsong
  /cast @Param0
  /varset Watch @WatchNum
  :Check
  /delay @Delay
  /if n @Watch==0 /goto :End
  /if $char(casting)=="FALSE" /goto :Start
  /if n @Watch>0 /goto :Check
  :End
/return

Raebis
a ghoul
a ghoul
Posts: 81
Joined: Fri Dec 12, 2003 6:23 am

stwist.mac - Simple Twist macro

Post by Raebis » Tue Jan 13, 2004 8:01 pm

I like your thinking, but i think you are going too much into it.
I know you are anti #event, and the only event i use is:

Event_Timer(TimerName)

Let me explain how this works:
if you have a timer (@SongTimer) and set the value to 30 it counts down to zero. When @SongTimer gets to zero it calls Event_Timer(TimerName) where TimerName is SongTimer (or the name of your timer).

Here is my simple twist macro (stwist.mac):
code moved to http://macroquest2.com/phpBB2/viewtopic ... 4331#34331
p.s. this is the third revision i've made, and i tested it with songs that i know i will fail casting hehe. give it a try
Last edited by Raebis on Wed Jan 14, 2004 1:09 am, edited 5 times in total.
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.

Raebis
a ghoul
a ghoul
Posts: 81
Joined: Fri Dec 12, 2003 6:23 am

Post by Raebis » Tue Jan 13, 2004 8:08 pm

Oh yeah, in reguards to the STOP issue, i have a hotbutton to cast mez... this is what it looks like: (without the comments, of course)
Remember this is a hotbutton in eq, so only 5 lines can be used.

Code: Select all

/mqp       | Pause the macro (pauses all timers etc)
/stop      | Stop singing
/cast 5    | Sing the mez song
/pause 30  | Pause to make sure that mez song sings
/mqp       | Resume the macro
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.