Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
hit_with = puncher:get_wielded_item()
hit_with_name = hit_with:get_name()
hit_with_count = hit_with:get_count()
if hit_with_name == "moreores:copper_ingot" then
hit_with_count = hit_with:get_count()
total_amount = hit_with_count
puncher:get_inventory():remove_item("main", hit_with)
puncher:get_inventory():add_item("main", "money:coin_gold hit_with:get_count()")
I'm trying to get my Automated Trader to count stacks of items. Sadly, this doesn't produce pay equal to the stack I feed into it. How can I get this to work?