I added head icons client-side for re-factored with this tut:
http://www.rune-server.org/showthread.php?t=156658

All the head icons correspond to the prayer, except that when I click the prayer once more to turn it off, it shows the melee protect head icon.

This happens with each prayer that has a head icon, so it has to be something simple. I just don't know though?

Here's the code from my player class:

Code:
	public int prayerId = 0;
	public int headIcon = -1;
	public int skullIcon = -1;
	public long stopPrayerDelay, prayerDelay;
	public boolean usingPrayer;
	public final int[] PRAYER_DRAIN_RATE = 		{2750,2750,2750,4250,4250,4250,3750,3750,3750,4750,4750,4750,5750,5750,5750,6250,6250,6250};
	public final int[] PRAYER_LEVEL_REQUIRED = 	{1,4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52};
	public final int[] PRAYER = 				{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
	public final String[] PRAYER_NAME = 		{"Thick Skin", "Burst of Strength", "Clarity of Thought", "Rock Skin", "Superhuman Strength", "Improved Reflexes","Rapid Restore", "Rapid Heal", "Protect Item", "Steel Skin", "Ultimate Strength", "Incredible Reflexes","Protect from Magic", "Protect from Missiles", "Protect from Melee", "Retribution", "Redemption", "Smite"};
	public final int[] PRAYER_GLOW =  			{83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100};
	public final int[] PRAYER_HEAD_ICONS = 		{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,1,0,3,5,4};