Script: Autokey
From Ultima Online: The Second Age
Revision as of 01:19, 6 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">inherits</span> add_door_to_key; <span style="color:#0000FF">trigger</span> creation { <span style="color:#0000FF">list</span> Q5DQ;...")
inherits add_door_to_key;
trigger creation { list Q5DQ; if (!hasObjVar(this, "whatIUnlock")) { setObjVar(this, "whatIUnlock", Q5DQ); } return (0x01); }
trigger speech("add_door") { if (isEditing(speaker)) { barkTo(this, speaker, "Which door do you want to add to my keylist?"); targetObj(speaker, this); } return (0x00); }
trigger speech("finished") { if (isEditing(speaker)) { bark(this, "okay"); detachScript(this, "autokey"); } return (0x00); }
trigger targetobj { if (usedon == NULL()) { return (0x00); } if (isEditing(user)) { Q45B(usedon, this); bark(this, "Added door to my keylist."); } return (0x00); }