You can remove all your mouse/coords related code and replace it with something like this. It sets the '#' button as the INTERACTTARGET keybinding so you can talk to the Innkeeper regardless of the number of players crowding around it. The /target will obviously only work if the Innkeeper has "Innkeeper" in their name. And since the Treat Bag is a usable item you can open it with "/use Treat Bag" assuming you have Auto-Loot enabled.
Code:
Send('/run SetBinding("{#}","INTERACTTARGET"){ENTER}')
Sleep(1000)
Send("/target Innkeeper{ENTER}")
Sleep(1000)
Send("{#}")
Sleep(1000)
Send("/run SelectGossipOption(1){ENTER}")
Sleep(5000)
Send("/use Treat Bag{ENTER}")
Sleep(5000)
twocents