Script Function: Q4BG

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4BG(obj killer, obj victim)
 {
   int Q51M = Q4S2(killer);
   int Q67R = Q4S2(victim);
   if (!isPlayer(killer))
   {
     return (0x00);
   }
   if (!isPlayer(victim))
   {
     return (0x00);
   }
   if (Q51M < Q67R)
   {
     if (0x00)
     {
       bark(victim, "Killer's killcount lower than victim's");
     }
     systemMessage(victim, "You cannot report this death because the person who killed you has slain less people than you have.");
     return (0x00);
   }
   if (getNotorietyLevel(victim) < (0x00 - 0x01))
   {
     if (0x00)
     {
       bark(victim, "Victim's notoriety too low to report.");
     }
     systemMessage(victim, "You cannot report this death to Lord British's guards because your notoriety is too low.");
     return (0x00);
   }
   if (isCriminal(victim))
   {
     if (0x00)
     {
       bark(victim, "Victim flagged criminal");
     }
     systemMessage(victim, "You cannot report this death to Lord British's guards because you are flagged as a criminal because of your recent deeds.");
     return (0x00);
   }
   if (!hasObjVar(victim, "lastCriminal"))
   {
     if (0x00)
     {
       bark(victim, "Victim doesn't have lastCriminal attached");
     }
     return (0x00);
   }
   obj Q52F = getObjVar(victim, "lastCriminal");
   if (Q52F != killer)
   {
     if (0x00)
     {
       bark(victim, "Victim's last criminal doesn't match killer");
     }
     return (0x00);
   }
   return (0x01);
 }