Initial upload
Initial upload
This commit is contained in:
34
_module/nss/10relevelscript.nss
Normal file
34
_module/nss/10relevelscript.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//Put this on action taken in the conversation editor
|
||||
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=FALSE)
|
||||
{
|
||||
|
||||
if (!bAllParty)
|
||||
{
|
||||
nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
|
||||
SetXP(oPC, nXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
object oMember=GetFirstFactionMember(oPC, TRUE);
|
||||
|
||||
while (GetIsObjectValid(oMember))
|
||||
{
|
||||
nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
|
||||
SetXP(oMember, nXP);
|
||||
oMember=GetNextFactionMember(oPC, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
RemoveXPFromParty(44900, oPC, FALSE);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
|
||||
DelayCommand(5.0, RewardPartyXP(45100, oPC, FALSE));
|
||||
|
||||
}
|
34
_module/nss/20relevelscript.nss
Normal file
34
_module/nss/20relevelscript.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//Put this on action taken in the conversation editor
|
||||
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=FALSE)
|
||||
{
|
||||
|
||||
if (!bAllParty)
|
||||
{
|
||||
nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
|
||||
SetXP(oPC, nXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
object oMember=GetFirstFactionMember(oPC, TRUE);
|
||||
|
||||
while (GetIsObjectValid(oMember))
|
||||
{
|
||||
nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
|
||||
SetXP(oMember, nXP);
|
||||
oMember=GetNextFactionMember(oPC, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
RemoveXPFromParty(189900, oPC, FALSE);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
|
||||
DelayCommand(5.0, RewardPartyXP(190100, oPC, FALSE));
|
||||
|
||||
}
|
19
_module/nss/21levelcondition.nss
Normal file
19
_module/nss/21levelcondition.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName level21check
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 4/9/2007 9:31:53 AM
|
||||
//:://////////////////////////////////////////////
|
||||
int StartingConditional()
|
||||
{
|
||||
|
||||
// Restrict based on the player's class
|
||||
int iPassed = 0;
|
||||
if(GetHitDice(GetPCSpeaker()) >= 21)
|
||||
iPassed = 1;
|
||||
if(iPassed == 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
34
_module/nss/30relevelscript.nss
Normal file
34
_module/nss/30relevelscript.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//Put this on action taken in the conversation editor
|
||||
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=FALSE)
|
||||
{
|
||||
|
||||
if (!bAllParty)
|
||||
{
|
||||
nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
|
||||
SetXP(oPC, nXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
object oMember=GetFirstFactionMember(oPC, TRUE);
|
||||
|
||||
while (GetIsObjectValid(oMember))
|
||||
{
|
||||
nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
|
||||
SetXP(oMember, nXP);
|
||||
oMember=GetNextFactionMember(oPC, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
RemoveXPFromParty(434900, oPC, FALSE);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
|
||||
DelayCommand(5.0, RewardPartyXP(435100, oPC, FALSE));
|
||||
|
||||
}
|
15
_module/nss/3rdkey1.nss
Normal file
15
_module/nss/3rdkey1.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName beetlejuice
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 8/13/2002 12:14:41 PM
|
||||
//:://////////////////////////////////////////////
|
||||
#include "nw_i0_tool"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oItem = GetItemPossessedBy(GetPCSpeaker(), "3rdkey");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
34
_module/nss/40relevelscript.nss
Normal file
34
_module/nss/40relevelscript.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//Put this on action taken in the conversation editor
|
||||
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=FALSE)
|
||||
{
|
||||
|
||||
if (!bAllParty)
|
||||
{
|
||||
nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
|
||||
SetXP(oPC, nXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
object oMember=GetFirstFactionMember(oPC, TRUE);
|
||||
|
||||
while (GetIsObjectValid(oMember))
|
||||
{
|
||||
nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
|
||||
SetXP(oMember, nXP);
|
||||
oMember=GetNextFactionMember(oPC, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
RemoveXPFromParty(784900, oPC, FALSE);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
|
||||
DelayCommand(5.0, RewardPartyXP(785100, oPC, FALSE));
|
||||
|
||||
}
|
34
_module/nss/5relevelscript.nss
Normal file
34
_module/nss/5relevelscript.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//Put this on action taken in the conversation editor
|
||||
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=FALSE)
|
||||
{
|
||||
|
||||
if (!bAllParty)
|
||||
{
|
||||
nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
|
||||
SetXP(oPC, nXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
object oMember=GetFirstFactionMember(oPC, TRUE);
|
||||
|
||||
while (GetIsObjectValid(oMember))
|
||||
{
|
||||
nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
|
||||
SetXP(oMember, nXP);
|
||||
oMember=GetNextFactionMember(oPC, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
RemoveXPFromParty(19900, oPC, FALSE);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
|
||||
DelayCommand(5.0, RewardPartyXP(10000, oPC, FALSE));
|
||||
|
||||
}
|
18
_module/nss/M0Q01A04GUARSGK3.nss
Normal file
18
_module/nss/M0Q01A04GUARSGK3.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
// Added compatibility for PRC base classes
|
||||
// classes that should pass *only* the priest test go here
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int bCondition = GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oPC);
|
||||
return bCondition;
|
||||
}
|
23
_module/nss/M0Q01A07ANSESGK3.nss
Normal file
23
_module/nss/M0Q01A07ANSESGK3.nss
Normal file
@@ -0,0 +1,23 @@
|
||||
// Added compatibility for PRC base classes
|
||||
// All divine classes - not really important
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int bCondition = GetLevelByClass(CLASS_TYPE_ANTI_PALADIN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CRUSADER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRAGON_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_PALADIN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SOHEI, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oPC);
|
||||
return bCondition;
|
||||
}
|
18
_module/nss/M0Q01A07ELYNEGBa.nss
Normal file
18
_module/nss/M0Q01A07ELYNEGBa.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
// Added compatibility for PRC base classes
|
||||
// classes that should pass *only* the priest test go here
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int bCondition = GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oPC);
|
||||
return bCondition;
|
||||
}
|
19
_module/nss/M0Q01A07ELYNSCK3.nss
Normal file
19
_module/nss/M0Q01A07ELYNSCK3.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
// Added compatibility for PRC base classes
|
||||
// classes that should pass *only* the priest test go here
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int bCondition = GetLocalInt(OBJECT_SELF, "NW_L_TALKLEVEL") == 1
|
||||
&& (GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oPC));
|
||||
return bCondition;
|
||||
}
|
19
_module/nss/M0Q01A07ELYNSCK6.nss
Normal file
19
_module/nss/M0Q01A07ELYNSCK6.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
// Added compatibility for PRC base classes
|
||||
// classes that should pass *only* the priest test go here
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int bCondition = GetLocalInt(OBJECT_SELF, "NW_L_TALKLEVEL") == 2
|
||||
&& (GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oPC));
|
||||
return bCondition;
|
||||
}
|
17
_module/nss/M0Q01A07INJUEGB1.nss
Normal file
17
_module/nss/M0Q01A07INJUEGB1.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
// Added compatibility for PRC base classes
|
||||
#include "prc_class_const"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int bCondition = GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oPC)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oPC);
|
||||
return !bCondition;
|
||||
}
|
40
_module/nss/M0Q0_INJURED_B.nss
Normal file
40
_module/nss/M0Q0_INJURED_B.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//* If I've been healed, Trial has been completed
|
||||
// Added compatibility for PRC base classes
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
int nSpell = GetLastSpell();
|
||||
//* Check if healed
|
||||
if(nSpell == SPELL_CURE_MINOR_WOUNDS
|
||||
|| nSpell == SPELL_CURE_LIGHT_WOUNDS
|
||||
|| nSpell == SPELL_CURE_MODERATE_WOUNDS
|
||||
|| nSpell == SPELL_CURE_SERIOUS_WOUNDS
|
||||
|| nSpell == SPELL_CURE_CRITICAL_WOUNDS)
|
||||
{
|
||||
RemoveEffect(OBJECT_SELF,GetFirstEffect(OBJECT_SELF));
|
||||
object oCaster = GetLastSpellCaster();
|
||||
if(GetLocalInt(GetModule(),"NW_G_M1Q0HalfPriest") == TRUE
|
||||
|| GetLevelByClass(CLASS_TYPE_ARCHIVIST, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_BARD, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_CLERIC, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_DRUID, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_HEALER, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_MYSTIC, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHAMAN, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_SHUGENJA, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_TEMPLAR, oCaster)
|
||||
|| GetLevelByClass(CLASS_TYPE_WITCH, oCaster))
|
||||
{
|
||||
SetLocalInt(GetModule(),"NW_G_M0Q01_PRIEST_TEST",2);
|
||||
AssignCommand(GetNearestObjectByTag("M1Q0BElynwyd"),
|
||||
SpeakOneLinerConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalInt(GetModule(),"NW_G_M1Q0HalfPriest",TRUE);
|
||||
SetLocalInt(GetModule(),"NW_G_M1Q0Healing",TRUE);
|
||||
}
|
||||
}
|
||||
}
|
20
_module/nss/M1Q0EDest_D.nss
Normal file
20
_module/nss/M1Q0EDest_D.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
void main()
|
||||
{
|
||||
object oGulnan = GetNearestObjectByTag("M1Q0EGulnan");
|
||||
object oDevourer = GetNearestObjectByTag("M1Q0EDevourer");
|
||||
if(GetUserDefinedEventNumber() == 30)
|
||||
{
|
||||
SetLocalInt(GetArea(OBJECT_SELF),"NW_G_M1Q0CutScene",30);
|
||||
DelayCommand(2.0,SpeakOneLinerConversation("M1Q0EFinal"));
|
||||
DelayCommand(4.0,SignalEvent(oGulnan,EventUserDefined(40)));
|
||||
DelayCommand(4.0,SignalEvent(oDevourer,EventUserDefined(40)));
|
||||
}
|
||||
else if (GetUserDefinedEventNumber() == 0) // fix for enabling On Damaged UD event signal in the default script
|
||||
{
|
||||
ClearAllActions();
|
||||
ActionForceMoveToObject(GetNearestObjectByTag("M1Q0ToChapter1"));
|
||||
//ActionOpenDoor(GetNearestObjectByTag("-"));
|
||||
ActionDoCommand(DestroyObject(OBJECT_SELF));
|
||||
SetCommandable(FALSE);
|
||||
}
|
||||
}
|
20
_module/nss/M1S3CMakeClay.nss
Normal file
20
_module/nss/M1S3CMakeClay.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "prc_inc_castlvl"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
if(!GetIsObjectValid(GetItemPossessedBy(OBJECT_SELF, "M1S03ICLAY"))
|
||||
&& !GetIsObjectValid(GetItemPossessedBy(oPC, "M1S03ICLAY")))
|
||||
{
|
||||
int i, nClass;
|
||||
for(i = 1; i <= 3; i++)
|
||||
{
|
||||
nClass = GetClassByPosition(i, oPC);
|
||||
if(GetIsArcaneClass(nClass))
|
||||
{
|
||||
CreateItemOnObject("M1S03ICLAY", OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
_module/nss/M1S3CMakeFog.nss
Normal file
20
_module/nss/M1S3CMakeFog.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "prc_inc_castlvl"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
if(!GetIsObjectValid(GetItemPossessedBy(OBJECT_SELF, "M1S03IFOG"))
|
||||
&& !GetIsObjectValid(GetItemPossessedBy(oPC, "M1S03IFOG")))
|
||||
{
|
||||
int i, nClass;
|
||||
for(i = 1; i <= 3; i++)
|
||||
{
|
||||
nClass = GetClassByPosition(i, oPC);
|
||||
if(GetIsArcaneClass(nClass))
|
||||
{
|
||||
CreateItemOnObject("M1S03IFOG", OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
_module/nss/M1S3CMakeH2O.nss
Normal file
20
_module/nss/M1S3CMakeH2O.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "prc_inc_castlvl"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
if(!GetIsObjectValid(GetItemPossessedBy(OBJECT_SELF, "M1S03IFLASK"))
|
||||
&& !GetIsObjectValid(GetItemPossessedBy(oPC, "M1S03IFLASK")))
|
||||
{
|
||||
int i, nClass;
|
||||
for(i = 1; i <= 3; i++)
|
||||
{
|
||||
nClass = GetClassByPosition(i, oPC);
|
||||
if(GetIsArcaneClass(nClass))
|
||||
{
|
||||
CreateItemOnObject("M1S03IFLASK", OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
_module/nss/M1S3CMakeWood.nss
Normal file
20
_module/nss/M1S3CMakeWood.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "prc_inc_castlvl"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
if(!GetIsObjectValid(GetItemPossessedBy(OBJECT_SELF, "M1S03IKINDLING"))
|
||||
&& !GetIsObjectValid(GetItemPossessedBy(oPC, "M1S03IKINDLING")))
|
||||
{
|
||||
int i, nClass;
|
||||
for(i = 1; i <= 3; i++)
|
||||
{
|
||||
nClass = GetClassByPosition(i, oPC);
|
||||
if(GetIsArcaneClass(nClass))
|
||||
{
|
||||
CreateItemOnObject("M1S03IKINDLING", OBJECT_SELF);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
58
_module/nss/__nw_s0_fireshld.nss
Normal file
58
_module/nss/__nw_s0_fireshld.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shield
|
||||
//:: NW_S0_FireShld.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Caster gains 50% cold and fire immunity. Also anyone
|
||||
who strikes the caster with melee attacks takes
|
||||
1d6 + 1 per caster level in damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
bugfix by Grant Beaty 2002.08.31
|
||||
- could stack
|
||||
*/
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD);
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
object oTarget = OBJECT_SELF;
|
||||
effect eShield = EffectRegenerate(3, 6.0);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eCold = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD, 50);
|
||||
effect eFire = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 50);
|
||||
|
||||
//Link effects
|
||||
effect eLink = EffectLinkEffects(eShield, eCold);
|
||||
|
||||
eLink = EffectLinkEffects(eLink, eFire);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eVis);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ELEMENTAL_SHIELD, FALSE));
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//If there is already a fire shield in effect, remove it.
|
||||
if(GetHasSpellEffect(GetSpellId(), oTarget))
|
||||
RemoveSpellEffects(GetSpellId(), oTarget, oTarget);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
105
_module/nss/_clone_info_list.nss
Normal file
105
_module/nss/_clone_info_list.nss
Normal file
@@ -0,0 +1,105 @@
|
||||
//Creator: Unknown
|
||||
//Revised By: Genisys (Guile)
|
||||
//Revised On: 8/12/08
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
|
||||
///Delete Var to start fresh\\\\
|
||||
object oPC = GetFirstPC();
|
||||
|
||||
while(GetIsPC(oPC)==TRUE)
|
||||
{
|
||||
DeleteLocalInt(oPC,"bootlist");
|
||||
DeleteLocalString(oPC,"playerinfo");
|
||||
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
|
||||
////Get Info of each Player and Store it on them\\\\
|
||||
int nLoop = 8999;
|
||||
SetCustomToken(9000,"Empty");
|
||||
SetCustomToken(9001,"Empty");
|
||||
SetCustomToken(9002,"Empty");
|
||||
SetCustomToken(9003,"Empty");
|
||||
SetCustomToken(9004,"Empty");
|
||||
SetCustomToken(9005,"Empty");
|
||||
SetCustomToken(9006,"Empty");
|
||||
SetCustomToken(9007,"Empty");
|
||||
SetCustomToken(9008,"Empty");
|
||||
SetCustomToken(9009,"Empty");
|
||||
|
||||
string sMessage;
|
||||
object oTarget;
|
||||
//object oPC = GetLastUsedBy();
|
||||
string sArea;
|
||||
string sAreaTag;
|
||||
string sLevel;
|
||||
int class, pos;
|
||||
string cname;
|
||||
|
||||
// Clear Message
|
||||
sMessage = "";
|
||||
|
||||
// First Line
|
||||
|
||||
sMessage = "<c<01>>---------------------------------";
|
||||
|
||||
// Get First Player
|
||||
oTarget = GetFirstPC();
|
||||
|
||||
|
||||
// Check if valid
|
||||
while(GetIsPC(oTarget)==TRUE)
|
||||
{
|
||||
|
||||
sLevel = "<c<><63><EFBFBD>>";
|
||||
nLoop++;
|
||||
string Name = GetName(oTarget);
|
||||
int Hitpoints = GetMaxHitPoints(oTarget);
|
||||
int AC = GetAC(oTarget);
|
||||
string PCPlayerName = GetPCPlayerName(oTarget);
|
||||
string sAreaName = GetName(GetArea(oTarget));
|
||||
for(pos=1; pos<4; pos++)
|
||||
{
|
||||
class = GetClassByPosition(pos, oTarget);
|
||||
if (class != CLASS_TYPE_INVALID)
|
||||
{
|
||||
cname = Get2DAString("classes", "Label", class);
|
||||
if (cname == "") cname = "unknown (" + IntToString(class) + ")";
|
||||
sLevel = sLevel + cname +"<c<><63><EFBFBD>> "+"<c<><63><EFBFBD>>(<c<01>>"+ IntToString(GetLevelByClass(class, oTarget))+"<c<><63><EFBFBD>>)" + " <c<><63><EFBFBD>>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Display Name
|
||||
sMessage = " ";
|
||||
|
||||
sMessage = "<c<01>>:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:";
|
||||
|
||||
sMessage +="\n"+"<c<01>>"+Name;
|
||||
|
||||
sMessage +="\n"+sLevel;
|
||||
|
||||
sMessage +="\n"+"AC:<c<01>> "+IntToString(AC);
|
||||
|
||||
sMessage +="\n"+"<c<><63><EFBFBD>>HP: <c<01>>"+IntToString(Hitpoints);
|
||||
|
||||
|
||||
// Set Token and Info//
|
||||
|
||||
SetLocalString(oTarget,"playerinfo",sMessage);
|
||||
SetLocalInt(oTarget,"bootlist",nLoop);
|
||||
int Token = GetLocalInt(oTarget,"bootlist");
|
||||
string Info = GetLocalString(oTarget,"playerinfo");
|
||||
SetCustomToken(Token,Info);
|
||||
|
||||
//Continue the loop
|
||||
oTarget = GetNextPC();
|
||||
}
|
||||
|
||||
//Main Script End
|
||||
}
|
4
_module/nss/_free_gold.nss
Normal file
4
_module/nss/_free_gold.nss
Normal file
@@ -0,0 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
GiveGoldToCreature(GetLastUsedBy(), 999999999);
|
||||
}
|
4
_module/nss/_free_levels.nss
Normal file
4
_module/nss/_free_levels.nss
Normal file
@@ -0,0 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
SetXP(GetLastUsedBy(), 800000);
|
||||
}
|
163
_module/nss/_inc_color_text_.nss
Normal file
163
_module/nss/_inc_color_text_.nss
Normal file
@@ -0,0 +1,163 @@
|
||||
/*--------------------------------------------------------
|
||||
|
||||
Script Name: _inc_color_text_
|
||||
----------------------------------------------------------
|
||||
Created By: Sadju
|
||||
Created On: Unkown
|
||||
----------------------------------------------------------
|
||||
|
||||
This very nice include allows you to set random colors,
|
||||
rainbow colors, or just set a color to an object, item,
|
||||
pc's name, or what have you!
|
||||
|
||||
----------------------------------------------------------*/
|
||||
|
||||
string sColors = " !!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~<7E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||
|
||||
// Returns Pseudo-Ascii Character (for color use only, not accurate Ascii)
|
||||
string ASCII(int iAsciiCode) // 0 - 255
|
||||
{
|
||||
int ASCIIReturn = iAsciiCode;
|
||||
if (ASCIIReturn<0) ASCIIReturn = 0;
|
||||
else if (ASCIIReturn>255) ASCIIReturn = 255;
|
||||
return GetSubString(sColors,iAsciiCode+1,1);
|
||||
}
|
||||
|
||||
// Returns Pseudo-Ascii Integer Value (for color use only, not accurate Ascii)
|
||||
int ASCIIToInt(string sLookup)
|
||||
{
|
||||
return FindSubString(sColors, sLookup)-1;
|
||||
}
|
||||
|
||||
// Returns a Color Code Based on Pseudo-Ascii
|
||||
string RGB(int iR, int iG, int iB) // 0-255
|
||||
{
|
||||
return "<c"+ASCII(iR)+ASCII(iG)+ASCII(iB)+">";
|
||||
}
|
||||
|
||||
const string TEXT_COLOR_RED = "<22> ";
|
||||
const string TEXT_COLOR_ORANGE = "<22><> ";
|
||||
const string TEXT_COLOR_YELLOW = "<22><> ";
|
||||
const string TEXT_COLOR_GREEN = " <20> ";
|
||||
const string TEXT_COLOR_BLUE = " <20>";
|
||||
const string TEXT_COLOR_CYAN = " <20><>";
|
||||
const string TEXT_COLOR_PURPLE = "<22> <20>";
|
||||
const string TEXT_COLOR_WHITE = "<22><><EFBFBD>";
|
||||
const string TEXT_COLOR_GREY = "~~~";
|
||||
const string TEXT_COLOR_CRIMSON = "<22> ";
|
||||
const string TEXT_COLOR_EMERALD = " ~ ";
|
||||
const string TEXT_COLOR_BROWN = "<22>~6";
|
||||
const string TEXT_COLOR_AZURE = "~~<7E>";
|
||||
|
||||
|
||||
string RGBColorText(string RGBCode, string sText)
|
||||
{
|
||||
return "<c"+ RGBCode +">"+ sText +"</c>";
|
||||
}
|
||||
|
||||
//ColorText Function, uses either a color token or a 3-Digit Color Code
|
||||
//Codes can be copied and pasted to item and placable names, descriptions, etc :)
|
||||
string ColorText(string ColorCode, string sText)
|
||||
{
|
||||
if (ColorCode == "crimson") ColorCode = "<c<> >";
|
||||
else if (ColorCode == "red") ColorCode = "<c<> >";
|
||||
else if (ColorCode == "plum") ColorCode = "<c<>ww>";
|
||||
else if (ColorCode == "tangerine") ColorCode = "<c<>Z >";
|
||||
else if (ColorCode == "orange") ColorCode = "<c<><63> >";
|
||||
else if (ColorCode == "peach") ColorCode = "<c<><63> >";
|
||||
else if (ColorCode == "amber") ColorCode = "<c<><63> >";
|
||||
else if (ColorCode == "yellow") ColorCode = "<c<><63> >";
|
||||
else if (ColorCode == "lemon") ColorCode = "<c<><63>w>";
|
||||
else if (ColorCode == "emerald") ColorCode = "<c ~ >";
|
||||
else if (ColorCode == "green") ColorCode = "<c <20> >";
|
||||
else if (ColorCode == "lime") ColorCode = "<cw<63>w>";
|
||||
else if (ColorCode == "midnight") ColorCode = "<c t>";
|
||||
else if (ColorCode == "navy") ColorCode = "<c <20>>";
|
||||
else if (ColorCode == "blue") ColorCode = "<c <20>>";
|
||||
else if (ColorCode == "azure") ColorCode = "<c~~<7E>>";
|
||||
else if (ColorCode == "skyblue") ColorCode = "<c<><63><EFBFBD>>";
|
||||
else if (ColorCode == "violet") ColorCode = "<c<> <20>>";
|
||||
else if (ColorCode == "purple") ColorCode = "<c<> <20>>";
|
||||
else if (ColorCode == "lavender") ColorCode = "<c<>~<7E>>";
|
||||
else if (ColorCode == "black") ColorCode = "<c >";
|
||||
else if (ColorCode == "slate") ColorCode = "<c666>";
|
||||
else if (ColorCode == "darkgrey") ColorCode = "<cZZZ>";
|
||||
else if (ColorCode == "grey") ColorCode = "<c~~~>";
|
||||
else if (ColorCode == "lightgrey") ColorCode = "<c<><63><EFBFBD>>";
|
||||
else if (ColorCode == "white") ColorCode = "<c<><63><EFBFBD>>";
|
||||
else if (ColorCode == "turquoise") ColorCode = "<c <20><>>";
|
||||
else if (ColorCode == "jade") ColorCode = "<c tt>";
|
||||
else if (ColorCode == "cyan") ColorCode = "<c <20><>>";
|
||||
else if (ColorCode == "cerulean") ColorCode = "<c<><63><EFBFBD>>";
|
||||
else if (ColorCode == "aqua") ColorCode = "<cZǯ>";
|
||||
else if (ColorCode == "silver") ColorCode = "<c<><63><EFBFBD>>";
|
||||
else if (ColorCode == "rose") ColorCode = "<c<>FF>";
|
||||
else if (ColorCode == "pink") ColorCode = "<c<>V<EFBFBD>>";
|
||||
else if (ColorCode == "wood") ColorCode = "<c<>Z(>";
|
||||
else if (ColorCode == "brown") ColorCode = "<c<>~6>";
|
||||
else if (ColorCode == "tan") ColorCode = "<cߑF>";
|
||||
else if (ColorCode == "flesh") ColorCode = "<c<><63>Z>";
|
||||
else if (ColorCode == "ivory") ColorCode = "<c<>Υ>";
|
||||
else if (ColorCode == "gold") ColorCode = "<c<><63>6>";
|
||||
else if (ColorCode == "random")
|
||||
{
|
||||
switch (d3())
|
||||
{
|
||||
case 1: ColorCode = RGB(Random(128)+128,Random(192)+64,Random(192)+64); break;
|
||||
case 2: ColorCode = RGB(Random(192)+64,Random(128)+128,Random(192)+64); break;
|
||||
case 3: ColorCode = RGB(Random(192)+64,Random(192)+64,Random(128)+128); break;
|
||||
}
|
||||
}
|
||||
|
||||
return ColorCode + sText + "</c>";
|
||||
}
|
||||
|
||||
int LoInt(int iInt1, int iInt2) {return (iInt1>iInt2)?iInt2:iInt1;}
|
||||
|
||||
int HiInt(int iInt1, int iInt2) {return (iInt1>iInt2)?iInt1:iInt2;}
|
||||
|
||||
string JumbleCode(string JColor1, string JColor2)
|
||||
{
|
||||
string sR1=(GetSubString(JColor1,0,1));
|
||||
string sG1=(GetSubString(JColor1,1,1));
|
||||
string sB1=(GetSubString(JColor1,2,1));
|
||||
|
||||
string sR2=(GetSubString(JColor2,0,1));
|
||||
string sG2=(GetSubString(JColor2,1,1));
|
||||
string sB2=(GetSubString(JColor2,2,1));
|
||||
|
||||
int RHi=HiInt(ASCIIToInt(sR1),ASCIIToInt(sR2));
|
||||
int RLo=LoInt(ASCIIToInt(sR1),ASCIIToInt(sR2));
|
||||
int GHi=HiInt(ASCIIToInt(sG1),ASCIIToInt(sG2));
|
||||
int GLo=LoInt(ASCIIToInt(sG1),ASCIIToInt(sG2));
|
||||
int BHi=HiInt(ASCIIToInt(sB1),ASCIIToInt(sB2));
|
||||
int BLo=LoInt(ASCIIToInt(sB1),ASCIIToInt(sB2));
|
||||
|
||||
return ASCII(Random(RHi-RLo)+RLo+1)+ASCII(Random(GHi-GLo)+GLo+1)+ASCII(Random(BHi-BLo)+BLo+1);
|
||||
}
|
||||
|
||||
//Jumble Text randomly selects a color between Color1 and Color2
|
||||
string JumbledText(string Color1, string Color2, string JumbleString)
|
||||
{
|
||||
int j;
|
||||
string ReturnString;
|
||||
while (j<(GetStringLength(JumbleString)))
|
||||
{
|
||||
ReturnString = ReturnString+"<c"+JumbleCode(Color1,Color2)+">"+GetSubString(JumbleString,j,1)+"</c>";
|
||||
j++;
|
||||
}
|
||||
return ReturnString;
|
||||
}
|
||||
|
||||
string ChaoticText(string RandomString)
|
||||
{
|
||||
int i=1;
|
||||
string ReturnString;
|
||||
|
||||
while (i<(GetStringLength(RandomString)+1))
|
||||
{
|
||||
ReturnString = ReturnString + ColorText("random",GetSubString(RandomString,i-1,1));
|
||||
i++;
|
||||
}
|
||||
return ReturnString;
|
||||
}
|
12
_module/nss/abysstorm.nss
Normal file
12
_module/nss/abysstorm.nss
Normal file
@@ -0,0 +1,12 @@
|
||||
void main()
|
||||
{
|
||||
location forge = GetLocation(GetObjectByTag("HellForge"));
|
||||
object target = GetNearestCreatureToLocation(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC, forge, 1, CREATURE_TYPE_IS_ALIVE);
|
||||
if (target == OBJECT_INVALID){return;}
|
||||
if (GetArea(GetObjectByTag("HellForge")) != GetArea(target)){return;}
|
||||
location boom = GetLocation(target);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_LIGHTNING_M), forge);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_LIGHTNING_M), boom);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_LIGHTNING_S), forge);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_LIGHTNING_S), boom);
|
||||
}
|
59
_module/nss/ac_arcanesheath.nss
Normal file
59
_module/nss/ac_arcanesheath.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
//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"
|
||||
#include "prc_class_const"
|
||||
|
||||
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.
|
||||
|
||||
|
||||
//Define Variables
|
||||
|
||||
object oPC;
|
||||
effect eEffect;
|
||||
|
||||
if (GetIsObjectValid(GetItemActivatedTarget()))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((GetLevelByClass(CLASS_TYPE_BARD, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SORCERER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_DREAD_NECROMANCER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_DUSKBLADE, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_WARMAGE, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_SHADOWCASTER, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_WARLOCK, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_DRAGONFIRE_ADEPT, oPC)>0)||
|
||||
(GetLevelByClass(CLASS_TYPE_WIZARD, oPC)>0))
|
||||
{
|
||||
}
|
||||
else if (GetHitDice(oPC) >= 20)
|
||||
{
|
||||
oPC = GetItemActivator();
|
||||
|
||||
eEffect = EffectSummonCreature("dancingscimit001", VFX_IMP_HARM, 1.0);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oPC, 5000.0);
|
||||
|
||||
}
|
||||
}
|
58
_module/nss/ac_armageddonsta.nss
Normal file
58
_module/nss/ac_armageddonsta.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.
|
||||
|
||||
{
|
||||
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;
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
SendMessageToAllDMs("Armageddon Staff Activated by " + dmname);
|
||||
WriteTimestampedLogEntry("Armageddon Staff Activated by " + dmname);
|
||||
SetLocalInt(GetModule(), "loadtimer", 2597) ;
|
||||
string time = IntToString(GetLocalInt(GetModule(), "loadtimer"));
|
||||
WriteTimestampedLogEntry("Timekeeper = " + time);
|
||||
object oWarn = GetFirstPC();
|
||||
while ((oWarn != OBJECT_INVALID))
|
||||
{
|
||||
location lVis = GetLocation(oWarn);
|
||||
SendMessageToPC(oWarn, "Emergency Reload Sequence Activated");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION), lVis, 5.0);
|
||||
oWarn = GetNextPC();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
37
_module/nss/ac_artmech44.nss
Normal file
37
_module/nss/ac_artmech44.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
//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;
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(5000, oPC, TRUE));
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectRegenerate(33, 2.0), oActivator, 500.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment (90), oActivator, 500.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(90), oActivator, 500.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 500.0));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 500.0));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator, 500.0));
|
||||
|
||||
}
|
||||
|
||||
}
|
17
_module/nss/ac_autofollow.nss
Normal file
17
_module/nss/ac_autofollow.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
|
||||
//Put body of script here
|
||||
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
|
||||
DelayCommand(0.2, AssignCommand(oActivator, ActionForceFollowObject(target, 3.0)));
|
||||
|
||||
}
|
29
_module/nss/ac_bannisher.nss
Normal file
29
_module/nss/ac_bannisher.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
|| !GetIsPC(GetItemActivatedTarget())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are not a DM!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("char_bann", oPC, 1);
|
||||
|
||||
FloatingTextStringOnCreature("Your Character has been banned by a DM.", oPC, TRUE);
|
||||
|
||||
//Make the it permanent!
|
||||
DelayCommand(2.0, ExportSingleCharacter(oPC));
|
||||
//Now boot them!
|
||||
DelayCommand(6.0, BootPC(oTarget));
|
||||
}
|
63
_module/nss/ac_bootsofbannis.nss
Normal file
63
_module/nss/ac_bootsofbannis.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
ApplyEffectAtLocation ( DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget), 12.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_TENTACLE), oTarget, 8.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_GHOSTLY_PULSE), oTarget, 8.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("Oh NO! Im being sucked into the depths of Hell!!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I will be at the mercy of a powerfull demon! HELP ME!!!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(5.9, AssignCommand(oTarget, ClearAllActions()));
|
||||
DelayCommand(6.0, AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("tortureway")))));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("There is no escape from Hell! Only repeated brutal torture!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I deserve this hellish judgements for my misdeeds!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(20.0, AssignCommand(oTarget, ActionSpeakString("If I had known the consequences of my actions, I would have chosen a different path!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
}
|
82
_module/nss/ac_boulder.nss
Normal file
82
_module/nss/ac_boulder.nss
Normal file
@@ -0,0 +1,82 @@
|
||||
//Created by Genisys / Guile 6/7/08
|
||||
|
||||
//This cool tagbased scripted item throws a boulder at the target
|
||||
//The item should be single use and look like a boulder (if possible)
|
||||
//Also, the item should weight 100 lbs!
|
||||
|
||||
void RockDamage(location lImpact);
|
||||
|
||||
object oPC = GetItemActivator();
|
||||
|
||||
#include "x0_i0_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oUser = GetItemActivator();
|
||||
object oCaster;
|
||||
oCaster = oPC;
|
||||
|
||||
|
||||
if(GetLocalInt(GetAreaFromLocation(GetLocation(oUser)), "NOCAST")==2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
location lImpact = GetLocation(oTarget);
|
||||
int nSpell = 775;
|
||||
|
||||
if(GetObjectType(oTarget)!=OBJECT_TYPE_CREATURE)
|
||||
{
|
||||
FloatingTextStringOnCreature("You must target a creature!", oUser);
|
||||
return;
|
||||
}
|
||||
if(GetAbilityScore(oPC, ABILITY_STRENGTH, TRUE) >19)
|
||||
{
|
||||
|
||||
AssignCommand(oPC, ActionCastSpellAtObject(
|
||||
nSpell, oTarget, METAMAGIC_ANY, TRUE, 20, PROJECTILE_PATH_TYPE_DEFAULT
|
||||
, TRUE));
|
||||
|
||||
RockDamage(lImpact);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RockDamage(location lImpact)
|
||||
{
|
||||
float fDelay;
|
||||
int nDamage;
|
||||
effect eDam;
|
||||
//Declare the spell shape, size and the location. Capture the first target object in the shape.
|
||||
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_SMALL, lImpact, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
//Cycle through the targets within the spell shape until an invalid object is captured.
|
||||
|
||||
int nDamageAdjustment = GetAbilityModifier (ABILITY_STRENGTH,OBJECT_SELF);
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
|
||||
if (spellsIsTarget(oTarget,SPELL_TARGET_STANDARDHOSTILE,OBJECT_SELF))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oPC, 775));
|
||||
//Get the distance between the explosion and the target to calculate delay
|
||||
fDelay = GetDistanceBetweenLocations(lImpact, GetLocation(oTarget))/20;
|
||||
//Roll damage for each target, but doors are always killed
|
||||
|
||||
|
||||
nDamage = d6(7) + nDamageAdjustment;
|
||||
|
||||
//Set the damage effect
|
||||
eDam = EffectDamage(nDamage, DAMAGE_TYPE_BLUDGEONING,DAMAGE_POWER_PLUS_ONE);
|
||||
|
||||
// Apply effects to the currently selected target.
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
|
||||
|
||||
}
|
||||
//Select the next target within the spell shape.
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lImpact, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR | OBJECT_TYPE_PLACEABLE);
|
||||
}
|
||||
}
|
58
_module/nss/ac_colorwand.nss
Normal file
58
_module/nss/ac_colorwand.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
////////////////////////////////////
|
||||
//Created by Genisys / Guile 6/14/08
|
||||
////////////////////////////////////
|
||||
/*
|
||||
|
||||
This is a tagbased item script for
|
||||
the item Tagnamed "colowand"
|
||||
which allows the user to colorize the
|
||||
name of an item.
|
||||
|
||||
*/
|
||||
////////////////////////////////////
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
object oItem;
|
||||
object oTarget;
|
||||
oPC = GetItemActivator();
|
||||
oItem = GetItemActivatedTarget();
|
||||
oTarget = oPC;
|
||||
|
||||
//Not useable in combat..
|
||||
if (GetIsInCombat(GetItemActivator()))
|
||||
{
|
||||
SendMessageToPC(GetItemActivator(), "This item is not useable in combat!");
|
||||
return;
|
||||
}
|
||||
//The user must target an item or themself!
|
||||
if (GetObjectType(oItem)!= OBJECT_TYPE_ITEM)
|
||||
{
|
||||
if(oItem==oPC)
|
||||
{
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "colorinvconv", TRUE));
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToPC(GetItemActivator(), "You must target an item or yourself!!!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Let's make sure that all of thier variables are clear..
|
||||
DeleteLocalString(oPC, "ONIDC");
|
||||
DeleteLocalString(oPC, "ONNC");
|
||||
|
||||
//Set Strings on PC to ID the item later..
|
||||
SetLocalString(oItem, "ONIDC", GetResRef(oItem));
|
||||
SetLocalString(oPC, "ONNC", GetName(oItem));
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "coloritemconv", TRUE));
|
||||
|
||||
}
|
36
_module/nss/ac_createlistene.nss
Normal file
36
_module/nss/ac_createlistene.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
//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.
|
||||
|
||||
if(GetResRef(oItem) == "createlistener")
|
||||
{
|
||||
if(GetLocalObject(oPlayer, "Listener")!= OBJECT_INVALID){ SendMessageToPC(oPlayer, "You already have a listener"); return;}
|
||||
object oListener = CreateObject(OBJECT_TYPE_CREATURE, "listener", GetLocation(oPlayer));
|
||||
SetLocalObject(oListener, "Master", oPlayer);
|
||||
SetLocalObject(oPlayer, "Listener", oListener);
|
||||
effect eInvis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY); // players shouldn't see their listener
|
||||
effect eEther = EffectEthereal(); // prevents monsters attacking the listener
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oListener, 999999.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEther, oListener, 999999.0);
|
||||
AssignCommand(oListener, ActionForceFollowObject(oPlayer));
|
||||
SetListening(oListener, TRUE);
|
||||
SetListenPattern(oListener, "**::**", 5432);
|
||||
}
|
||||
}
|
40
_module/nss/ac_crystalshard.nss
Normal file
40
_module/nss/ac_crystalshard.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//This is the tagbased item on_activate_item script for the item Crystal Shard
|
||||
//This script is fired by the crystalshard script, which operates on the
|
||||
//Tag Based System, this is my first tested script as a scripter in the new
|
||||
//tagbased system.
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
|
||||
//Check if target is a creature or not.
|
||||
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE)
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_PULSE_COLD), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_PULSE_COLD), GetLocation(oTarget));
|
||||
|
||||
effect eEffect;
|
||||
//Apply 3d100 dmg to the target creature
|
||||
eEffect = EffectDamage(d100(2) + 80, DAMAGE_TYPE_COLD, DAMAGE_POWER_ENERGY);
|
||||
|
||||
//Delay the damage so the visual effects fire before damage is applied.
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, GetItemActivatedTarget()));
|
||||
|
||||
}
|
20
_module/nss/ac_dabomb.nss
Normal file
20
_module/nss/ac_dabomb.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#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.
|
||||
{
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "bombconv", TRUE));
|
||||
|
||||
}
|
||||
}
|
24
_module/nss/ac_dangerbow44.nss
Normal file
24
_module/nss/ac_dangerbow44.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
#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 oPC;
|
||||
int nStackSize = 99;
|
||||
|
||||
if (!GetIsPC(GetItemActivatedTarget()))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("dangerarrows44", oPC, nStackSize);
|
||||
|
||||
}
|
47
_module/nss/ac_dmkey.nss
Normal file
47
_module/nss/ac_dmkey.nss
Normal file
@@ -0,0 +1,47 @@
|
||||
//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()
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are not a DM!!!");
|
||||
return;}
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDamage(999, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_ENERGY);
|
||||
|
||||
DelayCommand(5.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, GetItemActivatedTarget()));
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_UNDEAD_DRAGON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_UNDEAD_DRAGON), GetLocation(oTarget));
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
eEffect = EffectVisualEffect(VFX_IMP_DESTRUCTION);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget));
|
||||
else
|
||||
DelayCommand(4.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oTarget)));
|
||||
|
||||
}
|
40
_module/nss/ac_dmseffectwand.nss
Normal file
40
_module/nss/ac_dmseffectwand.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
221
_module/nss/ac_druidtool.nss
Normal file
221
_module/nss/ac_druidtool.nss
Normal file
@@ -0,0 +1,221 @@
|
||||
//Created by Genisys 5/4/08
|
||||
//Updated 2/14/09 (Found bugs!!)
|
||||
|
||||
//This OnActivateItem script works off the resref name of the items equipped.
|
||||
//It allows those polymorphed who die to unequip all items and equip them again
|
||||
//with just the use of this item. (Believe me I know how frustrating that is!)
|
||||
|
||||
#include "x2_inc_switches"
|
||||
|
||||
//PROTOTYPE DECLARED
|
||||
void EquipAllUnequipedItems(object oTarget);
|
||||
|
||||
void main ()
|
||||
{
|
||||
//Declare All Major Variables
|
||||
object oPC;
|
||||
oPC = GetItemActivator();
|
||||
object oItem1, oItem2, oItem3, oItem4, oItem5, oItem6, oItem7, oItem8,
|
||||
oItem9, oItem11, oItem12;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
//Add this code to bypass my weapon swapping script..
|
||||
SetLocalInt(oPC, "SWAPPING", 1);
|
||||
DelayCommand(10.0, SetLocalInt(oPC, "SWAPPING", 0));
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_NECK, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem1 = GetItemInSlot(INVENTORY_SLOT_NECK, oPC);
|
||||
SetLocalInt(oItem1, "NECK", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_NECK, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_BELT, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem2 = GetItemInSlot(INVENTORY_SLOT_BELT, oPC);
|
||||
SetLocalInt(oItem2, "BELT", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_BELT, oPC)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_BOOTS, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem3 = GetItemInSlot(INVENTORY_SLOT_BOOTS, oPC);
|
||||
SetLocalInt(oItem3, "BOOTS", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_BOOTS, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_CHEST, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem4 = GetItemInSlot(INVENTORY_SLOT_CHEST, oPC);
|
||||
SetLocalInt(oItem4, "CHEST", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem5 = GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC);
|
||||
SetLocalInt(oItem5, "CLOAK", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_CLOAK, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_HEAD, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem6 = GetItemInSlot(INVENTORY_SLOT_HEAD, oPC);
|
||||
SetLocalInt(oItem6, "HEAD", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_HEAD, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem7 = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
|
||||
SetLocalInt(oItem7, "L_HAND", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_LEFTRING, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem8 = GetItemInSlot(INVENTORY_SLOT_LEFTRING, oPC);
|
||||
SetLocalInt(oItem8, "L_RING", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem9 = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
|
||||
SetLocalInt(oItem9, "R_HAND", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem11 = GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oPC);
|
||||
SetLocalInt(oItem11, "R_RING", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oPC)));
|
||||
|
||||
}
|
||||
|
||||
if ((GetItemInSlot(INVENTORY_SLOT_ARMS, oPC) != OBJECT_INVALID))
|
||||
{
|
||||
|
||||
oItem12 = GetItemInSlot(INVENTORY_SLOT_ARMS, oPC);
|
||||
SetLocalInt(oItem12, "ARMS", 1);
|
||||
AssignCommand(oPC, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_ARMS, oPC)));
|
||||
|
||||
}
|
||||
|
||||
//Finally, have the PC equip all of the items after a delay..
|
||||
DelayCommand(1.5, EquipAllUnequipedItems(oPC));
|
||||
|
||||
//Main Script End
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
//PROTOTYPE DEFINED
|
||||
void EquipAllUnequipedItems(object oTarget)
|
||||
{
|
||||
|
||||
object oItem;
|
||||
|
||||
float fFloat = 0.5;
|
||||
|
||||
//Loop through and find each item which was unequiped..
|
||||
//Then assign the PC the action to equip it.
|
||||
//Then reset the variable to 0
|
||||
oItem = GetFirstItemInInventory(oTarget);
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
//Increment the float time by 0.1 second each time we loop
|
||||
fFloat += 0.1;
|
||||
|
||||
if(GetLocalInt(oItem, "NECK") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_NECK)));
|
||||
SetLocalInt(oItem, "NECK", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "HEAD") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_HEAD)));
|
||||
SetLocalInt(oItem, "HEAD", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "CLOAK") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_CLOAK)));
|
||||
SetLocalInt(oItem, "CLOAK", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "ARMS") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_ARMS)));
|
||||
SetLocalInt(oItem, "ARMS", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "BELT") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_BELT)));
|
||||
SetLocalInt(oItem, "BELT", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "BOOTS") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_BOOTS)));
|
||||
SetLocalInt(oItem, "BOOTS", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "CHEST") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)));
|
||||
SetLocalInt(oItem, "CHEST", 0);
|
||||
}
|
||||
|
||||
//NOTE: Right hand must go before left hand!!
|
||||
else if(GetLocalInt(oItem, "R_HAND") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTHAND)));
|
||||
SetLocalInt(oItem, "R_HAND", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "R_RING") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTRING)));
|
||||
SetLocalInt(oItem, "R_RING", 0);
|
||||
}
|
||||
|
||||
//NOTE: Left hand must go after right hand!
|
||||
else if(GetLocalInt(oItem, "L_HAND") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_LEFTHAND)));
|
||||
SetLocalInt(oItem, "L_HAND", 0);
|
||||
}
|
||||
else if(GetLocalInt(oItem, "L_RING") == 1)
|
||||
{
|
||||
DelayCommand(fFloat, AssignCommand(oTarget, ActionEquipItem(oItem, INVENTORY_SLOT_LEFTRING)));
|
||||
SetLocalInt(oItem, "L_RING", 0);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//Do nothing :)
|
||||
}
|
||||
|
||||
oItem = GetNextItemInInventory(oTarget);
|
||||
}
|
||||
|
||||
//Protoype End
|
||||
}
|
20
_module/nss/ac_dyekit.nss
Normal file
20
_module/nss/ac_dyekit.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//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 oPC = GetItemActivator();
|
||||
string sItemTag = GetTag(oItem);
|
||||
|
||||
AssignCommand(oPC, ActionStartConversation(oPC, "dye_dyekit", TRUE));
|
||||
|
||||
}
|
30
_module/nss/ac_elixirofimmor.nss
Normal file
30
_module/nss/ac_elixirofimmor.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
SetPlotFlag ( oActivator, TRUE);
|
||||
DelayCommand(600.0, SetPlotFlag ( oActivator, FALSE));
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 600.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oActivator, 600.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator, 600.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator, 600.0));
|
||||
}
|
||||
}
|
25
_module/nss/ac_emotewand.nss
Normal file
25
_module/nss/ac_emotewand.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//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.
|
||||
|
||||
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "emote_omni", TRUE));
|
||||
|
||||
}
|
31
_module/nss/ac_gemofteleport.nss
Normal file
31
_module/nss/ac_gemofteleport.nss
Normal file
@@ -0,0 +1,31 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
location lHome = GetLocation(GetWaypointByTag("home"));
|
||||
location lCandy = GetLocation(oActivator);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oActivator, 10.0);
|
||||
DelayCommand(10.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_PWKILL), lCandy, 2.5));
|
||||
DelayCommand(10.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3), lCandy, 5.0));
|
||||
DelayCommand(14.0,AssignCommand(oActivator, ActionJumpToLocation(lHome)));
|
||||
}
|
||||
}
|
84
_module/nss/ac_gen_token.nss
Normal file
84
_module/nss/ac_gen_token.nss
Normal file
@@ -0,0 +1,84 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectConcealment(70);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSpellResistanceIncrease(70);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectAttackIncrease(12);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_SONIC);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_SPELL_RESISTANCE_DECREASE);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSpellImmunity(SPELL_TIME_STOP);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectRegenerate(333, 6.0f);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSkillIncrease(SKILL_ALL_SKILLS, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectModifyAttacks(3);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectACIncrease(20);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageReduction(50, DAMAGE_POWER_PLUS_TWENTY);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
// */
|
||||
}
|
64
_module/nss/ac_grtelementpot.nss
Normal file
64
_module/nss/ac_grtelementpot.nss
Normal file
@@ -0,0 +1,64 @@
|
||||
//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);
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_ACID, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_ELECTRICAL, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_SONIC, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 60.0));
|
||||
|
||||
}
|
||||
|
26
_module/nss/ac_guildsbow.nss
Normal file
26
_module/nss/ac_guildsbow.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
if (GetGold(oPC) >= 1000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("guildarrows", oPC, 999);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(1000, oPC, TRUE));
|
||||
|
||||
FloatingTextStringOnCreature("Some gold disentigrated when you used this item.", oPC);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold to summon the arrows!", oPC);
|
||||
}
|
||||
|
||||
}
|
84
_module/nss/ac_guildstone.nss
Normal file
84
_module/nss/ac_guildstone.nss
Normal file
@@ -0,0 +1,84 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectConcealment(70);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSpellResistanceIncrease(70);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectAttackIncrease(12);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_SONIC);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_SPELL_RESISTANCE_DECREASE);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSpellImmunity(SPELL_TIME_STOP);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectRegenerate(333, 6.0f);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSkillIncrease(SKILL_ALL_SKILLS, 40);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectModifyAttacks(3);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectACIncrease(20);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageReduction(50, DAMAGE_POWER_PLUS_TWENTY);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
// */
|
||||
}
|
60
_module/nss/ac_guilesdmblade.nss
Normal file
60
_module/nss/ac_guilesdmblade.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//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 "nw_i0_spells"
|
||||
#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
|
||||
|
||||
//On-Hit Flaming Hide Script
|
||||
|
||||
|
||||
|
||||
object oItem; // The item casting triggering this spellscript
|
||||
object oSpellTarget; // On a weapon: The one being hit. On an armor: The one hitting the armor
|
||||
object oSpellOrigin; // On a weapon: The one wielding the weapon. On an armor: The one wearing an armor
|
||||
|
||||
// fill the variables
|
||||
oSpellOrigin = OBJECT_SELF;
|
||||
oSpellTarget = GetSpellTargetObject();
|
||||
oItem = GetSpellCastItem();
|
||||
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
if (GetIsObjectValid(oItem))
|
||||
{
|
||||
if (GetIsObjectValid(oSpellTarget))
|
||||
{
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oSpellTarget);
|
||||
if (!GetIsObjectValid(oWeapon))
|
||||
{
|
||||
oWeapon = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oSpellTarget);
|
||||
}
|
||||
if (!GetWeaponRanged(oWeapon) || !GetIsObjectValid(oWeapon))
|
||||
{
|
||||
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId()));
|
||||
int nDamage = d10(10)+ nLevel;
|
||||
effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE);
|
||||
effect eVis;
|
||||
if (nDamage<15)
|
||||
{
|
||||
eVis =EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
}
|
||||
else
|
||||
{
|
||||
eVis =EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oSpellTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oSpellTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error: Spell was not cast by an item
|
||||
}
|
||||
}
|
27
_module/nss/ac_heartstone.nss
Normal file
27
_module/nss/ac_heartstone.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 100), oActivator, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_FLAME_S), oActivator, 60.0);
|
||||
}
|
||||
}
|
32
_module/nss/ac_herocrystal44.nss
Normal file
32
_module/nss/ac_herocrystal44.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(12), oActivator, 200.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectModifyAttacks(2), oActivator, 200.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(40), oActivator, 200.0));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment (60), oActivator, 200.0));
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageReduction(10, DAMAGE_POWER_PLUS_FIFTEEN),oActivator, 200.0);
|
||||
|
||||
}
|
||||
}
|
26
_module/nss/ac_infoassistant.nss
Normal file
26
_module/nss/ac_infoassistant.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//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;
|
||||
|
||||
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//The PC will technically start a conversation with himself
|
||||
//You should add some odd little sound to the first line in the
|
||||
//conversation file, or the PC will give his normal voicegreeting.
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "infoassistconv"));
|
||||
|
||||
}
|
37
_module/nss/ac_itemchanger.nss
Normal file
37
_module/nss/ac_itemchanger.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
//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;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//The PC will technically start a conversation with himself
|
||||
//You should add some odd little sound to the first line in the
|
||||
//conversation file, or the PC will give his normal voicegreeting.
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "item_customizer"));
|
||||
|
||||
}
|
||||
|
||||
|
63
_module/nss/ac_itemseller.nss
Normal file
63
_module/nss/ac_itemseller.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
//Author Unknown..
|
||||
//Edited By Genisys (guile) - 4/19/09
|
||||
|
||||
#include "x2_inc_switches"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
|
||||
//This returns the Massive Critical Damage to be applied to the weapon
|
||||
int GetIsAmmo(int nType)
|
||||
{
|
||||
int n;
|
||||
n = FALSE;
|
||||
|
||||
if(nType == BASE_ITEM_ARROW || nType == BASE_ITEM_BOLT ||
|
||||
nType == BASE_ITEM_BULLET || nType == BASE_ITEM_DART ||
|
||||
nType == BASE_ITEM_SHURIKEN || nType == BASE_ITEM_THROWINGAXE)
|
||||
{ n = TRUE; }
|
||||
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
//Main Script
|
||||
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 = GetItemActivator();
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
if(GetObjectType(oTarget) != OBJECT_TYPE_ITEM) return;
|
||||
if(!GetIsObjectValid(oTarget)) return;
|
||||
if(GetPlotFlag(oTarget) == TRUE) return;
|
||||
int iValue = GetGoldPieceValue(oTarget);
|
||||
int nType = GetBaseItemType(oTarget);
|
||||
int iAssess = iValue/20;
|
||||
|
||||
if(iAssess>=400000)
|
||||
{ iAssess = 400000; }
|
||||
|
||||
if(GetIsAmmo(nType))
|
||||
{
|
||||
FloatingTextStringOnCreature("Ammunition cannot be sold!", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
GiveGoldToCreature(oPC, iAssess);
|
||||
DestroyObject(oTarget);
|
||||
}
|
||||
|
||||
}
|
47
_module/nss/ac_jumpball.nss
Normal file
47
_module/nss/ac_jumpball.nss
Normal file
@@ -0,0 +1,47 @@
|
||||
//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;
|
||||
|
||||
// Check if item target is valid.
|
||||
|
||||
if (GetIsObjectValid(GetItemActivatedTarget()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Next, do a Fly/Land animation and send the PC over to whereever
|
||||
// was clicked with the activated item.
|
||||
|
||||
effect eFly;
|
||||
location lTarget;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
lTarget = GetItemActivatedTargetLocation();
|
||||
eFly = EffectDisappearAppear(lTarget);
|
||||
|
||||
// Cutscene effects! Totally unnecessary, really, but cute.
|
||||
DelayCommand(2.5, FadeToBlack(oPC, FADE_SPEED_FASTEST));
|
||||
DelayCommand(4.2, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
|
||||
|
||||
// Duration MUST be 3.0 or higher. Higher for busy areas.
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 4.0);
|
||||
|
||||
}
|
58
_module/nss/ac_misslprotpot.nss
Normal file
58
_module/nss/ac_misslprotpot.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);
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectSpellImmunity(SPELL_MAGIC_MISSILE);
|
||||
|
||||
eEffect = ExtraordinaryEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSpellImmunity(SPELL_ISAACS_LESSER_MISSILE_STORM);
|
||||
|
||||
eEffect = ExtraordinaryEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectSpellImmunity(SPELL_ISAACS_GREATER_MISSILE_STORM);
|
||||
|
||||
eEffect = ExtraordinaryEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectACIncrease(6);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectDamageResistance(DAMAGE_TYPE_MAGICAL, 25);
|
||||
|
||||
eEffect = ExtraordinaryEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 60.0));
|
||||
}
|
27
_module/nss/ac_mordenkainens.nss
Normal file
27
_module/nss/ac_mordenkainens.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(100), oActivator, 100.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 100.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 100.0));
|
||||
}
|
||||
}
|
75
_module/nss/ac_namingtool.nss
Normal file
75
_module/nss/ac_namingtool.nss
Normal file
@@ -0,0 +1,75 @@
|
||||
////////////////////////////////////
|
||||
//Created by Genisys / Guile 6/14/08
|
||||
////////////////////////////////////
|
||||
/*
|
||||
|
||||
This is a tagbased item script for
|
||||
the item Tagnamed "namingtool"
|
||||
which spawns a listener starts
|
||||
a conversation with the PC to allow
|
||||
them to name thier item they target.
|
||||
|
||||
*/
|
||||
////////////////////////////////////
|
||||
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
object oTarget;
|
||||
object oSpawn;
|
||||
location lTarget;
|
||||
object oItem;
|
||||
object oListener;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
oTarget = oPC;
|
||||
oItem = GetItemActivatedTarget();
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetIsInCombat(GetItemActivator()))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "This item is not useable in combat!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetObjectType(oItem)!= OBJECT_TYPE_ITEM)
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You must target an item!!");
|
||||
return;
|
||||
}
|
||||
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "namer", lTarget);
|
||||
|
||||
oListener = oSpawn;
|
||||
|
||||
//Let's make sure that all of thier variables are clear..
|
||||
DeleteLocalString(oPC, "ONID");
|
||||
DeleteLocalString(oPC, "ONN");
|
||||
DeleteLocalInt(oPC, "NUSER");
|
||||
|
||||
//Set this string on the item so we can ID it later..
|
||||
SetLocalString(oItem, "ONID", "MEME");
|
||||
|
||||
//Set this string on the PC so we can Name the item if something goes wrong.
|
||||
SetLocalString(oPC, "ONN", GetName(oItem));
|
||||
|
||||
//Set the name in the conversation.
|
||||
SetCustomToken(6000, GetName(oItem));
|
||||
|
||||
//Set an Int on the PC to ID the PC as the user..
|
||||
SetLocalInt(oPC, "NUSER", 1);
|
||||
|
||||
//To insure we don't have any problems later...
|
||||
DelayCommand(80.4, DeleteLocalString(oPC, "ONID"));
|
||||
DelayCommand(80.5, DeleteLocalString(oPC, "ONN"));
|
||||
DelayCommand(80.6, DeleteLocalInt(oPC, "NUSER"));
|
||||
|
||||
DelayCommand(120.7, DestroyObject(GetObjectByTag("namer"), 0.0f));
|
||||
}
|
24
_module/nss/ac_pclist.nss
Normal file
24
_module/nss/ac_pclist.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
//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.
|
||||
|
||||
|
||||
AssignCommand(oActivator, ActionStartConversation(oActivator, "c_pcl_activate", TRUE));
|
||||
}
|
110
_module/nss/ac_pcplaything.nss
Normal file
110
_module/nss/ac_pcplaything.nss
Normal file
@@ -0,0 +1,110 @@
|
||||
//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
|
||||
|
||||
effect eEffect;
|
||||
object oTarget;
|
||||
|
||||
object oPC;
|
||||
|
||||
if (!GetIsPC(GetItemActivatedTarget())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
FloatingTextStringOnCreature("You spin the toy and something magical happens!!!", oPC);
|
||||
|
||||
int nInt;
|
||||
nInt = d6();
|
||||
if (nInt==1)
|
||||
{
|
||||
DelayCommand(1.0, SendMessageToPC(oPC, "You have been polymorphed into a Doom Knight!!!"));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectPolymorph(POLYMORPH_TYPE_DOOM_KNIGHT);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget, 5000000.0f);
|
||||
|
||||
}
|
||||
else if (nInt==2)
|
||||
{
|
||||
DelayCommand(1.0, SendMessageToPC(oPC, "You have been polymorphed into a Penguin!!!"));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectPolymorph(POLYMORPH_TYPE_PENGUIN);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget, 5000000.0f);
|
||||
|
||||
}
|
||||
else if (nInt==3)
|
||||
{
|
||||
DelayCommand(1.0, SendMessageToPC(oPC, "You have been polymorphed into a Pixie!!!"));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectPolymorph(POLYMORPH_TYPE_PIXIE);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget, 500000.0f);
|
||||
|
||||
}
|
||||
else if (nInt==4)
|
||||
{
|
||||
DelayCommand(1.0, SendMessageToPC(oPC, "You have been polymorphed into a Balor!!!"));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectPolymorph(POLYMORPH_TYPE_BALOR);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget, 500000.0f);
|
||||
|
||||
}
|
||||
else if (nInt==5)
|
||||
{
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature("You have been polymorphed into a Succubus!!!!", oPC));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectPolymorph(POLYMORPH_TYPE_SUCCUBUS);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget, 500000.0f);
|
||||
|
||||
}
|
||||
else if (nInt==6)
|
||||
{
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature("You have been polymorphed into a Zombie!!!", oPC));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectPolymorph(POLYMORPH_TYPE_ZOMBIE);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget, 500000.0f);
|
||||
|
||||
}
|
||||
|
||||
}
|
30
_module/nss/ac_plpotion.nss
Normal file
30
_module/nss/ac_plpotion.nss
Normal file
@@ -0,0 +1,30 @@
|
||||
//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()
|
||||
{ int nEvent =GetUserDefinedItemEventNumber();
|
||||
if (!nEvent == X2_ITEM_EVENT_ACTIVATE)
|
||||
return;
|
||||
{
|
||||
object oPC = GetItemActivator();
|
||||
object oItem = GetItemActivated();
|
||||
if (GetTag(oItem) == "plpotion")//not needed but for clarification.
|
||||
|
||||
{
|
||||
effect eFly;
|
||||
effect eFlyWind;
|
||||
eFly = EffectDisappear();
|
||||
eFlyWind = EffectVisualEffect(VFX_IMP_PULSE_WIND);
|
||||
|
||||
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, eFly, oPC));
|
||||
DelayCommand(1.2, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eFlyWind, GetLocation(oPC)));
|
||||
DelayCommand(2.0, FadeToBlack(oPC, FADE_SPEED_FASTEST));
|
||||
DelayCommand(3.0, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
|
||||
DelayCommand(3.5, AssignCommand(oPC, JumpToObject(GetFactionLeader(oPC))));
|
||||
}
|
||||
}
|
||||
}
|
79
_module/nss/ac_punisher.nss
Normal file
79
_module/nss/ac_punisher.nss
Normal file
@@ -0,0 +1,79 @@
|
||||
//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.
|
||||
|
||||
|
||||
{
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
location lWrath = GetLocation(oTarget);
|
||||
effect eExpl = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
effect eExpl2 = EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION);
|
||||
effect eSmoke = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
effect eBUMP = EffectVisualEffect(VFX_FNF_BLINDDEAF);
|
||||
|
||||
DelayCommand(0.2,ApplyEffectToObject(DURATION_TYPE_INSTANT,eExpl,OBJECT_SELF));
|
||||
|
||||
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,eSmoke,OBJECT_SELF));
|
||||
DelayCommand(1.3,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eExpl2,OBJECT_SELF, 5.0));
|
||||
DelayCommand(1.8,ApplyEffectToObject(DURATION_TYPE_INSTANT,eBUMP,OBJECT_SELF));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDispelMagicAll(40)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectCurse(20,20,20,20,20,20)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectBlindness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDarkness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDeaf()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSilence()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSlow()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ANTI_LIGHT_10), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_DARKNESS), oTarget, 60.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("I have offended the Gods, and must be punished!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I wander the realms in my accursed state as a pointed reminder... Don't anger the DM!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("I know now that the DM will punish me for misbehaving!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I promise to behave if only you will take this horrific curse off of me!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
}
|
28
_module/nss/ac_restarter.nss
Normal file
28
_module/nss/ac_restarter.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
ExportAllCharacters();
|
||||
SendMessageToPC(oPlayer, "All characters on the server have been saved to the server vault.");
|
||||
SendMessageToAllDMs( "All characters have been saved.");
|
||||
DelayCommand(6.0, StartNewModule("UNDERWORLD"));
|
||||
}
|
||||
}
|
25
_module/nss/ac_rodofthedead.nss
Normal file
25
_module/nss/ac_rodofthedead.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
//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.
|
||||
{
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "rodbuffconv", TRUE));
|
||||
|
||||
}
|
||||
}
|
31
_module/nss/ac_rodofthenamel.nss
Normal file
31
_module/nss/ac_rodofthenamel.nss
Normal file
@@ -0,0 +1,31 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
string sReport;
|
||||
sReport = ">>> ID: " + GetPCPlayerName( target )
|
||||
+ "; Name: "+ GetName( target )
|
||||
+ "; CD Key:" + GetPCPublicCDKey( target )
|
||||
+ "; IP:" + GetPCIPAddress( target );
|
||||
SendMessageToPC(oActivator, sReport);
|
||||
}
|
||||
|
||||
}
|
28
_module/nss/ac_ruin44.nss
Normal file
28
_module/nss/ac_ruin44.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//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 oPC;
|
||||
int nStackSize = 99;
|
||||
|
||||
if (!GetIsPC(GetItemActivatedTarget()))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("ruinarrows44", oPC, nStackSize);
|
||||
|
||||
}
|
28
_module/nss/ac_savingpen2.nss
Normal file
28
_module/nss/ac_savingpen2.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
ExportAllCharacters();
|
||||
SendMessageToPC(oPlayer, "All characters on the server have been saved to the server vault.");
|
||||
SendMessageToAllDMs( "All characters have been saved.");
|
||||
}
|
||||
|
||||
}
|
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);
|
||||
|
||||
}
|
||||
|
||||
}
|
60
_module/nss/ac_shadowsword44.nss
Normal file
60
_module/nss/ac_shadowsword44.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
//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 "nw_i0_spells"
|
||||
#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
|
||||
|
||||
//On-Hit Flaming Hide Script
|
||||
|
||||
|
||||
|
||||
object oItem; // The item casting triggering this spellscript
|
||||
object oSpellTarget; // On a weapon: The one being hit. On an armor: The one hitting the armor
|
||||
object oSpellOrigin; // On a weapon: The one wielding the weapon. On an armor: The one wearing an armor
|
||||
|
||||
// fill the variables
|
||||
oSpellOrigin = OBJECT_SELF;
|
||||
oSpellTarget = GetSpellTargetObject();
|
||||
oItem = GetSpellCastItem();
|
||||
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
if (GetIsObjectValid(oItem))
|
||||
{
|
||||
if (GetIsObjectValid(oSpellTarget))
|
||||
{
|
||||
object oWeapon = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oSpellTarget);
|
||||
if (!GetIsObjectValid(oWeapon))
|
||||
{
|
||||
oWeapon = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oSpellTarget);
|
||||
}
|
||||
if (!GetWeaponRanged(oWeapon) || !GetIsObjectValid(oWeapon))
|
||||
{
|
||||
SignalEvent(oSpellTarget,EventSpellCastAt(OBJECT_SELF,GetSpellId()));
|
||||
int nDamage = d6(1)+ nLevel;
|
||||
effect eDamage = EffectDamage(nDamage,DAMAGE_TYPE_FIRE);
|
||||
effect eVis;
|
||||
if (nDamage<15)
|
||||
{
|
||||
eVis =EffectVisualEffect(VFX_IMP_FLAME_S);
|
||||
}
|
||||
else
|
||||
{
|
||||
eVis =EffectVisualEffect(VFX_IMP_FLAME_M);
|
||||
}
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oSpellTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDamage,oSpellTarget);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Error: Spell was not cast by an item
|
||||
}
|
||||
}
|
28
_module/nss/ac_shortbowofrui.nss
Normal file
28
_module/nss/ac_shortbowofrui.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
//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 oPC;
|
||||
int nStackSize = 99;
|
||||
|
||||
if (!GetIsPC(GetItemActivatedTarget()))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("ruinarrows44", oPC, nStackSize);
|
||||
|
||||
}
|
26
_module/nss/ac_siempre.nss
Normal file
26
_module/nss/ac_siempre.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
if (GetGold(oPC) >= 10000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("foreverarrows", oPC, 999);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(10000, oPC, TRUE));
|
||||
|
||||
FloatingTextStringOnCreature("Some gold disentigrated when you used this item.", oPC);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("You do not have enough gold to summon the arrows!", oPC);
|
||||
}
|
||||
|
||||
}
|
24
_module/nss/ac_telerod.nss
Normal file
24
_module/nss/ac_telerod.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
//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.
|
||||
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "teleconv", TRUE));
|
||||
|
||||
}
|
28
_module/nss/ac_thehandofgod.nss
Normal file
28
_module/nss/ac_thehandofgod.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oPC;
|
||||
oPC = GetItemActivator();
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
if (!GetIsDM(oPC))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are not a DM!");
|
||||
return;
|
||||
}
|
||||
if(!GetIsPC(oTarget) || GetIsDM(oTarget))
|
||||
{
|
||||
SendMessageToPC(GetItemActivator(), "You Must Target a PC!");
|
||||
}
|
||||
|
||||
//Tell the Database this player has been banned (we will check in "oncliententer")
|
||||
SetCampaignInt(GetName(GetModule()), "ADMIN_BANN", 2, oTarget);
|
||||
|
||||
|
||||
DelayCommand(6.0, BootPC(oTarget));
|
||||
}
|
220
_module/nss/ac_timecrystal.nss
Normal file
220
_module/nss/ac_timecrystal.nss
Normal file
@@ -0,0 +1,220 @@
|
||||
//Script Name:
|
||||
//////////////////////////////////////////
|
||||
// Created By: Genisys (Guile)
|
||||
// Created On: 8/13/08
|
||||
//
|
||||
// (TABASED ITEM SCRIPT TEMPLATE)
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This template is used for ALL events which
|
||||
happen for an item which has the same
|
||||
tagname as the name of this script.
|
||||
(You need to name this script the item's tagname)
|
||||
|
||||
Every event below will fire when the event
|
||||
happens, ie. If the player activates the item
|
||||
the X2_ITEM_EVENT_ACTIVATE: script code will run.
|
||||
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
#include "x2_inc_switches"
|
||||
|
||||
//Required Include For Color Messages(Read include to learn more)
|
||||
#include "gen_inc_color"
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
|
||||
//All Major Variables Declared (Commonly used variables as well)
|
||||
|
||||
int nEvent = GetUserDefinedItemEventNumber(); //Which event triggered this
|
||||
object oPC; //The player character using the item
|
||||
object oItem; //The item being used
|
||||
object oSpellOrigin; //The origin of the spell
|
||||
object oSpellTarget; //The target of the spell
|
||||
int iSpell; //The Spell ID number
|
||||
object oTarget; //Define oTarget below
|
||||
object oObject; //Define oObject below
|
||||
int nInt; //A commonly used intergal (Must be defined)
|
||||
int nLvl; //Commonly used intergal for levels (ie. GetHitDice(oTarget); etc.)
|
||||
string sTag; //Used to define a tagname of something
|
||||
string sResref; //Used to define a resref name of something
|
||||
string sMsg; //Used to define a message
|
||||
effect eEffect; //Used to define an effect to be applied to an object or location
|
||||
effect eVis; //Used to define a visual effect to be applied to an object or location
|
||||
location lTarget; //The Target Location of the PC ONLY! (USE - Getlocation(oPC);)
|
||||
location lway; //The Target location for the Activated Item's Target only! (See below)
|
||||
|
||||
//Get the restart time on the module...
|
||||
int nHr = GetLocalInt(GetModule(), "HOURS_LEFT");
|
||||
int nMin = GetLocalInt(GetModule(), "MINS_LEFT");
|
||||
int nResetMin = GetLocalInt(GetModule(), "RESET_MIN");
|
||||
|
||||
//Calculate time for DM Message..
|
||||
int nSec = GetLocalInt(GetModule(), "MODULE_BEAT");
|
||||
int nTotalMin = nSec/60;
|
||||
int nTimeTillReset = nResetMin - nTotalMin;
|
||||
int nHrs;
|
||||
if(nTotalMin>=60)
|
||||
{nHrs = nTotalMin /60;}
|
||||
else
|
||||
{nHrs = 0;}
|
||||
|
||||
string sDMTime;
|
||||
sDMTime = "<c <20><>>";
|
||||
sDMTime += "The Module has been up: ";
|
||||
sDMTime += IntToString(nHrs);
|
||||
sDMTime += " Hrs. & ";
|
||||
sDMTime += IntToString(nTotalMin);
|
||||
sDMTime += " Minutes.";
|
||||
|
||||
|
||||
string sTime;
|
||||
sTime = "<c <20><>>"; //cyan
|
||||
sTime += "Server will Restart in: ";
|
||||
sTime += IntToString(nHr);
|
||||
sTime += " Hours & ";
|
||||
sTime += IntToString(nMin);
|
||||
sTime += " Minutes.";
|
||||
sTime += "</c>";
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//Set the return value for the item event script
|
||||
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
|
||||
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
|
||||
int nResult = X2_EXECUTE_SCRIPT_END;
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Deterimine which event has fired for the item...
|
||||
switch (nEvent)
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
///////The Item has the property: On-Hit Cast Spell: Unique Power/////////
|
||||
|
||||
case X2_ITEM_EVENT_ONHITCAST:
|
||||
// * This code runs when the item has the 'OnHitCastSpell: Unique power' property
|
||||
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
|
||||
// * Note that this event fires for non PC creatures as well.
|
||||
|
||||
oItem = GetSpellCastItem(); // The item triggering this spellscript
|
||||
oPC = OBJECT_SELF; // The player triggering it
|
||||
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
//Your code goes here
|
||||
|
||||
break;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/////////////Cast Spell: Unique Power /or/ Activate Item//////////////////
|
||||
|
||||
//I seperated this cause it's more commonly used..
|
||||
case X2_ITEM_EVENT_ACTIVATE:
|
||||
// * This code runs when the Unique Power property of the item is used
|
||||
// * or the item is activated. Note that this event fires for PCs only.
|
||||
|
||||
oPC = GetItemActivator(); // The player who activated the item
|
||||
oItem = GetItemActivated(); // The item that was activated
|
||||
oTarget = GetItemActivatedTarget(); //The target of the item's power
|
||||
lway = GetItemActivatedTargetLocation(); //To get the location of the target!
|
||||
|
||||
if(GetIsDM(oPC))
|
||||
{
|
||||
FloatingTextStringOnCreature(sDMTime, oPC, TRUE);
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature(sTime, oPC, TRUE));
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature(sTime, oPC, TRUE);
|
||||
DelayCommand(0.5, FloatingTextStringOnCreature(sTime, oPC, TRUE));
|
||||
DelayCommand(1.0, FloatingTextStringOnCreature(sTime, oPC, TRUE));
|
||||
}
|
||||
|
||||
//Your code goes here
|
||||
|
||||
break;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////When the User Equips this item////////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_EQUIP:
|
||||
// * This code runs when the item is equipped
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetPCItemLastEquippedBy(); // The player who equipped the item
|
||||
oItem = GetPCItemLastEquipped(); // The item that was equipped
|
||||
|
||||
//Your code goes here
|
||||
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/////////////When the User Unequips this item//////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_UNEQUIP:
|
||||
// * This code runs when the item is unequipped
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetPCItemLastUnequippedBy();// The player who unequipped the item
|
||||
oItem = GetPCItemLastUnequipped(); // The item that was unequipped
|
||||
|
||||
//Your code goes here
|
||||
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
////////////Everytime ANYONE Acquires this item////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_ACQUIRE:
|
||||
// * This code runs when the item is acquired
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetModuleItemAcquiredBy(); // The player who acquired the item
|
||||
oItem = GetModuleItemAcquired(); // The item that was acquired
|
||||
|
||||
//Your code goes here
|
||||
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//////////Everytime ANYONE Loses this item/////////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_UNACQUIRE:
|
||||
// * This code runs when the item is unacquired
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetModuleItemLostBy(); // The player who dropped the item
|
||||
oItem = GetModuleItemLost(); // The item that was dropped
|
||||
|
||||
//Your code goes here
|
||||
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/////Everytime ANYONE Cast a spell at this item////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_SPELLCAST_AT:
|
||||
//* This code runs when a PC or DM casts a spell from one of the
|
||||
//* standard spellbooks on the item
|
||||
|
||||
oPC = OBJECT_SELF; // The player who cast the spell
|
||||
oItem = GetSpellTargetObject();// The item targeted by the spell
|
||||
iSpell = GetSpellId(); // The id of the spell that was cast
|
||||
// See the list of SPELL_* constants
|
||||
|
||||
//Your code goes here
|
||||
|
||||
//Change the following line from X2_EXECUTE_SCRIPT_CONTINUE to
|
||||
//X2_EXECUTE_SCRIPT_END if you want to prevent the spell that was
|
||||
//cast on the item from taking effect
|
||||
nResult = X2_EXECUTE_SCRIPT_CONTINUE;
|
||||
break;
|
||||
}
|
||||
|
||||
//Pass the return value back to the calling script
|
||||
SetExecutedScriptReturnValue(nResult);
|
||||
}
|
||||
|
26
_module/nss/ac_tournamenttro.nss
Normal file
26
_module/nss/ac_tournamenttro.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//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.
|
||||
|
||||
{
|
||||
AssignCommand(oActivator, ActionSpeakString("I am a Tournament Champion!!"));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator, 300.0f);
|
||||
}
|
||||
}
|
37
_module/nss/ac_weaponchanger.nss
Normal file
37
_module/nss/ac_weaponchanger.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
//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"
|
||||
|
||||
|
||||
//The include is for the IPSafeAddItemProperty function
|
||||
//Makes the PC speaker's onhand weapon glow electrically. Doesn't affect
|
||||
//the damage it deals, and it will only work on melee weapons
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
|
||||
//You main script function goes under this line.
|
||||
|
||||
//Define Variables
|
||||
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//The PC will technically start a conversation with himself
|
||||
//You should add some odd little sound to the first line in the
|
||||
//conversation file, or the PC will give his normal voicegreeting.
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "weaponconv"));
|
||||
|
||||
}
|
24
_module/nss/ac_xbowofruin44.nss
Normal file
24
_module/nss/ac_xbowofruin44.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
#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 oPC;
|
||||
int nStackSize = 99;
|
||||
|
||||
if (!GetIsPC(GetItemActivatedTarget()))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("ruinbolts44", oPC, nStackSize);
|
||||
|
||||
}
|
14
_module/nss/acn_check_rdd.nss
Normal file
14
_module/nss/acn_check_rdd.nss
Normal file
@@ -0,0 +1,14 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if ((GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC)>0))
|
||||
|
||||
{
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetWaypointByTag("NW_DEATH_TEMPLE"))));
|
||||
|
||||
}
|
||||
}
|
||||
|
50
_module/nss/adventureportal1.nss
Normal file
50
_module/nss/adventureportal1.nss
Normal file
@@ -0,0 +1,50 @@
|
||||
string sDeny;
|
||||
|
||||
//Created by Guile 01/15/07
|
||||
//Put this script OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetHitDice(oPC) < 21)
|
||||
{
|
||||
sDeny="You are not experienced enough or do not have the key to use this portal.";
|
||||
|
||||
SendMessageToPC(oPC, sDeny);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("advway33");
|
||||
|
||||
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(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
|
||||
|
||||
}
|
49
_module/nss/advportaljump.nss
Normal file
49
_module/nss/advportaljump.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
int nInt;
|
||||
location lTarget;
|
||||
object oTarget;
|
||||
|
||||
//Created by Guile 3/27/07
|
||||
//Put this script OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetItemPossessedBy(oPC, "keyoftheunderwor")!= OBJECT_INVALID)
|
||||
{
|
||||
oTarget = GetWaypointByTag("advway33");
|
||||
|
||||
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(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("A specific key is needed to enter this place.", oPC);
|
||||
|
||||
}
|
||||
|
||||
}
|
24
_module/nss/afx_area_enter.nss
Normal file
24
_module/nss/afx_area_enter.nss
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
#include "afx_sfunc"
|
||||
|
||||
void main() {
|
||||
object oEntering = GetEnteringObject();
|
||||
if(GetIsPC(oEntering) == TRUE) {
|
||||
afx_apply_effects(oEntering,OBJECT_SELF);
|
||||
}
|
||||
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
// place here the % chance of rest being interruped excample here 33% chance of rest being interuped
|
||||
SetLocalInt(oArea, "nMonChance",30);
|
||||
// place here the blueprint refrenfrence tag of the creature you wish to attack them
|
||||
// or place the word CUSTOM which will send a 201 event to the area starting your won script
|
||||
// here it is a goblin
|
||||
SetLocalString(oArea, "sMonster","drowwarrior003");
|
||||
|
||||
|
||||
|
||||
|
||||
/* only execute for PC's entering an area */
|
||||
|
||||
}
|
105
_module/nss/afx_area_exit.nss
Normal file
105
_module/nss/afx_area_exit.nss
Normal file
@@ -0,0 +1,105 @@
|
||||
|
||||
|
||||
|
||||
void TrashObject(object oObject)
|
||||
|
||||
{
|
||||
/* search and destroy contents of body bag's, others just destroy */
|
||||
if (GetObjectType(oObject) == OBJECT_TYPE_PLACEABLE) {
|
||||
|
||||
object oItem = GetFirstItemInInventory(oObject);
|
||||
|
||||
/* recursively trash all items inside container */
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
TrashObject(oItem);
|
||||
|
||||
oItem = GetNextItemInInventory(oObject);
|
||||
}
|
||||
}
|
||||
|
||||
DestroyObject(oObject);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "afx_sfunc"
|
||||
|
||||
void main()
|
||||
{
|
||||
/* only execute for PC's entering an area */
|
||||
if(!GetIsPC(GetExitingObject()) ) {
|
||||
return; }
|
||||
|
||||
|
||||
|
||||
|
||||
object oPC = GetExitingObject();
|
||||
// First check to see if the ExitingObject is a PC or not
|
||||
if(GetIsPC(oPC) == TRUE) {
|
||||
afx_remove_effects(oPC,OBJECT_SELF);
|
||||
}
|
||||
if (!GetIsPC(oPC))
|
||||
return;
|
||||
// Start up the loop, setting oPC now to the first PC
|
||||
oPC = GetFirstPC();
|
||||
// Continue looping until there are no more PCs left
|
||||
while (oPC != OBJECT_INVALID)
|
||||
{
|
||||
// Check the Area against the Area of the current PC
|
||||
// If they are the same, exit the function, as we do not need to
|
||||
// check anymore PCs
|
||||
if (OBJECT_SELF == GetArea(oPC))
|
||||
return;
|
||||
// If not, continue to the next PC
|
||||
else oPC = GetNextPC();
|
||||
}
|
||||
|
||||
// If we've made it this far, we know that there aren't any PCs in the area
|
||||
// Set oObject to the first object in the Area
|
||||
object oObject = GetFirstObjectInArea(OBJECT_SELF);
|
||||
// Continue looping until there are no more objects left
|
||||
while (oObject != OBJECT_INVALID)
|
||||
{
|
||||
// Test to see if oObject is a creature spawned from an encounter
|
||||
// If so, destroy the object
|
||||
if (GetIsEncounterCreature(oObject))
|
||||
DestroyObject(oObject);
|
||||
// Move on to the next object
|
||||
oObject = GetNextObjectInArea(OBJECT_SELF);
|
||||
|
||||
/* only execute for PC's entering an area */
|
||||
}
|
||||
object oItem = GetFirstObjectInArea();
|
||||
|
||||
while (GetIsObjectValid(oItem))
|
||||
{
|
||||
|
||||
int iObjectType = GetObjectType(oItem);
|
||||
|
||||
switch (iObjectType) {
|
||||
case OBJECT_TYPE_PLACEABLE:
|
||||
|
||||
/* monster drop containers are tagged placeables */
|
||||
|
||||
|
||||
if (GetTag(oItem) != "BodyBag") {
|
||||
break; }
|
||||
/* note: no break here, allow fall-through */
|
||||
|
||||
case OBJECT_TYPE_ITEM:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
TrashObject(oItem); } /* destruct time has passed, trash the object */
|
||||
|
||||
/* note: no action if destruct time set but not passed */
|
||||
|
||||
|
||||
|
||||
|
||||
oItem = GetNextObjectInArea();
|
||||
}
|
||||
}
|
57
_module/nss/afx_mod_spawn.nss
Normal file
57
_module/nss/afx_mod_spawn.nss
Normal file
@@ -0,0 +1,57 @@
|
||||
// Modified by AW Olorin on 6-11-2004
|
||||
// Added Module Version string Constant
|
||||
// Added Announcement period Constant (How many HB's between announcemnts)
|
||||
|
||||
#include "afx_sfunc"
|
||||
|
||||
const string POA_VERSION = "This server is running PoA version 1.3.5";
|
||||
const int ANNOUNCE_PERIOD = 600;
|
||||
void main() {
|
||||
|
||||
// each area affected must be tagged and bagged then place the enter and exit scripts in each area.
|
||||
object oArea002 = GetObjectByTag("CavernsofUnderdark");
|
||||
SetLocalInt(oArea002,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea003 = GetObjectByTag("DrowSewers");
|
||||
SetLocalInt(oArea003,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea004 = GetObjectByTag("HouseFenLiss");
|
||||
SetLocalInt(oArea004,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea005 = GetObjectByTag("housedenat");
|
||||
SetLocalInt(oArea005,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea006 = GetObjectByTag("HermitsDen");
|
||||
SetLocalInt(oArea002,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea007 = GetObjectByTag("Manatakloss");
|
||||
SetLocalInt(oArea007,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea008 = GetObjectByTag("DrowSlum1");
|
||||
SetLocalInt(oArea008,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea009 = GetObjectByTag("DrowSlum2");
|
||||
SetLocalInt(oArea009,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea010 = GetObjectByTag("DrowSlum3");
|
||||
SetLocalInt(oArea010,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea011 = GetObjectByTag("DrowArcaneAcademy");
|
||||
SetLocalInt(oArea011,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea012 = GetObjectByTag("HouseGuratsz");
|
||||
SetLocalInt(oArea012,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea013 = GetObjectByTag("HouseKhuraan");
|
||||
SetLocalInt(oArea013,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea014 = GetObjectByTag("QueensPalace");
|
||||
SetLocalInt(oArea014,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
object oArea015 = GetObjectByTag("PalaceVault");
|
||||
SetLocalInt(oArea015,"afx_flags",AFX_FLAG_DARK);
|
||||
|
||||
SetLocalString(GetModule(),"Version",POA_VERSION);
|
||||
SetLocalInt(GetModule(),"iAnnounce_Period",ANNOUNCE_PERIOD);
|
||||
|
||||
}
|
90
_module/nss/afx_sfunc.nss
Normal file
90
_module/nss/afx_sfunc.nss
Normal file
@@ -0,0 +1,90 @@
|
||||
/* Area based effect example.
|
||||
* Author: Philip Jones <pjones@firepool.net>
|
||||
*
|
||||
* There aren't many effects for which this would be usefull, so only two are
|
||||
* currently implemented.
|
||||
* Effects placed with this script are super-natural, and there for can not be
|
||||
* removed with spells/potions or resting.
|
||||
*
|
||||
* Bugs:
|
||||
* - Other effect icons next to the players portrait seem to dissapear when
|
||||
* removing the effects, though this doesn't seem to affect the effects
|
||||
* themselves. For example, wearing the boots of speed my hasted icon
|
||||
* dissapeared, though the character sheet still listed hasted and immunity
|
||||
* to slow and speed decrease et cetra.
|
||||
*/
|
||||
|
||||
int AFX_FLAG_DARK = 0x0001;
|
||||
int AFX_FLAG_SPEEDDECREASE = 0x0002; // Thick fog?
|
||||
|
||||
void afx_debug(string sMessage) {
|
||||
string sMessage = ("The supernatural darkness here nearly chokes you.");
|
||||
SendMessageToPC(GetFirstPC(), sMessage);
|
||||
|
||||
PrintString(sMessage);
|
||||
}
|
||||
|
||||
void afx_apply_effects(object oCreature, object oArea) {
|
||||
// afx_debug("afx_apply_effects: Entered.");
|
||||
if(oCreature == OBJECT_INVALID) {
|
||||
// afx_debug("afx_apply_effects: Creature object is invalid, returning.");
|
||||
return;
|
||||
}
|
||||
if(oArea == OBJECT_INVALID) {
|
||||
oArea = GetArea(oCreature);
|
||||
if(oArea == OBJECT_INVALID) {
|
||||
// afx_debug("afx_apply_effects: Area object is invalid, returning.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(GetObjectType(oCreature) == OBJECT_TYPE_CREATURE) {
|
||||
// afx_debug("afx_apply_effects: Object is a creature.");
|
||||
int iAFXFlags = GetLocalInt(oArea,"afx_flags");
|
||||
if(iAFXFlags & AFX_FLAG_DARK) {
|
||||
// afx_debug("afx_apply_effects: Applying area effect darkness.");
|
||||
effect eDark = SupernaturalEffect(EffectDarkness());
|
||||
// object oDarkCreator = GetEffectCreator(eDark);
|
||||
// afx_debug("afx_apply_effects: GetEffectCreator(eDark): "+GetTag(oDarkCreator)+" (0x"+ObjectToString(oDarkCreator)+")");
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDark,oCreature,0.0);
|
||||
}
|
||||
if(iAFXFlags & AFX_FLAG_SPEEDDECREASE) {
|
||||
int iSpeedDecrease = GetLocalInt(oArea,"afx_sd_per");
|
||||
if(iSpeedDecrease < 1) iSpeedDecrease = 50;
|
||||
// afx_debug("afx_apply_effects: Applying area effect speed decrease " + IntToString(iSpeedDecrease) + "%.");
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectMovementSpeedDecrease(iSpeedDecrease),oCreature,0.0);
|
||||
}
|
||||
}
|
||||
// afx_debug("afx_apply_effects: Leaving.");
|
||||
}
|
||||
|
||||
void afx_remove_effects(object oCreature, object oArea) {
|
||||
// afx_debug("afx_remove_effects: Entered.");
|
||||
if(oCreature == OBJECT_INVALID) {
|
||||
// afx_debug("afx_remove_effects: Creature object is invalid, returning.");
|
||||
return;
|
||||
}
|
||||
if(oArea == OBJECT_INVALID) {
|
||||
oArea = GetArea(oCreature);
|
||||
if(oArea == OBJECT_INVALID) {
|
||||
// afx_debug("afx_remove_effects: Area object is invalid, returning.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(GetObjectType(oCreature) == OBJECT_TYPE_CREATURE) {
|
||||
// afx_debug("afx_remove_effects: Object is a creature.");
|
||||
// afx_debug("afx_remove_effects: Area: "+GetTag(oArea)+" (0x"+ObjectToString(oArea)+")");
|
||||
effect eEffect = GetFirstEffect(oCreature);
|
||||
while(GetIsEffectValid(eEffect)) {
|
||||
object oEffectCreator = GetEffectCreator(eEffect);
|
||||
// afx_debug("afx_remove_effects: Effect '"+IntToString(GetEffectType(eEffect))+"' created by: "+GetTag(oEffectCreator)+" (0x"+ObjectToString(oEffectCreator)+")");
|
||||
// if((oEffectCreator == oArea || oEffectCreator == GetModule()) && GetEffectSubType(eEffect) == SUBTYPE_SUPERNATURAL) {
|
||||
if(oEffectCreator == oArea && GetEffectSubType(eEffect) == SUBTYPE_SUPERNATURAL) {
|
||||
// afx_debug("afx_remove_effects: Effect added by area or module, removing.");
|
||||
RemoveEffect(oCreature,eEffect);
|
||||
}
|
||||
eEffect = GetNextEffect(oCreature);
|
||||
}
|
||||
}
|
||||
// afx_debug("afx_remove_effects: Leaving.");
|
||||
}
|
||||
|
122
_module/nss/ag_area_clean.nss
Normal file
122
_module/nss/ag_area_clean.nss
Normal file
@@ -0,0 +1,122 @@
|
||||
//Script Name: ag_area_clean (Horse Edition)
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 9/17/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script goes in the OnExit event
|
||||
for all areas within your module, if
|
||||
you want to clean inventories of placeable
|
||||
objects, in some areas I suggest you save
|
||||
this under a new name FIRST!
|
||||
|
||||
This script destroys all horses which are
|
||||
not assigned to a PC left in the area
|
||||
IF there are no more PCs in the area the
|
||||
script will fire.
|
||||
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
//Required Horse Include
|
||||
#include "x3_inc_horse"
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
//OPTIONS/////
|
||||
|
||||
//Note: This is a very important script, it should go on the exit event of
|
||||
//all area you create. (with some exceptions) This reduces lagg too!
|
||||
|
||||
//IMPORTANT: If you change this option change the script name! (Save As)
|
||||
// Set this to TRUE if you want placeable object's inventories cleared
|
||||
int nClearPlaceInv = FALSE;
|
||||
|
||||
// Set the amount of time to wait for cleaning here in seconds
|
||||
float fDelayTime = 5.0;
|
||||
|
||||
/////////////////WARNING: DON'T TOUCH ANYTHING BELOW!!!////////////
|
||||
|
||||
void CleanArea(object oArea)
|
||||
{
|
||||
object oTrash = GetFirstObjectInArea(oArea);
|
||||
object oInvItem;
|
||||
|
||||
//Check for PCs
|
||||
object oPC = GetFirstPC();
|
||||
while (GetIsObjectValid(oPC)) {
|
||||
if(!GetIsDM(oPC)||!GetIsDMPossessed(oPC))
|
||||
{
|
||||
if (GetArea(oPC) == oArea) {
|
||||
DeleteLocalInt(oArea, "CleanArea");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
|
||||
while(GetIsObjectValid(oTrash)) {
|
||||
string sTagPrefix = GetStringLeft(GetTag(oTrash), 15);
|
||||
// Clear remains, dropped items
|
||||
if(GetObjectType(oTrash)==OBJECT_TYPE_ITEM ||
|
||||
GetStringLowerCase(GetName(oTrash)) == "remains") {
|
||||
AssignCommand(oTrash, SetIsDestroyable(TRUE));
|
||||
if (GetHasInventory(oTrash)) {
|
||||
oInvItem = GetFirstItemInInventory(oTrash);
|
||||
while(GetIsObjectValid(oInvItem)) {
|
||||
DestroyObject(oInvItem,0.0);
|
||||
oInvItem = GetNextItemInInventory(oTrash);
|
||||
}
|
||||
}
|
||||
else DestroyObject(oTrash, 0.0);
|
||||
}
|
||||
// Clear placeable inventories
|
||||
if(GetObjectType(oTrash)==OBJECT_TYPE_PLACEABLE &&
|
||||
nClearPlaceInv == TRUE) {
|
||||
if (GetHasInventory(oTrash))
|
||||
{
|
||||
object oInvItem = GetFirstItemInInventory(oTrash);
|
||||
while(GetIsObjectValid(oInvItem)) {
|
||||
DestroyObject(oInvItem,0.0);
|
||||
oInvItem = GetNextItemInInventory(oTrash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (GetIsEncounterCreature(oTrash) ||
|
||||
sTagPrefix == "PWFSE_SPAWNERID")
|
||||
{
|
||||
AssignCommand(oTrash, SetIsDestroyable(TRUE));
|
||||
DestroyObject(oTrash, 0.0);
|
||||
}
|
||||
|
||||
// If it's a mountable creature!
|
||||
else if (HorseGetIsAMount(oTrash))
|
||||
{
|
||||
//If the mount has no master!
|
||||
if(HorseGetOwner(oTrash)== OBJECT_INVALID)
|
||||
{
|
||||
AssignCommand(oTrash, SetIsDestroyable(TRUE));
|
||||
DestroyObject(oTrash, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
oTrash = GetNextObjectInArea(oArea);
|
||||
}
|
||||
DeleteLocalInt(oArea, "CleanArea");
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oArea = OBJECT_SELF;
|
||||
object oPC = GetExitingObject();
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetLocalInt(oArea, "CleanArea") != 1)
|
||||
{
|
||||
DelayCommand(fDelayTime, CleanArea(oArea));
|
||||
SetLocalInt(oArea, "CleanArea", 1);
|
||||
}
|
||||
|
||||
}
|
17
_module/nss/allowrandomsocky.nss
Normal file
17
_module/nss/allowrandomsocky.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 2.3
|
||||
|
||||
For download info, please visit:
|
||||
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
||||
|
||||
//Put this script OnClose
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastClosedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
|
||||
|
||||
}
|
19
_module/nss/allowsockeys.nss
Normal file
19
_module/nss/allowsockeys.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
//Created by Guile 3/31/07
|
||||
//This variable is set on the pc while they are on the module to prevent
|
||||
//them from relooting chest when they open them for socketed items.
|
||||
//whenever a pc opens a chest the chest will check to see if they have
|
||||
//opened any others anytimes soon, if not, they get a 15% chance of getting
|
||||
//a rare socketed item.
|
||||
|
||||
//Put this script OnEnter of your starting area of the module.
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
SetLocalString(oPC, "nosockeysoon", "1");
|
||||
|
||||
}
|
||||
|
17
_module/nss/altar_use.nss
Normal file
17
_module/nss/altar_use.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
//trapdoor_use script by Kerico 7/5/02 for doorclosed by default
|
||||
//place in trapdoor on-use scipt
|
||||
//opens the trapdoor and starts convo between using pc and trapdoor
|
||||
|
||||
void main()
|
||||
{
|
||||
//Get PC
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
//Get Trapdoor
|
||||
object oDoor = GetObjectByTag("HolyAltar");
|
||||
|
||||
|
||||
//start trapdoor conversation
|
||||
AssignCommand (oPC,ActionStartConversation(oDoor));
|
||||
|
||||
}
|
51
_module/nss/altarcurse33.nss
Normal file
51
_module/nss/altarcurse33.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
//Created by Guile 2/2/07
|
||||
//Put this on action taken in the conversation editor
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectCurse(4, 4, 4, 4, 4, 4);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 600.0f);
|
||||
|
||||
eEffect = EffectAttackDecrease(4);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 600.0f);
|
||||
|
||||
eEffect = EffectACDecrease(4);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 600.0f);
|
||||
|
||||
FloatingTextStringOnCreature("As you place your hand on the alter you are bestowed with a powerful curse!", oPC);
|
||||
|
||||
eEffect = EffectDamage(300, DAMAGE_TYPE_DIVINE, DAMAGE_POWER_ENERGY);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC);
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HARM), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_HARM), GetLocation(oTarget));
|
||||
|
||||
}
|
15
_module/nss/altardeath.nss
Normal file
15
_module/nss/altardeath.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 15, float fRadius = 5.) {
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), lTarget);
|
||||
|
||||
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
|
||||
do {
|
||||
int nDamageAfterSave = GetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_FIRE), oObject);
|
||||
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID); }
|
||||
|
||||
void main()
|
||||
{
|
||||
location lSource = GetLocation(GetObjectByTag("HolyAltar"));
|
||||
DelayCommand(0.5, ExplodeAtLocation(lSource, d12(12)));
|
||||
}
|
56
_module/nss/altarjump33.nss
Normal file
56
_module/nss/altarjump33.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
//Created By Guile 2/07/07
|
||||
//Put this on action taken in the conversation editor
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("clericway33");
|
||||
|
||||
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());
|
||||
|
||||
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectCurse(4, 4, 4, 4, 4, 4);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f));
|
||||
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f));
|
||||
|
||||
eEffect = EffectSilence();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f));
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oTarget));
|
||||
|
||||
}
|
21
_module/nss/altartrigg33.nss
Normal file
21
_module/nss/altartrigg33.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
//Created by Guile 2/2/07
|
||||
//Put this script OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if ((GetLevelByClass(CLASS_TYPE_CLERIC, oPC)==0)&&
|
||||
(GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC)==0)&&
|
||||
(GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)==0)&&
|
||||
(GetLevelByClass(CLASS_TYPE_HEALER, oPC)==0)&&
|
||||
(GetLevelByClass(CLASS_TYPE_DRUID, oPC)==0))
|
||||
return;
|
||||
|
||||
ActionStartConversation(oPC, "altartalk33");
|
||||
|
||||
}
|
26
_module/nss/alterdrownsorhls.nss
Normal file
26
_module/nss/alterdrownsorhls.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
object oTarget;
|
||||
|
||||
//Created by Guile 3/8/07
|
||||
//Put this script OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetAlignmentGoodEvil(oPC) == ALIGNMENT_EVIL)
|
||||
{
|
||||
oTarget = oPC;
|
||||
|
||||
ActionCastSpellAtObject(SPELL_DROWN, oTarget, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);
|
||||
|
||||
}
|
||||
else if (GetAlignmentGoodEvil(oPC) != ALIGNMENT_EVIL)
|
||||
{
|
||||
oTarget = oPC;
|
||||
|
||||
ActionCastSpellAtObject(SPELL_HEAL, oTarget, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, FALSE);
|
||||
|
||||
}
|
||||
}
|
63
_module/nss/alterjump33.nss
Normal file
63
_module/nss/alterjump33.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
//Created by Guile 2/2/07
|
||||
//Put this on action taken in the conversation editor
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
eEffect = EffectCurse(4, 4, 4, 4, 4, 4);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);
|
||||
|
||||
oTarget = GetObjectByTag("unholyaltar33");
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUNBEAM), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUNBEAM), GetLocation(oTarget));
|
||||
|
||||
DestroyObject(oTarget, 0.5);
|
||||
|
||||
FloatingTextStringOnCreature("The destruction of the alter has cursed you!", oPC);
|
||||
|
||||
location lTarget;
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
oTarget = GetWaypointByTag("clericway33");
|
||||
|
||||
//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;
|
||||
|
||||
DelayCommand(1.0, AssignCommand(oPC, ClearAllActions()));
|
||||
|
||||
DelayCommand(1.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
eEffect = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
|
||||
}
|
||||
|
||||
|
20
_module/nss/alwarden_yes.nss
Normal file
20
_module/nss/alwarden_yes.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//trapdoor_yes script by Kerico 7/7/02
|
||||
//jumps the using PC to target waypoint and closes the trapdoor for next use
|
||||
//place in action taken scipt in trapdoor conversation
|
||||
//in 'yes' end dialog of the trapdoor
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//get the pc who used the trapdoor
|
||||
object oPC = GetObjectByTag("warden");
|
||||
|
||||
//get the target waypoint destination
|
||||
object oDrop = GetWaypointByTag("warden1");
|
||||
|
||||
//jump the PC to the destination
|
||||
AssignCommand (oPC,JumpToObject(oDrop));
|
||||
|
||||
|
||||
|
||||
}
|
277
_module/nss/ammo_maker.nss
Normal file
277
_module/nss/ammo_maker.nss
Normal file
@@ -0,0 +1,277 @@
|
||||
//Script Name: ammo_maker
|
||||
//////////////////////////////////////////
|
||||
// Created By: Genisys (Guile)
|
||||
// Created On: 4/19/09
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This tagbased item script is for an item
|
||||
with a Unique Power, which will allow the
|
||||
PC to create a 2 duplications of any stacksize
|
||||
of ammunition at X% of it's original cost!
|
||||
(Set X Below..)
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
//Required Include!
|
||||
#include "x2_inc_switches"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//PROTOTYPE
|
||||
int GetTrueValue(object oItem)
|
||||
{
|
||||
int i = 0;
|
||||
//Get the state of the item before altering
|
||||
int c = GetItemCursedFlag(oItem);
|
||||
int n = GetIdentified(oItem);
|
||||
int p = GetPlotFlag(oItem);
|
||||
|
||||
if(c==TRUE)
|
||||
{ SetItemCursedFlag(oItem, FALSE);}
|
||||
|
||||
if(n==FALSE)
|
||||
{ SetIdentified(oItem, TRUE); }
|
||||
|
||||
if(p==TRUE)
|
||||
{ SetPlotFlag(oItem, FALSE); }
|
||||
|
||||
i = GetGoldPieceValue(oItem);
|
||||
|
||||
SetItemCursedFlag(oItem, c);
|
||||
SetIdentified(oItem, n);
|
||||
SetPlotFlag(oItem, n);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
//PROTOTYPE
|
||||
void FlagCopies(object oPC)
|
||||
{
|
||||
object oItem = GetFirstItemInInventory(oPC);
|
||||
string sP;
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
sP = GetTag(oItem);
|
||||
if(sP=="REPLICATED")
|
||||
{
|
||||
SetPlotFlag(oItem, TRUE);
|
||||
SetItemCursedFlag(oItem, TRUE);
|
||||
}
|
||||
|
||||
oItem = GetNextItemInInventory(oPC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
|
||||
//All Major Variables Declared (Do not define them here!)
|
||||
|
||||
int nEvent = GetUserDefinedItemEventNumber(); //Which event triggered this
|
||||
object oPC; //The player character using the item
|
||||
object oItem; //The item being used
|
||||
object oSpellOrigin; //The origin of the spell
|
||||
object oSpellTarget; //The target of the spell
|
||||
int iSpell; //The Spell ID number
|
||||
object oTarget; //Define oTarget below
|
||||
object oObject; //Define oObject below
|
||||
int nInt; //A commonly used intergal (Must be defined)
|
||||
int nLvl; //Commonly used intergal for levels (ie. GetHitDice(oTarget); etc.)
|
||||
string sTag; //Used to define a tagname of something
|
||||
string sResref; //Used to define a resref name of something
|
||||
string sMsg; //Used to define a message
|
||||
effect eEffect; //Used to define an effect to be applied to an object or location
|
||||
effect eVis; //Used to define a visual effect to be applied to an object or location
|
||||
location lTarget; //The Target Location of the PC ONLY! (USE - Getlocation(oPC);)
|
||||
location lway; //The Target location for the Activated Item's Target only! (See below)
|
||||
int nType;
|
||||
int nCost;
|
||||
int nPlot;
|
||||
int nID;
|
||||
int nCursed;
|
||||
int nGP;
|
||||
int a, b, c;
|
||||
location lPC;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//Set the return value for the item event script
|
||||
// * X2_EXECUTE_SCRIPT_CONTINUE - continue calling script after executed script is done
|
||||
// * X2_EXECUTE_SCRIPT_END - end calling script after executed script is done
|
||||
int nResult = X2_EXECUTE_SCRIPT_END;
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Deterimine which event has fired for the item...
|
||||
switch (nEvent)
|
||||
{
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
///////The Item has the property: On-Hit Cast Spell: Unique Power/////////
|
||||
|
||||
case X2_ITEM_EVENT_ONHITCAST:
|
||||
{ // * This code runs when the item has the 'OnHitCastSpell: Unique power' property
|
||||
// * and it hits a target(if it is a weapon) or is being hit (if it is a piece of armor)
|
||||
// * Note that this event fires for non PC creatures as well.
|
||||
|
||||
oItem = GetSpellCastItem(); // The item triggering this spellscript
|
||||
oPC = OBJECT_SELF; // The player triggering it
|
||||
oSpellOrigin = OBJECT_SELF ; // Where the spell came from
|
||||
oSpellTarget = GetSpellTargetObject(); // What the spell is aimed at
|
||||
|
||||
//Your code goes here
|
||||
}
|
||||
break;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/////////////Cast Spell: Unique Power /or/ Activate Item//////////////////
|
||||
|
||||
//I seperated this cause it's more commonly used..
|
||||
case X2_ITEM_EVENT_ACTIVATE:
|
||||
{// * This code runs when the Unique Power property of the item is used
|
||||
// * or the item is activated. Note that this event fires for PCs only.
|
||||
|
||||
oPC = GetItemActivator(); // The player who activated the item
|
||||
oItem = GetItemActivated(); // The item that was activated
|
||||
oTarget = GetItemActivatedTarget(); //The target of the item's power
|
||||
lway = GetItemActivatedTargetLocation(); //To get the location of the target!
|
||||
nType = GetBaseItemType(oTarget);
|
||||
lPC = GetLocation(oPC);
|
||||
nGP = GetGold(oPC);
|
||||
b = 0; //initialize!
|
||||
|
||||
//If the user is targeting ammunition!
|
||||
if(nType == BASE_ITEM_ARROW || nType == BASE_ITEM_BOLT ||
|
||||
nType == BASE_ITEM_BULLET || nType == BASE_ITEM_DART ||
|
||||
nType == BASE_ITEM_SHURIKEN || nType == BASE_ITEM_THROWINGAXE)
|
||||
{
|
||||
//Get the identified cost of the item!
|
||||
a = GetTrueValue(oTarget);
|
||||
|
||||
if(a==0)
|
||||
b=100;
|
||||
else if(a>=100)
|
||||
b = a/80; //80% of it's original value!
|
||||
else
|
||||
b= 100;
|
||||
|
||||
if(nGP>=b)
|
||||
{
|
||||
|
||||
TakeGoldFromCreature(b, oPC, TRUE);
|
||||
|
||||
sMsg = IntToString(b) + " - Gold was used in the crafting of this ammunition!";
|
||||
FloatingTextStringOnCreature(sMsg, oPC, FALSE);
|
||||
|
||||
//Create 2 copies of the ammunition...
|
||||
CopyObject(oTarget, lPC, oPC, "REPLICATED");
|
||||
CopyObject(oTarget, lPC, oPC, "REPLICATED");
|
||||
|
||||
DelayCommand(0.5, FlagCopies(oPC));
|
||||
}
|
||||
else
|
||||
{
|
||||
sMsg = "You do not have enough gold to make more ammunition!";
|
||||
FloatingTextStringOnCreature(sMsg, oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
sMsg = "You must target ammunition only!";
|
||||
FloatingTextStringOnCreature(sMsg, oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////When the User Equips this item////////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_EQUIP:
|
||||
{// * This code runs when the item is equipped
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetPCItemLastEquippedBy(); // The player who equipped the item
|
||||
oItem = GetPCItemLastEquipped(); // The item that was equipped
|
||||
|
||||
//Your code goes here
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/////////////When the User Unequips this item//////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_UNEQUIP:
|
||||
{// * This code runs when the item is unequipped
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetPCItemLastUnequippedBy();// The player who unequipped the item
|
||||
oItem = GetPCItemLastUnequipped(); // The item that was unequipped
|
||||
|
||||
//Your code goes here
|
||||
}
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
////////////Everytime ANYONE Acquires this item////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_ACQUIRE:
|
||||
{// * This code runs when the item is acquired
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetModuleItemAcquiredBy(); // The player who acquired the item
|
||||
oItem = GetModuleItemAcquired(); // The item that was acquired
|
||||
|
||||
//Your code goes here
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
//////////Everytime ANYONE Loses this item/////////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_UNACQUIRE:
|
||||
{// * This code runs when the item is unacquired
|
||||
// * Note that this event fires for PCs only
|
||||
|
||||
oPC = GetModuleItemLostBy(); // The player who dropped the item
|
||||
oItem = GetModuleItemLost(); // The item that was dropped
|
||||
|
||||
//Your code goes here
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
/////Everytime ANYONE Cast a spell at this item////////////////////////////
|
||||
|
||||
case X2_ITEM_EVENT_SPELLCAST_AT:
|
||||
{//* This code runs when a PC or DM casts a spell from one of the
|
||||
//* standard spellbooks on the item
|
||||
|
||||
oPC = OBJECT_SELF; // The player who cast the spell
|
||||
oItem = GetSpellTargetObject();// The item targeted by the spell
|
||||
iSpell = GetSpellId(); // The id of the spell that was cast
|
||||
// See the list of SPELL_* constants
|
||||
|
||||
//Your code goes here
|
||||
|
||||
|
||||
//Change the following line from X2_EXECUTE_SCRIPT_CONTINUE to
|
||||
//X2_EXECUTE_SCRIPT_END if you want to prevent the spell that was
|
||||
//cast on the item from taking effect
|
||||
nResult = X2_EXECUTE_SCRIPT_CONTINUE;
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Pass the return value back to the calling script
|
||||
SetExecutedScriptReturnValue(nResult);
|
||||
}
|
||||
|
62
_module/nss/amy_gives_god.nss
Normal file
62
_module/nss/amy_gives_god.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
effect eEffect;
|
||||
effect eVis;
|
||||
eVis = EffectVisualEffect(VFX_DUR_ICESKIN);
|
||||
SetXP(oPC, 8988988);
|
||||
GiveGoldToCreature(oPC, 999999999);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVis, oPC, 0.0f);
|
||||
|
||||
//Buffs...
|
||||
eEffect = EffectAttackIncrease(10, ATTACK_BONUS_MISC);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectConcealment(60, MISS_CHANCE_TYPE_NORMAL);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectDamageShield(10, DAMAGE_BONUS_1d12, DAMAGE_TYPE_DIVINE);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectSpellResistanceIncrease(70);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_BLINDNESS);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_SPELL_RESISTANCE_DECREASE);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_STUN);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_ATTACK_DECREASE);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectEthereal();
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectRegenerate(200, 6.0f);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
eEffect = EffectTrueSeeing();
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC, 0.0f);
|
||||
|
||||
|
||||
}
|
49
_module/nss/ancruinjump1.nss
Normal file
49
_module/nss/ancruinjump1.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
location lTarget;
|
||||
object oTarget;
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 2.3
|
||||
|
||||
For download info, please visit:
|
||||
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
||||
|
||||
//Put this on action taken in the conversation editor
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if (GetItemPossessedBy(oPC, "godstate44")!= OBJECT_INVALID)
|
||||
{
|
||||
oTarget = GetWaypointByTag("statueway1");
|
||||
|
||||
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;
|
||||
|
||||
oTarget=GetFirstFactionMember(oPC, FALSE);
|
||||
|
||||
while (GetIsObjectValid(oTarget))
|
||||
{
|
||||
AssignCommand(oTarget, ClearAllActions());
|
||||
|
||||
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
|
||||
oTarget=GetNextFactionMember(oPC, FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, 1.0f, 4.0f));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
4
_module/nss/announce_start.nss
Normal file
4
_module/nss/announce_start.nss
Normal file
@@ -0,0 +1,4 @@
|
||||
void main()
|
||||
{
|
||||
SetLocalString(OBJECT_SELF,"StoneID","Announcement");
|
||||
}
|
9
_module/nss/apprentice_sp.nss
Normal file
9
_module/nss/apprentice_sp.nss
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "x0_i0_anims"
|
||||
void main()
|
||||
{
|
||||
SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT);
|
||||
|
||||
SetListening(OBJECT_SELF,TRUE);
|
||||
SetListenPattern(OBJECT_SELF,"**", 101);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user