Difference between revisions of "Script: Nonhuman"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">inherits</span> sndfx; <span style="color:#0000FF">trigger</span> creation { <span style="color:#0000FF">if</span> (!hasObjVar|<span s...") |
|||
Line 154: | Line 154: | ||
<span style="color:#0000FF">int</span> Q52S = [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](args) + 0x03; | <span style="color:#0000FF">int</span> Q52S = [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](args) + 0x03; | ||
<span style="color:#0000FF">list</span> Q69B = <span style="color:#800000">"meat"</span>, <span style="color:#800000">"gold"</span>, <span style="color:#800000">"kill"</span>, <span style="color:#800000">"killing"</span>, <span style="color:#800000">"slay"</span>, <span style="color:#800000">"sword"</span>, <span style="color:#800000">"axe"</span>, <span style="color:#800000">"spell"</span>, <span style="color:#800000">"magic"</span>, <span style="color:#800000">"spells"</span>, <span style="color:#800000">"swords"</span>, <span style="color:#800000">"axes"</span>, <span style="color:#800000">"mace"</span>, <span style="color:#800000">"maces"</span>, <span style="color:#800000">"monster"</span>, <span style="color:#800000">"monsters"</span>, <span style="color:#800000">"food"</span>, <span style="color:#800000">"run"</span>, <span style="color:#800000">"escape"</span>, <span style="color:#800000">"away"</span>, <span style="color:#800000">"help"</span>, <span style="color:#800000">"dead"</span>, <span style="color:#800000">"die"</span>, <span style="color:#800000">"dying"</span>, <span style="color:#800000">"lose"</span>, <span style="color:#800000">"losing"</span>, <span style="color:#800000">"life"</span>, <span style="color:#800000">"lives"</span>, <span style="color:#800000">"death"</span>, <span style="color:#800000">"ghost"</span>, <span style="color:#800000">"ghosts"</span>, <span style="color:#800000">"british"</span>, <span style="color:#800000">"blackthorn"</span>, <span style="color:#800000">"guild"</span>, <span style="color:#800000">"guilds"</span>, <span style="color:#800000">"dragon"</span>, <span style="color:#800000">"dragons"</span>, <span style="color:#800000">"game"</span>, <span style="color:#800000">"games"</span>, <span style="color:#800000">"ultima"</span>, <span style="color:#800000">"silly"</span>, <span style="color:#800000">"stupid"</span>, <span style="color:#800000">"dumb"</span>, <span style="color:#800000">"idiot"</span>, <span style="color:#800000">"idiots"</span>, <span style="color:#800000">"cheesy"</span>, <span style="color:#800000">"cheezy"</span>, <span style="color:#800000">"crazy"</span>, <span style="color:#800000">"dork"</span>, <span style="color:#800000">"jerk"</span>, <span style="color:#800000">"fool"</span>, <span style="color:#800000">"foolish"</span>, <span style="color:#800000">"ugly"</span>, <span style="color:#800000">"insult"</span>, <span style="color:#800000">"scum"</span>; | <span style="color:#0000FF">list</span> Q69B = <span style="color:#800000">"meat"</span>, <span style="color:#800000">"gold"</span>, <span style="color:#800000">"kill"</span>, <span style="color:#800000">"killing"</span>, <span style="color:#800000">"slay"</span>, <span style="color:#800000">"sword"</span>, <span style="color:#800000">"axe"</span>, <span style="color:#800000">"spell"</span>, <span style="color:#800000">"magic"</span>, <span style="color:#800000">"spells"</span>, <span style="color:#800000">"swords"</span>, <span style="color:#800000">"axes"</span>, <span style="color:#800000">"mace"</span>, <span style="color:#800000">"maces"</span>, <span style="color:#800000">"monster"</span>, <span style="color:#800000">"monsters"</span>, <span style="color:#800000">"food"</span>, <span style="color:#800000">"run"</span>, <span style="color:#800000">"escape"</span>, <span style="color:#800000">"away"</span>, <span style="color:#800000">"help"</span>, <span style="color:#800000">"dead"</span>, <span style="color:#800000">"die"</span>, <span style="color:#800000">"dying"</span>, <span style="color:#800000">"lose"</span>, <span style="color:#800000">"losing"</span>, <span style="color:#800000">"life"</span>, <span style="color:#800000">"lives"</span>, <span style="color:#800000">"death"</span>, <span style="color:#800000">"ghost"</span>, <span style="color:#800000">"ghosts"</span>, <span style="color:#800000">"british"</span>, <span style="color:#800000">"blackthorn"</span>, <span style="color:#800000">"guild"</span>, <span style="color:#800000">"guilds"</span>, <span style="color:#800000">"dragon"</span>, <span style="color:#800000">"dragons"</span>, <span style="color:#800000">"game"</span>, <span style="color:#800000">"games"</span>, <span style="color:#800000">"ultima"</span>, <span style="color:#800000">"silly"</span>, <span style="color:#800000">"stupid"</span>, <span style="color:#800000">"dumb"</span>, <span style="color:#800000">"idiot"</span>, <span style="color:#800000">"idiots"</span>, <span style="color:#800000">"cheesy"</span>, <span style="color:#800000">"cheezy"</span>, <span style="color:#800000">"crazy"</span>, <span style="color:#800000">"dork"</span>, <span style="color:#800000">"jerk"</span>, <span style="color:#800000">"fool"</span>, <span style="color:#800000">"foolish"</span>, <span style="color:#800000">"ugly"</span>, <span style="color:#800000">"insult"</span>, <span style="color:#800000">"scum"</span>; | ||
− | Q69D = <span style="color:#800000">"meat"</span>, <span style="color:#800000">"kill"</span>, <span style="color:#800000">"pound"</span>, <span style="color:#800000">"crush"</span>, <span style="color:#800000">"yum yum"</span>, <span style="color:#800000">"crunch"</span>, <span style="color:#800000">"destroy"</span>, <span style="color:#800000">"murder"</span>, <span style="color:#800000">"eat"</span>, <span style="color:#800000">"munch"</span>, <span style="color:#800000">"massacre"</span>, <span style="color:#800000">"food"</span>, <span style="color:#800000">"monster"</span>, <span style="color:#800000">"evil"</span>, <span style="color:#800000">"run"</span>, <span style="color:#800000">"die"</span>, <span style="color:#800000">"lose"</span>, <span style="color:#800000">"dumb"</span>, <span style="color:#800000">"idiot"</span>, <span style="color:#800000">"fool"</span>, <span style="color:#800000">"crazy"</span>, <span style="color:#800000">"jabber incomprehensibly"</span>, <span style="color:#800000">"dinner"</span>, <span style="color:#800000">"lunch"</span>, <span style="color:#800000">"breakfast"</span>, <span style="color:#800000">"fight"</span>, <span style="color:#800000">"battle"</span>, <span style="color:#800000">"doomed"</span>, <span style="color:#800000">"rip apart"</span>, <span style="color:#800000">"tear apart"</span>, <span style="color:#800000">"smash"</span>, <span style="color:#800000">"edible?"</span>, <span style="color:#800000">"shred"</span>, <span style="color:#800000">"disembowel"</span>, <span style="color:#800000">"ugly"</span>, <span style="color:#800000">"smelly"</span>, <span style="color:#800000">"stupid"</span>, <span style="color:#800000">" | + | Q69D = <span style="color:#800000">"meat"</span>, <span style="color:#800000">"kill"</span>, <span style="color:#800000">"pound"</span>, <span style="color:#800000">"crush"</span>, <span style="color:#800000">"yum yum"</span>, <span style="color:#800000">"crunch"</span>, <span style="color:#800000">"destroy"</span>, <span style="color:#800000">"murder"</span>, <span style="color:#800000">"eat"</span>, <span style="color:#800000">"munch"</span>, <span style="color:#800000">"massacre"</span>, <span style="color:#800000">"food"</span>, <span style="color:#800000">"monster"</span>, <span style="color:#800000">"evil"</span>, <span style="color:#800000">"run"</span>, <span style="color:#800000">"die"</span>, <span style="color:#800000">"lose"</span>, <span style="color:#800000">"dumb"</span>, <span style="color:#800000">"idiot"</span>, <span style="color:#800000">"fool"</span>, <span style="color:#800000">"crazy"</span>, <span style="color:#800000">"jabber incomprehensibly"</span>, <span style="color:#800000">"dinner"</span>, <span style="color:#800000">"lunch"</span>, <span style="color:#800000">"breakfast"</span>, <span style="color:#800000">"fight"</span>, <span style="color:#800000">"battle"</span>, <span style="color:#800000">"doomed"</span>, <span style="color:#800000">"rip apart"</span>, <span style="color:#800000">"tear apart"</span>, <span style="color:#800000">"smash"</span>, <span style="color:#800000">"edible?"</span>, <span style="color:#800000">"shred"</span>, <span style="color:#800000">"disembowel"</span>, <span style="color:#800000">"ugly"</span>, <span style="color:#800000">"smelly"</span>, <span style="color:#800000">"stupid"</span>, <span style="color:#800000">"hideous"</span>, <span style="color:#800000">"smell"</span>, <span style="color:#800000">"tasty"</span>, <span style="color:#800000">"invader"</span>, <span style="color:#800000">"attack"</span>, <span style="color:#800000">"raid"</span>, <span style="color:#800000">"plunder"</span>, <span style="color:#800000">"pillage"</span>, <span style="color:#800000">"treasure"</span>, <span style="color:#800000">"loser"</span>, <span style="color:#800000">"lose"</span>, <span style="color:#800000">"scum"</span>; |
<span style="color:#0000FF">list</span> Q69C; | <span style="color:#0000FF">list</span> Q69C; | ||
<span style="color:#0000FF">int</span> Q4QI = 0x00; | <span style="color:#0000FF">int</span> Q4QI = 0x00; |
Latest revision as of 16:40, 19 October 2018
inherits sndfx;
trigger creation { if (!hasObjVar(this, "nonHuman")) { return (0x00); } int Q519 = getObjVar(this, "nonHuman"); member int Q5U6; switch (Q519) { case 0x00 setDefaultTextHue(this, 0x22); Q5U6 = 0x01B0; break; case 0x01 setDefaultTextHue(this, 0x59); Q5U6 = 0x01D2; break; case 0x02 setDefaultTextHue(this, 0x3A); Q5U6 = 0x01A2; break; case 0x03 setDefaultTextHue(this, 0x95); Q5U6 = 0x01B6; break; default } return (0x01); }
function void Q4KE(obj this, int Q52S) { string Q60V; int Q56B = random(0x02, Q52S); int Q566; string Q610; string Q618; int Q5KV; int Q4AE; for(int i = 0x00; i < Q56B; i++) { Q618 = " "; Q4AE = 0x00; if (i != 0x00) { Q5KV = random(0x01, 0x0F); if (Q5KV < 0x0B) { Q618 = " "; } else { Q4AE = 0x01; if (Q5KV > 0x0D) { Q618 = "! "; } else { Q618 = ". "; } } } if (random(0x00, 0x0A) < 0x03) { Q566 = random(0x01, 0x05); } else { Q566 = random(0x01, 0x03); } int Q68P = 0x00; if (hasObjVar(this, "nonHuman")) { Q68P = getObjVar(this, "nonHuman"); } for(int Q518 = 0x00; Q518 < Q566; Q518++) { if (Q68P == 0x00) { Q610 = getOrcishSyllable(random(0x00, 0x7FFF)); } else { if (Q68P == 0x01) { Q610 = getWispishSyllable(random(0x00, 0x7FFF)); } else { if (Q68P == 0x02) { Q610 = getLizardishSyllable(random(0x00, 0x7FFF)); } else { Q610 = getRattishSyllable(random(0x00, 0x7FFF)); } } } if ((Q518 == 0x00) && (Q4AE == 0x01)) { toUpper(Q610, 0x00, 0x01); } concat(Q618, Q610); } concat(Q60V, Q618); } if (random(0x01, 0x05) == 0x01) { concat(Q60V, "!"); } else { concat(Q60V, "."); } toUpper(Q60V, 0x00, 0x02); bark(this, Q60V); sfx(getLocation(this), Q5U6, 0x00); return (); }
trigger speech("*") { if (!isPlayer(speaker)) { return (0x01); } if (isDead(speaker)) { return (0x01); } if (!canSeeObj(this, speaker)) { return (0x01); } list Q5YQ; getTargets(Q5YQ, this); if (numInList(Q5YQ) > 0x00) { return (0x01); } if (!isFacingPerson(this, speaker)) { return (0x01); } list args; string Q618; list Q69D; split(args, arg); int Q52S = numInList(args) + 0x03; list Q69B = "meat", "gold", "kill", "killing", "slay", "sword", "axe", "spell", "magic", "spells", "swords", "axes", "mace", "maces", "monster", "monsters", "food", "run", "escape", "away", "help", "dead", "die", "dying", "lose", "losing", "life", "lives", "death", "ghost", "ghosts", "british", "blackthorn", "guild", "guilds", "dragon", "dragons", "game", "games", "ultima", "silly", "stupid", "dumb", "idiot", "idiots", "cheesy", "cheezy", "crazy", "dork", "jerk", "fool", "foolish", "ugly", "insult", "scum"; Q69D = "meat", "kill", "pound", "crush", "yum yum", "crunch", "destroy", "murder", "eat", "munch", "massacre", "food", "monster", "evil", "run", "die", "lose", "dumb", "idiot", "fool", "crazy", "jabber incomprehensibly", "dinner", "lunch", "breakfast", "fight", "battle", "doomed", "rip apart", "tear apart", "smash", "edible?", "shred", "disembowel", "ugly", "smelly", "stupid", "hideous", "smell", "tasty", "invader", "attack", "raid", "plunder", "pillage", "treasure", "loser", "lose", "scum"; list Q69C; int Q4QI = 0x00; for(int i = 0x00; i < numInList(Q69B); i++) { Q618 = Q69B[i]; if (isInList(args, Q618)) { Q4QI = 0x01; appendToList(Q69D, Q618); appendToList(Q69C, Q618); } } if (Q4QI) { Q4KE(this, ((Q52S / 0x02) + 0x01)); string Q4XX; if (random(0x00, 0x01) == 0x01) { Q618 = Q69D[random(0x00, (numInList(Q69D) - 0x01))]; } else { Q618 = Q69C[random(0x00, (numInList(Q69C) - 0x01))]; } string Q46C = Q69D[random(0x00, (numInList(Q69D) - 0x01))]; int Q60R = random(0x00, 0x05); switch (Q60R) { case 0x00 Q4XX = " Me " + Q618 + "? "; break; case 0x01 toUpper(Q618, 0x00, 0x01); Q4XX = Q618 + " thee! "; break; case 0x02 toUpper(Q618, 0x00, 0x01); Q4XX = Q618 + "?"; break; case 0x03 toUpper(Q618, 0x00, 0x01); toUpper(Q46C, 0x00, 0x01); Q4XX = Q618 + "! " + Q46C + ". "; break; case 0x04 toUpper(Q618, 0x00, 0x01); Q4XX = Q618 + ". "; break; case 0x05 toUpper(Q618, 0x00, 0x01); toUpper(Q46C, 0x00, 0x01); Q4XX = Q618 + "? " + Q46C + ". "; break; default Q4XX = ""; break; } bark(this, Q4XX); Q4KE(this, ((Q52S / 0x02) + 0x01)); return (0x00); } Q4KE(this, Q52S); return (0x00); }
trigger 100 enterrange(0x05) { if (!isPlayer(target)) { return (0x01); } Q4KE(this, 0x07); return (0x01); }
function void Q5LC(list Q4OL) { string x = Q4OL[random(0x00, numInList(Q4OL) - 0x01)]; Q4KE(this, 0x03); bark(this, x); return (); }
trigger 100 death { list Q4GU = "Revenge!", "NOOooo!", "I... I...", "Me no die!", "Me die!", "Must... not die...", "Oooh, me hurt...", "Me dying?"; Q5LC(Q4GU); return (0x01); }
trigger 100 killedtarget { list Q58D = "Ha! Thou dead!", "Thou not attack me! ", "Die!", "Die! Die!", "There!", "Thou, die!", "Fight me not!", "Ha! Be ghost now!"; Q5LC(Q58D); return (0x01); }
trigger 100 washit { list Q58D; if (damamt < 0x01) { Q58D = "Ha! Bad fighter!", "You miss!", "Bad aim!", "Enemy fight bad!", "Me fight better!", "Thou art doomed..."; Q5LC(Q58D); return (0x01); } if (damamt < 0x05) { Q58D = "Ouch!", "Me not hurt bad!", "Thou fight bad.", "Thy blows soft!", "You bad with weapon!"; } else { Q58D = "Ouch! Me hurt!", "No, kill me not!", "Me hurt!", "Away with thee!", "Oof! That hurt!", "Aaah! That hurt...", "Good blow!"; } Q5LC(Q58D); return (0x01); }