Roko's first instict was to remember how the kobolds were constantly chasing him down. Then to show off a bit of electrical power to "Get the bucko to back off"
Roko also isn't able to teleport. He may be a balloon, but he wouldn't be out of range for a kobold to throw a spear through him. And even if he was super fast, then what? He just floats endlessly into the air forever alone? Also, while all spears may not be javalins, all javalins are spears. He was hosed no matter what he did.
The necklace is not just some shiny trinket, it is one of the most important things to Roko. In like.. many layers. Cause if I'm not mistaken that is also the thing that holds the gemstone from the serpent dragons too.