could anyone please help with this bard twist/forage

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

User avatar
Fuergrissa
a grimling bloodguard
a grimling bloodguard
Posts: 607
Joined: Mon Dec 08, 2003 3:46 pm
Location: UK

could anyone please help with this bard twist/forage

Post by Fuergrissa » Fri Jan 09, 2004 8:20 am

ok i have twist.mac working as i cant get twist2 to work as it just autocombats as soon as i start it, i was wondering if i caould get it to forage for me while im twisting and then autoinv whatever i find, i put in a basic doability and autoinv in the main sub but of course it gets executed all the time and autoinvs whatever i hold, is it possible to make it forage on a timer i could work out the forage time and put that in manually aftwewards. here is the code i use at the moment.

------------------------------------------------------------------------------------
| - twist.mac -
| /mac twist <GEMs>
| Modified from Colonel's Macro
|Modiefied to current form 11/7/2003
| <GEMs> is an any length song list of the gem slots. 12345678 or 213457 or 78
| hint make sure selos is in the gem list if you are kiting

#event MissedNote "You miss a note, bringing your song to a close!"
#event Recovered "You haven't recovered yet..."
#turbo

Sub Main(Param0)
/if $defined(Param0)==false /endmacro
/declare CASTTIME global
/declare cursong global
/declare nncsongs global
/declare ncsongs global
/declare prevsong global
/declare ncSongList global
/declare cSongList global
/declare SingTime timer
/declare I global
/declare J global
/declare ncSongArray array
/declare cSongArray array

/varset CASTTIME 33
/varset cursong 1
/varset nncsongs $strlen(@Param0)
/varset ncsongs $strlen(@Param1)
/varset ncSongList @Param0
/varset cSongList @Param1

/for I 1 to @nncsongs
/varcalc J $int(@I-1)
/varset ncSongArray(@I) $mid(@J,1,@ncSongList)
/next I
/for I 1 to @ncsongs
/varcalc J $int(@I-1)
/varset cSongArray(@I) $mid(@J,1,@cSongList)
/next I
/varset CASTTIME 33
:Loop
/if "$char(state)"!="SIT" {
/if "$combat"=="TRUE" /if n @SingTime<=0 /call Sing @cSongArray(@cursong)
/if "$combat"!="TRUE" /if n @SingTime<=0 /call Sing @ncSongArray(@cursong)
}
/if $char(state)=="DUCK" /press d
/doevents

/doability Forage
/autoinv

/goto :Loop

/return

Sub Sing
/varset SingTime @CASTTIME
/stopsong
/cast @Param0
/varset prevsong @cursong
/varadd cursong 1
/if n @cursong>@nncsongs /varset cursong 1
/doevents
/return

Sub Event_MissedNote
/varset cursong @prevsong
/varset SingTime 0
/doevents
/return

Sub Event_Recovered
/varset SingTime 0
/varset cursong @prevsong
/doevents
/return
-------------------------------------------------------------------------------------

Many thanks to anyone who can help.

I R monk
orc pawn
orc pawn
Posts: 28
Joined: Tue Dec 10, 2002 4:29 pm

Post by I R monk » Mon Jan 19, 2004 9:33 pm

:Loop
/if "$char(state)"!="SIT" {
/if "$combat"=="TRUE" /if n @SingTime<=0 /call Sing @cSongArray(@cursong)
/if "$combat"!="TRUE" /if n @SingTime<=0 /call Sing @ncSongArray(@cursong)
}
/if $char(state)=="DUCK" /press d
/doevents

/call Forage

/goto :Loop


Sub Forage
/if n $char(ability,"Forage")>0 /doability Forage
/if $cursor()=="True" {
/click left auto
/delay 1
}
/return