bard.mac

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

Moderator: MacroQuest Developers

Gatts
orc pawn
orc pawn
Posts: 10
Joined: Sat Jun 29, 2002 10:01 am

bard.mac

Post by Gatts » Sat Jun 29, 2002 7:57 pm

Code: Select all

| - Bard.mac -
|

Sub Main
	/varset t0 36		| Bard Song Timing
	/varset v50 0		|  Casting Flag
	/if n $v51==0 /varset v51 7   |  Next Song to Cast
	/varset v52 0		| Switching
	:Loop
		/doevents
		/if n $t0<35 /call StartSong  | Bard timings, A little slow but will always play now
		/if n $t0<13 /call Switch      | Switch to an instrument and get the full effect of a song
		/if n $t0<6 /call StopSong
	/goto :Loop
/return

Sub StartSong
	/if n $v50==1 /goto :StartSongEnd
	/if n $v51==1 /goto :Cast1
	/if n $v51==2 /goto :Cast2
	/if n $v51==3 /goto :Cast3
	/if n $v51==4 /goto :Cast4 
	/if n $v51==6 /goto :Cast6
	/if n $v51==7 /goto :Cast7
	:Cast1
		/cast 1
		/varset v50 1
		/varset v51 2
		/varset v52 2
		/goto :StartSongEnd
	:Cast2
		/cast 2
		/varset v50 1
		/varset v51 3
		/varset v52 1
		/goto :StartSongEnd
	:Cast3
		/cast 3 
		/varset v50 1
		/varset v51 4
		/varset v52 1
		/goto :StartSongEnd
	:Cast4
		/cast 4
		/varset v50 1
		/varset v51 6
		/varset v52 0
		/goto :StartSongEnd
	:Cast6
		/cast 6 
		/varset v50 1
		/varset v51 1
		/varset v52 0
		/goto :StartSongEnd
	:Cast7
		/cast 7 
		/varset v50 1
		/varset v51 4
		/varset v52 0
		/goto :StartSongEnd
	:StartSongEnd
/return

Sub StopSong
	/stopsong
	/varset t0 35
	/varset v50 0
	/if n $v52==0 /goto :StopSongEnd
	/if "$cursor()"=="TRUE" /click left auto
	/click left equip secondary
	/if n $v52==11 /click left pack 6 0   | Put it away somewhere
	/if n $v52==12 /click left pack 6 1 
	/if n $v52==13 /click left pack 6 2 
	/if n $v52==14 /click left pack 6 3 
	/finditem "Polished Granite Tomahawk"
	/click left equip primary
	/finditem "Giant Wolf Fang"
	/click left equip secondary
	/varset v52 0
:StopSongEnd
/return

Sub Switch
	/if n $v52==0 /goto :SwitchEnd
	/if n $v52>9 /goto :SwitchEnd
	/if "$cursor()"=="TRUE" /click left auto
	/if $pack(6,open)==FALSE /click right inv 6
	/click left equip primary
	/click left pack 6 8						 |  I leave my 6th pack open for switching
	/if n $v52==1 /finditem "Lute"
	/if n $v52==2 /finditem "Hand Drum"
	/if n $v52==3 /finditem "Wooden Flute"
	/if n $v52==4 /finditem "Horn"
	/click left equip secondary
	/click left pack 6 9
	/varadd v52 10
:SwitchEnd	
/return

Sub Event_CastFizzle  | MAN I WISH THIS WORKED 
   /echo You should probably recast that spell.
/return

|

Gatts
orc pawn
orc pawn
Posts: 10
Joined: Sat Jun 29, 2002 10:01 am

Post by Gatts » Sat Jun 29, 2002 8:02 pm

This is an example of a bard twisting Macro. It'll switch to the correct instrument right before the pulse, then switch back to weapons. It'll need a bit of work if anyone wants to use it. (You'll need to setup the correct weapon and instrument names) (Also you'll need to specify what pack to put things as its swapping, I suggest your last).

I could be made better with the addition of some bard specify triggers:

"You missed a note" or "You haven't recovered yet" and then restart the song.

I can hope right? :)

Gatts

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sat Jun 29, 2002 8:03 pm

Salutations,
I edited the initial post so its in

Code: Select all

 brackets...

Gatts
orc pawn
orc pawn
Posts: 10
Joined: Sat Jun 29, 2002 10:01 am

Post by Gatts » Sat Jun 29, 2002 8:32 pm

Ahh thank it looks much better now. So thats what those little buttons are for.

On another subject I was looking at the Source code and it looked fairly simple to add event triggers. I wish the entire project was open sourced because I would be working on it. Alas hooking DX calls are a bit out of my league. :) For a suggestiion it shouldn't be too hard to add some player defined triggers.

/eventadd [trigger_text] [Subroutine to call]

Maybe something like that. I could probably handle the C Code for it, but without the ability to test it, I could never get it bug free.

Thanks for great Program.

Gatts

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Sat Jun 29, 2002 8:44 pm

Salutations,
That idea should probably be submitted to the ideas thread (http://macroquest2.com/phpBB2/viewtopic.php?t=77) and maybe submitted to the feature request page on sourceforge.

Domosan
I had to suck up to get this title ;)
Posts: 101
Joined: Mon Jun 17, 2002 3:54 pm

Post by Domosan » Sun Jun 30, 2002 9:10 am

That suggestion as already been mentioned in 3 different locations by yours truly in the form of Custom_Events.

Domosan