| twist.mac
| /mac twist <song1> <song2> [song3] [song4..8]
#event MissedNote "Your spell fizzles!"
#event Recovered "You haven't recovered yet"
#event Exp "You gain "
#event Died "You have entered"
#event Nukerun "Begin your runs ladies"
#event Endmacro "Call it ladies"
#event Static "Cease"
#event Follow "Follow me ladies"
#event Beatfeet "Beat feet ladies"
#event Heala "Mother! heal yourself!"
#event Healb "Mother! heal me please!"
#event Healc "Mother! heal Kaikat!"
#event Heald "Mother! heal Skif!"
#event Mana "camp"
#event Camp "Camp"
#event Loot "Loot Mother"
#event Mark "Mark em up Mother"
#define CASTTIME 200
Sub Main
/zapvars
/declare cursong global
/declare numsongs global
/declare prevsong global
/declare stx global
/declare sty global
/declare exper global
/declare aaexp global
/declare timerCast timer
/declare songset array
/declare i local
/declare txt local
/declare zlttimer timer
/declare hovtimer timer
/declare masktimer timer
/declare blstimer timer
/if @Param1==NULL {
/echo USAGE: cast <song1> <song2> [song3] [song4..8]
/end
}
/if n @Param0>0 /varset songset(1) @Param0
/if n @Param1>0 {
/varset songset(2) @Param1
/varset numsongs 2
}
/if n @Param2>0 {
/varset songset(3) @Param2
/varset numsongs 3
}
/if n @Param3>0 {
/varset songset(4) @Param3
/varset numsongs 4
}
/if n @Param4>0 {
/varset songset(5) @Param4
/varset numsongs 5
}
/if n @Param5>0 {
/varset songset(6) @Param5
/varset numsongs 6
}
/if n @Param6>0 {
/varset songset(7) @Param6
/varset numsongs 7
}
/if n @Param7>0 {
/varset songset(8) @Param7
/varset numsongs 8
}
/varset txt ""
/for i 1 to @numsongs
/varcat txt @songset(@i)
/varcat txt " "
/next i
/echo Casting @numsongs spells: @txt
/varset cursong 1
/varset exper $char(exp)%
/varset aaexp $char(aa,exp)%
/varset zlttimer 0
/varset hovtimer 0
/varset masktimer 0
/varset blstimer 0
/varset stx $char(x)
/varset sty $char(y)
/call sit
/return
Sub Sit
/lootn never
/if n @zlttimer<=0 {
/loadspell Trio
/delay 120
/cast "armor of the zealot"
/delay 80
/loadspell Pet
/delay 80
/varset zlttimer 218m
}
/if n @masktimer<=0 {
/cast item "crown of deceit"
/delay 100
/varset masktimer 30m
}
/if n @hovtimer<=0 {
/loadspell Trio
/g preparing to cast hand of virtue
/delay 120
/cast "Hand of virtue"
/delay 300
/loadspell Pet
/delay 100
/varset hovtimer 225m
}
/if n @blstimer<=0 {
/tar Kaikat
/delay 3
/cast 6
/delay 60
/press Insert
/delay 3
/cast 6
/delay 60
/varset blstimer 30m
}
/g Standing by
:Loop
/if n $spawn($group(0),hp,pct)<=29 /if n $spawn($group(0),hp,pct)>0 {
/delay 3
/press Insert
/call Healf
}
/if n $spawn($group(1),hp,pct)<=29 /if n $spawn($group(1),hp,pct)>0 {
/delay 3
/press Home
/call Healf
}
/if n $spawn($group(2),hp,pct)<=29 /if n $spawn($group(2),hp,pct)>0 {
/delay 3
/press Page_Up
/call Healf
}
/if n $spawn($group(3),hp,pct)<=29 /if n $spawn($group(3),hp,pct)>0 {
/delay 3
/press Delete
/call Healf
}
/if n $spawn($group(4),hp,pct)<=29 /if n $spawn($group(4),hp,pct)>0 {
/delay 3
/press End
/call Healf
}
/if n $spawn($group(5),hp,pct)<=29 /if n $spawn($group(5),hp,pct)>0 {
/delay 3
/press Page_Down
/call Healf
}
/if n $spawn($group(0),hp,pct)<=50 /if n $spawn($group(0),hp,pct)>30 {
/delay 3
/press Insert
/call Heal
}
/if n $spawn($group(1),hp,pct)<=50 /if n $spawn($group(1),hp,pct)>30 {
/delay 3
/press Home
/call Heal
}
/if n $spawn($group(2),hp,pct)<=50 /if n $spawn($group(2),hp,pct)>30 {
/delay 3
/press Page_Up
/call Heal
}
/if n $spawn($group(3),hp,pct)<=50 /if n $spawn($group(3),hp,pct)>30 {
/delay 3
/press Delete
/call Heal
}
/if n $spawn($group(4),hp,pct)<=50 /if n $spawn($group(4),hp,pct)>30 {
/delay 3
/press End
/call Heal
}
/if n $spawn($group(5),hp,pct)<=50 /if n $spawn($group(5),hp,pct)>30 {
/delay 3
/press Page_Down
/call Heal
}
/doevents
/goto :Loop
/return
Sub Healf
/delay 3
/cast 4
/delay 100
/return
Sub Heal
/delay 3
/cast 3
/delay 100
/return
Sub Event_MissedNote
/varset cursong @prevsong
/varset timerCast 0
/doevents
/return
Sub Event_Loot
/tar corpse
/delay 6
/press f6
/delay 0
/press Num_6
/delay 0
/press f1
/delay 0
/tar corpse
/delay 3
/press down
:Loop
/if n $target(distance)>15 /sendkey down up
/if n $target(distance)<=25 /dismount
/if n $target(distance)<=10 /sendkey up up
/face fast
/if n $target(distance)<=10 /goto :Loopb
/delay 0
/if "$target()"=="TRUE" /goto :Loop
/if "$target()"=="FALSE" /goto :Loopc
/press down
/return
:Loopb
/press up
/g Usstan alu ULU inbau BELBOL da` %t
/duck
/delay 5
/loot
/delay 20
/if $corpse(empty)=="TRUE" {
/g Naut BELBOL
/click left 1140 745
/delay 5
/press down
/delay 20
/cast item "black chain bridle"
/delay 75
/press down
/goto :Loopc
}
/click left 1100 150
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1140 150
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1100 190
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1140 190
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1100 230
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1140 230
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1100 270
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1140 270
/delay 3
/if "$cursor()"!="TRUE" {
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
}
/autoinventory
/delay 3
/click left 1140 745
/delay 20
/cast item "black chain bridle"
/delay 70
/press down
/goto :Loopc
/return
:Loopc
/press up
/if n $distance(@sty,@stx)>=15 /sendkey down up
/if n $distance(@sty,@stx)<=25 /dismount
/if n $distance(@sty,@stx)<=10 /sendkey up up
/face fast loc @sty,@stx
/if n $distance(@sty,@stx)>=10 /goto :Loopc
/press down
/goto :Loopd
/return
:Loopd
/assist Shynkailia
/press up
/if n $target(hp,pct)<=95 /if n $target(hp,pct)>=21 {
/delay 10
/cast item "black chain bridle"
/delay 75
/press up
/tar Shynkailia
/face fast
/delay 6
/press f6
/delay 0
/press Num_6
/delay 0
/press f1
/delay 0
/call Event_Nukerun
} else {
/delay 10
/cast item "black chain bridle"
/g Alu Midnight !
/delay 75
/press up
/tar Shynkailia
/face fast
/delay 6
/press f6
/delay 0
/press Num_6
/delay 0
/press f1
/delay 0
/call Sit
}
/doevents
/return
Sub Event_Recovered
/varset cursong @prevsong
/varset timerCast 0
/return
Sub Event_Died
/delay 10
/sit
/delay 10
/g Holding tight
/return
Sub Event_Exp
/varset aaexp $calc($char(aa,exp)-@aaexp)
/varset exper $calc($char(exp)-@exper)
/echo Running time $calc($running/60) minutes
/echo @exper% regular exp @aaexp% AA exp
/varset exper $char(exp)
/varset aaexp $char(aa,exp)
/varset cursong 1
| /varset bellowtimer 200
/doevents
/return
Sub Event_Nukerun
/assist Shynkailia
/delay 3
/g Kenafin Ultrin! Usstan zhal ELGG %t
/delay 3
/assist shynkailia
/delay 3
/cast 8
/delay 60
:Nuke
/if n $spawn($group(0),hp,pct)<=29 /if n $spawn($group(0),hp,pct)>0 {
/delay 3
/press Insert
/call Healf
}
/if n $spawn($group(1),hp,pct)<=29 /if n $spawn($group(1),hp,pct)>0 {
/delay 3
/press Home
/call Healf
}
/if n $spawn($group(2),hp,pct)<=29 /if n $spawn($group(2),hp,pct)>0 {
/delay 3
/press Page_Up
/call Healf
}
/if n $spawn($group(3),hp,pct)<=29 /if n $spawn($group(3),hp,pct)>0 {
/delay 3
/press Delete
/call Healf
}
/if n $spawn($group(4),hp,pct)<=29 /if n $spawn($group(4),hp,pct)>0 {
/delay 3
/press End
/call Healf
}
/if n $spawn($group(5),hp,pct)<=29 /if n $spawn($group(5),hp,pct)>0 {
/delay 3
/press Page_Down
/call Healf
}
/if n $spawn($group(0),hp,pct)<=50 /if n $spawn($group(0),hp,pct)>30 {
/delay 3
/press Insert
/call Heal
}
/if n $spawn($group(1),hp,pct)<=50 /if n $spawn($group(1),hp,pct)>30 {
/delay 3
/press Home
/call Heal
}
/if n $spawn($group(2),hp,pct)<=50 /if n $spawn($group(2),hp,pct)>30 {
/delay 3
/press Page_Up
/call Heal
}
/if n $spawn($group(3),hp,pct)<=50 /if n $spawn($group(3),hp,pct)>30 {
/delay 3
/press Delete
/call Heal
}
/if n $spawn($group(4),hp,pct)<=50 /if n $spawn($group(4),hp,pct)>30 {
/delay 3
/press End
/call Heal
}
/if n $spawn($group(5),hp,pct)<=50 /if n $spawn($group(5),hp,pct)>30 {
/delay 3
/press Page_Down
/call Heal
}
/if n @timerCast<=0 {
/varset timerCast CASTTIME
/assist shynkailia
/delay 3
/cast @songset(@cursong)
/varset prevsong @cursong
/varadd cursong 1
}
/if n @cursong>@numsongs /varset cursong 1
/doevents
/goto :Nuke
/return
Sub Event_Endmacro
/g Done
/end
/return
Sub Event_Static
/delay 10
/call Sit
/return
Sub Event_Follow
/tar Shynkailia
/delay 3
/g Following %t
/press down
:Loop
/if n $target(distance)>20 /sendkey down up
/if n $target(distance)<5 /sendkey up up
/face fast
/delay 0
/doevents
/if "$target()"=="TRUE" /goto :Loop
/g No longer following %t
/press down
/call Sit
/return
Sub Event_Beatfeet
/g Run away! Run away!
/press 7
/return
Sub Event_Heala
/press insert
/delay 10
/g Of course My Child
/cast "Supernal Elixir"
/delay 50
/return
Sub Event_Healb
/tar shynkailia
/delay 10
/g Healing you My Child
/cast "Supernal Elixir"
/delay 50
/return
Sub Event_Healc
/tar Kaikat
/delay 10
/g Healing you My Child
/cast "Supernal Elixir"
/delay 50
/return
Sub Event_Heald
/tar Skif
/delay 10
/g Healing you My Love
/cast "Supernal Elixir"
/delay 50
/return
Sub Event_Virtue
/tar shynkailia
/delay 10
/g Casting Hand of Virtue
/cast "Hand of Virtue"
/delay 250
/return
Sub Event_Mark
/assist shynkailia
/delay 10
/g Marking %t to hell and back
/delay 10
/cast "mark of the righteous"
/delay 55
/cast "mark of kings"
/delay 55
/return
Sub Event_Mana
/press Num_0
/return
Sub Event_Camp
/press Num_0
/return



