Script: Decounselor
From Ultima Online: The Second Age
inherits globals;
member int num;
function void Q4JA(obj it) { if (hasScript(it, "counokay")) { detachScript(it, "decounselor"); return (); } num++; if (num > 0x03) { systemMessage(it, "Your counselor status has been removed."); doSCommand(it, "ucoun me"); detachScript(it, "decounselor"); } else { systemMessage(it, "All counselors are being unmade. You can log in " + (0x03 - num) + " more times"); systemMessage(it, "without renewing until your counselor status is removed."); systemMessage(it, "To continue being a Counselor, please re-apply to the web page"); systemMessage(it, "under Help and Guidance / Playguide / Counselors."); } return (); }
trigger creation { callback(this, 0x05, 0x7C); return (0x01); }
trigger objectloaded { callback(this, 0x05, 0x7C); return (0x01); }
trigger callback(0x7C) { if (!isCounselor(this)) { detachScript(this, "decounselor"); } Q4JA(this); return (0x01); }