//dmw_activate // ** This script goes in the OnItemActivation event of your Module // ** Properties. It checks to see if the item used is a DM Helper // ** or the DM EFfect Wand. If it is, but the user isn't a DM, the wand // ** is destroyed. // ** DM Helper is not mine, and is not included with the distribution // ** of DM Effect Wand. If you are not using DM Helper, its code herein // ** will simply not be used. But you should be using it! It rocks. void main() { object oItem=GetItemActivated(); object oActivator=GetItemActivator(); if(GetTag(oItem)=="DMsHelper") // DM Helper code here { if(GetIsDM(oActivator) != TRUE) { SendMessageToPC(oActivator,"You are mortal and this is not yours!"); DestroyObject(oItem); return; } // 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)); return; } if(GetTag(oItem)=="AutoFollow") { object oTarget = GetItemActivatedTarget(); if(GetIsObjectValid(oTarget)) { AssignCommand ( oActivator, ActionForceFollowObject(oTarget)); } return; } if(GetTag(oItem)=="DMsEffectWand") // DM Effect Wand code here { if(GetIsDM(oActivator) != TRUE) { SendMessageToPC(oActivator,"You are mortal and this is not yours!"); DestroyObject(oItem); return; } // get the wand's activator and target, put target info into local vars on activator object oMyActivator = GetItemActivator(); object oMyTarget = GetItemActivatedTarget(); SetLocalObject(oMyActivator, "dmfx_wandtarget", oMyTarget); location lMyLoc = GetItemActivatedTargetLocation(); SetLocalLocation(oMyActivator, "dmfx_wandloc", lMyLoc); //Make the activator start a conversation with itself AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "conv_dmfxwand", TRUE)); return; } }