Code:
public void giveLife()
{
c.isDead = false;
c.faceUpdate(-1);
c.freezeTimer = 0;
if (c.playerRights < 6)
{
if (!c.isInWilderness)
{
if (!c.isSkulled)
{
if ((c.prayerActive[10] || c.curseActive[0]) && System.currentTimeMillis() - c.lastProtItem > 1000)
{
c.getItems().keepItem(0, true);
}
else
{
i = 0;
}
else
if ((c.prayerActive[10] || c.curseActive[0]) && System.currentTimeMillis() - c.lastProtItem > 1000)
{
for (int i = 0, i < 4, i++)
c.getItems().keepItem(i, true);
}
else
{
for (int i = 0, i < 3, i++)
c.getItems().keepItem(i, true);
}
if (i > 0)
{
c.getItems().dropAllItems();
c.getItems().addItem(c.itemKeptId[i], 1);
}
}
else
{
c.getItems().keepAllItems();
//I AM NOT SURE IF THE ABOVE LINE EXISTS AS A METHOD.
}
}
}
}
Don't know if this will work or not. This is what I think it will do.
Basically, if the player is lower than permission level 6 then it will check if they are in the wilderness. If they are, and if they are skulled, it will check if their protection prayer was on. If it was on, then it will protect 1 item otherwise it will drop all items. If they aren't skulled, it will check if their protection prayers are on and if one is then it will protect four items and if it is not, it will protect three items. At the end it will clear all items regardless of what it was and add in the items at the very end.