You have to save last altar prayed at.
Code:
case 411:
if(c.altarPrayed == 0) {
c.altarPrayed = 1;
c.setSidebarInterface(5, 22500);
c.startAnimation(645);
c.sendMessage("You sense a surge of power flow through your body!");
c.getCombat().resetPrayers();
} else {
c.altarPrayed = 0;
c.setSidebarInterface(5, 5608);
c.startAnimation(645);
c.sendMessage("You sense a surge of purity flow through your body!");
c.getCurse().resetCurse();
}
If I'm not mistaken, you're missing what's in red and what's in red is what saves the last altar prayed at. I had the same problem. If you're still encountering this problem, I'll lead you though the whole tutorial.