90 lines
5.1 KiB
Plaintext
90 lines
5.1 KiB
Plaintext
///////////////////////////////////////////////////////
|
|
//Drunken fool 1.0
|
|
/////////// //////////////////////////////////////////
|
|
//This script rolls 1d10 and causes a random walking NPC to be have as a drunk.
|
|
//Not that I know anything about that :)
|
|
/////////////////////////////////////////////////////
|
|
//Script by Christopher Bernert
|
|
//Date Created: 6/27/02
|
|
////////////////////////////////////////////////////
|
|
|
|
int iRollTen = d10(1);
|
|
void main()
|
|
{
|
|
ActionRandomWalk();
|
|
if(d100(1) >100) //50% chance of performing a drunken act
|
|
{
|
|
{
|
|
switch(iRollTen) //Generated Number
|
|
{
|
|
case 1:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_LISTEN));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
break;
|
|
case 2:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
break;
|
|
case 3:
|
|
ClearAllActions();
|
|
ActionDoCommand(PlaySound("as_pl_chantingm2"));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
break;
|
|
case 4:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(PlaySound("as_pl_hiccupm1"));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
break;
|
|
case 5:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS));
|
|
break;
|
|
case 6:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(PlaySound("as_pl_hiccupm1"));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
break;
|
|
case 7:
|
|
ClearAllActions();
|
|
ActionDoCommand(PlaySound("as_pl_belchingm1"));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
break;
|
|
case 8:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS));
|
|
break;
|
|
case 9:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
break;
|
|
case 10:
|
|
ClearAllActions();
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK));
|
|
ActionDoCommand(ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK));
|
|
break;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|