Initial upload
Initial upload
This commit is contained in:
58
_module/nss/ac_scalesofsente.nss
Normal file
58
_module/nss/ac_scalesofsente.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
//This is the default header for most items converted to the new
|
||||
//tagbased system.
|
||||
//Remember to create 2 scripts, one using the template, and name this
|
||||
//script ac_"tagnameofitemgoeshere" (without the "")
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
//Define Variables
|
||||
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
string tag = GetTag(oItem);
|
||||
|
||||
//You main script function goes under this line.
|
||||
|
||||
|
||||
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are Mortal and this is not yours!!!!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("sentenced");
|
||||
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
//only do the jump if the location is valid.
|
||||
//though not flawless, we just check if it is in a valid area.
|
||||
//the script will stop if the location isn't valid - meaning that
|
||||
//nothing put after the teleport will fire either.
|
||||
//the current location won't be stored, either
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(1.0, AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("sentenced")))));
|
||||
|
||||
FloatingTextStringOnCreature("You have been placed in prison by a DM for violation of server rules.", oPC);
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user