Page 3 of 5

Posted: Mon May 23, 2005 9:23 am
by fearless
There are already several plugins that can accomplish this, no need to create another.

Posted: Mon May 23, 2005 9:06 pm
by OnyxSys
this is awesome..

with the VT orb for my shaman, i can now just call apon it.. and what i did was made alias for it:

Code: Select all

/alias /shrink /mac swap orb
bingo then i can just type:

Code: Select all

/shrink


this is very nice.. great job!

Posted: Sat Jul 02, 2005 10:58 am
by monster69
change this line:

Code: Select all

      /if (${String[${equipslot}].Find[null]}) { 
to this:

Code: Select all

      /if (!${equipslot}) { 
To handle the change to the Strings TLO

Monster

Posted: Sat Jul 02, 2005 4:00 pm
by DEDruid
Monster69's change to the code works for items that are equippable, but MQ2 runs into an error if you try to use this on an item that must be clicked from inventory, such as an AoN for classes that cannot equip it.

Posted: Sat Jul 02, 2005 6:18 pm
by monster69
Well, I don't have an AoN but my fisherman's companion and collapsable spit & toolbox all work just fine and they are inventory slot only.

I will see if I can dig up something that is equipable, that I can't equip that has a click effect to test with.

Posted: Sat Jul 02, 2005 7:13 pm
by DEDruid
Hmm, could you show me what the command lines in your hot key look like?

Mine says: /mac swapcast "amulet of necropotence" pack1

Also tried my fisherman's companion, and got the same error message.

The error message I am receiving is: "Failed to parse /if condition '(!pack1)', non-numeric encountered.

Posted: Sat Jul 02, 2005 8:37 pm
by DEDruid
Monster 69 wru?!!? I need to know how you are making this work, it's driving me nuts!

Posted: Sat Jul 02, 2005 8:37 pm
by monster69
/macro swapcast fisherman's

/macro swapcast spit

/macro swapcast toolkit

I don't bother telling it which slot because it auto uses #1

Monster

Posted: Sun Jul 03, 2005 12:45 am
by bardomatic
1st post updated

Posted: Sat Sep 23, 2006 7:30 pm
by Infinite monkeys
for us ancient folks that still use this one can someone point me in the right direction on fixing it?

for some reason it will take the item out put it in a slot then immediately put it back into a pack while trying to cast it.

any help =)

IM.

Posted: Sat Sep 23, 2006 7:47 pm
by JimJohnson
put a /delay 5s ${Me.Casting} after it swaps the item in.

Posted: Sat Sep 23, 2006 8:31 pm
by Infinite monkeys
Thanks JJ. I was playing around with that to.

I did put in a delay as it starts to cast the item. more of a /delay 1s ${Me.Casting}

now that helps as it will cast the item. but then just leaves it in my slot with an item on the cursor.

I know this isnt really your macro or hell its over a year since anyones even posted on it.. but ive gotten so used to this thing. Its like a life saver =)

Posted: Sat Sep 23, 2006 8:50 pm
by JimJohnson
Post the version you have and sure we can look at it and get it fixed. The problem is you now have to wait for server to actually click an item.

Posted: Sat Sep 23, 2006 9:03 pm
by Infinite monkeys

Code: Select all

Sub Main(p0,p1) 
   /call SwapCast "${p0}" "${p1}" 
/endmacro 

Sub SwapCast(item,equipslot) 
   /declare inventoryslot int local 
   /declare pack local 
   /declare packslot int local 
   /declare leaveopen int local 1 
   /declare packnumber int local 0 
   /declare leavetwisting int local 0 

   /if (!${Defined[item]}) /goto :end 
   /if (${Twist}) { 
      /twist stop 
      /varset leavetwisting 1 
   } 
   :stopsingingdelay 
   /if (${Me.Casting.ID}>0) { 
      /stopsong 
      /goto :stopsingingdelay 
      } 
   /varset inventoryslot ${FindItem[${item}].InvSlot} 
   /if (!${inventoryslot}) /goto :notfound 
   :packcountloop 
   /if (${inventoryslot}>250 && ${inventoryslot}<331) { 
      /varset packnumber ${Math.Calc[${packnumber}+1]} 
      /varset inventoryslot ${Math.Calc[${inventoryslot}-10]} 
      /goto :packcountloop 
      } 
   /if (${packnumber} > 0) { 
      /varset pack pack${packnumber} 
      /varset packslot ${Math.Calc[${inventoryslot}-240]} 
      /goto :foundit 
      } 
   :notinpack 
      /call CastItem ${inventoryslot} 
      /goto :end 
   :foundit 
      /if (!${Window[${pack}].Open}) { 
         /nomod /itemnotify ${pack} rightmouseup 
         /varset leaveopen 0 
         } 
      /call WaitCursor ${packslot} ${pack} 
      /if (${equipslot.Find[null]}) { 
         /if (${Cursor.WornSlots}>0) { 
            /varset equipslot ${Cursor.WornSlot[1]} 
         } else { 
               /varset equipslot pack1 
         } 
      } 
      /call WaitCursor ${equipslot} 
      /call CastItem ${equipslot} 
      /call WaitCursor ${equipslot} 
      /call WaitCursor ${packslot} ${pack} 
      /if (${leaveopen} == 0) /nomod /itemnotify ${pack} rightmouseup 
      /goto :end 
   :notfound 
      /echo ${item} not found in inventory. 
   :end 
   /if (${leavetwisting} == 1) /twist start 
/return 

Sub CastItem(slot) 
   /nomod /itemnotify ${slot} rightmouseup 
   /echo Swapcast::Casting the effect on your ${InvSlot[${slot}].Item.Name} 
   :castloop 
|| special case composer greaves don't ever stop casting 
      /if (${InvSlot[${slot}].Item.Name.Find["Composers Greaves"]}) { 
         /delay 12 
         /stopsong 
      } 
|| special cases for epics and other items that don't seem to cast proper with default cast times 
       /if (${InvSlot[${slot}].Item.Name.Find["Blade of Vesagran"]}) { 
         /delay 10 
         /stopsong 
      } 
      /if (${InvSlot[${slot}].Item.Name.Find["Prismatic Dragon Blade"]}) { 
         /delay 10 
         /stopsong 
      } 
      /if (${Me.Casting.ID}>0) /goto :castloop 
/return 

Sub WaitCursor(slot, pack) 
   /declare item local 
   /declare timeout timer 30 
   /varset item ${Cursor.ID} 
   /if (${Defined[pack]}) /goto :waitloop2 
   :waitloop1 
      /nomod /itemnotify ${slot} leftmouseup 
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop1 
   /goto :donewaiting 
   :waitloop2 
      /nomod /itemnotify in ${pack} ${slot} leftmouseup 
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop2 
   :donewaiting 
/return
that was the newest one like a year ago. and after diff its still the same as on the first page.

I tried adding the line just after this

Code: Select all

:castloop
/delay 5s ${Me.Casting}
and that keeps it enough to cast. but doesnt put it back.

Posted: Sat Sep 23, 2006 9:19 pm
by JimJohnson
Give this a fast try and let me know if its working right.

Code: Select all

Sub Main(p0,p1)
   /call SwapCast "${p0}" "${p1}"
/endmacro

Sub SwapCast(item,equipslot)
   /declare inventoryslot int local
   /declare pack local
   /declare packslot int local
   /declare leaveopen int local 1
   /declare packnumber int local 0
   /declare leavetwisting int local 0

   /if (!${Defined[item]}) /goto :end
   /if (${Twist}) {
      /twist stop
      /varset leavetwisting 1
   }
   :stopsingingdelay
   /if (${Me.Casting.ID}>0) {
      /stopsong
      /goto :stopsingingdelay
      }
   /varset inventoryslot ${FindItem[${item}].InvSlot}
   /if (!${inventoryslot}) /goto :notfound
   :packcountloop
   /if (${inventoryslot}>250 && ${inventoryslot}<331) {
      /varset packnumber ${Math.Calc[${packnumber}+1]}
      /varset inventoryslot ${Math.Calc[${inventoryslot}-10]}
      /goto :packcountloop
      }
   /if (${packnumber} > 0) {
      /varset pack pack${packnumber}
      /varset packslot ${Math.Calc[${inventoryslot}-240]}
      /goto :foundit
      }
   :notinpack
      /call CastItem ${inventoryslot}
      /goto :end
   :foundit
      /if (!${Window[${pack}].Open}) {
         /nomod /itemnotify ${pack} rightmouseup
         /varset leaveopen 0
         }
      /call WaitCursor ${packslot} ${pack}
      /if (${equipslot.Find[null]}) {
         /if (${Cursor.WornSlots}>0) {
            /varset equipslot ${Cursor.WornSlot[1]}
         } else {
               /varset equipslot pack1
         }
      }
      /call WaitCursor ${equipslot}
      /call CastItem ${equipslot}
      /call WaitCursor ${equipslot}
      /call WaitCursor ${packslot} ${pack}
      /if (${leaveopen} == 0) /nomod /itemnotify ${pack} rightmouseup
      /goto :end
   :notfound
      /echo ${item} not found in inventory.
   :end
   /if (${leavetwisting} == 1) /twist start
/return

Sub CastItem(slot)
   /nomod /itemnotify ${slot} rightmouseup
[color=red]  /echo Waiting 3seconds for server or untill I start to cast
  /delay 3s ${Me.Casting.ID}[/color]
   /echo Swapcast::Casting the effect on your ${InvSlot[${slot}].Item.Name}
   :castloop
|| special case composer greaves don't ever stop casting
      /if (${InvSlot[${slot}].Item.Name.Find["Composers Greaves"]}) {
         /delay 12
         /stopsong
      }
|| special cases for epics and other items that don't seem to cast proper with default cast times
       /if (${InvSlot[${slot}].Item.Name.Find["Blade of Vesagran"]}) {
         /delay 10
         /stopsong
      }
      /if (${InvSlot[${slot}].Item.Name.Find["Prismatic Dragon Blade"]}) {
         /delay 10
         /stopsong
      }
      [color=red]/if (${Me.Casting.ID})[/color] /goto :castloop
/return

Sub WaitCursor(slot, pack)
   /declare item local
   /declare timeout timer 30
   /varset item ${Cursor.ID}
   /if (${Defined[pack]}) /goto :waitloop2
   :waitloop1
      /nomod /itemnotify ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop1
   /goto :donewaiting
   :waitloop2
      /nomod /itemnotify in ${pack} ${slot} leftmouseup
   /if ((${item} == ${Cursor.ID}) && (${timeout} > 0)) /goto :waitloop2
   :donewaiting
/return