The goblins hand the treasures over to the wizard Niak, who reveals his true nature and throws them in the prison.

How to Clear Gobliiins Level 8
Switch to Hooter/Ignatius and change the cursor into a fist, then
click on the small skeleton that is standing on the wooden walkway.
It will walk to the side and drop a bone behind it.
Click on the bone to use magic on it, and it will turn into a flute.
Switch to Dwayne/Oups and change the cursor into an open hand, and
click the flute. Then change the cursor to an arrow and click the ground
below the ladder to make him go down the ladder.
Then change the cursor into a fist, and click the snake. It
will stretch upward.
Switch to Bobo/Asgard, change the cursor to an arrow,
and click near the base of the snake,
then click the body of the snake to climb up. Ignore the switch on the wall.
Instead, change the cursor to a fist and click on the pile of rocks in the
upper-right part of the screen, and watch as a boulder hits a loose wooden
board in the right side of the walkway.
Switch to
Dwayne/Oups and have him stand on the left side
of that loose wooden board, then switch back to
Bobo/Asgard
and have him punch the pile of boulders again. Do the same with
Hooter/Ignatius.
This completes the level. Click the flashing "Go" in the cave exit. Make a note of the code in the bottom-left of the screen ( ), then click anywhere to continue to the next level, The Mad Dog, Part 1.