Script Function: Q4BG

From Ultima Online: The Second Age
Revision as of 17:38, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4BG(<span style="color:#0000FF">obj</span> killer, <span style="color:#0000FF">obj</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
 }