twist.mac - Bard twisting macro

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Phantal
orc pawn
orc pawn
Posts: 18
Joined: Tue Aug 13, 2002 7:57 pm

twist.mac - Bard twisting macro

Post by Phantal » Thu Aug 15, 2002 3:43 pm

A bit updated version of someone elses Twist.mac, delay timing is shorter allowing for 4 song twists instead of only 3, and it handles missed notes.

Code: Select all

| - Twist.mac - 
| twists the song #'s passed through params.  Accepts up to 5 songs
| may need to fiddle with delay timings to suit your
| current needs (raid, exp groups, etc)

#event MissedNote "You miss a note, bringing your song to a close!"

Sub Main
	/stopsong
	/delay 3

	:Sing

| Song 1
	/varset v0 $p0
|	/echo Playing song #$p0
	/cast $p0
	/delay 4
	/doevents
	/delay 24
	/stop
	/delay 3

| Song 2
	/if "$p1"=="" /goto :Sing
	/varset v0 $p1
|	/echo Playing song #$p1
	/cast $p1
	/delay 4
	/doevents
	/delay 24
	/stop
	/delay 3

| Song 3
	/if "$p2"=="" /goto :Sing
	/varset v0 $p2
|	/echo Playing song #$p2
	/cast $p2
	/delay 4
	/doevents
	/delay 24
	/stop
	/delay 3

| Song 4
	/if "$p3"=="" /goto :Sing
	/varset v0 $p3
|	/echo Playing song #$p3
	/cast $p3
	/delay 4
	/doevents
	/delay 24
	/stop
	/delay 3

| Song 5
	/if "$p4"=="" /goto :Sing
	/varset v0 $p4
|	/echo Playing song #$p4
	/cast $p4
	/delay 4
	/doevents
	/delay 24
	/stop
	/delay 3


	/goto :Sing
/return 

Sub Event_MissedNote
	/cast $v0
	/delay 4
	/doevents
/return
-Phantal

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

Post by Ariain » Fri Oct 11, 2002 10:37 am

I am very new to this, but this macro doesnt work. I think it has something to do with the /varset. It wont cast spells and returns the syntax on /varset and /cast 1-8 when run I have fiddled with it but when I change the cast spell line it will cast the spell but only the first spell over and over again.

User avatar
Stargazer
a lesser mummy
a lesser mummy
Posts: 32
Joined: Mon Sep 30, 2002 3:30 pm

Post by Stargazer » Fri Oct 11, 2002 2:28 pm

How are you invoking this macro? Are you passing it the gem number(s) of the song(s) you want to sing? I typically invoke it by entering "/macro twist 1 2 3 4" where my songs I want to twist are in the first 4 spell gems.

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

Post by Ariain » Fri Oct 11, 2002 3:23 pm

And that would probley be what I am doing wrong =) Thanks Ill try that
Yup that was it thank you. =)

Phantal
orc pawn
orc pawn
Posts: 18
Joined: Tue Aug 13, 2002 7:57 pm

...

Post by Phantal » Sat Nov 02, 2002 8:10 am

That isn't the only way to invoke it, but it is the easiest.

/macro twist "Chorus of Replenishment" "Amplification" "Chorus of Clarity" "Melody of Preservation"

Note that i cut out nivs because i don't remember if it has an ` or not in the name... but regardless, it doesn't matter, because the /cast command doesn't care ... it just does a partial name match. However, if you do happen to run into a song or spellname that has an ` in it, make sure you use the ` near the #1, rather than the one near the enter key.

-Phantal

Macromancer
orc pawn
orc pawn
Posts: 11
Joined: Thu Oct 31, 2002 8:34 pm

Phantal..

Post by Macromancer » Sun Nov 10, 2002 5:14 pm

Any chance you could be coerced into adding in stuns and bashes to this baby? I tried but I ended up mangling it :p

aGuy
orc pawn
orc pawn
Posts: 18
Joined: Tue Nov 05, 2002 3:22 pm

Post by aGuy » Tue Nov 12, 2002 3:07 pm

macromancer,

Look at this post. This marco kit should do the thing for you. It has both a spell casting and fight macro macros. The fight macro has bash and other abbilities built in.

http://macroquest2.com/phpBB2/viewtopic.php?t=1257

aGuy

Macromancer
orc pawn
orc pawn
Posts: 11
Joined: Thu Oct 31, 2002 8:34 pm

Sorry I wasn't clear

Post by Macromancer » Wed Nov 13, 2002 7:23 pm

The problem is not that I need to bash(bards can't). It's that I'm *Getting* bashed and stunned, thus screwing up the twisting

aGuy
orc pawn
orc pawn
Posts: 18
Joined: Tue Nov 05, 2002 3:22 pm

Re: Sorry I wasn't clear

Post by aGuy » Wed Nov 13, 2002 9:24 pm

Macromancer wrote:The problem is not that I need to bash(bards can't). It's that I'm *Getting* bashed and stunned, thus screwing up the twisting
Try adding code like this. I borrowed this from Pusyfoot's code that can be in the in macro depot. Take a look at the full code in his post. It works great. It is called bardtwist.mac. I modified it to sing songs that I would use while group fighing. His post is more for when you are solo kitting

Code: Select all


#event MissedNote "You miss a note, bringing your song to a close!" 
#event Stunned "You cannot cast while stunned" 
#event OutOfRange "Your target is out of range, get closer!"
#event stunoff "You are unstunned"

Sub Event_MissedNote 
   /stop    
   /delay 4 
   /varset SingStatus SING_RESTART 
/return 

Sub Event_Stunned 
   /varset SingStatus STUNED 
/return 

Sub Event_OutOfRange 
   /stop 
   /delay 4 
   /varset SingStatus SING_RESTART 
/return 

Sub Event_stunoff 
   /stop 
   /goto :SingLoop 
/endm


Phantal
orc pawn
orc pawn
Posts: 18
Joined: Tue Aug 13, 2002 7:57 pm

...

Post by Phantal » Thu Dec 19, 2002 4:46 am

Well, I haven't added bash and stun in yet, I re-wrote the macro the way I really wanted it to work out ...

Code: Select all

| - Twist1.mac - 
| 
#event MissedNote "You miss a note, bringing your song to a close!"
#event Recovered "You haven't recovered yet..."
#event NeedTarget "You must first select a target for this spell!"

|#chat tell
| Read what Event_chat is setup to do before uncommenting it.

| song queue.  prev/next aren't really doing anything useful
| right now, I just have them there in case I find a good use later
#define prevsong v0
#define cursong v1
#define nextsong v2

#define nsongs v3
#define switch v4

#define waittime 30

Sub Main
  /if $p0=="" /return
  /if $p0==NULL /return

  /varset nsongs 1

  /varset a(0,1) $p0	| First song
  /echo Song 1: $char(gem,$p0)

  /if $p1!="" /if $p1!=NULL {
				/varadd nsongs 1
				/varset a(0,2) $p1
				/echo Song 2: $char(gem,$p1)
		}

  /if $p2!="" /if $p2!=NULL {
				/varadd nsongs 1
				/varset a(0,3) $p2
				/echo Song 3: $char(gem,$p2)
		}

  /if $p3!="" /if $p3!=NULL {
				/varadd nsongs 1
				/varset a(0,4) $p3
				/echo Song 4: $char(gem,$p3)
		}

  /varset cursong 1
  /varset nextsong 2
  /varset switch 0

:Sing
  /stopsong
  /delay 3

  /cast $int($a(0,$cursong))
|  /echo Playing: $char(gem,$int($a(0,$cursong)))
  /delay 4
  /doevents

  /if n $switch==1 {
	/varset switch 0
	/goto :Sing
  }

  /delay $int($calc(waittime-4))

  /varset prevsong $cursong
  /varset cursong $nextsong
  /varset nextsong $int($calc($nextsong+1))

  /if n $nextsong>$nsongs /varset nextsong 1

  /goto :Sing
/return

Sub Event_MissedNote
  /cast $int($a(0,$cursong))
  /delay 4
  /doevents
/return

Sub Event_Recovered
  /cast $int($a(0,$cursong))
  /delay 4
  /doevents
/return

Sub Event_chat
  /if "$p2"~~"assist me" {
    /assist $p1
    /delay 2
    /g assisting $p1 on %t
  }

  /if "$p2"~~"camp" {
    /sit
    /camp
    /end
  }
/return

Sub Event_NeedTarget
  /varset prevsong $cursong
  /varset cursong $nextsong
  /varset nextsong $int($calc($nextsong+1))

  /if n $nextsong>$nsongs /varset nextsong 1

  /varset switch 1
/return
I'll worry about the bash/stun thing later.

-Phantal