Difference between revisions of "Script: Clumsy"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> clumsybase; <span style="color:#0000FF">trigger</span> use { <span style="color:#2B91AF">Q4M9</span>(this, user...") |
|||
Line 3: | Line 3: | ||
<span style="color:#0000FF">trigger</span> use | <span style="color:#0000FF">trigger</span> use | ||
{ | { | ||
− | [[Script_Function:_Q4M9|<span style="color:#2B91AF">Q4M9</span>]](this, user); | + | [[Spelskil#Q4M9[[Script_Function:_Q4M9|<span style="color:#2B91AF">Q4M9</span>]](this, user); |
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } | ||
Line 9: | Line 9: | ||
<span style="color:#0000FF">trigger</span> message(<span style="color:#800000">"castspell"</span>) | <span style="color:#0000FF">trigger</span> message(<span style="color:#800000">"castspell"</span>) | ||
{ | { | ||
− | <span style="color:#0000FF">obj</span> user = [[Script_Function:_Q4BB|<span style="color:#2B91AF">Q4BB</span>]](this, args); | + | <span style="color:#0000FF">obj</span> user = [[Spelskil#Q4BB[[Script_Function:_Q4BB|<span style="color:#2B91AF">Q4BB</span>]](this, args); |
<span style="color:#0000FF">if</span> (![[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](user)) | <span style="color:#0000FF">if</span> (![[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](user)) | ||
{ | { | ||
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } | ||
− | [[Script_Function:_Q5RD|<span style="color:#2B91AF">Q5RD</span>]](user, this); | + | [[Spelskil#Q5RD[[Script_Function:_Q5RD|<span style="color:#2B91AF">Q5RD</span>]](user, this); |
− | [[Script_Function:_Q4WO|<span style="color:#2B91AF">Q4WO</span>]](user, this); | + | [[Spelskil#Q4WO[[Script_Function:_Q4WO|<span style="color:#2B91AF">Q4WO</span>]](user, this); |
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } | ||
Line 21: | Line 21: | ||
<span style="color:#0000FF">trigger</span> targetobj | <span style="color:#0000FF">trigger</span> targetobj | ||
{ | { | ||
− | <span style="color:#0000FF">if</span> (![[Script_Function:_Q4C8|<span style="color:#2B91AF">Q4C8</span>]](user, this)) | + | <span style="color:#0000FF">if</span> (![[Spelskil#Q4C8[[Script_Function:_Q4C8|<span style="color:#2B91AF">Q4C8</span>]](user, this)) |
{ | { | ||
<span style="color:#0000FF">return</span> (0x01); | <span style="color:#0000FF">return</span> (0x01); | ||
Line 29: | Line 29: | ||
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } | ||
− | <span style="color:#0000FF">if</span> ([[Script_Function:_Q49V|<span style="color:#2B91AF">Q49V</span>]](user, usedon, 0x00)) | + | <span style="color:#0000FF">if</span> ([[Spelskil#Q49V[[Script_Function:_Q49V|<span style="color:#2B91AF">Q49V</span>]](user, usedon, 0x00)) |
{ | { | ||
− | <span style="color:#0000FF">if</span> (![[Script_Function:_Q5YC|<span style="color:#2B91AF">Q5YC</span>]](user, this)) | + | <span style="color:#0000FF">if</span> (![[Spelskil#Q5YC[[Script_Function:_Q5YC|<span style="color:#2B91AF">Q5YC</span>]](user, this)) |
{ | { | ||
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } | ||
− | <span style="color:#0000FF">if</span> ([[Script_Function:_Q4LT|<span style="color:#2B91AF">Q4LT</span>]](user, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](usedon), this)) | + | <span style="color:#0000FF">if</span> ([[Spelskil#Q4LT[[Script_Function:_Q4LT|<span style="color:#2B91AF">Q4LT</span>]](user, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](usedon), this)) |
{ | { | ||
<span style="color:#0000FF">if</span> ([[Engine Function:_hasScript|<span style="color:#FF0000;font-weight:bold">hasScript</span>]](usedon, <span style="color:#800000">"reflctor"</span>)) | <span style="color:#0000FF">if</span> ([[Engine Function:_hasScript|<span style="color:#FF0000;font-weight:bold">hasScript</span>]](usedon, <span style="color:#800000">"reflctor"</span>)) | ||
{ | { | ||
[[Engine Function:_doMobAnimation|<span style="color:#FF0000;font-weight:bold">doMobAnimation</span>]](usedon, 0x37B9, 0x0A, 0x05, 0x00, 0x00); | [[Engine Function:_doMobAnimation|<span style="color:#FF0000;font-weight:bold">doMobAnimation</span>]](usedon, 0x37B9, 0x0A, 0x05, 0x00, 0x00); | ||
− | [[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](usedon, user, 0x01); | + | [[Clumsybase#Q4J7[[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](usedon, user, 0x01); |
[[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](usedon, <span style="color:#800000">"reflctor"</span>); | [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](usedon, <span style="color:#800000">"reflctor"</span>); | ||
} | } | ||
<span style="color:#0000FF">else</span> | <span style="color:#0000FF">else</span> | ||
{ | { | ||
− | [[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](user, usedon, 0x00); | + | [[Clumsybase#Q4J7[[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](user, usedon, 0x00); |
} | } | ||
} | } | ||
<span style="color:#0000FF">else</span> | <span style="color:#0000FF">else</span> | ||
{ | { | ||
− | [[Script_Function:_Q4RD|<span style="color:#2B91AF">Q4RD</span>]](user); | + | [[Spelskil#Q4RD[[Script_Function:_Q4RD|<span style="color:#2B91AF">Q4RD</span>]](user); |
} | } | ||
} | } | ||
Line 65: | Line 65: | ||
<span style="color:#0000FF">obj</span> user = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](this, <span style="color:#800000">"user"</span>); | <span style="color:#0000FF">obj</span> user = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](this, <span style="color:#800000">"user"</span>); | ||
<span style="color:#0000FF">obj</span> target = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](this, <span style="color:#800000">"target"</span>); | <span style="color:#0000FF">obj</span> target = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](this, <span style="color:#800000">"target"</span>); | ||
− | <span style="color:#0000FF">if</span> ([[Script_Function:_Q41X|<span style="color:#2B91AF">Q41X</span>]](user, target)) | + | <span style="color:#0000FF">if</span> ([[Spelskil#Q41X[[Script_Function:_Q41X|<span style="color:#2B91AF">Q41X</span>]](user, target)) |
{ | { | ||
− | [[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](target, user, 0x01); | + | [[Clumsybase#Q4J7[[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](target, user, 0x01); |
− | [[Script_Function:_Q5MF|<span style="color:#2B91AF">Q5MF</span>]](target); | + | [[Spelskil#Q5MF[[Script_Function:_Q5MF|<span style="color:#2B91AF">Q5MF</span>]](target); |
} | } | ||
<span style="color:#0000FF">else</span> | <span style="color:#0000FF">else</span> | ||
{ | { | ||
− | [[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](user, target, 0x00); | + | [[Clumsybase#Q4J7[[Script_Function:_Q4J7|<span style="color:#2B91AF">Q4J7</span>]](user, target, 0x00); |
} | } | ||
<span style="color:#0000FF">return</span> (0x00); | <span style="color:#0000FF">return</span> (0x00); | ||
} | } |
Revision as of 06:29, 5 October 2018
inherits clumsybase;
trigger use { [[Spelskil#Q4M9Q4M9(this, user); return (0x00); }
trigger message("castspell") { obj user = [[Spelskil#Q4BBQ4BB(this, args); if (!isValid(user)) { return (0x00); } [[Spelskil#Q5RDQ5RD(user, this); [[Spelskil#Q4WOQ4WO(user, this); return (0x00); }
trigger targetobj { if (![[Spelskil#Q4C8Q4C8(user, this)) { return (0x01); } if (usedon == NULL()) { return (0x00); } if ([[Spelskil#Q49VQ49V(user, usedon, 0x00)) { if (![[Spelskil#Q5YCQ5YC(user, this)) { return (0x00); } if ([[Spelskil#Q4LTQ4LT(user, getLocation(usedon), this)) { if (hasScript(usedon, "reflctor")) { doMobAnimation(usedon, 0x37B9, 0x0A, 0x05, 0x00, 0x00); [[Clumsybase#Q4J7Q4J7(usedon, user, 0x01); detachScript(usedon, "reflctor"); } else { [[Clumsybase#Q4J7Q4J7(user, usedon, 0x00); } } else { [[Spelskil#Q4RDQ4RD(user); } } return (0x00); }
trigger creation { return (0x00); }
trigger callback(0x49) { obj user = getObjVar(this, "user"); obj target = getObjVar(this, "target"); if ([[Spelskil#Q41XQ41X(user, target)) { [[Clumsybase#Q4J7Q4J7(target, user, 0x01); [[Spelskil#Q5MFQ5MF(target); } else { [[Clumsybase#Q4J7Q4J7(user, target, 0x00); } return (0x00); }