Difference between revisions of "Script: Punishable"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> globals; <span style="color:#0000FF">trigger</span> creation { systemMessage|<span style="color:#FF0000;font-weight:bo...") |
|||
Line 24: | Line 24: | ||
<span style="color:#0000FF">trigger</span> callback(0x92) | <span style="color:#0000FF">trigger</span> callback(0x92) | ||
{ | { | ||
− | [[ | + | [[Script_Function:_Cleanup|<span style="color:#2B91AF">cleanup</span>]](); |
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } | ||
Line 56: | Line 56: | ||
{ | { | ||
[[Engine Function:_setDefaultReturn|<span style="color:#FF0000;font-weight:bold">setDefaultReturn</span>]](0x01); | [[Engine Function:_setDefaultReturn|<span style="color:#FF0000;font-weight:bold">setDefaultReturn</span>]](0x01); | ||
− | [[ | + | [[Script_Function:_Cleanup|<span style="color:#2B91AF">cleanup</span>]](); |
<span style="color:#0000FF">return</span> (0x01); | <span style="color:#0000FF">return</span> (0x01); | ||
} | } |
Latest revision as of 08:35, 19 October 2018
inherits globals;
trigger creation { systemMessage(this, "Guards can now be called on you!"); return (0x00); }
trigger message("punishableReset") { shortcallback(this, 0x3C, 0x92); return (0x00); }
function void cleanup() { systemMessage(this, "Guards can no longer be called on you."); removeObjVar(this, "crimeWitnessList"); removeObjVar(this, "crimeSeverity"); detachScript(this, "punishable"); return (); }
trigger callback(0x92) { cleanup(); return (0x00); }
trigger speech("*guards*") { if (!inJusticeRegion(getLocation(speaker))) { return (0x01); } int Q5RN = 0x03E8; if (hasObjVar(this, "crimeSeverity")) { Q5RN = getObjVar(this, "crimeSeverity"); } if (hasObjVar(this, "crimeWitnessList")) { if (!isInObjVarListSet(this, "crimeWitnessList", NULL())) { if (!isInObjVarListSet(this, "crimeWitnessList", speaker)) { return (0x01); } } } callGuards(this, speaker, Q5RN); return (0x01); }
trigger death { setDefaultReturn(0x01); cleanup(); return (0x01); }