Difference between revisions of "Script Function: Q4BZ"
From Ultima Online: The Second Age
Line 31: | Line 31: | ||
{ | { | ||
[[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](this, <span style="color:#800000">"continuePatrol"</span>, 0x00); | [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](this, <span style="color:#800000">"continuePatrol"</span>, 0x00); | ||
− | <span style="color:#0000FF">if</span> (![[ | + | <span style="color:#0000FF">if</span> (![[Script_Function:_isPet|<span style="color:#2B91AF">isPet</span>]](this)) |
{ | { | ||
[[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, <span style="color:#800000">"Stopping patrol."</span>); | [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, <span style="color:#800000">"Stopping patrol."</span>); |
Latest revision as of 00:51, 21 October 2018
function int Q4BZ(obj this, string Q698, obj speaker) { int Q4E3 = 0x00; if (Q698 != "patrol") { return (0x00); } if (0x00) { bark(this, "Got order to patrol."); } if (hasObjVar(this, "continuePatrol")) { Q4E3 = getObjVar(this, "continuePatrol"); } if (!Q4E3) { setObjVar(this, "continuePatrol", 0x01); if (!isPet(this)) { bark(this, "Patrolling."); } else { Q4LJ(this); barkTo(this, speaker, "Your pet begins to patrol."); } Q5HF(this); } else { setObjVar(this, "continuePatrol", 0x00); if (!isPet(this)) { bark(this, "Stopping patrol."); } else { Q4LJ(this); barkTo(this, speaker, "Your pet stops patrolling."); } } return (0x01); }