Help! Logic says yes, Macroquest says duhduhduhduhduh~~

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

ThatOtherGuy
a lesser mummy
a lesser mummy
Posts: 41
Joined: Tue Aug 05, 2003 6:12 pm

Help! Logic says yes, Macroquest says duhduhduhduhduh~~

Post by ThatOtherGuy » Wed Aug 13, 2003 11:50 am

bardsong twisting integrated into an always on attack script ~~
Simplified Sub Main

Code: Select all

(varsets, events, defines)
	:Mainloop
		/doevents
		(call inrange script)
		(call checkbehind script)
		/call twist
		/doevents 
	/goto :Mainloop
/return
Sub twist in it's wholeness :P

Code: Select all

Sub twist
/if $currentsong=="songone" {
	/if n timer=="0" {
		/stop
		/delay 3
		/cast $song1
		/doevents
		/varset timer "$dly"
		/echo timer = $timer and dly = $dly
		/if $song2!="" {
			/varset currentsong "songtwo"
		}
		/if #song2=="" {
			/varset currentsong "songone"
		}
	} else {
		/return
	}
}	/return

/if $currentsong=="songtwo" {
	/if n timer=="0" {
		/stop
		/delay 3
		/cast $song2
		/doevents
		/varset timer "$dly"
		/if $song3!="" {
			/varset currentsong "songthree"
		}
		/if #song3=="" {
			/varset currentsong "songone"
		}
	} else {
		/return
	}
	/return
}

/if $currentsong=="songthree" {
	/if n timer=="0" {
		/stop
		/delay 3
		/cast $song3
		/doevents
		/varset timer "$dly"
		/if $song4!="" {
			/varset currentsong "songfour"
		}
		/if #song4=="" {
			/varset currentsong "songone"
		}
	} else {
		/return
	}
	/return
}

/if $currentsong=="songfour" {
	/if n timer=="0" {
		/stop
		/delay 3
		/cast $song4
		/doevents
		/varset timer "$dly"
		/if $song5!="" {
			/varset currentsong "songfive"
		}
		/if #song5=="" {
			/varset currentsong "songone"
		}
	} else {
		/return
	}
	/return

/if $currentsong=="songfive" {
	/if n timer=="0" {
		/stop
		/delay 3
		/cast $song5
		/doevents
		/varset timer "$dly"
		/varset currentsong "songone"
	} else {
		/return
	}
	/return
}
/return

Sub Event_MissedNote 
/if $currentsong=="songone" {
	/cast $song1
	/delay 4
}
/if $currentsong=="songtwo" {
	/cast $song2
	/delay 4
}
/if $currentsong=="songthree" {
	/cast $song3
	/delay 4
}
/if $currentsong=="songfour" {
	/cast $song4
	/delay 4
}
/if $currentsong=="songfive" {
	/cast $song5
	/delay 4
}
/doevents 
/return
sooooo
What this does is basically spams the songs as if it wasn't checking to make sure the timer = 0, and an echo of teh variables showed that $dly was reseting the timer to the appointed delay.

I'm completely confused on this one, I hope someone can make some sense out of it
-TOG

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Wed Aug 13, 2003 12:55 pm

Didn't look in to it real deep, but you should change

Code: Select all

/if n timer==0
to

Code: Select all

/if n $timer==0

ThatOtherGuy
a lesser mummy
a lesser mummy
Posts: 41
Joined: Tue Aug 05, 2003 6:12 pm

Post by ThatOtherGuy » Wed Aug 13, 2003 2:36 pm

Argh, I feel st00pid.
That was the problem :P
Works great now!

Thanks much
-TOG

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

For faster twisting ...

Post by MacroFiend » Wed Aug 13, 2003 3:10 pm

you may want to look in to using events instead of delays. Each song should have some text that is output when it completes its "casting". When that text is displayed is usually the optimal time to stop it and start the next.

Granted, this means creating an event for each song in your twist rotation but may give you just enough time to twist that 5th song in. You should probably also trap for the song fizzled message. You may not care to re-try your DD or AoE song in a rotation ... but keeping your speed or invis etc may come in handy.

ThatOtherGuy
a lesser mummy
a lesser mummy
Posts: 41
Joined: Tue Aug 05, 2003 6:12 pm

Post by ThatOtherGuy » Wed Aug 13, 2003 3:19 pm

I'm not going to change over to events for spell finishes simply because theres a HUGE number of bard spells, and I want it to work with them all :P

Sub Event_missednote = fizzle trap :P
-TOG

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

If not events ... then maybe ...

Post by MacroFiend » Wed Aug 13, 2003 3:27 pm

you could use the $spell(xxx,mycasttime) variable to set your delay on a per-song basis. This is assuming that it is working with bard songs. I don't have a bard anymore, so I couldn't tell you if it works or not. For that matter, I don't know if all bard songs have the same cast time. Just trying to give you some ideas to make the twisting a little faster. :wink:

ThatOtherGuy
a lesser mummy
a lesser mummy
Posts: 41
Joined: Tue Aug 05, 2003 6:12 pm

Post by ThatOtherGuy » Wed Aug 13, 2003 3:41 pm

Ya, it works, but if your computer is laggin a bit, it cuts off the last few tenths of a second... Thats why I allowed for the DLY parameter... I tried donig the cast time stuff, but it ended up missing the song if I was lookin at a laggy part of zone_00
-TOG

Shin Noir
a ghoul
a ghoul
Posts: 90
Joined: Tue Aug 05, 2003 8:18 pm

Post by Shin Noir » Fri Aug 15, 2003 7:37 am

arrays are your friend!

Doodman
a ghoul
a ghoul
Posts: 124
Joined: Thu Jan 02, 2003 12:07 pm

Post by Doodman » Fri Aug 15, 2003 10:50 am

you could use the $spell(xxx,mycasttime) variable to set your delay on a per-song basis
All bard songs are 3 second cast and no modifiers make them cast faster. Such is the life of a bard. No focus items, no mana regen (except FT and MC), no mod rods. Well, mod rods technically work. They take health but give no mana.
you may want to look in to using events instead of delays. Each song should have some text that is output when it completes its "casting". When that text is displayed is usually the optimal time to stop it and start the next.
No all song have message and sometimes (like with chant kiting) you are too far away to see the messages. Also, you can usually stop the current song and start another just before the cast bar goes away (and before the message appears) and still get it to go off. I four-twist by hand and this is a very common in my log:

Your song ends.
Your attacks accelerate.
Your song ends.
You feel protected from cold.