Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
56
_module/nss/jw_safe_enter.nss
Normal file
56
_module/nss/jw_safe_enter.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
int CheckPartyForItem(object oMember, string sItem);
|
||||
int HasItem(object oCreature, string s);
|
||||
|
||||
void main()
|
||||
{
|
||||
object oObject=GetEnteringObject();
|
||||
object oItem;
|
||||
|
||||
if (GetIsObjectValid(oObject)&&GetIsPC(oObject))
|
||||
|
||||
{
|
||||
//SendMessageToPC(oObject,"checking you for the amulet");
|
||||
//oItem=GetItemInSlot(INVENTORY_SLOT_NECK,oObject);
|
||||
|
||||
if (CheckPartyForItem(oObject, "jw_am_cross"))
|
||||
|
||||
|
||||
//(GetTag(oItem)=="jw_am_cross")
|
||||
{
|
||||
//SendMessageToPC(oObject,"you have the amulet");
|
||||
SetLocalInt(GetObjectByTag("jw_invis_killer"),"safety",3);
|
||||
DelayCommand(120.0,SetLocalInt(GetObjectByTag("jw_invis_killer"),"safety",1));
|
||||
// FloatingTextStringOnCreature("The amulet glows",oObject);
|
||||
//ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_LIGHT_WHITE_20),oObject,120.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//SendMessageToPC(oObject,"what you have is "+GetTag(oItem)+" I wanted jw_am_cross");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int HasItem(object oCreature, string s)
|
||||
{
|
||||
return GetIsObjectValid(GetItemPossessedBy(oCreature, s));
|
||||
}
|
||||
|
||||
int CheckPartyForItem(object oMember, string sItem)
|
||||
{
|
||||
object oPartyMember = GetFirstFactionMember(oMember, TRUE);
|
||||
while (GetIsObjectValid(oPartyMember) == TRUE)
|
||||
{
|
||||
if (HasItem(oPartyMember, sItem)&&GetTag(GetArea(oPartyMember))=="TheCrypts")
|
||||
{ FloatingTextStringOnCreature("The amulet glows",oPartyMember);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_DUR_LIGHT_WHITE_20),oPartyMember,120.0);
|
||||
return TRUE;
|
||||
}
|
||||
oPartyMember = GetNextFactionMember(oMember, TRUE);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
Reference in New Issue
Block a user