Multiboxing.com - Multiboxing in World of Warcraft and more!
          

Go Back   Multiboxing in World of Warcraft and Beyond! > All Gaming Forums > World of Warcraft - Macros, UIs, Mods, Addons

Reply
 
LinkBack Thread Tools Display Modes
Old 05-20-2010, 09:54 PM   #1
Senior Member
 
TheMuffinMan's Avatar
 
Join Date: Dec 2009
Location: Oklahoma, US
Posts: 1,421
Send a message via AIM to TheMuffinMan Send a message via MSN to TheMuffinMan Send a message via Yahoo to TheMuffinMan
Default Quick item macro question...

I am working on a macro script for someone in my guild...

I have 2 questions for you gurus out there

How do you

1) Cast another macro from within a macro, that is NOT necessarily on your bar?
2) Restack a specific item (by name) in your bags? (i.e. I have a stack of 2 cloth and one of 8 cloth and I want to auto combine them into a stack of 10)

I want to do the above without the use of ANY addons (I know their are item stacking bag addons etc...)
__________________
TheMuffinMan is offline   Reply With Quote
Old 05-21-2010, 05:59 AM   #2
Senior Member
 
lofblad's Avatar
 
Join Date: Aug 2009
Posts: 224
Default Re: Quick item macro question...

At least in the past, you couldn't call another macro from within a macro. I have no idea about the stacking problem, sorry.
__________________
lofblad is offline   Reply With Quote
Old 05-21-2010, 07:18 AM   #3
Senior Member
 
Poyzon's Avatar
 
Join Date: Jul 2009
Posts: 1,295
Blog Entries: 38
Default Re: Quick item macro question...

Off the top of my head.

Caveats:
  • > 255 characters, so you would need an addon that supports longer macros.
  • Untested since I don't have said addon.

Code:
/script for b=4,0,-1 do for s=GetContainerNumSlots(b),1,-1 do local n=GetContainerItemLink(b,s);if n and string.find(n,"ITEM NAME HERE") then local t,i,l,q,r=GetContainerItemInfo(b,s);if i<10 then PickupContainerItem(b,s);if CursorHasItem() then PutItemInBackpack();end;end;end;end;end;
Pseudo code:
  • Loop through all your bags (in reverse order)
  • Loop through each item in each bag (in reverse order)
  • If the item name matches the name you're looking for and the item count is less than 10 (change this to whatever you want), pick up the item, make sure you have it picked up and then place it in your backpack (which should then force it to stack with any other partial stacks you have).

Even if the above doesn't work, maybe it will give someone else some ideas.
Poyzon is offline   Reply With Quote
Old 05-21-2010, 08:42 AM   #4
Super Moderator
 
Nghtmr9999's Avatar
 
Join Date: Aug 2009
Location: Minnesota, US
Posts: 1,662
Blog Entries: 6
Default Re: Quick item macro question...

Well, looking through the Macro API, I did come across something...

API Split Container Item
Picks up part of a stack of items from a container, placing them on the cursor.

Code:
SplitContainerItem(bagID, slot, count);
Arguments:
bagID
Integer - id of the bag the slot is located in.
slot
Integer - slot inside the bag (top left slot is 1, slot to the right of it is 2).
count
Integer - Quantity to pick up.

Returns: Nothing


I also found this...

API PutItemInBag
Puts the item on the cursor into the specified bag slot on the main bar, if it's a bag. Otherwise, attempts to place the item inside the bag in that slot.

Code:
PutItemInBag(n)
Arguments:
n
Numeric - A value from 20 to 23 where 20 is the rightmost bag (not including backpack) and 23 is the leftmost.

However, making a macro might involve some hard-coding, which I am not a big fan of, since you need to specify a 'n' of how many of a specific item to pick up. It's a start I suppose =\



And to answer the question about multiple Macros, yes you can.

Code:
/click MultiBarRightButton1 (or macro location)
So you would have
Code:
/cast Create Ghost
/attack Nexus
/click MultiBarRightButton1
Then that macro could finish the first if it was beyond the 255 character limit.
__________________

Last edited by Nghtmr9999; 05-21-2010 at 08:48 AM.
Nghtmr9999 is offline   Reply With Quote
Old 05-21-2010, 09:34 AM   #5
Senior Member
 
TheMuffinMan's Avatar
 
Join Date: Dec 2009
Location: Oklahoma, US
Posts: 1,421
Send a message via AIM to TheMuffinMan Send a message via MSN to TheMuffinMan Send a message via Yahoo to TheMuffinMan
Default Re: Quick item macro question...

Quote:
Originally Posted by Nghtmr9999 View Post
And to answer the question about multiple Macros, yes you can.

Code:
/click MultiBarRightButton1 (or macro location)
So you would have
Code:
/cast Create Ghost
/attack Nexus
/click MultiBarRightButton1
Then that macro could finish the first if it was beyond the 255 character limit.
This requires them both be on a button on your bars though, that is what I am trying to avoid.

I want a macro to call another macro WITHOUT more than ONE macro on an actual button.
__________________
TheMuffinMan is offline   Reply With Quote
Old 05-21-2010, 09:40 AM   #6
Member
 
Join Date: Apr 2010
Location: houston, tx
Posts: 88
Default Re: Quick item macro question...

Isn't the whole reason why blizzard setup up, that you can only have a certain amount of macros because you can't fit to many? Or atleast thats my logic.

So are you trying clean up the screen or just can't fit anymore on the screen?
__________________
Computer Science Student, also a student in the wayz of Hacks
p0weruser is offline   Reply With Quote
Old 05-21-2010, 09:44 AM   #7
Super Moderator
 
Nghtmr9999's Avatar
 
Join Date: Aug 2009
Location: Minnesota, US
Posts: 1,662
Blog Entries: 6
Default Re: Quick item macro question...

Quote:
Originally Posted by TheMuffinMan View Post
This requires them both be on a button on your bars though, that is what I am trying to avoid.

I want a macro to call another macro WITHOUT more than ONE macro on an actual button.
I know. But that is the only way to call another macro within another one.
__________________
Nghtmr9999 is offline   Reply With Quote
Old 05-21-2010, 09:52 AM   #8
Senior Member
 
TheMuffinMan's Avatar
 
Join Date: Dec 2009
Location: Oklahoma, US
Posts: 1,421
Send a message via AIM to TheMuffinMan Send a message via MSN to TheMuffinMan Send a message via Yahoo to TheMuffinMan
Default Re: Quick item macro question...

Quote:
Originally Posted by Nghtmr9999 View Post
I know. But that is the only way to call another macro within another one.
I wonder how Healbot can cast a macro on a Unitframe them without it being on a button. A LUA script must be able to run a macro by name.
__________________
TheMuffinMan is offline   Reply With Quote
Old 05-21-2010, 09:58 AM   #9
Super Moderator
 
Nghtmr9999's Avatar
 
Join Date: Aug 2009
Location: Minnesota, US
Posts: 1,662
Blog Entries: 6
Default Re: Quick item macro question...

Quote:
Originally Posted by TheMuffinMan View Post
I wonder how Healbot can cast a macro on a Unitframe them without it being on a button. A LUA script must be able to run a macro by name.
From my understanding, Healbot directly casts spells on players and doesn't use macros. But if it does, that is one macro not multiple

Regardless, as asked/answered here: http://forums.worldofwarcraft.com/th...78358653&sid=1 there is no way to directly call a macro from another one. As for the lua aspect, i'll take a look for you.
__________________

Last edited by Nghtmr9999; 05-21-2010 at 10:05 AM.
Nghtmr9999 is offline   Reply With Quote
Old 05-21-2010, 10:10 AM   #10
Senior Member
 
TheMuffinMan's Avatar
 
Join Date: Dec 2009
Location: Oklahoma, US
Posts: 1,421
Send a message via AIM to TheMuffinMan Send a message via MSN to TheMuffinMan Send a message via Yahoo to TheMuffinMan
Default Re: Quick item macro question...

I use Healbot to cast macros, and it does so without a button at all.... so their has to be some way of calling macros that is completely independent of the bars.

You aren't talking to a WoW n00b here Nght... I know all about /Click macros and HealBot hehe
__________________
TheMuffinMan is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Question about RAF Broomba37 General Discussions 9 01-13-2010 04:05 PM
Quick question Broomba37 Multiboxing Software 8 11-27-2009 08:31 PM
Another RAF quick question... CAPO General Discussions 4 08-24-2009 01:50 PM
quick question Zulfur101 General Discussions 31 07-16-2009 09:25 PM
I got a quick question Bay General Discussions 2 07-02-2009 01:13 PM


SEO by vBSEO 3.3.2