Battledale_PRC8/_module/nss/inc_emotewand.nss

199 lines
6.9 KiB
Plaintext
Raw Permalink Normal View History

//::///////////////////////////////////////////////
//:: Name: inc_emotewand
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
An INCLUDE script to handle all EmoteWand
functions.
*/
//:://////////////////////////////////////////////
//:: Created By: Samius Maximus
//:: Created On:
//:://////////////////////////////////////////////
void BroadcasttoParty(object oPC,string sText);
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 <20><>> 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 ("*Rolls a 100-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" 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 ("*Rolls a 10-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" 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 ("*Rolls a 12-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" 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 ("*Rolls a 20-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" 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 ("*Rolls a 4-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" 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 ("*Rolls a 6-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" 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 ("*Rolls an 8-sided die, and recieves a " + IntToString (iRoll) + ".*")));
DelayCommand (2.0, BroadcasttoParty (oPlayer,"*"+GetName(oPlayer)+" rolls a 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, 10000.0));
}
void Meditate()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_MEDITATE, 1.0, 10000.0));
}
void Read()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_READ));
DelayCommand (3.0, 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, 10000.0));
//AssignCommand (oPlayer, PlayVoiceChat (VOICE_CHAT_PAIN2));
}
void TalkForceful()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_FORCEFUL, 1.0, 10000.0));
}
void TalkLaughing()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_LAUGHING, 1.0, 10000.0));
}
void TalkPleading()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_TALK_PLEADING, 1.0, 10000.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 Drink()
{
AssignCommand (oPlayer ,ActionPlayAnimation (ANIMATION_FIREFORGET_DRINK, 0.3, 10000.0));
}
void GetLow()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_LOW, 1.0, 10000.0));
}
void GetMid()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 1.0, 10000.0));
}
void PauseTired()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_PAUSE_TIRED, 1.0, 10000.0));
}
void LookFar()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_LOOPING_LOOK_FAR, 1.0, 10000.0));
}
void HideObject()
{
AssignCommand (oPlayer, ActionPlayAnimation (ANIMATION_FIREFORGET_STEAL, 1.0, 10000.0));
}
void BroadcasttoParty(object oPC,string sText)
{
object oParty=GetFirstFactionMember(oPC);
while (GetIsObjectValid(oParty))
{
SendMessageToPC(oParty,sText);
oParty=GetNextFactionMember(oPC);
}
}