MMD_PRC8/_module/nss/use_mirror.nss
Jaysyn904 adeff59f82 Initial commit
Initial commit.
2024-08-02 23:18:00 -04:00

88 lines
2.6 KiB
Plaintext

void main()
{
object oPC = GetLastUsedBy();
int iUsed = GetLocalInt(OBJECT_SELF,"hasused");
int iRandom = d10();
float fTime = IntToFloat(d6()*120);
if (iUsed != 1)
{
switch (iRandom)
{
case 1:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_COW,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 2:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_MINOTAUR,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 3:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_BADGER,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 4:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_MANTICORE,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 5:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_PENGUIN,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 6:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_DOOM_KNIGHT,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 7:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_CHICKEN,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 8:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_VROCK,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 9:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_IMP,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
case 10:
{
effect ePoly = EffectPolymorph(POLYMORPH_TYPE_BEHOLDER,FALSE);
SetLocalInt(OBJECT_SELF,"hasused",1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,ePoly,oPC,fTime);
break;
}
}
SendMessageToPC(oPC,"You see yourself differently.");
return;
}
SendMessageToPC(oPC,"Nothing happens.");
}