Initial upload

Initial upload
This commit is contained in:
Jaysyn904
2023-09-25 18:13:22 -04:00
parent 684ef76c20
commit 499aba4eb3
5734 changed files with 4843758 additions and 0 deletions

48
_module/nss/dmshelper.nss Normal file
View File

@@ -0,0 +1,48 @@
#include "cs_misc_function"
void main()
{
object oItem=GetItemActivated();
object oActivator=GetItemActivator();
int nIsDM = FALSE;
int nIsKOT = FALSE;
if(GetIsDM(oActivator) != TRUE)
{
object oTest = GetFirstPC();
string sTestName = GetPCPlayerName(oActivator);
int nFound = FALSE;
while (GetIsObjectValid(oTest) && (! nFound))
{
if (GetPCPlayerName(oTest) == sTestName)
{
if(GetIsDM(oTest)) { nFound = TRUE; nIsDM = TRUE; }
else {
}
}
oTest=GetNextPC();
}
} else { nIsDM = TRUE; }
if (GetItemPossessedBy(oActivator, "KeyofCheating") != OBJECT_INVALID) {
nIsKOT = TRUE;
}
if ((nIsDM == FALSE) && (nIsKOT == FALSE)) {
DestroyObject(oItem);
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
return;
}
SetLocalInt(oActivator, "csiskot", nIsKOT);
// get the wand's activator and target, put target info into local vars on activator
object oMyActivator = GetItemActivator();
object oMyTarget = GetItemActivatedTarget();
SetLocalObject(oMyActivator, "dmwandtarget", oMyTarget);
location lMyLoc = GetItemActivatedTargetLocation();
SetLocalLocation(oMyActivator, "dmwandloc", lMyLoc);
//Make the activator start a conversation with itself
AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "dmwand", TRUE));
}