Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 05:20:49 am *

Login with username, password and session length
Pages: 1 [2] 3
Print
Author Topic: Combine HoH tokens macro..  (Read 37648 times)
Natedog
Master
******
Posts: 830


View Profile
« Reply #15 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 Cheesy)


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
Logged

Raygan
Legend
*******
Posts: 1156



View Profile
« Reply #16 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
 Grin
Logged

Hate's Most Hateful Hater
Raygan
Legend
*******
Posts: 1156



View Profile
« Reply #17 on: January 17, 2018, 01:40:12 pm »

ok that combine macro works perfect for RoF2 client  Grin
Logged

Hate's Most Hateful Hater
Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #18 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.
Logged

Natedog
Master
******
Posts: 830


View Profile
« Reply #19 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
Logged

Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #20 on: December 04, 2018, 04:56:01 am »

Thanks will try that when i get home later.
Logged

Sarthin
Administrator
Legend
*****
Posts: 1036

Common sense is not so common


View Profile
« Reply #21 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.
Logged

Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #22 on: December 04, 2018, 03:09:58 pm »

hmm don't work says slot is null: could not send notification to in null.  Huh
Logged

Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #23 on: December 11, 2018, 07:33:53 pm »

I Cant get this to work for me any ideas?
Logged

Sarthin
Administrator
Legend
*****
Posts: 1036

Common sense is not so common


View Profile
« Reply #24 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.
Logged

Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #25 on: December 12, 2018, 05:06:35 am »

Thanks if i cant get this to work i will take you up on that offer.
Logged

wendel
Newbie
*
Posts: 18


View Profile
« Reply #26 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?
Logged
Sarthin
Administrator
Legend
*****
Posts: 1036

Common sense is not so common


View Profile
« Reply #27 on: December 12, 2018, 10:25:34 am »

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.
« Last Edit: December 12, 2018, 10:28:22 am by Sarthin » Logged

Rakharth
Full Member
***
Posts: 141


View Profile
« Reply #28 on: December 13, 2018, 08:17:13 am »

I have tried multiple build im at a loss lol
Logged

Knorgar
Newbie
*
Posts: 11


View Profile
« Reply #29 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
Logged
Pages: 1 [2] 3
Print
Jump to:  

Recent

Stats

Members
  • Total Members: 6156
  • Latest: Rin1
Stats
  • Total Posts: 65127
  • Total Topics: 5066
  • Online Today: 331
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 1
Guests: 134
Total: 135
TinyPortal v1.0 beta 4 © Bloc