Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
22
_module/nss/anph_writesubrac.nss
Normal file
22
_module/nss/anph_writesubrac.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
string sSubrace = GetName(OBJECT_SELF);
|
||||
// don't allow multiple selection
|
||||
if (GetLocalInt(oPC, "SubraceSelected") == TRUE)
|
||||
{
|
||||
SendMessageToPC(oPC, "You alread selected a Subrace.");
|
||||
return;
|
||||
}
|
||||
|
||||
// check for alignment
|
||||
if ((GetAlignmentGoodEvil(oPC) != ALIGNMENT_EVIL) &&
|
||||
(sSubrace == "Drow" || sSubrace == "Duergar")
|
||||
)
|
||||
{
|
||||
SendMessageToPC(oPC, "Only evil " + sSubrace + " are allowed.");
|
||||
}
|
||||
SetSubRace(oPC, sSubrace);
|
||||
SendMessageToPC(oPC, "Your subrace is now defined as " + GetName(OBJECT_SELF) + ".");
|
||||
SetLocalInt(oPC, "SubraceSelected", TRUE);
|
||||
}
|
||||
Reference in New Issue
Block a user