To catch the Name we can grab the link with macro event and make some String manipulation.
below the solution for make that :
Code: Select all
/varset ItemName ${ItemName.Right[${Math.Calc[${ItemName.Length} - 51]}].Left[-1]}
If you implement a finditem function in your macro, you can make some search or manipulation directly from the item EQ Link
Below my FindItem function which uses this tips, (need to be adapted for you) :
Code: Select all
Sub command-finditem
/if (${Netbots[${MasterName}].ID}) {
/declare bct_command string local bct ${MasterName}
} else {
/declare bct_command string local bcaa
}
/varset CommandParam ${CommandParam.Right[${Math.Calc[${CommandParam.Length} - 51]}].Left[-1]}
/if (${Find}) {
/docommand /${bct_command} //docommand /${echo} -Total Qty: ${Cr}${Int[${Find.Name[${CommandParam}]}]}${Cx} - ${Ct}${Me.CleanName}${Cx} - ${Cg}${CommandParam}${Cx}
} else {
/if (${FindItemCount[${CommandParam}]} || ${FindItemBankCount[${CommandParam}]}) {
/docommand /${bct_command} [+${Notice}+]Notice[+x+]: "Item found <${CommandParam}> Total([+r+]${Int[${Math.Calc[${FindItemCount[${CommandParam}]}+${FindItemBankCount[${CommandParam}]}]}]}[+x+]) in Bag(${If[${ChatIn.Equal[bct]} && ${FindItemCount[${CommandParam}]},[+g+],]}${FindItemCount[${CommandParam}]}[+x+]), in Bank(${If[${ChatIn.Equal[bct]} && ${FindItemBankCount[${CommandParam}]},[+g+],]}${FindItemBankCount[${CommandParam}]}[+x+])"
} else {
/docommand /${bct_command} [+${Warning}+]Warning[+x+]: "Item containing the name <${CommandParam}>" not found
}
}
/return
Below the 2 captures (the command and the result)