Twist1.mac - A chant kiting macro.

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

Moderator: MacroQuest Developers

User avatar
SingleServing
a hill giant
a hill giant
Posts: 195
Joined: Tue Dec 17, 2002 11:00 pm

Muhahah!

Post by SingleServing » Fri Jan 17, 2003 9:41 pm

I'm going to equip my bard just so I can do a bard macro !

Sounds like a lot of fun! :D :lol: 8) :shock: :P :wink:
[color=DarkBlue]Everything,[/color] [color=DarkBlue][b]is[/b][/color] [color=black]black[/color] [color=DarkBlue]and[/color] [color=white]white[/color][color=DarkBlue], when you zoom out it looks[/color] [color=gray]grey[/color][color=DarkBlue].[/color]

Cokoanut
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Nov 19, 2002 4:51 am

Post by Cokoanut » Sat Jan 18, 2003 8:24 pm

Having the same problem as Murat...will sing the first song, but won't twist. Or it will spam "you do not have that spell memorized" and not sing at all.

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

Post by TheColonel » Sat Jan 18, 2003 8:54 pm

Interesting... I always just use the first three. Are you using MY macro? which requires spell gem #'s as an argument, or visuals? I've had a lot of issues getting spells/songs to fire from the name lately. Perhaps the 2 blank offsets at the bottom of the eqclient.ini have something to do with that.. dunno... lately I'ven't had the time to do anything. I've got 24.5 credit hours... 5.5 more than they would allow me to sign up for... wankers don't know my potential... needless to say, I'm swamped with homework/readings/learning... so I haven't had a chance to sit down and play... I'm glad I got this thing working over the break, now I can exp while I do homework!!! =) LOL
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

Cokoanut
decaying skeleton
decaying skeleton
Posts: 5
Joined: Tue Nov 19, 2002 4:51 am

Post by Cokoanut » Sun Jan 19, 2003 10:50 pm

Was talking about visual's above...like his because I have 49 selos =). But on yours, it won't even start singing at all, lol. think there's something i'm doing wrong.

BEHEMOTH
orc pawn
orc pawn
Posts: 13
Joined: Wed Sep 11, 2002 3:45 pm
Location: RightBehindYou

hmm... my post mighta been missed 'cause it's back on page 2

Post by BEHEMOTH » Tue Jan 21, 2003 1:24 pm

hmm... my post mighta been missed 'cause it's back on page 2...

anyone have anything simple to say/advise? i would think that a few of those would be realativly simple.
---------

Signature?!??! Nobody ever reads these damn things anyway....

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Tue Jan 21, 2003 11:33 pm

Needs a

#define CastTimer t0

and an initial timer /varset.

I don't believe timers stop at zero, they go negative so the compares should be <= not ==.

Needs more comments so we know what you are trying to do.

BEHEMOTH
orc pawn
orc pawn
Posts: 13
Joined: Wed Sep 11, 2002 3:45 pm
Location: RightBehindYou

new improved not working

Post by BEHEMOTH » Wed Jan 22, 2003 1:05 pm

NEW AND IMPROVED, NOT WORKING! WOOT

seeing as this is my first script, i am fairly happy that it seems to START doing the right thing... but...

as i said in my earlier post, there was a wishlist of things i wanted the previous programs to do, and since nobody immediatly posted em, i am trying to do this myself. my current version is supposed to run around in circles like the rest, but only target mobs of close lvl (i was getting greenies and high reds sometimes before), and also if you get bashed/stunned/hurt, it switches the damage song for a heal.

i dont think it does either of these at the moment, but at least it starts!

Code: Select all


#event Target   "Your target is out of range, get closer!" 
#event Target   "You must first select a target for this spell!"
#event Restart  "bashes for"
#event Restart  "You slow down."
#event Restart  "You miss a note, bringing your song to a close!"
#event Restart  "You haven't recovered yet..."

#define CastTimer t0 
#define CurSpell v10

Sub Main
 /if $p0=="" /call lochere  
 /if $p0==NULL /call lochere
 /varset a(0,1) 1
 /varset CurSpell 1
 /varset t0 0
:loop
 /if n $CastTimer<=0 /call Sing $int($a(0,1))
 /call circ $p0 $p1 $p2
 /doevents
 /goto :loop
/return

Sub Sing 
 /stopsong
 /varset CastTimer 35
 /cast $p0
 /Call Switch
 /doevents
/return

sub circ 
 /if n $distance($p0,$p1)<($p2/2){ 
 /face heading $calc($heading($p0,$p1)+180) 
 } else { 
 /face heading $calc($heading($p0,$p1)+$calc(90*$calc($p2/$distance($p0,$p1)))) 
 }  
/return 

Sub Target 
 /tar npc range $calc($char(level)-5) $calc($char(level)+5)
/return

Sub lochere 
 /call Main $char(y) $char(x) 70
/return

Sub Restart 
 /varset CastTimer 0
 /varset CurSpell 1
/return

Sub Switch 
 /varadd CurSpell 1
 /if $CurSpell==1 {
  /varset a(0,1) 1
  /return
  }
 /if $CurSpell==2 {
  /varset CurSpell 1
  /if n $char(hp,pct)>=90 {
  /varset a(0,1) 2
  } else {
  /varset a(0,1) 3
  }}
/return
Im fiddling with this trying to get it to work (<-- not very good at this), and if i get a working version i will post it. also, i'm going to (hopefully try and add a check for target distance, and adjusting accordingly... then maybe a simple auto-pull to a loc if nothing is close. none of those seem too hard from a coding point of view, but actually getting them to work will be a miracle for me...

oh. btw, much thanks to TheColonel for most of the working code up there... and the fact that he hasn't yelled at me for tearing his pretty stuff up...

my code actually crashes me to desktop now. i just checked it. guess i need a bit more troubleshooting than i thought.
---------

Signature?!??! Nobody ever reads these damn things anyway....

BEHEMOTH
orc pawn
orc pawn
Posts: 13
Joined: Wed Sep 11, 2002 3:45 pm
Location: RightBehindYou

Post by BEHEMOTH » Wed Jan 22, 2003 1:50 pm

maybe i should explain my macro a bit. i couldn't get it to cast spells by their names, and i didn't want to have to imput them each time, so i just made them selo=gem1 damage=gem2 heal=gem3. thats what it's changing at the sub switch at the end. also, i want to know where i should add a

/if n $target(distance)>34

so i can get it to lower the radius slightly... havent really figured much o this out though.
---------

Signature?!??! Nobody ever reads these damn things anyway....

BEHEMOTH
orc pawn
orc pawn
Posts: 13
Joined: Wed Sep 11, 2002 3:45 pm
Location: RightBehindYou

hmm.. well at least i know it was my spell casting stuff

Post by BEHEMOTH » Wed Jan 22, 2003 8:47 pm

okay... i know now that it was my spell casting stuff in my macro was what was screwing up... and i tried to just isolate that part and get it to sing gems 1 and 2 unless damaged where it should switch to 1 3... still cant get it to work... it will sing the first 1 and switch, but then not switch back.

Code: Select all

#define CastTimer t0 
#define CurSpell v10

Sub Main
 /varset a(0,1) 1
 /varset CurSpell 1
 /varset t0 0
:loop
 /if n $CastTimer<=0 /call Sing $int($a(0,1))
 /goto :loop
/return

Sub Sing 
 /stopsong
 /varset CastTimer 35
 /cast $p0
 /Call Switch
/return

Sub Switch 
 /if $CurSpell==1 {
 /varset a(0,1) 1
 /varset CurSpell 2
 }  
 /if $CurSpell==2 /if n $char(hp,pct)>=90 {
 /varset CurSpell 1 
 /varset a(0,1) 2
 }
 /if $CurSpell==2 /if n $char(hp,pct)<90 {
 /varset CurSpell 1
 /varset a(0,1) 3
 }
/return
---------

Signature?!??! Nobody ever reads these damn things anyway....

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

Post by TheColonel » Wed Jan 22, 2003 11:51 pm

First off... I dunno what the issues are with not getting something to run... I've seen a few people bitch about the screwed up "less than" and "greater than" symbols... so if you've experienced GREAT difficulty getting jack for poop to start... I suggest looking through the code in your .mac and replaceing < with the appropriate LESS THAN sybmbol and > with the Greater Than... There's a less than or equal... not sure how that got parsed... but it should be obvious.... if it isn't look at the logic... think it through... admittedly it's not commented... but I think it's fairly clear. Anyhow... like I said, swamped... got a quasi-working version that'll grab the mobs current loc and circle THAT if no parameters are specified... but I've had it run me into the ocean a few times... so obviously needs a thorough pounding... expect something this weekend, probably not early as my Friday is a nice, enjoyable drinking day, to forget everything I've learned this week. After all I did the homework right?

{EDIT} Wow... I read through all the posts... and realized I've been ignoring people left and right... and rather than correcting it right now... I'll get back to you. =) probably this weekend. Gah... so tired. Sorry I'll do my best when I don't have more pressing matters. RL comes to mind. Stupid girls.
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

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

Post by L124RD » Thu Jan 23, 2003 1:35 am

Salutations,
the problem was that after the update of the forums all the less then symbols (<) were replaced with < and the greater then symbols (>) were replaced with >. I fixed it and now ALL posts view as normal as why yousee it that way even though people were complaining.

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

Post by TheColonel » Thu Jan 23, 2003 5:46 pm

Bouns, five points. Thanks.
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

BEHEMOTH
orc pawn
orc pawn
Posts: 13
Joined: Wed Sep 11, 2002 3:45 pm
Location: RightBehindYou

Post by BEHEMOTH » Fri Jan 24, 2003 2:13 pm

finally got it to work. this macro will:
-twist speed and damage song unless you are are at low hp, when you will:
-Twist speed and heal untill healthy, then go back to damage
-use your current loc and default radius unless you define these.
-camp and end macro if you die
-only target mobs that you can give you xp

Code: Select all

| solo.mac
| code by whatever BEHEMOTH could patch together from others.

#event MissedNote "You miss a note, bringing your song to a close!" 
#event MobDead "You gain experience" 
#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 CastTimer t7 
#define yloc v9
#define xloc v10
#define radius v11

|If you dont specify a loc and radius, it will set to default. you can change this at lochere

Sub Main      
 /stopsong  
 /if $p0=="" /call lochere 
 /if $p0==NULL /call lochere
 /varset yloc $p0
 /varset xloc $p1
 /varset radius $p2

|I wanted to be able to call this because it was giving me an error when i tried to use goto command

Sub speed 

|speed song here, in gem#1

:SingLoopSpeed 
 /if n $CastTimer<=0 /call Sing 1
 /call circ $yloc $xloc $radius
 /if n $char(hp,pct)>=80 /goto :SingLoopDamage
 /if n $char(hp,pct)<80 /goto :SingLoopHeal 
/goto :SingLoopSpeed
/return

|damage song here. I use AOE DOT, but you could switch in bellow or chant. gem#2

:SingLoopDamage 
 /if n $CastTimer<=0 /call Sing 2
 /goto :SingLoopSpeed
/goto :SingLoopDamage 

|Heal song here. Gem#3
 
:SingLoopHeal 
 /if n $CastTimer<=0 /call Sing 3
 /goto :SingLoopSpeed
/goto :SingLoopHeal 

|hopefully will sing songs correctly...

Sub Sing 
:StartSong 
 /call circ $yloc $xloc $radius
 /varset CastTimer 0 
 /stop 
 /delay 1 
 /cast $p0
 /varset CastTimer 35 
:WaitSing 
 /call circ $yloc $xloc $radius 
 /doevents  
 /if n $CastTimer>0 /goto :WaitSing 
 /varset CastTimer 0 
/return 

|this goes back to speed song. dont want to drop that.

Sub Event_MissedNote
 /varset CastTimer 0
 /Call speed
/return

|this goes back to speed song. dont want to drop that.

Sub Event_Stunned 
 /varset CastTimer 0
 /Call Speed
/return 

|targets a closer xp giving mob that you can land spells on. you might want to adjust this.

Sub Event_OutOfRange 
 /tar npc range $calc($char(level)-6) $calc($char(level)+5)  
/return 

|this goes back to speed song. dont want to drop that.

Sub Event_NoSpeed 
 /varset CastTimer 0
 /Call Speed
/return 

|targets a closer xp giving mob that you can land spells on. you might want to adjust this.

Sub Event_NoTarget 
 /tar npc range $calc($char(level)-6) $calc($char(level)+5) 
/return

|targets a closer xp giving mob that you can land spells on. you might want to adjust this.

Sub Event_EXP 
 /tar npc range $calc($char(level)-6) $calc($char(level)+5)
/return

Sub Event_stunoff 
 /stop 
 /Call Speed
/return

|sets loc to your current loc and the radius to 30. it may be to close some mobs. no drum

Sub lochere 
 /call Main $char(y) $char(x) 30
/return

|Circ sub stolen from TheColonel

sub circ 
 /if n $distance($p0,$p1)<($p2/2){ 
 /face heading $calc($heading($p0,$p1)+180) 
 } else { 
 /face heading $calc($heading($p0,$p1)+$calc(90*$calc($p2/$distance($p0,$p1)))) 
 }  
/return 

|Should stop macro and camp if killed

Sub Event_LOADING 
 /sit
 /camp desktop
 /end
/return
put speed in gem1, damage song in gem2, heal in gem3. You need to be careful if starting macro using current loc because it zig zags to get to radius, and if something is following you already, it might suck.

I'm going to put in a check to target disance and make the circle very slightly smaller so as to bring you closer so you can use AOE DOT without watching it 24/7. right now unless all mobs following you run the same speed, it's dangerous to use AOEDOTs. safe to equip bellow or something and set radius to 80... but i want it to auto adjust radius to get you with range of dennon's discord.

dont blame me for bugs, just tell me they are there so i can try and fix em.
---------

Signature?!??! Nobody ever reads these damn things anyway....

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Fri Jan 24, 2003 4:09 pm

There are a number of problems here:

no /return in main
no /doevent in the main loop only in sing, which means you wait until the timer expires before processing events.
Event_Stunned calls Speed which calls sing which calls doevents which calls Event_Stunned which can cause a stack overflow.

Suggested change:

Instead of call lochere which calls main, just set the variables if $p0==""

BEHEMOTH
orc pawn
orc pawn
Posts: 13
Joined: Wed Sep 11, 2002 3:45 pm
Location: RightBehindYou

Post by BEHEMOTH » Fri Jan 24, 2003 4:21 pm

thanks much. just starting to understand this... will put the improvements in....
---------

Signature?!??! Nobody ever reads these damn things anyway....