OnPCDieEvent: if (!$@MapFlagStatus) end; query_sql("SELECT 'char_id' FROM 'char' WHERE 'account_id'="+killerrid+"",.@c); if(.@c > 0){ dispbottom "You have been killed by "+rid2name(killerrid)+"."; callfunc "PenaltyBaseExp",2; // 2% } else { //NO result, then its a mob callfunc "PenaltyBaseExp",1; // 1% } } function script PenaltyBaseExp { if (BaseExp) { set BaseExp, BaseExp - (BaseExp / 100 * getarg(0)); announce "~ Nightmare Penalty: -" + getarg(0) + "% Base Exp", bc_self, 0xEAC8E7; }