Help identifying inventory index for RODEX add command
Would appreciate any help. What I'm trying to do is if I immediately loot a bow, the automacro triggers and opens mail and sends it over to my Smith to upgrade. Overall it's working fine aside from the fact that in order to use "rodex add" command correctly, it has the be the inventory index number. Which means I can't specifically add just "Composite Bow [4]. Now if I add for example do rodex add 8, it's possible that it sends a different item instead of the bow. How can I get it to input the number in which the bow is at once I pick it up?
automacro MailBow {
inventory "Composite Bow [4]" >= 1
call {
do rodex open
do rodex write name
do rodex settarget name
do rodex settitle abcdefg
do rodex setbody abcdefg
do rodex add ###Composite Bow [4] has to be indexed number in inventory (i) command###
do rodex send
do reload macros.txt
}
run-once 1
}
Tried to use $list. It says it's adding it but it doesn't actually so it goes on a loop.
use @inventory(Composite Bow [4])
like this:
automacro MailBow {
inventory "Composite Bow [4]" >= 1
call {
do rodex open
do rodex write name
do rodex settarget name
do rodex settitle abcdefg
do rodex setbody abcdefg
do rodex add @inventory(Composite Bow [4])
do rodex send
do reload macros.txt
}
run-once 1
}
this command gets the current index of the item
Hi @Nipodemos. Thanks for the answer. I wasn't able to add the code in to my previous comment. I forgot to mention that I've used
$list = @inventory(Composite Bow [4])
do rodex add $list
and only the @inventory to show like your code above.
@inventory(Composite Bow [4])
Like my previous comment states, it does say it attaches. But it doesn't actually "send" the item. It stays in my inventory, my Smith gets an empty mail and it keeps looping back since it sees I still have the bow with me. I don't even get any errors or get disconnected. Just those lines below and then loops to send it again.
Adding amount of item Composite Bow [4] (10) to rodex mail. Sending rodex mail. You lost 2,500 zeny.
EDIT:
Figured it out.. The amount of item needs to be specified just like how it is on shop.txt edit:Figured it out.. The amount of item needs to be specified just like how it is on shop.txt**
It has to be
do rodex add @inventory(Composite Bow [4]) 1