viewing paste Unknown #704 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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;
   }
Viewed 883 times, submitted by Guest.