EZ Server

General Category => Quest and Guides => Topic started by: Natedog on May 18, 2016, 04:56:20 am



Title: Combine HoH tokens macro..
Post by: Natedog on May 18, 2016, 04:56:20 am
This is so you don't break your wrist trying to combine all those damn HoH tokens...

Works best if you use more than 1 character if you are in a hurry to combine them. Otherwise just put tokens on one character and just watch a movie or something because it will take awhile if you have tons of tokens :)


DO NOT RUN THIS IF YOU HAVE BAGS INSIDE BAGS...
(not sure why but someone else had an error doing this.. just a heads up)

Code:
|112921 - 112927 - T3 IDs
|112931 - 112937 - T4 IDs
#turbo 40
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||| Place A Magic Box in the 8th bag slot (bottom right)          ||||
|||| Any loss of tokens is not my fault Kappa                      ||||
|||| Written By: Natedog                                           ||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Sub Main
/if (!${Defined[MagicBoxSlot]}) /declare MagicBoxSlot string outer
/varset MagicBoxSlot ${FindItem[=A Magic Box].InvSlot.Name}

||Lets open all bags!
/if (!${Defined[bag]}) /declare bag int local 0
/if (!${Defined[packnum]}) /declare packnum int 1
/if (!${Defined[tokenid]}) /declare tokenid int 112921
/if (!${Defined[T]}) /declare T int 1
/if (!${Defined[CurrentID]}) /declare CurrentID int outer
/if (!${Defined[ItemName]}) /declare ItemName string outer
/if (!${Defined[TokenItemCount]}) /declare TokenItemCount int outer

/for bag 1 to 8
/if (!${Window[pack${bag}].Open} && ${InvSlot[pack${bag}].Item.Container}) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag

/for tokenid 112927 downto 112921
:retrycombine
/for packnum 1 to 8
/if (!${Window[pack${packnum}].Open} && ${InvSlot[pack${packnum}].Item.Container}) {
/itemnotify pack${packnum} rightmouseup
/delay 6
}

/if (${Window[pack${packnum}].Open} && ${InvSlot[pack${packnum}].Item.Container}) {
/for T 1 to 10
|Find the item by ID...
/if (${InvSlot[pack${packnum}].Item.Item[${T}].ID} == ${tokenid}) {
/varset CurrentID ${InvSlot[pack${packnum}].Item.Item[${T}].ID}
/varset ItemName ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/varset TokenItemCount ${FindItemCount[${ItemName}]}

/if (${TokenItemCount} < 2) {
|/echo Skipping ID.. ${CurrentID} - ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/goto :dont_upgrade
/echo Item skipped.. if we got here.. something is WRONG
} else {
|/echo We have .. ${AugmentItemCount} of this item.. ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/ctrlkey /itemnotify in pack${packnum} ${T} leftmouseup
/delay 6
/call CombineHoHToken
/call FindNextToken
/goto :retrycombine
}
}
/next T
}
/next packnum
:dont_upgrade
/next tokenid

|Close our bags back up...
/for bag 1 to 8
/if (${Window[pack${bag}].Open} && ${InvSlot[pack${bag}].Item.Container}) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag

/return

sub FindNextToken
/if (!${Defined[P]}) /declare P int 1
/if (!${Defined[packnum2]}) /declare packnum2 int 1
/for packnum2 1 to 8
/if (!${Window[pack${packnum2}].Open} && ${InvSlot[pack${packnum2}].Item.Container}) {
/itemnotify pack${packnum2} rightmouseup
/delay 6
}

/if (${Window[pack${packnum2}].Open} && ${InvSlot[pack${packnum2}].Item.Container}) {
/for P 1 to 10
/if (${InvSlot[pack${packnum2}].Item.Item[${P}].ID} == ${CurrentID}) {
/ctrlkey /itemnotify in pack${packnum2} ${P} leftmouseup
/delay 6
/call CombineHoHToken
/return
}
/next P
}
/next packnum2

/return

Sub CombineHoHToken
|Make sure bag is open.. (it should be...)
/if (!${Window[${MagicBoxSlot}].Open} && ${InvSlot[${MagicBoxSlot}].Item.Container}) /nomodkey /itemnotify ${MagicBoxSlot} rightmouseup
/if (!${Defined[slot]}) /declare slot int 0
/varset slot ${Math.Calc[${FindItem[A Magic Box].Items}+1]}
/if (${slot} > 2) {
/autoinventory
/declare fixit int 1
:fixbox
/for fixit 1 to 10
/delay 5
/shiftkey /itemnotify in ${MagicBoxSlot} ${fixit} leftmouseup
/delay 5
/autoinventory
/next fixit
/if (${FindItem[A Magic Box].Items} > 0) {
/goto :fixbox
} else {
/goto :endcombine
}
}
/itemnotify in ${MagicBoxSlot} ${slot} leftmouseup
/delay 6

/if (${slot} == 2) {
/combine ${MagicBoxSlot}
/delay 1s
/autoinventory
/delay 15
}
:endcombine
/return



Title: Re: Combine HoH tokens macro..
Post by: Kelordis on May 18, 2016, 10:36:05 am
Awesome, this will be handy when I farm Airplane for my UW.

Thanks Nate!


Title: Re: Combine HoH tokens macro..
Post by: KnowFear on May 18, 2016, 01:02:05 pm
If someone wants to donate a few hundred tokens to me I will gladly help test this out.


Title: Re: Combine HoH tokens macro..
Post by: Danish on May 18, 2016, 03:05:15 pm
hehe I think I have a script, that actually hands in the tokens to the guy upon your request aswell.

Not sure if its allowed, if so, I never used it.


Title: Re: Combine HoH tokens macro..
Post by: balidet on May 18, 2016, 03:56:09 pm
all banned!


now that they are clicks its pretty slick


Title: Re: Combine HoH tokens macro..
Post by: Rent Due on May 18, 2016, 04:20:31 pm
hehe I think I have a script, that actually hands in the tokens to the guy upon your request aswell.

Not sure if its allowed, if so, I never used it.

Was changed you no longer have to turn in the tokens just click them and the boss spawns.

Thanks for the combining macro $$


Title: Re: Combine HoH tokens macro..
Post by: Moggs on November 07, 2017, 02:25:28 pm
By chance does one that actually works?


Title: Re: Combine HoH tokens macro..
Post by: Loyal on November 07, 2017, 04:53:26 pm
This works - i use it all the time.....i think a couple of the coin names are wrong in the original post so it will return an error? I hunted them down and fixed them in my macro back home (just find the misnamed coins and correct it)....then it runs quite nicely.


Title: Re: Combine HoH tokens macro..
Post by: Poker-ecaf on November 07, 2017, 07:36:55 pm
Turn in at Teleporter is much faster as use the cast ability !

didnt work to me that macro!


Title: Re: Combine HoH tokens macro..
Post by: WatchYouDie on November 07, 2017, 09:31:48 pm
This works just used it 2 days ago. Need UF client has not been updated to rof


Title: Re: Combine HoH tokens macro..
Post by: Raygan on January 07, 2018, 02:27:13 pm
Is there any way to fix this for RoF2 client?  i tried running it and gives an error message about unavailable bag slot or something.  :'(


Title: Re: Combine HoH tokens macro..
Post by: gotee on January 09, 2018, 08:30:24 pm
Anything that can be done to streamline the MPC tokens got tons.


Title: Re: Combine HoH tokens macro..
Post by: WatchYouDie on January 10, 2018, 01:24:16 am
Anything that can be done to streamline the MPC tokens got tons.

hand them in 4x at a time to teleporter for random name


Title: Re: Combine HoH tokens macro..
Post by: RedDwarf on January 14, 2018, 11:42:56 am
Think he means to speed up the hand ins, to prevent carpal tunnel

Something like this should work, have mule run it by observer, change last /delay to how long you want for next to be spawned, its dirty, but should work, not automating kills, just the hand in's

Code:
Sub Main

 :Loop
/if (${FindItemCount[=The MCP Quest Token]}<4 ) /endmacro
/if (${FindItemCount[=The MCP Quest Token]}>=4) {
/call Give
/goto :loop
}
/return
 
 Sub Give
/ctrl /itemnotify ${FindItem[The MCP Quest Token].InvSlot} LeftMouseUp
/delay 10
/target Observer
/click left target
/delay 10
/ctrl /itemnotify ${FindItem[The MCP Quest Token].InvSlot} LeftMouseUp
/delay 10
/click left target
/delay 10
/ctrl /itemnotify ${FindItem[The MCP Quest Token].InvSlot} LeftMouseUp
/delay 10
/click left target
/delay 10
/ctrl /itemnotify ${FindItem[The MCP Quest Token].InvSlot} LeftMouseUp
/delay 10
/click left target
/delay 10
/notify GiveWnd GVW_Give_Button LeftMouseUP
/delay 100

/return


Title: Re: Combine HoH tokens macro..
Post by: synthaxx_17 on January 14, 2018, 07:59:34 pm
Awesome! thanks for this MCP hand-in macro.


Title: Re: Combine HoH tokens macro..
Post by: Natedog on January 15, 2018, 10:52:46 am
There is a bug in MQ2 for RoF2 where the Name of the slot for bags is returning the incorrect value (always returns 1 higher than normal)


Until the bugged is fixed.. this will calculate the slot .. (should work? I hope :D)


Code:
|112921 - 112927 - T3 IDs
|112931 - 112937 - T4 IDs
#turbo 40
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||| Place A Magic Box in the 8th bag slot (bottom right)          ||||
|||| Any loss of tokens is not my fault Kappa                      ||||
|||| Written By: Natedog                                           ||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Sub Main
/if (!${Defined[MagicBoxSlot]}) /declare MagicBoxSlot string outer
|/varset MagicBoxSlot ${FindItem[=A Magic Box].InvSlot.Name}

/varset MagicBoxSlot pack${Math.Calc[${FindItem[=A Magic Box].InvSlot.Name.Right[1]}-1].Int}

||Lets open all bags!
/if (!${Defined[bag]}) /declare bag int local 0
/if (!${Defined[packnum]}) /declare packnum int 1
/if (!${Defined[tokenid]}) /declare tokenid int 112921
/if (!${Defined[T]}) /declare T int 1
/if (!${Defined[CurrentID]}) /declare CurrentID int outer
/if (!${Defined[ItemName]}) /declare ItemName string outer
/if (!${Defined[TokenItemCount]}) /declare TokenItemCount int outer

/for bag 1 to 8
/if (!${Window[pack${bag}].Open} && ${InvSlot[pack${bag}].Item.Container}) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag

/for tokenid 112927 downto 112921
:retrycombine
/for packnum 1 to 8
/if (!${Window[pack${packnum}].Open} && ${InvSlot[pack${packnum}].Item.Container}) {
/itemnotify pack${packnum} rightmouseup
/delay 6
}

/if (${Window[pack${packnum}].Open} && ${InvSlot[pack${packnum}].Item.Container}) {
/for T 1 to 10
|Find the item by ID...
/if (${InvSlot[pack${packnum}].Item.Item[${T}].ID} == ${tokenid}) {
/varset CurrentID ${InvSlot[pack${packnum}].Item.Item[${T}].ID}
/varset ItemName ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/varset TokenItemCount ${FindItemCount[${ItemName}]}

/if (${TokenItemCount} < 2) {
|/echo Skipping ID.. ${CurrentID} - ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/goto :dont_upgrade
/echo Item skipped.. if we got here.. something is WRONG
} else {
|/echo We have .. ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/ctrlkey /itemnotify in pack${packnum} ${T} leftmouseup
/delay 6
/call CombineHoHToken
/call FindNextToken
/goto :retrycombine
}
}
/next T
}
/next packnum
:dont_upgrade
/next tokenid

|Close our bags back up...
/for bag 1 to 8
/if (${Window[pack${bag}].Open} && ${InvSlot[pack${bag}].Item.Container}) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag

/return

sub FindNextToken
/if (!${Defined[P]}) /declare P int 1
/if (!${Defined[packnum2]}) /declare packnum2 int 1
/for packnum2 1 to 8
/if (!${Window[pack${packnum2}].Open} && ${InvSlot[pack${packnum2}].Item.Container}) {
/itemnotify pack${packnum2} rightmouseup
/delay 6
}

/if (${Window[pack${packnum2}].Open} && ${InvSlot[pack${packnum2}].Item.Container}) {
/for P 1 to 10
/if (${InvSlot[pack${packnum2}].Item.Item[${P}].ID} == ${CurrentID}) {
/ctrlkey /itemnotify in pack${packnum2} ${P} leftmouseup
/delay 6
/call CombineHoHToken
/return
}
/next P
}
/next packnum2

/return

Sub CombineHoHToken
|Make sure bag is open.. (it should be...)
/if (!${Window[${MagicBoxSlot}].Open} && ${InvSlot[${MagicBoxSlot}].Item.Container}) /nomodkey /itemnotify ${MagicBoxSlot} rightmouseup
/if (!${Defined[slot]}) /declare slot int 0
/varset slot ${Math.Calc[${FindItem[A Magic Box].Items}+1]}
/if (${slot} > 2) {
/autoinventory
/declare fixit int 1
:fixbox
/for fixit 1 to 10
/delay 5
/shiftkey /itemnotify in ${MagicBoxSlot} ${fixit} leftmouseup
/delay 5
/autoinventory
/next fixit
/if (${FindItem[A Magic Box].Items} > 0) {
/goto :fixbox
} else {
/goto :endcombine
}
}
/itemnotify in ${MagicBoxSlot} ${slot} leftmouseup
/delay 6

/if (${slot} == 2) {
/combine ${MagicBoxSlot}
/delay 1s
/autoinventory
/delay 15
}
:endcombine
/return


Title: Re: Combine HoH tokens macro..
Post by: Raygan on January 16, 2018, 04:57:43 pm
Thanks Nate...I will give it a shot a little later this week and let ya know
 ;D


Title: Re: Combine HoH tokens macro..
Post by: Raygan on January 17, 2018, 01:40:12 pm
ok that combine macro works perfect for RoF2 client  ;D


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on December 03, 2018, 05:53:34 pm
hmm cant get any of these to work opens all bags and just keeps picking one token up and putting it back in a bag and picking it up again I must be doing something wrong.


Title: Re: Combine HoH tokens macro..
Post by: Natedog on December 04, 2018, 01:54:02 am
hmm cant get any of these to work opens all bags and just keeps picking one token up and putting it back in a bag and picking it up again I must be doing something wrong.

If you updated mq2 recently i think the itemslot bug was fixed .. try this..


Code:
|112921 - 112927 - T3 IDs
|112931 - 112937 - T4 IDs
#turbo 40
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||| Place A Magic Box in the 8th bag slot (bottom right)          ||||
|||| Any loss of tokens is not my fault Kappa                      ||||
|||| Written By: Natedog                                           ||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Sub Main
/if (!${Defined[MagicBoxSlot]}) /declare MagicBoxSlot string outer
/varset MagicBoxSlot ${FindItem[=A Magic Box].InvSlot.Name}

|/varset MagicBoxSlot pack${Math.Calc[${FindItem[=A Magic Box].InvSlot.Name.Right[1]}-1].Int}

||Lets open all bags!
/if (!${Defined[bag]}) /declare bag int local 0
/if (!${Defined[packnum]}) /declare packnum int 1
/if (!${Defined[tokenid]}) /declare tokenid int 112921
/if (!${Defined[T]}) /declare T int 1
/if (!${Defined[CurrentID]}) /declare CurrentID int outer
/if (!${Defined[ItemName]}) /declare ItemName string outer
/if (!${Defined[TokenItemCount]}) /declare TokenItemCount int outer

/for bag 1 to 8
/if (!${Window[pack${bag}].Open} && ${InvSlot[pack${bag}].Item.Container}) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag

/for tokenid 112927 downto 112921
:retrycombine
/for packnum 1 to 8
/if (!${Window[pack${packnum}].Open} && ${InvSlot[pack${packnum}].Item.Container}) {
/itemnotify pack${packnum} rightmouseup
/delay 6
}

/if (${Window[pack${packnum}].Open} && ${InvSlot[pack${packnum}].Item.Container}) {
/for T 1 to 10
|Find the item by ID...
/if (${InvSlot[pack${packnum}].Item.Item[${T}].ID} == ${tokenid}) {
/varset CurrentID ${InvSlot[pack${packnum}].Item.Item[${T}].ID}
/varset ItemName ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/varset TokenItemCount ${FindItemCount[${ItemName}]}

/if (${TokenItemCount} < 2) {
|/echo Skipping ID.. ${CurrentID} - ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/goto :dont_upgrade
/echo Item skipped.. if we got here.. something is WRONG
} else {
|/echo We have .. ${InvSlot[pack${packnum}].Item.Item[${T}].Name}
/ctrlkey /itemnotify in pack${packnum} ${T} leftmouseup
/delay 6
/call CombineHoHToken
/call FindNextToken
/goto :retrycombine
}
}
/next T
}
/next packnum
:dont_upgrade
/next tokenid

|Close our bags back up...
/for bag 1 to 8
/if (${Window[pack${bag}].Open} && ${InvSlot[pack${bag}].Item.Container}) /nomodkey /itemnotify pack${bag} rightmouseup
/next bag

/return

sub FindNextToken
/if (!${Defined[P]}) /declare P int 1
/if (!${Defined[packnum2]}) /declare packnum2 int 1
/for packnum2 1 to 8
/if (!${Window[pack${packnum2}].Open} && ${InvSlot[pack${packnum2}].Item.Container}) {
/itemnotify pack${packnum2} rightmouseup
/delay 6
}

/if (${Window[pack${packnum2}].Open} && ${InvSlot[pack${packnum2}].Item.Container}) {
/for P 1 to 10
/if (${InvSlot[pack${packnum2}].Item.Item[${P}].ID} == ${CurrentID}) {
/ctrlkey /itemnotify in pack${packnum2} ${P} leftmouseup
/delay 6
/call CombineHoHToken
/return
}
/next P
}
/next packnum2

/return

Sub CombineHoHToken
|Make sure bag is open.. (it should be...)
/if (!${Window[${MagicBoxSlot}].Open} && ${InvSlot[${MagicBoxSlot}].Item.Container}) /nomodkey /itemnotify ${MagicBoxSlot} rightmouseup
/if (!${Defined[slot]}) /declare slot int 0
/varset slot ${Math.Calc[${FindItem[A Magic Box].Items}+1]}
/if (${slot} > 2) {
/autoinventory
/declare fixit int 1
:fixbox
/for fixit 1 to 10
/delay 5
/shiftkey /itemnotify in ${MagicBoxSlot} ${fixit} leftmouseup
/delay 5
/autoinventory
/next fixit
/if (${FindItem[A Magic Box].Items} > 0) {
/goto :fixbox
} else {
/goto :endcombine
}
}
/itemnotify in ${MagicBoxSlot} ${slot} leftmouseup
/delay 6

/if (${slot} == 2) {
/combine ${MagicBoxSlot}
/delay 1s
/autoinventory
/delay 15
}
:endcombine
/return


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on December 04, 2018, 04:56:01 am
Thanks will try that when i get home later.


Title: Re: Combine HoH tokens macro..
Post by: Sarthin on December 04, 2018, 07:57:40 am
Speaking from own experience, could also make sure you only have one magic box and that it's in the 8th slot.


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on December 04, 2018, 03:09:58 pm
hmm don't work says slot is null: could not send notification to in null.  ???


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on December 11, 2018, 07:33:53 pm
I Cant get this to work for me any ideas?


Title: Re: Combine HoH tokens macro..
Post by: Sarthin on December 12, 2018, 04:29:41 am
I don't have any other ideas, but I can combine for you if you want. Just hail me in game.


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on December 12, 2018, 05:06:35 am
Thanks if i cant get this to work i will take you up on that offer.


Title: Re: Combine HoH tokens macro..
Post by: wendel on December 12, 2018, 09:57:11 am
so here is what I have... empty box in slot 8 I think.
All this mac does is pickup items from box 2 and return them...  no combines, no clicks, and thankfully no destroys lol
I'm running RoF client.

Thoughts?


Title: Re: Combine HoH tokens macro..
Post by: Sarthin on December 12, 2018, 10:25:34 am
https://imgur.com/a/JKrccQP (https://imgur.com/a/JKrccQP) 8 slot bag

This is the setup I have and the macro I use. If it's not working for you with this macro and the bag setup I have in the picture, my guess is you need to try a different MQ2 build.


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on December 13, 2018, 08:17:13 am
I have tried multiple build im at a loss lol


Title: Re: Combine HoH tokens macro..
Post by: Knorgar on March 25, 2020, 09:40:47 pm
Updated. Follow instructions.

I haven't reach HoH yet, but the rest of the combines for getting to there are giving me carpal tunnel anyways.

Code:
|Combine HoH tokens
|Have an empty Magic Box in slot 10
|1 2
|3 4
|5 6
|7 8 
|9 10 <--Empty "A Magic Box"
|

Sub Main
|This is the slot of the Magic Box I'll be using. Use 10 since I'm using Auto Inventory
/declare MagicBoxSlot string outer pack10
|These are the items I'm going to check for, grab 2 of, and combine them in
/declare item1 string outer Split Paw Quest Token
/declare item2 string outer The Oceanlord Quest Token
/declare item3 string outer The Lightbringer Quest Token
/declare item4 string outer The Tranquil Quest Token
/declare item5 string outer The Faceless Quest Token
/declare item6 string outer H-One N-One Quest Token
/declare item7 string outer The Prince of Darkness Quest Token
/declare i int outer 1

/keypress OPEN_INV_BAGS
|Delay 1minute until that condition is met
/delay 1m ${Window[pack8].Open}

|Cycle through all 7 of the items above
/for i 1 to 7
:nextset
|Check if I have 2 or more of the item
/if (${FindItem[=${item${i}}].Stack} < 2) {
/echo I don't have enough of ${item${i}} I only have ${FindItem[=${item${i}}].Stack}. Going to next one
/next i
}
|Pickup the first one
/ctrlkey /itemnotify ${FindItem[=${item${i}}].InvSlot} leftmouseup
/delay 1m ${Cursor.ID} == ${FindItem[=${item${i}}].ID}
/itemnotify in ${MagicBoxSlot} 1 leftmouseup
/delay 1m !${Cursor.ID}
|Pickup the second one
/ctrlkey /itemnotify ${FindItem[=${item${i}}].InvSlot} leftmouseup
/delay 1m ${Cursor.ID} == ${FindItem[=${item${i}}].ID}
/itemnotify in ${MagicBoxSlot} 2 leftmouseup
/delay 1m !${Cursor.ID}
|Hit Combine and put it away
/combine ${MagicBoxSlot}
/delay 1m ${Cursor.ID}
/delay 1s
/autoinventory
/delay 1m !${Cursor.ID}
|If I still have more, go through the process again
/if (${FindItem[${item${i}}].ID}) /goto :nextset
/next i

/echo Done!

/return


Title: Re: Combine HoH tokens macro..
Post by: Rakharth on August 26, 2020, 08:31:42 pm
So i know this is more then a year ago messing with this macro but i just came back and figured out why it was not working for me. dont know why but was not working with sars ui loaded swapped back  to default and works fine incase others have issue maybe.


Title: Re: Combine HoH tokens macro..
Post by: Dbeast on April 04, 2024, 05:10:46 pm
Everyone,

Here is a version of code I got to work for me personally:


Code:
Sub Main
|This is the slot of the Magic Box I'll be using. Use 10 since I'm using Auto Inventory
/declare MagicBoxSlot string local pack10
|These are the items I'm going to check for, grab 2 of, and combine them in
/declare item1 string local Split Paw Quest Token
/declare item2 string local The Oceanlord Quest Token
/declare item3 string local The Lightbringer Quest Token
/declare item4 string local The Tranquil Quest Token
/declare item5 string local The Faceless Quest Token
/declare item6 string local H-One N-One Quest Token
/declare item7 string local The Prince of Darkness Quest Token
/declare i int local 1

/keypress OPEN_INV_BAGS
|Delay 5 seconds until that condition is met
/delay 5s ${Window[pack8].Open}

|Cycle through all 7 of the items above
/for i 1 to 7
:nextset
|Check if I have 2 or more of the item
/if (${FindItem[=${item${i}}].Stack} < 2) {
/echo I don't have enough of ${item${i}} I only have ${FindItem[=${item${i}}].Stack}. Going to next one
/if (${Math.Calc[${i}+1]}>=8) {
/echo Done!
/return
}
/next i
}
|Pickup the first one

/if (!${Defined[BagNum]}) /declare BagNum int local
/varcalc BagNum ${FindItem[=${item${i}}].ItemSlot}
/varcalc BagNum ${BagNum}-22
/if (!${Defined[BagSlot]}) /declare BagSlot int local
/varcalc BagSlot ${FindItem[=${item${i}}].ItemSlot2}
/varcalc BagSlot ${BagSlot}+1


/ctrlkey /itemnotify in pack${BagNum} ${BagSlot} leftmouseup
/delay 1m ${Cursor.ID} == ${FindItem[=${item${i}}].ID}
/itemnotify in ${MagicBoxSlot} 1 leftmouseup
/delay 1m !${Cursor.ID}
|Pickup the second one
/ctrlkey /itemnotify in pack${BagNum} ${BagSlot} leftmouseup
/delay 1m ${Cursor.ID} == ${FindItem[=${item${i}}].ID}
/itemnotify in ${MagicBoxSlot} 2 leftmouseup
/delay 1m !${Cursor.ID}
|Hit Combine and put it away
/combine ${MagicBoxSlot}
/delay 1m ${Cursor.ID}
/delay 2
/autoinventory
/delay 1m !${Cursor.ID}
|If I still have more, go through the process again
/if (${FindItem[${item${i}}].ID}) {
/echo Restarting
/goto :nextset
}
/next i

/echo Done!

/return