Twist1.mac - A chant kiting macro.

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

Moderator: MacroQuest Developers

a_large_rat01
orc pawn
orc pawn
Posts: 10
Joined: Thu Jan 02, 2003 3:43 am

Post by a_large_rat01 » Tue Jan 07, 2003 6:49 am

O I forgot one thing . . . the Grey has traps. Sometime the traps spawn wurms that cant be snared or rooted :( I guess stonefriends will maybe be a problem at 42 (there 50 and hit hard and have huge argo range).

I hope ya did get killed yet in the grey :?

a_large_rat01 :wink:

Mortedamour
orc pawn
orc pawn
Posts: 28
Joined: Tue Jan 07, 2003 2:30 pm

Post by Mortedamour » Tue Jan 07, 2003 2:34 pm

Im slightly confused as to how to call this script. I am just learning this and enjoying the hell out of MQ.

How exactly should one be calling this script?

I had already figured out the problem with the comparative funtions( < > >=). and I call the macro with 3 spell slots

i.e. /macro twist1 1 2 3 500 500 500
so this would be gem slots 1 2 and 3, at cord 500,500 and a radius of 500.
is this correct? Everytime I call the macro. twisting starts. and I face one direction and just sit there twisting.

Nagathon1
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Jan 07, 2003 3:11 pm

...

Post by Nagathon1 » Tue Jan 07, 2003 3:20 pm

can someone post a working version of the second version of the kite macro, i tried to change it , but what i thought i had to change didnt work..

also i have a few good suggestions to help the macro Work better

Change the delay from 3 seconds to like 3.5 per song, so if any lag occurs each song will still land, cause my songs stop like right before they land, and this way you will still be able to twist 3 songs each time, just more efficantly.

Also add someone in that is liek in the hunters script, to where u can type in the name of the creatures you wanna target .

like if you wanna kite ulthorks, it would just target ulthorks and nothing else, unless it hits you, if the mob hits you it gets added to the list to kite (not sure if the 2nd one is possible)

that way you dont spend time kiting reds or guards or something you cant kill..

The first script would be excellent if my songs didnt end like a splt second before they land, it looks very promising, and i think these 2 changes will make this one of the easiest way to lvl your bard. If i was good at coding i would help, i gotta try to learn, im just not that bright heh (when it comes to this).

xviisualx
orc pawn
orc pawn
Posts: 22
Joined: Mon Nov 18, 2002 3:08 pm
Contact:

Post by xviisualx » Tue Jan 07, 2003 7:08 pm

give me an hour or so ill post a very nice working one.
Hoodallali!

xviisualx
orc pawn
orc pawn
Posts: 22
Joined: Mon Nov 18, 2002 3:08 pm
Contact:

Post by xviisualx » Tue Jan 07, 2003 9:35 pm

Ok, here's my version of Colonel's Macro. I based my engine off his, but strengthened it as mutch I could. Ive ran this macro for 24 hours strait and not had 1 problem the only problem one can run into really is stun, casters. But if your smart and go to the right spots this should not be a problem. Here are a few things that difer between engines.

New calling style MAKE SURE you understand it. /macro <macroname> xloc yloc radius gem1 gem2 gem3 gem4 There are 4 gems because it's possible to run it that fast, however it becomes risky when lag becoms an issue. I suggest leaving the 4th gem blank unless your using selos accelerating chourus and you can have 2.5 min speed and not worry about a recast only to refresh just in time.

New timer for casting, it is exact and precise to the cast time, however it is impossible to tell if you are still casting so if it bugs up, tell me ill make a fix for it.

Small updates in coding, nothing large but it still is noticable in performance

Id like to salute colonel for makin this macro it is very good and has alot of power for the bard. So, here is my code post questions/problems/bugs you may see.

Code: Select all

| - Twist1.mac - 
| - Created by:
| - TheColonel -
| * Edited by:
| * Viisual
| + Touched up:
| + don't_know_at_all
|
| Description: This macro will run a bard in a circle, starting at an
|              x,y loc you input and a radius you input and cast songs
|              from the gem#(s) that you input
| Call       : /macro <macroname> <xloc> <yloc> <radius> <song1> <song2> 
|              <song3> <song4>
|______________________________________________________________________
#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 Exp   "You gain " 
#event Outof   "out of range" 
#event SpawnCheck "check"

#define cursong v1   
#define exper V2 
#define nsongs v3
#define targcount v4 
#define songname v5
#define CastTimer t0
#define xpleft v14

Sub Main 
  /varset nsongs 0 

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

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

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

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

  /varset cursong 1 
  /varset exper $char(exp) 

:Loop 
  /varset songname $char(gem,$cursong)
  /call Sing $int($a(0,$cursong))
  /call circ $p0 $p1 $p2
  /doevents 
  /varset CastTimer $int($spell("$songname",casttime)*10+$spell("$songname",recoverytime)*10)
  :casting
  /call circ $p0 $p1 $p2 
  /if n $CastTimer>0 /goto :casting
  /doevents 
  /cal circ $p0 $p1 $p2
/goto :Loop 
/return 

Sub Sing 
  /stopsong 
  /cast $p0 
  /varadd cursong 1 
  /if n $cursong>$nsongs /varset cursong 1 
  /doevents 
/return 

sub circ 
  /face heading $calc($heading($p0,$p1)+90+$calc($p2-$distance($p0,$p1))/2) 
  /varset v6 $calc($p2-$distance($p0,$p1)) 
  /if n $v6>10 { 
  /face heading $calc($heading($p0,$p1)+180)
  } else /if n $v6<-10 {  
  /if n $v6<-180 /varset v6 -180 
  /face heading $calc($heading($p0,$p1)+90+$v6/2)
  } else { 
  /face heading $calc($heading($p0,$p1)+90)
} 

/return 

Sub Event_MissedNote 
  /varcalc cursong $cursong - 1 
  /if n $cursong<1 /varset cursong 1 
  /varset t0 0 
/return 

Sub Event_Slow 
  /if n $cursong!=1 { 
    /varset cursong 1 
    /varset t0 0 
    /doevent 
  } 
/return 

Sub Event_Outof 
  /varset t0 0 
  /varadd targcount 1 
  /if n targcount<=4 /if $target(hp)<"100" { 
    /varset targcount 0 
    /tar npc
  } 
  /doevents 
/return 

Sub Event_Recovered 
  /delay .4
  /doevents 
/return 

Sub Event_NeedTarget 
  /varadd cursong 1 
  /if n $cursong>nsongs /varset cursong 1 
  /tar npc
/return 

Sub Event_Exp
/varset xpleft $calc(100-$char(exp))
  /varcalc exper $char(exp)-$exper 
  /echo Kill:$exper%  Left:$xpleft
  /varset exper $char(exp) 
  /tar npc
/return 

Sub Event_SpawnCheck
|  /ooc Big Island raptors
/return

This is updated with don't know at all's code - seems to work fairly well and the circle is more stable. hoorah!
Last edited by xviisualx on Wed Jan 08, 2003 4:56 am, edited 1 time in total.

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

Post by TheColonel » Tue Jan 07, 2003 10:24 pm

WELLL.... hehe I've read a few people trying to use 500 as your radius... I regret to inform you that the "radius" isn't really a radius... I'm a slacker, I found that if you go above 360 it tends to freak the machine out and do a smaller cirlce... which might lead to death, I'd suggest keeping the circle radius within 50-200 I've been successful with that. And you do need to hit auto-run yourself... again I'm a slacker... as far as goofed >'s I can't seem to see any... mine works GREAT, first or second revision with 150 ar my radius, keeps all the mobs within the 200 range required for Tuyen's Chants. If you're lower level and trying to quad kite, I'd suggest something smaller. I've never tried anything below 50... if you're curious, merely comment out the bit that calls Sing and run in circles... uncomment the /echo $distance($p0,$p1) in the circ sub dealy... that'll echo the distance to the location you specified. If you are having issues IM me... AIM is turned on most of the time.
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

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 » Wed Jan 08, 2003 1:32 am

That's because this line could be better:

Code: Select all

/face heading $calc($heading($p0,$p1)+90+$calc($p2-$distance($p0,$p1))/2)
If $distance($p2-$distance($p0,$p1)) is positive, you are inside the circle radius. Add a number between 91 and 269 to your heading will get to you edge. Anything larger or smaller can you are just plain wandering.

Outside the circle is the same only subtract the number.

This is better (tested):

Code: Select all

/varset v6 $calc($p2-$distance($p0,$p1))
/if n $v6>10 {
|/echo heading outward $v6
        /face heading $calc($heading($p0,$p1)+180)          | head outward
} else /if n $v6<-10 {
|/echo heading inward
        /if n $v6<-180 /varset v6 -180
        /face heading $calc($heading($p0,$p1)+90+$v6/2)   | head inward
} else {
|/echo tangent
        /face heading $calc($heading($p0,$p1)+90)   | head tangentially
}
Another problem is that Sing is called from an event handler. This significantly delays the return to the main loop for a call to circ. This causes wide loops.

Here is my miss note handler:

Code: Select all

Sub Event_MissedNote
  /varcalc cursong $cursong - 1
  /if n $cursong<1 /varset cursong 1
  /varset t0 0
/return

xviisualx
orc pawn
orc pawn
Posts: 22
Joined: Mon Nov 18, 2002 3:08 pm
Contact:

Post by xviisualx » Wed Jan 08, 2003 4:42 am

Pretty slick don't know man. I was just seeing if I could set up singing a differant way then colonel. I don't get any lag from it *shrug* Thanks for the other input though.

I just like thinkin its the radius ;( i know its the distance but I don't get to say radius muthc ;( and i forgot to say all that stuff about hittin numlock thanks colonel =)
Hoodallali!

xviisualx
orc pawn
orc pawn
Posts: 22
Joined: Mon Nov 18, 2002 3:08 pm
Contact:

Post by xviisualx » Sun Jan 12, 2003 4:40 pm

After mutch trial with all posibilities ive come to conclusion I like using this macro the best.

Code: Select all


| - Twist1.mac - 
| - TheColonel -

#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 Exp   "You gain " 
#event Outof   "out of range" 
#event SpawnCheck "check"

#define cursong v1 
#define nsongs v3 
#define switch v4 
#define exper V2 
#define targcount v5
#define aaleft v6
#define aaxper v7 
#define xpleft v14

Sub Main 
   /varset nsongs 0
  /if "$p3"~~"Selo`s Accelerating Chorus" /varset t1 1400
  /if $p3!="" /if $p3!=NULL {
            /varadd nsongs 1
            /varset a(0,1) $p3
            /echo Song 1: $char(gem,$p3) 
      }  

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

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

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

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

  /varset cursong 1 
  /varset exper $char(exp) 
  /call Sing $int($a(0,$cursong))
  /varset t0 33
:Loop
  /if n $cursong==1 /if n $t1>0 /varadd cursong 1
  /if n $t1<=0 {
	/varset t1 1400
	/stopsong
	/varset cursong 1
	/varset t0 0
	}
  /if n $t0<=0 /call Sing $int($a(0,$cursong))
  /call circ $p0 $p1 $p2 
  /doevents 
/goto :Loop 
/return 

Sub Sing 
  /varset t0 33
  /stopsong 
  /cast $p0
  /varadd cursong 1 
  /if n $cursong>$nsongs /varset cursong 1 
  /doevents 
/return 

sub circ 
  /face heading $calc($heading($p0,$p1)+90+$calc($p2-$distance($p0,$p1))/2) 
/return 

Sub Event_MissedNote 
  /varcalc cursong $cursong - 1 
  /if n $cursong<1 /varset cursong 1 
  /call Sing $cursong 
  /doevents 
/return 

Sub Event_Slow 
  /if n $cursong!=1 { 
    /varset cursong 1 
    /varset t0 0 
    /doevent 
  } 
/return 

Sub Event_Outof 
  /varset t0 0 
  /varadd targcount 1
  /if n targcount<=15 /if $target(hp)<"100" { 
    /varset targcount 0 
    /tar npc raptor
  } 
  /doevents 
/return 

Sub Event_Recovered 
  /delay .4
  /doevents 
/return 

Sub Event_NeedTarget 
  /varadd cursong 1 
  /if n $cursong>nsongs /varset cursong 1 
  /tar npc raptor
/return 

Sub Event_Exp
  /varset xpleft $calc(100-$char(exp))
  /varset aaleft $calc(100-$char(aa,exp))
  /varcalc exper $char(exp)-$exper
  /varcalc aaxper $char(aa,exp)-$aaxper 
  /echo XP:$exper% AA:$aaxper% Xp Left:$xpleft% AA Left:$aaleft%
  /varset exper $char(exp)
  /varset aaxper $char(aa,exp)
  /tar npc raptor
/return 

Sub Event_SpawnCheck
|  /ooc Big Island raptors
/return


As for the circle upgrade I thought it was a bit to jagged but I know colonel has a good mod'd version thats mutch smoother maybe he will post it.

to use /macro <name> x y dist song song song

ALSO KEEP IN MIND
I wrote this to work with the 2.5 min song however it should work otherwise and supports like 4 or 5 songs at once. Id test this on low level mobs to get the feel for how it will run before actualy agroing and startin the macro, use at own risk.
Hoodallali!

Nagathon1
decaying skeleton
decaying skeleton
Posts: 2
Joined: Tue Jan 07, 2003 3:11 pm

Post by Nagathon1 » Sun Jan 12, 2003 6:33 pm

how does targeting work? does it target the closest mob automatically or what?

i suggest you make it like the unter bot, to where uc an type in a bunch of names of mobs, and it trgets the closest one of those type, then runs around it in a circle and kites it, and repeats.

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

Post by TheColonel » Mon Jan 13, 2003 3:59 am

ATM it targets the closest mob... I've been fooling with a list of allowable targets... I've got it working if I pound in the mobs by hand... and I think I could manage a parameter version... BUT the real reason behind this here post is to update you on my circ function... I was in class... doing what I do best... ignoring crazy french guy babbling about linear algebra, so I was thinking... and this is what landed in my notebook... and the problem assignment, but I won't bore you with that. Anyhow, without further adieu...

Code: Select all

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))))
  }
|  /echo $distance($p0,$p1)
/return

THIS circ will run you all the way across the zone to the circle, rather that making up new circles all over the map. And if you're a programmer you'll notice why. Instead of adding degrees, whcih gets messy past 360, it's a ratio of distances multiplies by 90... anyhow... it seems to work much more better. No more spirals across the map. =) I'll work on the targeting code and get something posted this week. I'll repost an entire working script, my version, with a parameter re-arrange... so you don't have to piece one together from a few random posts... anyhow... it's 2:00 am... I've got 2 hours 'till I ding 47. So says ShowEQ. That's another thing that I put on the back-burner... time to ding, shouldn't be that hard, but the math in MQ scripts is a smidge goofy. I'm seriously pondering switching over to perl all together. Anyputz. Night, enjoy, comment.
Hell hath no fury like a woman's scorn for EQ.
-==(UDIC)==-

xviisualx
orc pawn
orc pawn
Posts: 22
Joined: Mon Nov 18, 2002 3:08 pm
Contact:

Post by xviisualx » Mon Jan 13, 2003 6:40 am

I really wouldn't suggest using my code just yet.

It works with the level 49 sow AND for some reason it likes to have spell slots 1 2 3 4 5 not like 2 3 4 5 6. A few bugs, but if you must you must.
Hoodallali!

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 » Mon Jan 13, 2003 6:00 pm

You still have this bad bit:

Code: Select all

Sub Event_MissedNote
  /varcalc cursong $cursong - 1
  /if n $cursong&1 /varset cursong 1
  /call Sing $cursong
  /doevents
/return 
You should be singing the song in the array and not the $cursong variable:

Code: Select all

/call Sing $int($a(0,$cursong))
Calling Sing from in the event is a bad idea anyway on a slow machine. Just set the timer to 0 and reset $cursong and let the main loop take care of re-singing the song.

Murat
decaying skeleton
decaying skeleton
Posts: 1
Joined: Sat Jan 04, 2003 5:10 pm

Post by Murat » Mon Jan 13, 2003 10:32 pm

Hi . I am using xviisualx's version of the macro with this command

/macro <name> x y dist 1 2 3

it lists the songs correctly but only playes the first number then stops
twisting. if I go /macro <name> x y dist song 3 2 1 then playes the
third song only once will not recast eather way.

is there any other trick to the command line.

Thanks in advance

Murat

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

whats wrong with my macro?

Post by BEHEMOTH » Fri Jan 17, 2003 2:02 am

well i borrowed a bit all around to make this macro. IT DOESN'T WORK. What i wanted it to do is twist selo's and AOE DOT song while running around in a circle... unless i got damaged by something (i have to be close to mobs to hit em with DOT, and thats dangerous)... so if hp are low, i try and have it switch out the DOT for a heal untill i am better...

problem is it crashes when i start it up.... anyone willingto help out? i also have a wishlist after my edited version...

Code: Select all



#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 Exp   "You gain experience!!" 

#define exper V2 

Sub Main 
  /if $p0=="" /return 
  /if $p0==NULL /return 
  /varset exper $char(exp)  
:Loop 
  /if n $CastTimer<=0 /call Sing 
  /call circ $p0 $p1 $p2 
  /doevents 
  /goto :Loop 
/return 


Sub Sing 
/if n $char(buff,"Selo`s Accelerando")==0 { 
            /if n $char(gem,"Selo`s Accelerando")==-2 { 
                /if $CastTimer==0 { 
                    /stopsong 
                } 
            } else /if $CastTimer==0 { 
                /sit off 
                   /varset CastTimer 35 
                   /cast $char(gem,"Selo`s Accelerando") 
            } 
  /if n $char(hp,pct)&70 /call healme
  /if n $char(hp,pct)&90 /call damage
/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)))) 
  } 
  /echo $distance($p0,$p1) 
/return 

Sub Event_MissedNote 
  /call Sing 
/return

Sub Event_Slow 
  /call Sing
/return 

Sub Event_Recovered 
  /call Sing
/return 

Sub Event_NeedTarget 
  /tar npc
/return 

Sub Event_Exp 
  /varcalc exper $char(exp)-$exper 
  /echo $exper% 
  /varset exper $char(exp) 
  /tar npc 
/return 

Sub healme
  /if n $char(buff,"Hymn of Restoration")==0 { 
            /if n $char(gem,"Hymn of Restoration")==-2 { 
                /if $CastTimer==0 { 
                    /stopsong 
                } 
            } else /if $CastTimer==0 { 
                /sit off 
                /varset CastTimer 35 
                /cast $char(gem,"Hymn of Restoration") 
            } 
  /call Sing
/return 

Sub damage
  /if n $char(buff,"Chords of Dissonance")==0 { 
            /if n $char(gem,"Denon's Disruptive Discord")==-2 { 
                /if $CastTimer==0 { 
                    /stopsong 
                } 
            } else /if $CastTimer==0 { 
                    /sit off 
                    /varset CastTimer 40 
                    /cast $char(gem,"Denon's Disruptive Discord") 
            } 
        } 
  /call Sing 
/return  

hope the code thing worked.... but anyway... my modified script crashed eq eveytime. im a noob and this was my first attempt to modify/use this.

WISHLIST:

-I dont want to have to imput the songs i want it to twist eveytime (tried to get it to do this)
-if i dont imput a loc/radius it would be nice if it circled a default radius from the area i started the macro from
-it would be nice to have it auto-adjust the radius to be smaller in little increments untill the distance of the closest mob was a certain range
-alternatly, increase it to some already defined number if you get attacked so you can run ahead and heal from a stun/bash incident
-maybe find a way to automatically collect new mobs after you kill the ones you have
-run to zone line or something if you get casted on

awhile ago i asked for a macro like this in the request part but there wasnt a reply, so i am most glad someone did something like this!

bravo!

thanks to those that made working scripts here and sorry for ripping this one apart to get it to do something else

WHAT IS THE PROBLEM WITH MY CURRENT SCRIPT?[/quote]
---------

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