NWScript:
void main()
{
int nConvoNumber = d20();
int nD100 = d100();
float temp;
int temp2;
string temp3;
object oChair;
switch(nConvoNumber) {
case 1:
AssignCommand(OBJECT_SELF, ActionSpeakString("G'day to ye, friend!"));
break;
case 2:
AssignCommand(OBJECT_SELF, ActionSpeakString("Hail to you, dear friend."));
break;
case 3:
if(GetIsNight())
AssignCommand(OBJECT_SELF, ActionSpeakString("What a nice night it is tonight."));
else
AssignCommand(OBJECT_SELF, ActionSpeakString("You can't ask for a nicer day than today."));
break;
case 4:
AssignCommand(OBJECT_SELF, ActionSpeakString("I like coconuts!"));
break;
case 5:
AssignCommand(OBJECT_SELF, ActionSpeakString("Hello, my name is " + GetName(OBJECT_SELF)));
break;
case 6:
AssignCommand(OBJECT_SELF, ActionSpeakString("Ohhh... I'm so tired."));
break;
case 7:
ActionSpeakString("Watch this!");
ActionCastFakeSpellAtObject(SPELL_FIREBALL, OBJECT_SELF);
break;
case 8:
ActionSpeakString("I feel like walking around for a while.");
ActionRandomWalk();
break;
case 9:
ActionSpeakString("I grow tired of this body.");
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectPolymorph(POLYMORPH_TYPE_BALOR), OBJECT_SELF, 7.5);
break;
case 10:
ActionSpeakString("Some day, I want to have " + IntToString(d20()) + " children!");
break;
case 11:
temp = IntToFloat(nD100);
temp2 = FloatToInt(FeetToMeters(temp));
temp3 = IntToString(temp2);
ActionSpeakString("Did you know that " + IntToString(nD100) + " feet is " + temp3 + " meters?");
break;
case 12:
temp = IntToFloat(nD100);
temp2 = FloatToInt(YardsToMeters(temp));
temp3 = IntToString(temp2);
ActionSpeakString("Did you know that " + IntToString(nD100) + " yards is " + temp3 + " meters?");
break;
case 13:
ActionSpeakString("I need to sit down.");
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SCREEN_SHAKE), GetLocation(OBJECT_SELF), 2.5);
oChair = CreateObject(OBJECT_TYPE_PLACEABLE, "chair001", GetLocation(OBJECT_SELF));
ActionSit(oChair);
break;
case 14:
ActionSpeakString("How are you today, friend?");
break;
case 15:
ActionSpeakString("I just heard a great joke!");
ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, 1.0, 1.5);
break;
case 16:
ActionSpeakString("It's always the same around here.");
break;
case 17:
ActionSpeakString("I can count to 100.");
ActionWait(0.7);
for (nD100 = 1; nD100 <= 100; nD100++) {
ActionSpeakString(IntToString(nD100));
ActionWait(0.3);
}
break;
case 18:
nD100 = GetGender(OBJECT_SELF);
if (nD100 == GENDER_FEMALE)
temp3 = "woman?";
else if (nD100 == GENDER_MALE)
temp3 = "man?";
ActionSpeakString("Who's the " + temp3);
ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1);
break;
case 19:
ActionSpeakString("All in a day's work, my friend.");
break;
case 20:
ActionSpeakString("Your lucky number for today is " + IntToString(nD100));
break;
}
}