refactored the behaviour tree to vanilla javascript, now it all works. npcs now work on server side holy shit that is awesome
added in more javascript bridge methods