Initial Upload
Initial Upload
This commit is contained in:
173
_module/nss/mooooo_inc.nss
Normal file
173
_module/nss/mooooo_inc.nss
Normal file
@@ -0,0 +1,173 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Name: mooooo_inc
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Include file for Mooooo rod
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Flash
|
||||
//:: Created On: 03-mar-2005
|
||||
//:://////////////////////////////////////////////
|
||||
#include "elv_guildchecker"
|
||||
|
||||
void ExamineSomething(object oVictim);
|
||||
void WalkRandomly(object oVictim);
|
||||
|
||||
void TransformToCow(object oCow)
|
||||
{
|
||||
effect eMorph = ExtraordinaryEffect(EffectPolymorph(POLYMORPH_TYPE_COW, TRUE));
|
||||
effect eEff = GetFirstEffect(oCow);
|
||||
|
||||
while(GetIsEffectValid(eEff))
|
||||
{
|
||||
RemoveEffect(oCow, eEff);
|
||||
eEff = GetNextEffect(oCow);
|
||||
}
|
||||
|
||||
eEff = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_1);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEff, oCow);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMorph, oCow);
|
||||
}
|
||||
|
||||
void RemoveCow(object oCow)
|
||||
{
|
||||
effect eCow = GetFirstEffect(oCow);
|
||||
while(GetIsEffectValid(eCow))
|
||||
{
|
||||
RemoveEffect(oCow, eCow);
|
||||
eCow = GetNextEffect(oCow);
|
||||
}
|
||||
ApplyGuildAura(GetPCPlayerName(oCow), oCow);
|
||||
}
|
||||
|
||||
void TurnIntoCow(object oVictim)
|
||||
{
|
||||
int iTimeAsCow = d10() + 6;
|
||||
SetLocalInt(oVictim, "is_cow", TRUE);
|
||||
SetLocalInt(oVictim, "iCowDuration", iTimeAsCow);
|
||||
RemoveFromParty(oVictim);
|
||||
AssignCommand(oVictim, ClearAllActions(TRUE));
|
||||
AssignCommand (oVictim, ActionSpeakString("Ooops, errr... help?"));
|
||||
DelayCommand(2.5f, AssignCommand(oVictim, ActionSpeakString("Mmm... ?")));
|
||||
DelayCommand(3.5f, AssignCommand(oVictim, ActionSpeakString("Mooooo...?!?")));
|
||||
DelayCommand(4.0f, TransformToCow(oVictim));
|
||||
}
|
||||
|
||||
string GetRandomPCTalk()
|
||||
{
|
||||
string sText = "";
|
||||
switch(d4())
|
||||
{
|
||||
case 1: sText = "*licks your face* .......Yuck!";
|
||||
break;
|
||||
case 2: sText = "*wispers* You have some grass or mushroms for me?";
|
||||
break;
|
||||
case 3: sText = "M.... *nevermind*";
|
||||
break;
|
||||
case 4: sText = "Moo! Hey dude, scratch me will ya?";
|
||||
break;
|
||||
default: sText = "Err... This can't be right.";
|
||||
break;
|
||||
}
|
||||
return sText;
|
||||
}
|
||||
|
||||
void TalkToPC(object oVictim)
|
||||
{
|
||||
int i = 0;
|
||||
object oCreature = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oVictim, d6());
|
||||
|
||||
while((oCreature == OBJECT_INVALID) && (i < 10))
|
||||
{
|
||||
oCreature = GetNearestCreature(CREATURE_TYPE_IS_ALIVE, TRUE, oVictim, d6());
|
||||
if(oCreature == OBJECT_INVALID) i++;
|
||||
}
|
||||
|
||||
if(GetIsObjectValid(oCreature))
|
||||
{
|
||||
AssignCommand (oVictim, SetCommandable(TRUE));
|
||||
AssignCommand (oVictim, ClearAllActions(TRUE));
|
||||
AssignCommand (oVictim, ActionMoveToObject(oCreature, Random(1)));
|
||||
AssignCommand (oVictim, ActionSpeakString(GetRandomPCTalk()));
|
||||
AssignCommand (oVictim, SetCommandable(FALSE));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ExamineSomething(oVictim);
|
||||
}
|
||||
}
|
||||
|
||||
string GetRandomObjectTalk()
|
||||
{
|
||||
string sText = "";
|
||||
switch(d4())
|
||||
{
|
||||
case 1: sText = "Yep... boring";
|
||||
break;
|
||||
case 2: sText = "MOOOOOooooOOOooOooOOOOOOo";
|
||||
break;
|
||||
case 3: sText = "I've seen that before";
|
||||
break;
|
||||
case 4: sText = "*sings* Moo mo mo mo MOOOOOO mooo mOOOooOOOo";
|
||||
break;
|
||||
default: sText = "Err... This can't be right.";
|
||||
break;
|
||||
}
|
||||
return sText;
|
||||
}
|
||||
|
||||
void ExamineSomething(object oVictim)
|
||||
{
|
||||
int i = 0;
|
||||
object oThing = GetNearestObject(OBJECT_TYPE_ALL, oVictim, d6());
|
||||
|
||||
while(oThing == OBJECT_INVALID && (i < 10))
|
||||
{
|
||||
oThing = GetNearestObject(OBJECT_TYPE_ALL, oVictim, d6());
|
||||
if(oThing == OBJECT_INVALID) i++;
|
||||
}
|
||||
|
||||
if(GetIsObjectValid(oThing))
|
||||
{
|
||||
AssignCommand (oVictim, SetCommandable(TRUE));
|
||||
AssignCommand (oVictim, ClearAllActions(TRUE));
|
||||
AssignCommand (oVictim, ActionMoveToObject(oThing, Random(1)));
|
||||
AssignCommand (oVictim, ActionSpeakString(GetRandomObjectTalk()));
|
||||
AssignCommand (oVictim, SetCommandable(FALSE));
|
||||
}
|
||||
else
|
||||
{
|
||||
WalkRandomly(oVictim);
|
||||
}
|
||||
}
|
||||
|
||||
string GetRandomWalkTalk()
|
||||
{
|
||||
string sText = "";
|
||||
switch(d4())
|
||||
{
|
||||
case 1: sText = "Hmm, thats interesting..";
|
||||
break;
|
||||
case 2: sText = "That looks like some tasty grass over there";
|
||||
break;
|
||||
case 3: sText = "*chews*";
|
||||
break;
|
||||
case 4: sText = "Dum-de-dum-dum, err.. MoooOOooO";
|
||||
break;
|
||||
default: sText = "Err... This can't be right.";
|
||||
break;
|
||||
}
|
||||
return sText;
|
||||
}
|
||||
|
||||
void WalkRandomly(object oVictim)
|
||||
{
|
||||
AssignCommand (oVictim, SetCommandable(TRUE));
|
||||
AssignCommand (oVictim, ClearAllActions(TRUE));
|
||||
AssignCommand (oVictim, ActionSpeakString(GetRandomWalkTalk()));
|
||||
AssignCommand (oVictim, ActionRandomWalk());
|
||||
AssignCommand (oVictim, SetCommandable(FALSE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user