LoD_PRC8/_module/nss/dmw_runscript.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

36 lines
1.0 KiB
Plaintext

void main()
{
object oMyActivator = OBJECT_SELF;
if(GetIsDM(oMyActivator) != TRUE)
{
object oTest = GetFirstPC();
string sTestName = GetPCPlayerName(oMyActivator);
int nFound = FALSE;
while (GetIsObjectValid(oTest) && (! nFound))
{
if (GetPCPlayerName(oTest) == sTestName)
{
if(GetIsDM(oTest))
{
nFound = TRUE;
}
else
{
SendMessageToPC(oMyActivator,"This is too much power for mere mortals!");
return;
}
}
oTest=GetNextPC();
}
}
// get the wand's activator and target, put target info into local vars on activator
object oMyTarget;
SetLocalObject(oMyActivator, "dmwandtarget", oMyTarget);
location lMyLoc;
SetLocalLocation(oMyActivator, "dmwandloc", lMyLoc);
//Make the activator start a conversation with itself
AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "dmwand", TRUE));
return;
}