Difference between revisions of "Script: Usebirdi"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> birdi; <span style="color:#0000FF">trigger</span> creation { setObjVar|<span style="color:#FF0000;font-weight:bold">se...") |
(No difference)
|
Latest revision as of 07:45, 5 October 2018
inherits birdi;
trigger creation { setObjVar(this, "magicItemModifier", 0x0258); shortcallback(this, 0x01, 0x2F); return (0x00); }
trigger callback(0x2F) { int Q54U; int Q4Q1 = getResource(Q54U, this, "magic", 0x03, 0x02); int charges = Q54U / 0x03; setObjVar(this, "charges", charges); return (0x00); }
trigger use { int charges = getObjVar(this, "charges"); if (charges <= 0x00) { systemMessage(user, "This magic item is out of charges."); return (0x00); } if (hasScript(user, "reflctor")) { doMobAnimation(user, 0x37B9, 0x0A, 0x05, 0x00, 0x00); detachScript(user, "reflctor"); } else { Q4IY(user, user); } charges = charges - 0x01; setObjVar(this, "charges", charges); returnResourcesToBank(this, 0x03, "magic"); if (charges <= 0x00) { systemMessage(user, "This magic item is out of charges."); } return (0x00); }