okay, so let start with those sleep timers, doing a sleep thats random between 300ms and 600ms is pointless, the idea of using if statements to check if a action is completed is so you can use conditional sleeps so the script can flow nicely, static sleep should only be used in very niche places.
first sleep should be condition bank.isOpen()
second should be inventory.contains("Knife")
third should be inventory.isEmptyExcept("Knife, "Arrow shafts")
fourth should be inventory.contains(getLogType())
watch it run how you have it, then do the change to that ^ and just watch how different the script will act