UW2_PRC8/_module/nss/inc_emotewand.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

158 lines
5.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//::///////////////////////////////////////////////
//:: Name: inc_emotewand
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
An INCLUDE script to handle all EmoteWand
functions.
*/
//:://////////////////////////////////////////////
//:: Created By: Samius Maximus
//:: Created On:
//:://////////////////////////////////////////////
object oPlayer = GetPCSpeaker();
int iRoll;
void ewRest()
{
SetLocalInt(oPlayer, "REST", 1);
AssignCommand(oPlayer, ActionRest());
DelayCommand(20.0, DeleteLocalInt(oPlayer, "REST"));
}
void DoPartyRoll()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
object oMember;
oMember = GetFirstFactionMember(oPlayer, TRUE);
string sMsg;
sMsg = GetName(oPlayer) + "<c ÞÞ> Rolled a 100 sided dice for the party & ";
while(GetIsPC(oMember))
{
iRoll = d100();
sMsg += GetName(oMember) + "<cÞ´ > *Rolled a " + IntToString (iRoll) + ". & ";
oMember = GetNextFactionMember(oPlayer, TRUE);
}
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString (sMsg)));
}
void Roll100()
{
iRoll = d100();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls a 100-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Roll10()
{
iRoll = d10();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls a 10-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Roll12()
{
iRoll = d12();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls a 12-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Roll20()
{
iRoll = d20();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls a 20-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Roll4()
{
iRoll = d4();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls a 4-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Roll6()
{
iRoll = d6();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls a 6-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Roll8()
{
iRoll = d8();
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
DelayCommand (2.0, AssignCommand (oPlayer, SpeakString ("<cÞ´ >*Rolls an 8-sided die, and recieves a " + IntToString (iRoll) + ".*")));
}
void Dance()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY2));
DelayCommand (3.0, AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_LAUGHING, 3.0, 2.0)));
DelayCommand (3.0, AssignCommand (oPlayer, PlayVoiceChat (VOICE_CHAT_LAUGH)));
DelayCommand (5.0, AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY1)));
DelayCommand (8.5, AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY3)));
DelayCommand (11.0, AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 2.0)));
DelayCommand (14.5, AssignCommand (oPlayer, PlayVoiceChat (VOICE_CHAT_LAUGH)));
DelayCommand (13.0, AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_VICTORY3)));
}
void Drunk()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_PAUSE_DRUNK, 1.0, 60.0));
}
void Meditate()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_MEDITATE, 1.0, 10000.0));
}
void Read()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_READ));
DelayCommand (2.5, AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_READ)));
}
void Sit()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_SIT_CROSS, 1.0, 10000.0));
}
void Worship()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_WORSHIP, 1.0, 600.0));
}
void TalkForceful()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 150.0));
}
void TalkLaughing()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_LAUGHING, 1.0, 150.0));
}
void TalkPleading()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_PLEADING, 1.0, 150.0));
}
void TakeNap()
{
//effect eNap = EffectVisualEffect (VFX_IMP_SLEEP);
//ApplyEffectToObject (DURATION_TYPE_INSTANT, eNap, oPlayer, 1.0);
AssignCommand (oPlayer ,ActionPlayAnimation (ANIMATION_LOOPING_DEAD_FRONT, 1.0, 10000.0));
}
void FallBack()
{
AssignCommand (oPlayer ,ActionPlayAnimation (ANIMATION_LOOPING_DEAD_BACK, 1.0, 10000.0));
}
void GetLow()
{
AssignCommand (oPlayer ,ActionPlayAnimation (ANIMATION_LOOPING_GET_LOW, 1.0, 1000.0));
}
void GetMid()
{
AssignCommand (oPlayer ,ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 1.0, 1000.0));
}