One more thing i need help with please

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

Socky

One more thing i need help with please

Post by Socky » Tue Oct 14, 2003 11:55 am

Can someone help me figure out how to make a macro cast a spell 8 times in a row, then drop to the inventory 8 times, and loop that 15 times?

I have no idea how to even start, i tried
/cast 1
/cast 1
/cast 1
/cast 1
/cast 1
/cast 1
/cast 1
/cast 1

But it only casted 1 time

Lajiskin
decaying skeleton
decaying skeleton
Posts: 6
Joined: Thu Oct 09, 2003 4:09 pm

answer:

Post by Lajiskin » Tue Oct 14, 2003 12:05 pm

the problem with your technique is that there are no delays.
You begin casting the 1st instance and then immediately try to cast 7 more times while the first is still casting.

What you need to do is 1 of 2 things.
1. Check the spell being casted and account for network lag and insert manual delays between each cast

2. Find a spellsub.inc type include, possibly using one from GJ's genbot module. These modules are designed to flawlessly cast a spell and you can just use an #include of the file and then /call spellsub "name of spell"
and it will cast it without problems.

renagade8
orc pawn
orc pawn
Posts: 28
Joined: Sat Oct 19, 2002 9:17 pm

Post by renagade8 » Tue Oct 14, 2003 3:32 pm

This should do what you wanted done

Code: Select all

|-- multicast.mac 
|-- Renagade8
|-- usage : /macro multicast <spell name>
|-- example : /macro multicast "Enchant Gold"

#turbo

sub main(spellname)
    /declare xx local
    /declare yy local

    /for xx 0 to 14
        /for yy 0 to 7
           /cast "@spellname"
           :waitcast
               /delay 1
            /if $char(casting)==TRUE /goto :waitcast
            /click left auto
            /delay 2
        /next yy
    /next xx

/return

- Ren

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Tue Oct 14, 2003 4:23 pm

Not knocking renegade8, but you can be done casting but not have the spell gem refreshed. I modified renegade8's example to check the spell gem instead of casting. I also inserted code to drop the 8 items at a time as you had asked:

Code: Select all

|-- multicast.mac 
|-- Renagade8 
|-- usage : /macro multicast <spell name> 
|-- example : /macro multicast "Enchant Gold" 

Sub Main
   /declare Loop1 local 
   /declare Loop2 local 

   /for Loop1 1 to 15
      /for Loop2 1 to 8
         /cast "@Param0"
         :waitcast
         /if n $char(gem,"@Param0")==-2 {
            /delay 0
            /goto :WaitCast
         }
      /next Loop2
      :DropItems
      /autoinv
      /if $cursor()!=FALSE {
         /delay 0
         /goto :DropIitems
      }
   /next Loop1
/return 

renagade8
orc pawn
orc pawn
Posts: 28
Joined: Sat Oct 19, 2002 9:17 pm

Post by renagade8 » Tue Oct 14, 2003 6:23 pm

heh np i just threw it together really quick without really thinking about it.

- Ren