Script: Decounselor2
From Ultima Online: The Second Age
inherits globals;
member int num;
function void Q4JA(obj it) { if (hasScript(it, "counokay2")) { detachScript(it, "decounselor2"); return (); } num++; if (num > 0x03) { systemMessage(it, "Your counselor status has been removed."); doSCommand(it, "ucoun me"); detachScript(it, "decounselor2"); } 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, "decounselor2"); } Q4JA(this); return (0x01); }