My twisting macro

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

Moderator: MacroQuest Developers

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

My twisting macro

Post by Ariain » Sun Oct 13, 2002 5:55 pm

Thanks to all who helps.

Code: Select all

|  - Twist.mac -
|  - By Ariain ariain@earthlink.net -
|  Twisting with no delays so it can be run in other macros such as a hunting macro.
|  If you have an requests please email me.


#define SONG1 t1
#define SONG2 t2
#define SONG3 t3
#define SONG4 t4

#event MissedNote "You miss a note, bringing your song to a close!" 
#event Stunned "You are unstunned."

Sub Main
/call sing1
:Mainloop
/doevents
/goto :Mainloop


Sub Sing1
:1
/varset v0 1
/stop song
/delay 2
/cast 5
/varset SONG1 50s
/varset SONG2 31
/goto :Mainloop


Sub Sing2
:2
/varset v0 2
/stop song
/delay 2
/cast 4
|/click left hotkey 6
|/click left hotkey 8
|/click left hotkey 9
|/click left hotkey 7
/varset SONG2 50s
/varset SONG3 31
/goto :Mainloop


Sub Sing3
:3
/varset v0 3
/stop song
/delay 2
/cast 2
|/click left hotkey 7
|/click left hotkey 9
|/click left hotkey 8
|/click left hotkey 6
/varset SONG3 50s
/varset SONG4 31
/goto :Mainloop


Sub Sing4
:4
/varset v0 4
/stop song
/delay 2
/cast 1
/varset SONG4 50s
/varset SONG1 31
/goto :Mainloop


Sub Event_Timer

/if n $SONG1==0 /call Sing1
/if n $SONG2==0 /call Sing2
/if n $SONG3==0 /call Sing3
/if n $SONG4==0 /call Sing4
/doevents
/goto :Mainloop

Sub Event_Missednote
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/varset SONG4 50s
/goto :$v0


Sub Event_Stunned
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/varset SONG4 50s
/goto :$v0

Timid
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sun Oct 20, 2002 2:52 am

Fear Kite

Post by Timid » Sun Oct 20, 2002 3:03 am

Thanks to you this is now easy to make.

Code: Select all

|  - FearKite.mac -
|  - modified by Timid from:
|  - Twist.mac - 
|  - By Ariain ariain@earthlink.net -
|  - and Fight.mac by L124RD
|  - Default song positions at 5, 7, 1, does ability 1
|  - 5 = fear 7 = snare 1 = buff/misc.


#define SONG1 t1
#define SONG2 t2
#define SONG3 t3

#event MissedNote "You miss a note, bringing your song to a close!"
#event Stunned "You are unstunned."
#event Resist "Your Target resisted the Angstlich`s Appalling Screech spell."

Sub main
/echo Fighting $target(name). It is level $target(level).
/varset v10 $target(name)
/varset v11 $target(id)
/face
/sendkey down up
:FollowLoop
 /if n $target(distance)>15 /sendkey down up
 /if n $target(distance)<16 {
  /sendkey up up 
  /attack on
  /call sing1
  /goto :CloserAF
 }
 /face nopredict
 /doability 1
 /goto :FollowLoop

:CloserAF
  /if "$target(id)"!="$v11" /goto :EndAF
  /if n $target(distance)>15 /sendkey down up
  /if n $target(distance)<4 /sendkey down down
  /if n $target(distance)<16 /sendkey up up
  /if n $target(distance)>5 /sendkey up down
  /face nopredict fast
  /doability 1
  /doevents
  /goto :CloserAF

:EndAF
  /echo $v10 is dead
  /sendkey up up
  /sendkey up down
  /attack off
  /varset v10 0
/endmacro
/return

| Snare
Sub Sing1
:1
/varset v0 1
/stop song
/delay 1
/cast 7
/varset SONG1 50s
/varset SONG2 31
/if "$target(id)"!="$v11" /goto :EndAF
/goto :CloserAF

| Fear
Sub Sing2
:2
/varset v0 2
/stop song
/delay 1
/cast 5
/varset SONG2 50s
/varset SONG3 31
/if "$target(id)"!="$v11" /goto :EndAF
/goto :CloserAF

| Buff/heal/whatever
Sub Sing3
:3
/varset v0 3
/stop song
/delay 1
/cast 1
/varset SONG3 50s
/varset SONG1 31
/if "$target(id)"!="$v11" /goto :EndAF
/goto :CloserAF

Sub Event_Timer

/if n $SONG1==0 /call Sing1
/if n $SONG2==0 /call Sing2
/if n $SONG3==0 /call Sing3
/doevents
/goto :CloserAF

Sub Event_Missednote
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/goto :$v0


Sub Event_Stunned
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/goto :$v0

Sub Event_Resist
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/goto :2

PussyFoot
a lesser mummy
a lesser mummy
Posts: 39
Joined: Tue Oct 15, 2002 8:05 pm

Twisting Macro

Post by PussyFoot » Tue Oct 29, 2002 8:47 pm

After looking at the one provided by Ariain and the modifications by Timid, I began to look into making my own twisting macro. I also looked at the spellcast include that comes with the last IRC version of macroquest.

This is what I have managed so far, this one is currently for chant kiting.

Working on a #include file for bardsongs, hopefully will have it setup and can post it soon.

Code: Select all

| - bardtwist.mac -
| Twists the bard songs and watches for a missed note, if the note is
| missed restarts that song.

#event MissedNote "You miss a note, bringing your song to a close!" 
#event MobDead "You gain experience"
#event Loading "LOADING"
#event Stunned "You cannot cast while stunned"
#event OutOfRange "Your target is out of range, get closer!"
#event NoSpeed "You slow down."
#event NoTarget "You must first select a target for this spell"
#event EXP "You gain experience!!"
#event LOADING "LOADING"
#event stunoff "You are unstunned"

#define SingStatus v59
#define SONG_UNKOWN 1
#define SING_RESTART 2
#define OUT_OF_RANGE 3
#define STUNED 4
#define SONG_FINISHED 8
#define SongTimer t7

Sub Main
/stop
/delay 10
:SingLoop
/Call Sing "Selo"
/stop
/delay 2
/call Sing "Tuyen`s Chant of Frost"
/stop
/delay 2
/call Sing "Tuyen`s Chant of Flame"
/stop
/delay 2
/goto :SingLoop


Sub Sing
 	/echo "Attempting to sing $p0"
	:StartSong
	/varset SingStatus 0
	/stop
	/delay 1
	/cast "$p0"
	/varset SongTimer 35
	:WaitSing
		/doevents
		/doevents MissedNote
	   	/if n $SingStatus==SING_RESTART /goto :StartSong
     		/if n $SingStatus>SING_RESTART /return $SingStatus
  		/if n $SongTimer>0 /goto :WaitSing
  		/varset SongTimer 0
/return SONG_FINISHED


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_NoSpeed
	/stop
	/delay 5
	/call Sing "Selo"
/return

Sub Event_NoTarget
	/stop
	/call Sing "Selo"
/endm

Sub Event_EXP
	/stop
	/delay 5
	/stop
	/call Sing "Selo"
/endm

Sub Event_stunoff
	/stop
	/goto :SingLoop
/endm

Sub Event_LOADING
/endm
Let me know of any improvements I can make to this code, I know it's sloppy I need to go back and clean it up some, for instance all the /stop /call sing "selo" could be a single sub called play_run and would condense the code some. I'm gonna optimize it and attempt to figure out how to detect when teh cast meter goes away, anyone know how to do that? That way it doesn't waste anytime based on lag, and if your lagging real bad it lets you cast no matter how long it takes the bar to go.
One day, PussyFoot will strike fear into the hearts of man.

Asleep@TheWheel
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Apr 27, 2003 12:06 am

Duh Question.

Post by Asleep@TheWheel » Mon Jun 16, 2003 2:02 am

Experienced board members,

Again.... maybe cause it is late..... (again)

Can someone please explain the x and y parameters on these macros?
Can you please post a real macro command to start any of them up? I can figure it out if I see a real one instead of the /macro <name> x y dist song song song

Thanks in advance

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Mon Jun 16, 2003 2:19 am

What are you meaning x y parameters? I don't see anything in any of these macros that has anything to do with x and y.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Mon Jun 16, 2003 2:46 am

I needed a botted bard solely for twisting songs for the raid party, and group, looked at all the nice bard and twisting macros, most were to featurefull for my needs, a few were too simple for my needs, so I took the best of both worlds, and fitted them to my needs :)

It's purpose is to just put the bard on Auto Follow or AFK or whatever, and twist AE mana, AE resists and group attack songs.

Code: Select all

#event Fizzle "You miss a note, bringing your song to a close!"
#define ReSing v1
Sub Main
	/if "$p1"=="" {
		/echo Syntax: /macro twist <delaysMS> <gem#> <gem#> [gem#] [gem#]
		/endmacro
	}
	/stopsong
	/delay 5
	:Sing
		:Song1
			/cast $p1
			/doevents
			/if n $ReSing==1 {
				/varset ReSing 0
				/goto :Song1
			}
			/delay $p0
			/stopsong
			/delay 4
		:Song2
			/cast $p2
			/doevents
			/if n $ReSing==1 {
				/varset ReSing 0
				/goto :Song2
			}
			/delay $p0
			/stopsong
			/delay 4
		:Song3
			/if "$p3"=="" /goto :Sing
			/cast $p3
			/doevents
			/if n $ReSing==1 {
				/varset ReSing 0
				/goto :Song3
			}
			/delay $p0
			/stopsong
			/delay 4
		:Song4
			/if "$p4"=="" /goto :Sing
			/cast $p4
			/doevents
			/if n $ReSing==1 {
				/varset ReSing 0
				/goto :Song4
			}
			/delay $p0
			/stopsong
			/delay 4
	/goto :Sing
/return

Sub Event_Fizzle
	/varset ReSing 1
/return

TheColonel
of what?
of what?
Posts: 164
Joined: Thu Oct 10, 2002 6:34 pm
Location: Golden, CO
Contact:

Post by TheColonel » Mon Jun 16, 2003 6:51 pm

Well.. since I've been boasting in my thread that I've got a good twisting one, WTF? why not... syntax is a little odd, I'll explain it all.

There are two keywords that can be used "selo" which refers to the 2.5 minute duration selo's song(lvl 49) and "amp" which refers to the song "Amplification" both of which can be placed anywhere when you call the macro, BUT, the next parameter MUST be the spell gem associated with AMP or Selo's... I suppose I could make it search, but the $char(spell,"Name") or whatever seems to be problematic more often than not, so I choose this way. That not clear enough? Here's a few examples

Example 1: I want to sing AMP which is in slot 8, and some other songs in slot 2 3 4 & 5... to do this I'd type,
/macro twi 2 3 4 5 amp 8
OR, /macro twi 2 amp 8 3 4 5
You can push the amp or the selos whereever you want....
Example b: I want to sing both AMP and Selo's extended verion with 2 3 and 4 for kicks (Selos is in slot 1, amp in slot 8)

/macro twi selo 1 2 3 4 amp 8
... if that's not clear enough, PM me. Or I've got AIM and ICQ up all the time... And for the code (note selo's runs on a timer and amp counts songs, rather crude but it seems to work, I ran into problems with amp overwriting selos if I did it anyother way.)

Code: Select all

| - Twi.mac - 
| 
#include exp.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!" 
#event Slow		"You slow down"
#event Outran		"out of range"
#event Outran		"You cannot see"

|#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 temp v4
#define amtem v5

#define WAITTIME 33   |Cast time of one song.
#define AMPL 5        |This is the hole that it gets in the queue
#define SELOS 6       | ^^ditto^^

Sub Main 
  /if $p0=="" /return 
  /if $p0==NULL /return 
  /varset nsongs 0 
  /varset v60 0
  /varset cursong 0
  /call EXPSETUP

  /varset a(1,0) $p0
  /if $p1!="" /varset a(1,1) $p1
  /if $p2!="" /varset a(1,2) $p2
  /if $p3!="" /varset a(1,3) $p3
  /if $p4!="" /varset a(1,4) $p4  
  /if $p5!="" /varset a(1,5) $p5
  /if $p6!="" /varset a(1,6) $p6
  /if $p7!="" /varset a(1,7) $p7
  /if $p8!="" /varset a(1,8) $p8
  :setupLoop
    /if $a(1,$v60)=="amp" {
      /varcalc temp $v60+1
      /varset a(0,AMPL) $a(1,$temp)
      /varadd v60 2
      /echo Found $char(gem,$a(0,AMPL)) at Gem $a(0,AMPL)
      /varset amtem 7
      /goto :setuploop
    }
    /if $a(1,$v60)=="selo" {
      /varcalc temp $v60+1
      /varset a(0,SELOS) $a(1,$temp)
      /varadd v60 2
      /echo Found $char(gem,$a(0,SELOS)) at Gem $a(0,SELOS)
      /goto :setuploop
    }
    /if $a(1,$v60)!="" /if $a(1,$v60)!=NULL { 
      /varset a(0,$int($nsongs)) $int($a(1,$v60))
      /echo Song $int($nsongs+1): $char(gem,$a(0,$int($nsongs)))
      /varadd nsongs 1
      /varadd v60 1
      /goto :setuploop
    } 
  /if n $a(0,SELOS)>0 /varset cursong $a(0,SELOS)
:Loop
  /if n $a(0,SELOS)>0 {
    /if n $t1<=$calc($t0+WAITTIME) /varset cursong SELOS
    /if n $t1<=WAITTIME /varset t0 1 	|INTERRUPTS CURRENT SONG!
  }
  /if n $a(0,AMPL)>0 /if n $amtem>6 /varset cursong AMPL
  /if n $t0<=0 /call Sing $int($a(0,$cursong))
  /delay 0
  /doevents
  /goto :Loop
/return

Sub Sing
  /varset t0 WAITTIME
  /if n $cursong==SELOS /varset t1 1500
  /if n $cursong==AMPL /varset amtem 0
  /stopsong
  /cast $p0
  /varadd amtem 1
  /varset prevsong $cursong
  /varadd cursong 1
  /if n $cursong>=$nsongs /varset cursong 0
  /doevents
/return 


Sub Event_MissedNote 
  /varset cursong $prevsong
  /varsub amtem 1
  /varset t0 0 
  /doevents 
/return 

Sub Event_Slow
  /varset cursong SELOS
  /varset t0 0
/return

Sub Event_Outran
  /varset t0 0
  /varadd targcount 1
  /varsub amtem 1
  /if n $targcount>=4 {
    /varset targcount 0
    /tar npc 
  }
  /doevents 
/return

Sub Event_Recovered 
  /varset t0 0
  /varsub amtem 1
  /varset cursong $prevsong
  /doevents 
/return 

Sub Event_NeedTarget 
  /varadd targcount 1
  /if n $targcount>=2 {
    /varset targcount 0
    /tar npc 
  }
  /doevents
/return
EDIT:: Hehe exp.mac is as follows

Code: Select all

#event Exp		"You gain party experience!!"
#event Exp		"You gained raid experience!"
#event Exp		"You gain experience!!"

#define aaexp v96
#define exper v97
#define exptot v98
#define aatot v99

Sub EXPSETUP
  /varset exper $char(exp)
  /varset aaexp $char(aa,exp)
/return

Sub Event_Exp
  /varcalc exper $char(exp)-$exper
  /varcalc aaexp $char(aa,exp)-$aaexp
  /varcalc exptot $exptot+$exper
  /varcalc aatot $aatot+$aaexp
  /echo $exper%  $aaexp%AA from this kill.
  /echo $exptot% $aatot%AA total earned in $calc($running/60) minutes.
  /varset aaexp $char(aa,exp)
  /varset exper $char(exp)
/return
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

Darkhearted_Wizard
orc pawn
orc pawn
Posts: 22
Joined: Fri Jun 20, 2003 7:14 pm

Post by Darkhearted_Wizard » Sun Jun 22, 2003 5:01 pm

...