Difference between revisions of "Script: Globals"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span id="isOnAnyMulti" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> isOnAnyMulti(<span style="color:#0000FF">obj</span> Q68S) { <span sty...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
  <span id="isOnAnyMulti" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> isOnAnyMulti(<span style="color:#0000FF">obj</span> Q68S)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> isOnAnyMulti(<span style="color:#0000FF">obj</span> Q68S)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q68S)) != [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]());
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q68S)) != [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]());
 
  }
 
  }
  
  <span id="Q4ZQ" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZQ(<span style="color:#0000FF">loc</span> where)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZQ(<span style="color:#0000FF">loc</span> where)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]](where) != [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]());
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]](where) != [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]());
 
  }
 
  }
  
  <span id="Q4ZR" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZR(<span style="color:#0000FF">obj</span> Q44K, <span style="color:#0000FF">obj</span> Q44L)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZR(<span style="color:#0000FF">obj</span> Q44K, <span style="color:#0000FF">obj</span> Q44L)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q44K)) == [[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q44L)));
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q44K)) == [[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q44L)));
 
  }
 
  }
  
  <span id="Q4ZZ" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZZ(<span style="color:#0000FF">obj</span> Q44K, <span style="color:#0000FF">loc</span> Q4G3)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZZ(<span style="color:#0000FF">obj</span> Q44K, <span style="color:#0000FF">loc</span> Q4G3)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q44K)) == [[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]](Q4G3));
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q44K)) == [[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]](Q4G3));
 
  }
 
  }
  
  <span id="Q4ZS" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZS(<span style="color:#0000FF">obj</span> Q68S, <span style="color:#0000FF">obj</span> multi)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZS(<span style="color:#0000FF">obj</span> Q68S, <span style="color:#0000FF">obj</span> multi)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q68S)) == multi);
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q68S)) == multi);
 
  }
 
  }
  
  <span id="Q4SA" style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4SA(<span style="color:#0000FF">loc</span> Q4G3)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4SA(<span style="color:#0000FF">loc</span> Q4G3)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]](Q4G3));
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]](Q4G3));
 
  }
 
  }
  
  <span id="Q4S9" style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4S9(<span style="color:#0000FF">obj</span> it)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4S9(<span style="color:#0000FF">obj</span> it)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](it)));
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_isAnyMultiBelow|<span style="color:#FF0000;font-weight:bold">isAnyMultiBelow</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](it)));
 
  }
 
  }
  
  <span id="Q4BL" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4BL(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">string</span> Q5H3, <span style="color:#0000FF">int</span> Q480)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4BL(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">string</span> Q5H3, <span style="color:#0000FF">int</span> Q480)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> (Q480)
 
   <span style="color:#0000FF">if</span> (Q480)
Line 47: Line 47:
 
  }
 
  }
  
  <span id="Q4BD" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4BD(<span style="color:#0000FF">obj</span> pet, <span style="color:#0000FF">obj</span> boss)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4BD(<span style="color:#0000FF">obj</span> pet, <span style="color:#0000FF">obj</span> boss)
 
  {
 
  {
 
   <span style="color:#0000FF">list</span> Q48U;
 
   <span style="color:#0000FF">list</span> Q48U;
Line 58: Line 58:
 
  }
 
  }
  
  <span id="Q41R" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q41R(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> usedon)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q41R(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> usedon)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> (usedon == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]())
 
   <span style="color:#0000FF">if</span> (usedon == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]())
Line 112: Line 112:
 
  }
 
  }
  
  <span id="Q426" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q426(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> usedon, <span style="color:#0000FF">int</span> Q65M, <span style="color:#0000FF">string</span> desc)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q426(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> usedon, <span style="color:#0000FF">int</span> Q65M, <span style="color:#0000FF">string</span> desc)
 
  {
 
  {
 
   [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](usedon, <span style="color:#800000">"resurrectLocation"</span>, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](usedon));
 
   [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](usedon, <span style="color:#800000">"resurrectLocation"</span>, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](usedon));
Line 122: Line 122:
 
  }
 
  }
  
  <span id="Q4SM" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4SM(<span style="color:#0000FF">obj</span> Q68S)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4SM(<span style="color:#0000FF">obj</span> Q68S)
 
  {
 
  {
 
   <span style="color:#0000FF">int</span> Q5NC;
 
   <span style="color:#0000FF">int</span> Q5NC;
Line 136: Line 136:
 
  }
 
  }
  
  <span id="Q4SN" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4SN(<span style="color:#0000FF">obj</span> Q68S)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4SN(<span style="color:#0000FF">obj</span> Q68S)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_getNotorietyLevelByNot|<span style="color:#FF0000;font-weight:bold">getNotorietyLevelByNot</span>]]([[Script_Function:_Q4SM|<span style="color:#2B91AF">Q4SM</span>]](Q68S)));
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_getNotorietyLevelByNot|<span style="color:#FF0000;font-weight:bold">getNotorietyLevelByNot</span>]]([[Script_Function:_Q4SM|<span style="color:#2B91AF">Q4SM</span>]](Q68S)));
 
  }
 
  }
  
  <span id="Q5MA" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5MA(<span style="color:#0000FF">list</span> Q5AG)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5MA(<span style="color:#0000FF">list</span> Q5AG)
 
  {
 
  {
 
   <span style="color:#0000FF">int</span> Q4NB = 0x00;
 
   <span style="color:#0000FF">int</span> Q4NB = 0x00;
Line 164: Line 164:
 
  }
 
  }
  
  <span id="Q662" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q662(<span style="color:#0000FF">obj</span> Q61K, <span style="color:#0000FF">int</span> Q5MG)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q662(<span style="color:#0000FF">obj</span> Q61K, <span style="color:#0000FF">int</span> Q5MG)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isInvisible|<span style="color:#FF0000;font-weight:bold">isInvisible</span>]](Q61K))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isInvisible|<span style="color:#FF0000;font-weight:bold">isInvisible</span>]](Q61K))
Line 172: Line 172:
 
   <span style="color:#0000FF">if</span> (Q5MG)
 
   <span style="color:#0000FF">if</span> (Q5MG)
 
   {
 
   {
     <span style="color:#0000FF">if</span> ([[Engine Function:_hasScript|<span style="color:#FF0000;font-weight:bold">hasScript</span>]](Q61K, <span style="color:#800000">"[[hide|<span style="color:#2B91AF">hide</span>]]sk"</span>))
+
     <span style="color:#0000FF">if</span> ([[Engine Function:_hasScript|<span style="color:#FF0000;font-weight:bold">hasScript</span>]](Q61K, <span style="color:#800000">"hidesk"</span>))
 
     {
 
     {
       [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](Q61K, <span style="color:#800000">"[[hide|<span style="color:#2B91AF">hide</span>]]sk"</span>);
+
       [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](Q61K, <span style="color:#800000">"hidesk"</span>);
 
     }
 
     }
 
   }
 
   }
Line 180: Line 180:
 
  }
 
  }
  
  <span id="Q661" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q661(<span style="color:#0000FF">obj</span> Q61K)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q661(<span style="color:#0000FF">obj</span> Q61K)
 
  {
 
  {
 
   [[Script_Function:_Q662|<span style="color:#2B91AF">Q662</span>]](Q61K, 0x01);
 
   [[Script_Function:_Q662|<span style="color:#2B91AF">Q662</span>]](Q61K, 0x01);
Line 186: Line 186:
 
  }
 
  }
  
  <span id="hide" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> hide(<span style="color:#0000FF">obj</span> Q61K)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> hide(<span style="color:#0000FF">obj</span> Q61K)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> (![[Engine Function:_isInvisible|<span style="color:#FF0000;font-weight:bold">isInvisible</span>]](Q61K))
 
   <span style="color:#0000FF">if</span> (![[Engine Function:_isInvisible|<span style="color:#FF0000;font-weight:bold">isInvisible</span>]](Q61K))
Line 195: Line 195:
 
  }
 
  }
  
  <span id="Q5RC" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5RC(<span style="color:#0000FF">obj</span> Q4P2, <span style="color:#0000FF">obj</span> caster)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5RC(<span style="color:#0000FF">obj</span> Q4P2, <span style="color:#0000FF">obj</span> caster)
 
  {
 
  {
 
   [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q4P2, <span style="color:#800000">"caster"</span>, caster);
 
   [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q4P2, <span style="color:#800000">"caster"</span>, caster);
Line 201: Line 201:
 
  }
 
  }
  
  <span id="Q4RM" style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4RM(<span style="color:#0000FF">obj</span> Q4P2)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">obj</span> Q4RM(<span style="color:#0000FF">obj</span> Q4P2)
 
  {
 
  {
 
   <span style="color:#0000FF">obj</span> Q68S = [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]();
 
   <span style="color:#0000FF">obj</span> Q68S = [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]();
Line 211: Line 211:
 
  }
 
  }
  
  <span id="Q5ZJ" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5ZJ(<span style="color:#0000FF">obj</span> Q68S, <span style="color:#0000FF">int</span> skill, <span style="color:#0000FF">int</span> Q4IA, <span style="color:#0000FF">int</span> Q46N)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5ZJ(<span style="color:#0000FF">obj</span> Q68S, <span style="color:#0000FF">int</span> skill, <span style="color:#0000FF">int</span> Q4IA, <span style="color:#0000FF">int</span> Q46N)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_getSkillSuccessChance|<span style="color:#FF0000;font-weight:bold">getSkillSuccessChance</span>]](Q68S, skill, Q4IA, Q46N) - [[Engine Function:_random|<span style="color:#FF0000;font-weight:bold">random</span>]](0x00, 0x03E7));
 
   <span style="color:#0000FF">return</span> ([[Engine Function:_getSkillSuccessChance|<span style="color:#FF0000;font-weight:bold">getSkillSuccessChance</span>]](Q68S, skill, Q4IA, Q46N) - [[Engine Function:_random|<span style="color:#FF0000;font-weight:bold">random</span>]](0x00, 0x03E7));
 
  }
 
  }
  
  <span id="Q4MN" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4MN(<span style="color:#0000FF">obj</span> Q68D, <span style="color:#0000FF">loc</span> where)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4MN(<span style="color:#0000FF">obj</span> Q68D, <span style="color:#0000FF">loc</span> where)
 
  {
 
  {
 
   [[Engine Function:_attachScript|<span style="color:#FF0000;font-weight:bold">attachScript</span>]](Q68D, <span style="color:#800000">"teleobj"</span>);
 
   [[Engine Function:_attachScript|<span style="color:#FF0000;font-weight:bold">attachScript</span>]](Q68D, <span style="color:#800000">"teleobj"</span>);
Line 225: Line 225:
 
  }
 
  }
  
  <span id="Q581" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q581(<span style="color:#0000FF">obj</span> it, <span style="color:#0000FF">int</span> Q5DU, <span style="color:#0000FF">int</span> Q5DV, <span style="color:#0000FF">int</span> Q5DW, <span style="color:#0000FF">int</span> Q5DX)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q581(<span style="color:#0000FF">obj</span> it, <span style="color:#0000FF">int</span> Q5DU, <span style="color:#0000FF">int</span> Q5DV, <span style="color:#0000FF">int</span> Q5DW, <span style="color:#0000FF">int</span> Q5DX)
 
  {
 
  {
 
   <span style="color:#0000FF">int</span> Q5AX;
 
   <span style="color:#0000FF">int</span> Q5AX;
Line 240: Line 240:
 
  }
 
  }
  
  <span id="Q56V" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q56V(<span style="color:#0000FF">obj</span> recipient, <span style="color:#0000FF">string</span> Q56R, <span style="color:#0000FF">list</span> args)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q56V(<span style="color:#0000FF">obj</span> recipient, <span style="color:#0000FF">string</span> Q56R, <span style="color:#0000FF">list</span> args)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](recipient))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](recipient))
Line 252: Line 252:
 
   [[Engine Function:_prependToList|<span style="color:#FF0000;font-weight:bold">prependToList</span>]](args, Q56R);
 
   [[Engine Function:_prependToList|<span style="color:#FF0000;font-weight:bold">prependToList</span>]](args, Q56R);
 
   [[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]](Q4DT, <span style="color:#800000">"addMessage"</span>, args);
 
   [[Engine Function:_message|<span style="color:#FF0000;font-weight:bold">message</span>]](Q4DT, <span style="color:#800000">"addMessage"</span>, args);
   <span style="color:#0000FF">int</span> Q4Q1 = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q4DT, [[Engine Function:_getRelayLoc|<span style="color:#FF0000;font-weight:bold">getRelayLoc</span>]](recipient));
+
   <span style="color:#0000FF">int</span> Q4Q1 = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q4DT, [[Engine Function:_getRelayLoc|<span style="color:#FF0000;font-weight:bold">getRelayLoc</span>]](recipient));
 
   [[Engine Function:_clearList|<span style="color:#FF0000;font-weight:bold">clearList</span>]](args);
 
   [[Engine Function:_clearList|<span style="color:#FF0000;font-weight:bold">clearList</span>]](args);
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](Q4DT))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](Q4DT))
Line 261: Line 261:
 
  }
 
  }
  
  <span id="isHumanBodyType" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> isHumanBodyType(<span style="color:#0000FF">int</span> Q65M)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> isHumanBodyType(<span style="color:#0000FF">int</span> Q65M)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ((Q65M == 0x0190) || (Q65M == 0x0191));
 
   <span style="color:#0000FF">return</span> ((Q65M == 0x0190) || (Q65M == 0x0191));
 
  }
 
  }
  
  <span id="Q4ZB" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZB(<span style="color:#0000FF">obj</span> it)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4ZB(<span style="color:#0000FF">obj</span> it)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isCorpse|<span style="color:#FF0000;font-weight:bold">isCorpse</span>]](it))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isCorpse|<span style="color:#FF0000;font-weight:bold">isCorpse</span>]](it))
 
   {
 
   {
 
     <span style="color:#0000FF">int</span> Q65M = [[Engine Function:_getCorpseBodyType|<span style="color:#FF0000;font-weight:bold">getCorpseBodyType</span>]](it);
 
     <span style="color:#0000FF">int</span> Q65M = [[Engine Function:_getCorpseBodyType|<span style="color:#FF0000;font-weight:bold">getCorpseBodyType</span>]](it);
     <span style="color:#0000FF">if</span> ([[isHumanBodyType|<span style="color:#2B91AF">isHumanBodyType</span>]](Q65M))
+
     <span style="color:#0000FF">if</span> ([[Script_Function:_isHumanBodyType|<span style="color:#2B91AF">isHumanBodyType</span>]](Q65M))
 
     {
 
     {
 
       <span style="color:#0000FF">return</span> (0x01);
 
       <span style="color:#0000FF">return</span> (0x01);
Line 279: Line 279:
 
  }
 
  }
  
  <span id="Q50D" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q50D(<span style="color:#0000FF">obj</span> victim)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q50D(<span style="color:#0000FF">obj</span> victim)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> (![[Engine Function:_isMobile|<span style="color:#FF0000;font-weight:bold">isMobile</span>]](victim))
 
   <span style="color:#0000FF">if</span> (![[Engine Function:_isMobile|<span style="color:#FF0000;font-weight:bold">isMobile</span>]](victim))
Line 302: Line 302:
 
  }
 
  }
  
  <span id="Q4HU" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4HU(<span style="color:#0000FF">obj</span> corpse)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4HU(<span style="color:#0000FF">obj</span> corpse)
 
  {
 
  {
 
   <span style="color:#0000FF">list</span> Q4E4;
 
   <span style="color:#0000FF">list</span> Q4E4;
Line 316: Line 316:
 
     <span style="color:#0000FF">else</span>
 
     <span style="color:#0000FF">else</span>
 
     {
 
     {
       <span style="color:#0000FF">int</span> Q5NC = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q61K, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](corpse));
+
       <span style="color:#0000FF">int</span> Q5NC = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q61K, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](corpse));
 
     }
 
     }
 
   }
 
   }
Line 323: Line 323:
 
  }
 
  }
  
  <span id="Q42E" style="color:#0000FF">function</span> <span style="color:#0000FF">loc</span> Q42E(<span style="color:#0000FF">loc</span> where)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">loc</span> Q42E(<span style="color:#0000FF">loc</span> where)
 
  {
 
  {
 
   <span style="color:#0000FF">loc</span> Q5HP;
 
   <span style="color:#0000FF">loc</span> Q5HP;
Line 342: Line 342:
 
  }
 
  }
  
  <span id="Q41Y" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q41Y(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">int</span> Q4KF, <span style="color:#0000FF">loc</span> Q5HP)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q41Y(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">int</span> Q4KF, <span style="color:#0000FF">loc</span> Q5HP)
 
  {
 
  {
 
   <span style="color:#0000FF">list</span> Q4AB = 0x0A26, 0x0A27, 0x0A28, 0x0A29, 0x142F, 0x1433, 0x1437, 0x1853, 0x1857, 0x1C16;
 
   <span style="color:#0000FF">list</span> Q4AB = 0x0A26, 0x0A27, 0x0A28, 0x0A29, 0x142F, 0x1433, 0x1437, 0x1853, 0x1857, 0x1C16;
Line 368: Line 368:
 
  }
 
  }
  
  <span id="Q48E" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q48E(<span style="color:#0000FF">obj</span> Q61K)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q48E(<span style="color:#0000FF">obj</span> Q61K)
 
  {
 
  {
 
   [[Script_Function:_Q662|<span style="color:#2B91AF">Q662</span>]](Q61K, 0x00);
 
   [[Script_Function:_Q662|<span style="color:#2B91AF">Q662</span>]](Q61K, 0x00);
Line 376: Line 376:
 
  }
 
  }
  
  <span id="Q5RE" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5RE(<span style="color:#0000FF">obj</span> it, <span style="color:#0000FF">string</span> desc)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5RE(<span style="color:#0000FF">obj</span> it, <span style="color:#0000FF">string</span> desc)
 
  {
 
  {
 
   [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](it, <span style="color:#800000">"lookAtText"</span>, desc);
 
   [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](it, <span style="color:#800000">"lookAtText"</span>, desc);
Line 382: Line 382:
 
  }
 
  }
  
  <span id="Q5QJ" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5QJ(<span style="color:#0000FF">obj</span> it)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5QJ(<span style="color:#0000FF">obj</span> it)
 
  {
 
  {
 
   <span style="color:#0000FF">obj</span> container = [[Engine Function:_containedBy|<span style="color:#FF0000;font-weight:bold">containedBy</span>]](it);
 
   <span style="color:#0000FF">obj</span> container = [[Engine Function:_containedBy|<span style="color:#FF0000;font-weight:bold">containedBy</span>]](it);
Line 397: Line 397:
 
  }
 
  }
  
  <span id="Q50B" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q50B(<span style="color:#0000FF">loc</span> where)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q50B(<span style="color:#0000FF">loc</span> where)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> (([[Engine Function:_getX|<span style="color:#FF0000;font-weight:bold">getX</span>]](where) >= 0x1400) && ([[Engine Function:_getY|<span style="color:#FF0000;font-weight:bold">getY</span>]](where) >= 0x0900) && ([[Engine Function:_getX|<span style="color:#FF0000;font-weight:bold">getX</span>]](where) <= 0x17FF) && ([[Engine Function:_getY|<span style="color:#FF0000;font-weight:bold">getY</span>]](where) <= 0x0FFF));
 
   <span style="color:#0000FF">return</span> (([[Engine Function:_getX|<span style="color:#FF0000;font-weight:bold">getX</span>]](where) >= 0x1400) && ([[Engine Function:_getY|<span style="color:#FF0000;font-weight:bold">getY</span>]](where) >= 0x0900) && ([[Engine Function:_getX|<span style="color:#FF0000;font-weight:bold">getX</span>]](where) <= 0x17FF) && ([[Engine Function:_getY|<span style="color:#FF0000;font-weight:bold">getY</span>]](where) <= 0x0FFF));
 
  }
 
  }
  
  <span id="Q4YW" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4YW(<span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4YW(<span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](Q5U8) && (![[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](dest)));
 
   <span style="color:#0000FF">return</span> ([[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](Q5U8) && (![[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](dest)));
 
  }
 
  }
  
  <span id="Q4YX" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4YX(<span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4YX(<span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ((![[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](Q5U8)) && [[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](dest));
 
   <span style="color:#0000FF">return</span> ((![[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](Q5U8)) && [[Script_Function:_Q50B|<span style="color:#2B91AF">Q50B</span>]](dest));
 
  }
 
  }
  
  <span id="Q4YV" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4YV(<span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4YV(<span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
 
  {
 
  {
 
   <span style="color:#0000FF">return</span> ([[Script_Function:_Q4YX|<span style="color:#2B91AF">Q4YX</span>]](Q5U8, dest) || [[Script_Function:_Q4YW|<span style="color:#2B91AF">Q4YW</span>]](Q5U8, dest));
 
   <span style="color:#0000FF">return</span> ([[Script_Function:_Q4YX|<span style="color:#2B91AF">Q4YX</span>]](Q5U8, dest) || [[Script_Function:_Q4YW|<span style="color:#2B91AF">Q4YW</span>]](Q5U8, dest));
 
  }
 
  }
  
  <span id="Q50C" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q50C(<span style="color:#0000FF">obj</span> it)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q50C(<span style="color:#0000FF">obj</span> it)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isNPC|<span style="color:#FF0000;font-weight:bold">isNPC</span>]](it))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isNPC|<span style="color:#FF0000;font-weight:bold">isNPC</span>]](it))
Line 447: Line 447:
 
  }
 
  }
  
  <span id="Q4A7" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4A7(<span style="color:#0000FF">obj</span> Q68D, <span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4A7(<span style="color:#0000FF">obj</span> Q68D, <span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isPlayer|<span style="color:#FF0000;font-weight:bold">isPlayer</span>]](Q68D))
 
   <span style="color:#0000FF">if</span> ([[Engine Function:_isPlayer|<span style="color:#FF0000;font-weight:bold">isPlayer</span>]](Q68D))
Line 491: Line 491:
 
  }
 
  }
  
  <span id="Q5Z1" style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5Z1(<span style="color:#0000FF">obj</span> Q68D, <span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest, <span style="color:#0000FF">string</span> Q4HF)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5Z1(<span style="color:#0000FF">obj</span> Q68D, <span style="color:#0000FF">loc</span> Q5U8, <span style="color:#0000FF">loc</span> dest, <span style="color:#0000FF">string</span> Q4HF)
 
  {
 
  {
 
   <span style="color:#0000FF">if</span> (![[Script_Function:_Q4A7|<span style="color:#2B91AF">Q4A7</span>]](Q68D, Q5U8, dest))
 
   <span style="color:#0000FF">if</span> (![[Script_Function:_Q4A7|<span style="color:#2B91AF">Q4A7</span>]](Q68D, Q5U8, dest))
Line 504: Line 504:
 
  }
 
  }
  
  <span id="Q5Z2" style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5Z2(<span style="color:#0000FF">obj</span> boss, <span style="color:#0000FF">loc</span> destination)
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5Z2(<span style="color:#0000FF">obj</span> boss, <span style="color:#0000FF">loc</span> destination)
 
  {
 
  {
 
   <span style="color:#0000FF">list</span> Q57T;
 
   <span style="color:#0000FF">list</span> Q57T;
Line 540: Line 540:
 
       <span style="color:#0000FF">if</span> ([[Script_Function:_Q5Z1|<span style="color:#2B91AF">Q5Z1</span>]](it, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](it), destination, <span style="color:#800000">"teleport there"</span>))
 
       <span style="color:#0000FF">if</span> ([[Script_Function:_Q5Z1|<span style="color:#2B91AF">Q5Z1</span>]](it, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](it), destination, <span style="color:#800000">"teleport there"</span>))
 
       {
 
       {
         <span style="color:#0000FF">int</span> r = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](it, destination);
+
         <span style="color:#0000FF">int</span> r = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](it, destination);
 
       }
 
       }
 
     }
 
     }

Latest revision as of 09:43, 21 October 2018

function int isOnAnyMulti(obj Q68S)
{
  return (isAnyMultiBelow(getLocation(Q68S)) != NULL());
}
function int Q4ZQ(loc where)
{
  return (isAnyMultiBelow(where) != NULL());
}
function int Q4ZR(obj Q44K, obj Q44L)
{
  return (isAnyMultiBelow(getLocation(Q44K)) == isAnyMultiBelow(getLocation(Q44L)));
}
function int Q4ZZ(obj Q44K, loc Q4G3)
{
  return (isAnyMultiBelow(getLocation(Q44K)) == isAnyMultiBelow(Q4G3));
}
function int Q4ZS(obj Q68S, obj multi)
{
  return (isAnyMultiBelow(getLocation(Q68S)) == multi);
}
function obj Q4SA(loc Q4G3)
{
  return (isAnyMultiBelow(Q4G3));
}
function obj Q4S9(obj it)
{
  return (isAnyMultiBelow(getLocation(it)));
}
function int Q4BL(obj user, string Q5H3, int Q480)
{
  if (Q480)
  {
    string Q5CR;
    Q5CR = Q5H3;
    concat(Q5CR, " has been temporarily disabled.");
    systemMessage(user, Q5CR);
    return (0x01);
  }
  return (0x00);
}
function int Q4BD(obj pet, obj boss)
{
  list Q48U;
  if (!hasObjListVar(pet, "myBoss"))
  {
    return (0x00);
  }
  getObjListVar(Q48U, pet, "myBoss");
  return (isInList(Q48U, boss));
}
function int Q41R(obj user, obj usedon)
{
  if (usedon == NULL())
  {
    return (0x00);
  }
  if (user == usedon)
  {
    systemMessage(user, "Thou can not resurrect thyself.");
    return (0x00);
  }
  if (isDead(user))
  {
    systemMessage(user, "The resurrecter must be alive.");
    return (0x00);
  }
  if (canSeeObj(user, usedon) == 0x01)
  {
    if (isPlayer(usedon))
    {
      if (!isDead(usedon))
      {
        systemMessage(user, "Target is not dead.");
        return (0x00);
      }
      loc target = getLocation(usedon);
      int Q4XW = getHeight(usedon);
      if (0x07 != canExistAt(target, Q4XW, 0x01))
      {
        systemMessage(user, "Target can not be resurrected at that location.");
        return (0x00);
      }
      loc Q671 = getLocation(user);
      if ((getDistanceInTiles(Q671, target) > 0x01) || (!Q4ZR(user, usedon)))
      {
        systemMessage(user, "Target is not close enough.");
        return (0x00);
      }
      return (0x01);
    }
    else
    {
      systemMessage(user, "Target is not a being.");
      return (0x00);
    }
  }
  else
  {
    systemMessage(user, "Target cannot be seen.");
    return (0x00);
  }
  return (0x00);
}
function void Q426(obj user, obj usedon, int Q65M, string desc)
{
  setObjVar(usedon, "resurrectLocation", getLocation(usedon));
  setObjVar(usedon, "resurrectCaster", user);
  setObjVar(usedon, "resurrectType", Q65M);
  setObjVar(usedon, "resurrectDesc", desc);
  attachScript(usedon, "resmenu");
  return ();
}
function int Q4SM(obj Q68S)
{
  int Q5NC;
  if (hasObjVar(Q68S, "origNotoriety"))
  {
    Q5NC = getObjVar(Q68S, "origNotoriety");
  }
  else
  {
    Q5NC = getNotoriety(Q68S);
  }
  return (Q5NC);
}
function int Q4SN(obj Q68S)
{
  return (getNotorietyLevelByNot(Q4SM(Q68S)));
}
function int Q5MA(list Q5AG)
{
  int Q4NB = 0x00;
  list Q4EB;
  copyList(Q4EB, Q5AG);
  clearList(Q5AG);
  obj it;
  int num = numInList(Q4EB);
  for(int i = 0x00; i < num; i++)
  {
    it = Q4EB[i];
    if (isInList(Q5AG, it))
    {
      Q4NB++;
    }
    else
    {
      appendToList(Q5AG, it);
    }
  }
  return (Q4NB);
}
function void Q662(obj Q61K, int Q5MG)
{
  if (isInvisible(Q61K))
  {
    setInvisible(Q61K, 0x00);
  }
  if (Q5MG)
  {
    if (hasScript(Q61K, "hidesk"))
    {
      detachScript(Q61K, "hidesk");
    }
  }
  return ();
}
function void Q661(obj Q61K)
{
  Q662(Q61K, 0x01);
  return ();
}
function void hide(obj Q61K)
{
  if (!isInvisible(Q61K))
  {
    setInvisible(Q61K, 0x01);
  }
  return ();
}
function void Q5RC(obj Q4P2, obj caster)
{
  setObjVar(Q4P2, "caster", caster);
  return ();
}
function obj Q4RM(obj Q4P2)
{
  obj Q68S = NULL();
  if (hasObjVar(Q4P2, "caster"))
  {
    Q68S = getObjVar(Q4P2, "caster");
  }
  return (Q68S);
}
function int Q5ZJ(obj Q68S, int skill, int Q4IA, int Q46N)
{
  return (getSkillSuccessChance(Q68S, skill, Q4IA, Q46N) - random(0x00, 0x03E7));
}
function void Q4MN(obj Q68D, loc where)
{
  attachScript(Q68D, "teleobj");
  list Q5Z0;
  appendToList(Q5Z0, where);
  message(Q68D, "teleobj", Q5Z0);
  return ();
}
function void Q581(obj it, int Q5DU, int Q5DV, int Q5DW, int Q5DX)
{
  int Q5AX;
  int Q5AY;
  int Q5AZ;
  int Q5B0;
  getWeaponClass(it, Q5AX, Q5AY, Q5AZ, Q5B0);
  Q5AX = Q5AX + Q5DU;
  Q5AY = Q5AY + Q5DV;
  Q5AZ = Q5AZ + Q5DW;
  Q5B0 = Q5B0 + Q5DX;
  setWeaponClass(it, Q5AX, Q5AY, Q5AZ, Q5B0);
  return ();
}
function void Q56V(obj recipient, string Q56R, list args)
{
  if (isValid(recipient))
  {
    message(recipient, Q56R, args);
    return ();
  }
  obj Q4DT = createNoResObjectAt(0x01, getLocation(this));
  setObjVar(Q4DT, "recipient", recipient);
  attachScript(Q4DT, "comprobe");
  prependToList(args, Q56R);
  message(Q4DT, "addMessage", args);
  int Q4Q1 = teleport(Q4DT, getRelayLoc(recipient));
  clearList(args);
  if (isValid(Q4DT))
  {
    message(Q4DT, "teleported", args);
  }
  return ();
}
function int isHumanBodyType(int Q65M)
{
  return ((Q65M == 0x0190) || (Q65M == 0x0191));
}
function int Q4ZB(obj it)
{
  if (isCorpse(it))
  {
    int Q65M = getCorpseBodyType(it);
    if (isHumanBodyType(Q65M))
    {
      return (0x01);
    }
  }
  return (0x00);
}
function int Q50D(obj victim)
{
  if (!isMobile(victim))
  {
    return (0x00);
  }
  int Q5YT = getObjType(victim);
  switch (Q5YT)
  {
  case 0x18
  case 0x1A
  case 0x32
  case 0x38
  case 0x03
    return (0x01);
    break;
  default
    return (0x00);
    break;
  }
  return (0x00);
}
function void Q4HU(obj corpse)
{
  list Q4E4;
  getContents(Q4E4, corpse);
  int num = numInList(Q4E4);
  for(int i = 0x00; i < num; i++)
  {
    obj Q61K = Q4E4[i];
    if (isHair(Q61K))
    {
      deleteObject(Q61K);
    }
    else
    {
      int Q5NC = teleport(Q61K, getLocation(corpse));
    }
  }
  deleteObject(corpse);
  return ();
}
function loc Q42E(loc where)
{
  loc Q5HP;
  list Q5HN = 0x0FE6, 0x0FE7, 0x0FE8, 0x0FE9, 0x0FEA, 0x0FEB, 0x0FEC, 0x0FED, 0x0FEE;
  loc blah = where;
  if (objectsNearby(Q5HN, blah, 0x06, 0x0FEA))
  {
    Q5HP = blah;
    return (Q5HP);
  }
  list Q5HO = 0x120E, 0x120F, 0x1210, 0x1211, 0x1212, 0x1213, 0x1214, 0x1215, 0x1216;
  if (objectsNearby(Q5HO, blah, 0x06, 0x1216))
  {
    Q5HP = blah;
    return (Q5HP);
  }
  return (Q5HP);
}
function int Q41Y(obj user, int Q4KF, loc Q5HP)
{
  list Q4AB = 0x0A26, 0x0A27, 0x0A28, 0x0A29, 0x142F, 0x1433, 0x1437, 0x1853, 0x1857, 0x1C16;
  list Q514;
  int count = 0x00;
  getObjectsInRange(Q514, Q5HP, 0x02);
  int Q50Z = numInList(Q514);
  int Q4AA = numInList(Q4AB);
  for(int i = 0x00; i < Q50Z; i++)
  {
    int Q513 = getObjType(Q514[i]);
    for(int Q518 = 0x00; Q518 < Q4AA; Q518++)
    {
      if (Q513 == (Q4AB[Q518]))
      {
        count++;
        if (Q4KF)
        {
          useItem(user, Q514[i]);
        }
      }
    }
  }
  return (count);
}
function void Q48E(obj Q61K)
{
  Q662(Q61K, 0x00);
  list Q5DT;
  message(Q61K, "uninvis", Q5DT);
  return ();
}
function void Q5RE(obj it, string desc)
{
  setObjVar(it, "lookAtText", desc);
  return ();
}
function void Q5QJ(obj it)
{
  obj container = containedBy(it);
  if (container == NULL())
  {
    destroyOne(it);
    return ();
  }
  if (!isSpellbook(container))
  {
    destroyOne(it);
  }
  return ();
}
function int Q50B(loc where)
{
  return ((getX(where) >= 0x1400) && (getY(where) >= 0x0900) && (getX(where) <= 0x17FF) && (getY(where) <= 0x0FFF));
}
function int Q4YW(loc Q5U8, loc dest)
{
  return (Q50B(Q5U8) && (!Q50B(dest)));
}
function int Q4YX(loc Q5U8, loc dest)
{
  return ((!Q50B(Q5U8)) && Q50B(dest));
}
function int Q4YV(loc Q5U8, loc dest)
{
  return (Q4YX(Q5U8, dest) || Q4YW(Q5U8, dest));
}
function int Q50C(obj it)
{
  if (isNPC(it))
  {
    switch (getObjType(it))
    {
    case 0x46
    case 0x47
    case 0x48
    case 0x4B
    case 0x4C
    case 0x50
    case 0x51
    case 0x55
    case 0x56
    case 0x57
    case 0x5F
    case 0xCE
    case 0x03E2
    case 0x023D
    case 0xD2
    case 0xDA
    case 0xDB
      return (0x01);
      break;
    }
  }
  return (0x00);
}
function int Q4A7(obj Q68D, loc Q5U8, loc dest)
{
  if (isPlayer(Q68D))
  {
    if (Q4YX(Q5U8, dest))
    {
      if (isGoldAccount(Q68D))
      {
        return (0x01);
      }
      else
      {
        return (0x00);
      }
    }
    else
    {
      if (Q4YW(Q5U8, dest))
      {
        if (isRiding(Q68D))
        {
        }
      }
    }
    return (0x01);
  }
  if (isNPC(Q68D))
  {
    if (Q50C(Q68D))
    {
      if (Q4YW(Q5U8, dest))
      {
        return (0x00);
      }
      else
      {
        return (0x01);
      }
    }
    return (0x01);
  }
  return (0x01);
}
function int Q5Z1(obj Q68D, loc Q5U8, loc dest, string Q4HF)
{
  if (!Q4A7(Q68D, Q5U8, dest))
  {
    string Q56O = "You must be a registered UO Gold user to ";
    concat(Q56O, Q4HF);
    concat(Q56O, ".");
    systemMessage(Q68D, Q56O);
    return (0x00);
  }
  return (0x01);
}
function void Q5Z2(obj boss, loc destination)
{
  list Q57T;
  list Q48U;
  obj it;
  int Q642 = 0x00;
  getMobsInRange(Q57T, getLocation(boss), 0x19);
  for(int i = 0x00; i < numInList(Q57T); i++)
  {
    it = Q57T[i];
    Q642 = 0x00;
    if (hasObjListVar(it, "myBoss"))
    {
      getObjListVar(Q48U, it, "myBoss");
      if (isInList(Q48U, boss))
      {
        if (getLeader(it) == boss)
        {
          Q642 = 0x01;
        }
      }
    }
    else
    {
      if (isNPC(it))
      {
        if (getLeader(it) == boss)
        {
          Q642 = 0x01;
        }
      }
    }
    if (Q642)
    {
      if (Q5Z1(it, getLocation(it), destination, "teleport there"))
      {
        int r = teleport(it, destination);
      }
    }
  }
  return ();
}