Difference between revisions of "Script: Trap poison"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> trap_globals; <span style="color:#0000FF">trigger</span> creation { setObjVar|<span style="color:#FF0000;font-weight:b...") |
(No difference)
|
Latest revision as of 08:08, 5 October 2018
inherits trap_globals;
trigger creation { setObjVar(this, "trapType", 0x01); setObjVar(this, "trapLevel", 0x01); return (0x00); }
trigger message("removeTrap") { Q4DB(); detachScript(this, "trap_poison"); return (0x00); }
trigger message("triggerTrap") { obj user = args[0x00]; if (Q4YA(user, this) > 0x00) { return (0x01); } barkTo(this, user, "A cloud of green gas engulfs your body!"); int Q52T = 0x01; if (hasObjVar(this, "trapLevel")) { Q52T = getObjVar(this, "trapLevel"); } setObjVar(user, "poison_strength", Q52T); attachScript(user, "poisoned"); receiveUnhealthyActionFrom(user, this); Q4DB(); detachScript(this, "trap_poison"); return (0x01); }