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