Here you go. I didn't test it yet:
function onDeath(cid, corpse, deathList)
if getPlayerStorageValue(cid, 348129) == 29 then
doAddPlayerBanishment(account, PLAYERBAN_BANISHMENT, 24 * 3600, 23, ACTION_BANISHMENT, "You have ben banned for dying 30 times", getPlayerGUID(cid), 1)...