Initial upload
Initial upload
This commit is contained in:
15
module/nss/1stkeycheck.nss
Normal file
15
module/nss/1stkeycheck.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(), "1stkey");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
15
module/nss/2ndkeycheck.nss
Normal file
15
module/nss/2ndkeycheck.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(), "2ndkey");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
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;
|
||||
}
|
||||
|
15
module/nss/4soulcheck.nss
Normal file
15
module/nss/4soulcheck.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(), "SoulStone");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
18
module/nss/4thkeycheck.nss
Normal file
18
module/nss/4thkeycheck.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName beetlejuice
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 8/13/2002 12:14:41 PM
|
||||
//:://////////////////////////////////////////////
|
||||
#include "nw_i0_tool"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC= GetPCSpeaker();
|
||||
string name = GetPCPlayerName(oPC);
|
||||
SetLocalString(oPC, "doublecheck", name);
|
||||
object oItem = GetItemPossessedBy(GetPCSpeaker(), "rainbowstone");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
15
module/nss/4toothcheck.nss
Normal file
15
module/nss/4toothcheck.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(), "JadeTooth");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
37
module/nss/5minlock.nss
Normal file
37
module/nss/5minlock.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
location lTarget;
|
||||
object oTarget;
|
||||
|
||||
//Put this script OnClose
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastClosedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
oTarget = GetWaypointByTag("secureway1");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||||
|
||||
SetLocked(OBJECT_SELF, TRUE);
|
||||
|
||||
DelayCommand(300.0, SetLocked(OBJECT_SELF, FALSE));
|
||||
|
||||
DelayCommand(301.0, ActionOpenDoor(OBJECT_SELF));
|
||||
|
||||
object oParty = GetFirstFactionMember(oPC);
|
||||
while(oParty != OBJECT_INVALID)
|
||||
{
|
||||
|
||||
CreateItemOnObject("barrel", oParty);
|
||||
oParty = GetNextFactionMember(oPC);
|
||||
}
|
||||
|
||||
|
||||
}
|
36
module/nss/5minlock2.nss
Normal file
36
module/nss/5minlock2.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
location lTarget;
|
||||
object oTarget;
|
||||
|
||||
//Put this script OnClose
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastClosedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
oTarget = GetWaypointByTag("secureway2");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||||
|
||||
SetLocked(OBJECT_SELF, TRUE);
|
||||
|
||||
DelayCommand(300.0, SetLocked(OBJECT_SELF, FALSE));
|
||||
|
||||
DelayCommand(301.0, ActionOpenDoor(OBJECT_SELF));
|
||||
|
||||
object oParty = GetFirstFactionMember(oPC);
|
||||
while(oParty != OBJECT_INVALID)
|
||||
{
|
||||
|
||||
CreateItemOnObject("barrel2", oParty);
|
||||
oParty = GetNextFactionMember(oPC);
|
||||
}
|
||||
|
||||
}
|
63
module/nss/_clone_.nss
Normal file
63
module/nss/_clone_.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9000){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_1.nss
Normal file
63
module/nss/_clone_1.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9001){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_2.nss
Normal file
63
module/nss/_clone_2.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9002){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_3.nss
Normal file
63
module/nss/_clone_3.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9003){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_4.nss
Normal file
63
module/nss/_clone_4.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9004){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_5.nss
Normal file
63
module/nss/_clone_5.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9005){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_6.nss
Normal file
63
module/nss/_clone_6.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9006){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_7.nss
Normal file
63
module/nss/_clone_7.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9007){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
62
module/nss/_clone_8.nss
Normal file
62
module/nss/_clone_8.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9008){
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
63
module/nss/_clone_9.nss
Normal file
63
module/nss/_clone_9.nss
Normal file
@@ -0,0 +1,63 @@
|
||||
void main()
|
||||
{
|
||||
object PC = GetFirstPC();
|
||||
while(GetIsPC(PC)==TRUE)
|
||||
{
|
||||
int SN = GetLocalInt(PC,"bootlist");
|
||||
if(SN==9009){
|
||||
|
||||
|
||||
object oPC = GetLastSpeaker();
|
||||
AssignCommand(oPC,PlaySound("as_sw_x2gong2"));
|
||||
object oTrigger=OBJECT_SELF;
|
||||
object oNest = GetWaypointByTag("WP_NEST6");
|
||||
object clone = GetLocalObject(oPC, "Clone");
|
||||
// int bReady=!GetLocalInt(oTrigger, "Used");
|
||||
location lSpawn=GetLocation(oNest);
|
||||
|
||||
// if (bReady && GetIsPC(oPC))
|
||||
if (GetIsObjectValid(clone) == FALSE && GetIsPC(oPC))
|
||||
{
|
||||
object oClone = CopyObject(PC, lSpawn, OBJECT_INVALID, "Clone");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oNest));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SOUND_BURST_SILENT), GetLocation(oNest));
|
||||
SetBaseAttackBonus(6,oClone);
|
||||
//This prevents a PC from accidentally triggering an army of clones
|
||||
//by making the trigger inactive for 30 seconds after use.
|
||||
// SetLocalInt(oTrigger, "Used", TRUE);
|
||||
// DelayCommand(30.0, SetLocalInt(oTrigger, "Used", FALSE));
|
||||
SetLocalObject(PC, "Clone", oClone);
|
||||
|
||||
//This sets the clone to Hostile
|
||||
ChangeToStandardFaction(oClone, STANDARD_FACTION_HOSTILE);
|
||||
//Have the clone leave a corpse that's not lootable.
|
||||
//We don't want all the player's gear coming into play either.
|
||||
AssignCommand(oClone, SetIsDestroyable(FALSE, FALSE));
|
||||
int nGold = GetGold(oClone);
|
||||
int nHP = GetMaxHitPoints(oClone);
|
||||
|
||||
//This makes sure the clone doesn't drop a ton of gold,
|
||||
//otherwise he'd have as much as the PC he copied
|
||||
TakeGoldFromCreature(nGold, oClone, TRUE);
|
||||
//Don't want an injured clone from an injured player, so heal him too.
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(nHP), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectTemporaryHitpoints(9999), oClone));
|
||||
DelayCommand(3.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment(99,MISS_CHANCE_TYPE_VS_MELEE), oClone));
|
||||
DelayCommand(3.0,AssignCommand(oClone,SpeakString("You will Die Fucker!!!",TALKVOLUME_TALK)));
|
||||
DelayCommand(2.0,AssignCommand(oClone, ActionPlayAnimation(ANIMATION_FIREFORGET_BOW)));
|
||||
DelayCommand(2.5,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,FALSE)));
|
||||
DelayCommand(2.6,AssignCommand(oClone,ActionEquipMostDamagingMelee(oPC,TRUE)));
|
||||
|
||||
// Attack player straight away
|
||||
DelayCommand (3.0,AssignCommand(oClone, ActionAttack(oPC)));
|
||||
|
||||
//This is the all important combat hb script.
|
||||
ExecuteScript("clone_hb", oClone);
|
||||
}
|
||||
}
|
||||
PC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
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
|
||||
}
|
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;
|
||||
}
|
7
module/nss/_start_clone_cnv.nss
Normal file
7
module/nss/_start_clone_cnv.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastUsedBy();
|
||||
AssignCommand(OBJECT_SELF,ClearAllActions(TRUE));
|
||||
AssignCommand(oPC,ClearAllActions(TRUE));
|
||||
AssignCommand(oPC,ActionStartConversation(oPC,"clone_peeps",TRUE,FALSE));
|
||||
}
|
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);
|
||||
}
|
56
module/nss/ac_armageddonsta.nss
Normal file
56
module/nss/ac_armageddonsta.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
string tag = GetTag(oItem);
|
||||
|
||||
SetLocalString(GetModule(), "NWNX!RESETPLUGIN!SHUTDOWN", "1");
|
||||
|
||||
|
||||
/* DISABLED
|
||||
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);
|
||||
//Not needed any more..
|
||||
//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();
|
||||
}
|
||||
|
||||
//Reload the module..
|
||||
DelayCommand(10.0, StartNewModule(GetName(GetModule())));
|
||||
*/
|
||||
|
||||
}
|
29
module/nss/ac_arthxbow.nss
Normal file
29
module/nss/ac_arthxbow.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;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//If not level 40, STOP!
|
||||
if(GetHitDice(oPC)<40)return;
|
||||
|
||||
if (GetGold(oPC) >= 10000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("artbolts1", 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 create the bolts!", oPC);
|
||||
}
|
||||
|
||||
}
|
29
module/nss/ac_artifactlbow.nss
Normal file
29
module/nss/ac_artifactlbow.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;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//If not level 40, STOP!
|
||||
if(GetHitDice(oPC)<30)return;
|
||||
|
||||
if (GetGold(oPC) >= 10000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("artarrows1", 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 create the bolts!", oPC);
|
||||
}
|
||||
|
||||
}
|
29
module/nss/ac_artifactsbow.nss
Normal file
29
module/nss/ac_artifactsbow.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;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//If not level 40, STOP!
|
||||
if(GetHitDice(oPC)<30)return;
|
||||
|
||||
if (GetGold(oPC) >= 10000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("artarrows1", 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);
|
||||
}
|
||||
|
||||
}
|
28
module/nss/ac_artifactsling.nss
Normal file
28
module/nss/ac_artifactsling.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();
|
||||
|
||||
//If not level 40, STOP!
|
||||
if(GetHitDice(oPC)<30)return;
|
||||
|
||||
if (GetGold(oPC) >= 5000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("artbullets1", oPC, 500);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(5000, 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);
|
||||
}
|
||||
}
|
29
module/nss/ac_artlxbow.nss
Normal file
29
module/nss/ac_artlxbow.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;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
//If not level 40, STOP!
|
||||
if(GetHitDice(oPC)<40)return;
|
||||
|
||||
if (GetGold(oPC) >= 10000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("artbolts1", 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 create the bolts!", oPC);
|
||||
}
|
||||
|
||||
}
|
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));
|
||||
}
|
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));
|
||||
|
||||
}
|
24
module/nss/ac_crystalball.nss
Normal file
24
module/nss/ac_crystalball.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;
|
||||
|
||||
|
||||
object oActivator=GetItemActivator();
|
||||
object oPC = GetFirstPC();
|
||||
|
||||
while (oPC != OBJECT_INVALID)
|
||||
{
|
||||
string sReport;
|
||||
sReport = ">>> ID: " + GetPCPlayerName( oPC )
|
||||
+ "; Name: "+ GetName( oPC )
|
||||
+ "; CD Key:" + GetPCPublicCDKey( oPC )
|
||||
+ "; IP:" + GetPCIPAddress( oPC );
|
||||
SendMessageToPC(oActivator, sReport);
|
||||
oPC=GetNextPC();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
65
module/nss/ac_dmhand.nss
Normal file
65
module/nss/ac_dmhand.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are not a DM!!!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectMovementSpeedDecrease(80);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectSavingThrowDecrease(SAVING_THROW_ALL, 15, SAVING_THROW_TYPE_ALL);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectACDecrease(30);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectAbilityIncrease(ABILITY_CONSTITUTION, 6);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectSilence();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
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));
|
||||
|
||||
AssignCommand(oPC, ActionSpeakString("I have offended the Gods and I must be punished!!!!", TALKVOLUME_SHOUT));
|
||||
|
||||
DelayCommand(2.0, AssignCommand(oPC, ActionSpeakString("I know now not to anger the gods or I will suffer!!!", TALKVOLUME_SHOUT)));
|
||||
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionSpeakString("I promise to be good, if only the gods will remove this horrible curse off of me!!", TALKVOLUME_SHOUT)));
|
||||
|
||||
}
|
27
module/nss/ac_dmjail.nss
Normal file
27
module/nss/ac_dmjail.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are not a DM!!!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
|
||||
//Send the PC to DM Jail (A bad bad thing!!!)
|
||||
oTarget = GetWaypointByTag("dmtorture");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
AssignCommand(oPC, ActionJumpToLocation(lTarget));
|
||||
|
||||
}
|
49
module/nss/ac_dmkey.nss
Normal file
49
module/nss/ac_dmkey.nss
Normal file
@@ -0,0 +1,49 @@
|
||||
//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;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are not a DM!!!");
|
||||
return;}
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDamage(5000, 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)));
|
||||
|
||||
}
|
114
module/nss/ac_dmreward.nss
Normal file
114
module/nss/ac_dmreward.nss
Normal file
@@ -0,0 +1,114 @@
|
||||
//Created by Genisys 5/23/08
|
||||
//This script rewards the PC targeted by the DM with a Random Reward
|
||||
//Note this is a tag based item script which fires OnActivateItem Unique Power
|
||||
#include "x2_inc_switches"
|
||||
#include "setxp_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
//Declare Major Variables
|
||||
object oPC;
|
||||
object oItem;
|
||||
object oTarget;
|
||||
string aItem;
|
||||
int bInt;
|
||||
int dInt;
|
||||
int gInt;
|
||||
int nInt;
|
||||
int nLvl;
|
||||
int gGold;
|
||||
int nGold;
|
||||
|
||||
//Major Variables Defined...
|
||||
oPC = GetItemActivator();
|
||||
oTarget = GetItemActivatedTarget();
|
||||
bInt = Random(100);
|
||||
//This is the amount of gold given X Level (adjust below)
|
||||
dInt = 3000;
|
||||
nLvl = GetHitDice(oTarget);
|
||||
//Give them an amount of Gold X PC Level (See dInt above)
|
||||
gGold = nLvl * dInt;
|
||||
nGold = GetGold(oTarget);
|
||||
|
||||
|
||||
if(!GetIsPC(oTarget))
|
||||
{
|
||||
SendMessageToPC(oPC, "You must target a PC!");
|
||||
}
|
||||
|
||||
FloatingTextStringOnCreature("You have recieved a random reward!", oTarget, TRUE);
|
||||
|
||||
//Lets make sure they aren't pretty rich..
|
||||
if(nGold < 500000)
|
||||
{
|
||||
GiveGoldToCreature(oPC, gGold);
|
||||
}
|
||||
|
||||
//Whopping 1% chance of the best item the DM can give a player!!
|
||||
if(bInt == 50)
|
||||
{
|
||||
//Don't forget to create this item and give it the resref name "dmitem7"
|
||||
CreateItemOnObject("dmitem7", oPC, 1);
|
||||
}
|
||||
//Award a Level 40% chance..
|
||||
else if(bInt <= 39)
|
||||
{
|
||||
Give1Level(oPC);
|
||||
}
|
||||
|
||||
//Award a special item 20% chance.. (1 of 6 different rare items!)
|
||||
else if(bInt >=80)
|
||||
{
|
||||
//You will want to create 6 items resref named below "dmitem"
|
||||
//don't forget the item # !
|
||||
nInt = d6(1);
|
||||
|
||||
switch (nInt)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
CreateItemOnObject("dmitem1", oPC, 1);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
CreateItemOnObject("dmitem2", oPC, 1);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
CreateItemOnObject("dmitem3", oPC, 1);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
CreateItemOnObject("dmitem4", oPC, 1);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
CreateItemOnObject("dmitem5", oPC, 1);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
CreateItemOnObject("dmitem6", oPC, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Otherwise give a random reward (something decent..)
|
||||
else
|
||||
{
|
||||
GiveXPToCreature(oTarget, 1000);
|
||||
GiveGoldToCreature(oTarget, 5000);
|
||||
//Note I created these items! (you can create your own!) :)
|
||||
CreateItemOnObject("grtrestorepots", oTarget, 10);
|
||||
CreateItemOnObject("bagofholding", oTarget, 10);
|
||||
}
|
||||
|
||||
//End Script
|
||||
}
|
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));
|
||||
|
||||
}
|
86
module/nss/ac_elixirofimmor.nss
Normal file
86
module/nss/ac_elixirofimmor.nss
Normal file
@@ -0,0 +1,86 @@
|
||||
//script name: ac_elixirofimmor
|
||||
//
|
||||
//Created by: Genisys / Guile
|
||||
//Created On: 3/21/09
|
||||
//Modified the original by AW_OLORIN
|
||||
/////////////////////////////////////
|
||||
//Note this is a TagBased Item Script
|
||||
//for the OnActivate Event
|
||||
////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
|
||||
//This is the SUPER BUFF Potion!
|
||||
|
||||
object oPC;
|
||||
|
||||
object oTarget;
|
||||
oPC = GetItemActivator();
|
||||
oTarget = oPC;
|
||||
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
//Apply some cool visual effects
|
||||
effect eEffect;
|
||||
eEffect = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget));
|
||||
else
|
||||
DelayCommand(1.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oTarget)));
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
eEffect = EffectVisualEffect(VFX_FNF_MYSTICAL_EXPLOSION);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
DelayCommand(3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oTarget));
|
||||
else
|
||||
DelayCommand(3.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oTarget)));
|
||||
|
||||
//Apply the longer lasting visuals so the player knows when they potion wears off
|
||||
eEffect = EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectACIncrease(5);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectAttackIncrease(5);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectRegenerate(10, 6.0f);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectTrueSeeing();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectModifyAttacks(2);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
|
||||
SetPlotFlag(oTarget, TRUE);
|
||||
DelayCommand(300.0, (SetPlotFlag(oTarget, FALSE)));
|
||||
}
|
||||
|
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));
|
||||
|
||||
}
|
22
module/nss/ac_fieldtent.nss
Normal file
22
module/nss/ac_fieldtent.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
//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;
|
||||
|
||||
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, "tentconv"));
|
||||
|
||||
}
|
111
module/nss/ac_gemofteleport.nss
Normal file
111
module/nss/ac_gemofteleport.nss
Normal file
@@ -0,0 +1,111 @@
|
||||
#include "nw_i0_tool"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
oPC = GetItemActivator();
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
int nInt;
|
||||
effect eEffect;
|
||||
int nCheck = d6(1);
|
||||
|
||||
if (GetIsPC(oPC))
|
||||
{
|
||||
if (nCheck==1)
|
||||
{
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DISPEL), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DISPEL), GetLocation(oTarget));
|
||||
|
||||
eEffect = EffectSpellResistanceIncrease(42);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
}
|
||||
else if (nCheck==2)
|
||||
{
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_EVIL_HELP), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_EVIL_HELP), GetLocation(oTarget));
|
||||
|
||||
eEffect = EffectTemporaryHitpoints(100);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
}
|
||||
else if (nCheck==3)
|
||||
{
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_GOOD_HELP), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_GOOD_HELP), GetLocation(oTarget));
|
||||
|
||||
eEffect = EffectRegenerate(10, 3.0f);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
}
|
||||
|
||||
else if (nCheck==4)
|
||||
{
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DECK), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_DECK), GetLocation(oTarget));
|
||||
|
||||
RewardPartyXP(3000, oPC, FALSE);
|
||||
RewardPartyGP(30000, oPC, FALSE);
|
||||
}
|
||||
|
||||
else if (nCheck==5)
|
||||
{
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_TORNADO), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_TORNADO), GetLocation(oTarget));
|
||||
|
||||
eEffect = EffectInvisibility(INVISIBILITY_TYPE_IMPROVED);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectConcealment(60);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
}
|
||||
|
||||
else if (nCheck==6)
|
||||
{
|
||||
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_PULSE_HOLY), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_PULSE_HOLY), GetLocation(oTarget));
|
||||
|
||||
eEffect = EffectACIncrease(5);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectAttackIncrease(5);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL, 5, SAVING_THROW_TYPE_ALL);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 300.0f);
|
||||
|
||||
}
|
||||
|
||||
//If statement end..
|
||||
}
|
||||
|
||||
//Main script end..
|
||||
}
|
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);
|
||||
|
||||
// */
|
||||
}
|
306
module/nss/ac_ibag.nss
Normal file
306
module/nss/ac_ibag.nss
Normal file
@@ -0,0 +1,306 @@
|
||||
//Script Name: ac_ibag
|
||||
//////////////////////////////////////////
|
||||
//Created by: Genisys / Guile
|
||||
//ON: 6/17/08
|
||||
/////////////////////////////////////////
|
||||
/* **Notes**
|
||||
This is the OnActivate Item Script for
|
||||
the item tagnamed ibag, which will allow
|
||||
the PC to move undroppable items around
|
||||
in thier inventory, and it can also
|
||||
bag all such items as well.
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
//Required Include
|
||||
#include "x2_inc_switches"
|
||||
///////////////////////////////////////
|
||||
//PROTOTYPES DECLARED
|
||||
int GetNum(object oTarget);
|
||||
void GiveBack(object oTarget);
|
||||
void StoreItem(object oStored);
|
||||
void SortContainer(object oTarget);
|
||||
void SortBox(object oTarget);
|
||||
///////////////////////////////////////
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
//Major Variables Defined...
|
||||
object oPC = GetItemActivator();
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
object oBox = GetObjectByTag("ibagbox");
|
||||
object oBox2 = GetObjectByTag("ibag2box");
|
||||
|
||||
|
||||
//If the PC Is targeting themself Do this..
|
||||
if(oTarget==oPC)
|
||||
{
|
||||
|
||||
if(GetLocalInt(GetModule(), "INVUSE")==1)
|
||||
{
|
||||
FloatingTextStringOnCreature("This system is busy, try again later", oPC, FALSE);
|
||||
//Stop the script here!
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//This is a fix to Module Event Scripts (Prevents them from firing on PC)
|
||||
SetLocalInt(GetModule(), "INVUSE", 1);
|
||||
//Allow the system to be useable again after some time..
|
||||
DelayCommand(24.1, SetLocalInt(GetModule(), "INVUSE", 0));
|
||||
}
|
||||
|
||||
object oMine = GetFirstItemInInventory(oPC);
|
||||
while(GetIsObjectValid(oMine))
|
||||
{
|
||||
//If the item is Undroppable!
|
||||
if(GetItemCursedFlag(oMine))
|
||||
{
|
||||
//Don't take bags!
|
||||
if(!GetHasInventory(oMine))
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oBox, ActionTakeItem(oMine, oPC)));
|
||||
}
|
||||
}
|
||||
|
||||
oMine = GetNextItemInInventory(oPC);
|
||||
}
|
||||
|
||||
//Give the loop time to get all the items!
|
||||
DelayCommand(6.0, SortBox(oBox));
|
||||
|
||||
//Run this again to make sure we get all of the items!
|
||||
DelayCommand(12.0, SortBox(oBox));
|
||||
|
||||
//Run this again to make sure we get all of the items!
|
||||
DelayCommand(18.0, SortBox(oBox));
|
||||
|
||||
//Finally return all items in the box to the PC. (If any remain.)
|
||||
DelayCommand(24.0, GiveBack(oBox));
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//CONDITIONALS
|
||||
|
||||
//Otherwise if they are not targeting themself, do this..
|
||||
else
|
||||
{
|
||||
//Tell the PC they can only target items..
|
||||
if(GetObjectType(oTarget)!= OBJECT_TYPE_ITEM)
|
||||
{
|
||||
FloatingTextStringOnCreature("You must target an item!", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
//Tell the PC they must target items in their inventory only!
|
||||
if(GetItemPossessor(oTarget)!=oPC)
|
||||
{
|
||||
FloatingTextStringOnCreature("You must target an item in your inventory!", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//If they have passed the conditionals, let's continue..
|
||||
|
||||
//If the pc targets the Special Bag (there are 2 different ones!)
|
||||
//Then remove it's content and place it in the PC's inventory!
|
||||
if(GetTag(oTarget)=="ibagboxbag" || GetTag(oTarget)=="plotbag")
|
||||
{
|
||||
object oContent = GetFirstItemInInventory(oTarget);
|
||||
while(GetIsObjectValid(oContent)==TRUE)
|
||||
{
|
||||
//Put the items in the bag in the ibagbox
|
||||
AssignCommand(oBox, ActionTakeItem(oContent, oTarget));
|
||||
|
||||
//Move on to the next item after taking this one.
|
||||
oContent = GetNextItemInInventory(oTarget);
|
||||
//While loop end
|
||||
}
|
||||
|
||||
//Return the items!
|
||||
DelayCommand(1.7, GiveBack(oBox));
|
||||
//Destroy the bag now..
|
||||
DelayCommand(2.0, DestroyObject(oTarget,0.0f));
|
||||
//Stop here
|
||||
return;
|
||||
|
||||
//If statement end
|
||||
}
|
||||
|
||||
//Another Conditional (If they are not targeting a special bag)
|
||||
//Tell the PC they can't target non-plot containers
|
||||
if(GetHasInventory(oTarget))
|
||||
{
|
||||
FloatingTextStringOnCreature("You must target the Special Items Bag!", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//If the player is targeting just 1 Undroppable Item
|
||||
|
||||
//Let's make sure it's UnDroppable!
|
||||
if(GetItemCursedFlag(oTarget)==FALSE)
|
||||
{
|
||||
//Tell the PC the item must be undroppable & plot!
|
||||
FloatingTextStringOnCreature("You must target an undroppable item only!", oPC, FALSE);
|
||||
//Stop the script here!
|
||||
return;
|
||||
}
|
||||
|
||||
//If they don't have a special bag give them one
|
||||
if(GetItemPossessedBy(oPC, "itoolbag")==OBJECT_INVALID)
|
||||
{
|
||||
CreateItemOnObject("NW_IT_CONTAIN006", oPC, 1, "itoolbag");
|
||||
}
|
||||
|
||||
object oBag = GetItemPossessedBy(oPC, "itoolbag");
|
||||
|
||||
//We can't take this plot item, it would present big problems!
|
||||
if(GetTag(oTarget)=="pcidname")
|
||||
{
|
||||
FloatingTextStringOnCreature("This item may not be moved, sorry.", oPC);
|
||||
return;
|
||||
}
|
||||
//Otherise have the storage box take the item.
|
||||
else
|
||||
{
|
||||
//Make the box take the item!
|
||||
AssignCommand(oBox, ActionTakeItem(oTarget, oPC));
|
||||
}
|
||||
|
||||
//Make the bag unsellable and undroppable!
|
||||
DelayCommand(0.2, SetItemCursedFlag(oBag, TRUE));
|
||||
DelayCommand(0.3, SetPlotFlag(oBag, TRUE));
|
||||
//Give the bag a nice Bright Yellow new name identifying it clearly :)
|
||||
//Even if it was already set before, because we don't know..
|
||||
DelayCommand(0.4, SetName(oBag, "<c<><63> >Special Items"));
|
||||
|
||||
//Make the ibagbox put the item in the bag!
|
||||
DelayCommand(0.5, StoreItem(oBox));
|
||||
|
||||
|
||||
//Else statement end
|
||||
}
|
||||
|
||||
//Main Script end
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void GiveBack(object oTarget)
|
||||
{
|
||||
object oBox = oTarget;
|
||||
object oPC = GetItemActivator();
|
||||
object oGiven = GetFirstItemInInventory(oBox);
|
||||
while(GetIsObjectValid(oGiven)==TRUE)
|
||||
{
|
||||
AssignCommand(oBox, ActionGiveItem(oGiven, oPC));
|
||||
|
||||
oGiven = GetNextItemInInventory(oBox);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
// Return the number of items oTarget possesses in thier inventory
|
||||
int GetNum(object oTarget)
|
||||
{
|
||||
int nNum = 0;
|
||||
object oItem = GetFirstItemInInventory(oTarget);
|
||||
|
||||
while (GetIsObjectValid(oItem) == TRUE)
|
||||
{
|
||||
nNum = nNum +1;
|
||||
oItem = GetNextItemInInventory(oTarget);
|
||||
}
|
||||
return nNum;
|
||||
|
||||
//END PROTOTYPE
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void StoreItem(object oStored)
|
||||
{
|
||||
object oBox = oStored;
|
||||
object oPC = GetItemActivator();
|
||||
object oGiven = GetFirstItemInInventory(oBox);
|
||||
while(GetIsObjectValid(oGiven)==TRUE)
|
||||
{
|
||||
//Put the item in the bag on the PC!
|
||||
DelayCommand(0.2, AssignCommand(oBox, ActionGiveItem(oGiven,
|
||||
GetItemPossessedBy(oPC, "itoolbag"))));
|
||||
|
||||
oGiven = GetNextItemInInventory(oBox);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void SortContainer(object oTarget)
|
||||
{
|
||||
|
||||
//Declare Major Variables
|
||||
object oPC = GetItemActivator();
|
||||
object oNPC = GetObjectByTag("ibag2box");
|
||||
object oBox = GetObjectByTag(GetTag(oTarget));
|
||||
object oMine;
|
||||
object oBag = GetItemPossessedBy(oNPC, GetTag(oTarget)+ "bag");
|
||||
|
||||
//First Put all the items that will fit into the bag
|
||||
//on the NPC into the bag..
|
||||
oMine = GetFirstItemInInventory(oTarget);
|
||||
while(GetIsObjectValid(oMine)==TRUE)
|
||||
{
|
||||
AssignCommand(oTarget, ActionGiveItem(oMine, oBag));
|
||||
|
||||
oMine = GetNextItemInInventory(oTarget);
|
||||
}
|
||||
|
||||
//Give the bag a colorful name.. :)
|
||||
DelayCommand(0.2, SetName(oBag, "<c<><63> >Special Items"));
|
||||
|
||||
//Make the bags unsellable and undroppable!!
|
||||
DelayCommand(0.3, SetItemCursedFlag(oBag, TRUE));
|
||||
DelayCommand(0.3, SetPlotFlag(oBag, TRUE));
|
||||
|
||||
//Give the PC the bag now that it has items in it!
|
||||
DelayCommand(0.4, AssignCommand(oNPC, ActionGiveItem(oBag, oPC)));
|
||||
|
||||
//PROTOTYPE END
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
//PROTOTYPE DEFINED
|
||||
void SortBox(object oTarget)
|
||||
{
|
||||
|
||||
//Declare Major Variables
|
||||
object oPC = GetLastUsedBy();
|
||||
object oBox = GetObjectByTag(GetTag(oTarget));
|
||||
object oItem;
|
||||
object oNPC = GetObjectByTag("ibag2box");
|
||||
|
||||
//We only continue if the box has items!
|
||||
if(GetNum(oBox)>0)
|
||||
{
|
||||
//Give the NPC a Bag to store items in!
|
||||
//Give the bag the tagname of the box!
|
||||
CreateItemOnObject("NW_IT_CONTAIN006", oNPC, 1, GetTag(oBox) + "bag");
|
||||
|
||||
//Start putting items in the bag on the NPC
|
||||
DelayCommand(0.3, SortContainer(oTarget));
|
||||
|
||||
}
|
||||
|
||||
//NOTE: If the box has 0 items, no need to continue!
|
||||
|
||||
//PROTOTYPES END
|
||||
}
|
||||
|
||||
/////////////////SCRIPT END////////////////////////////////
|
35
module/nss/ac_infoassistant.nss
Normal file
35
module/nss/ac_infoassistant.nss
Normal file
@@ -0,0 +1,35 @@
|
||||
//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, "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"));
|
||||
|
||||
}
|
||||
|
||||
|
133
module/nss/ac_itemseller.nss
Normal file
133
module/nss/ac_itemseller.nss
Normal file
@@ -0,0 +1,133 @@
|
||||
//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"
|
||||
|
||||
object oTarget;
|
||||
object oItem;
|
||||
|
||||
int GetIdentifiedGoldPieceValue(object oItem)
|
||||
{
|
||||
|
||||
// Initial flag
|
||||
int bIdentified = GetIdentified(oItem);
|
||||
|
||||
// If not already, set to identfied
|
||||
if (!bIdentified) SetIdentified(oItem, TRUE);
|
||||
|
||||
// Get the GP value
|
||||
int nGP=GetGoldPieceValue(oItem);
|
||||
|
||||
//Cap the max gold for an item at 300,000 gold.(40% the value)
|
||||
if(nGP >750000)
|
||||
{
|
||||
nGP = 750000;
|
||||
return nGP;}
|
||||
|
||||
//Let's make sure the item is worth something!
|
||||
else if(nGP<100){
|
||||
nGP = 100;
|
||||
return nGP;}
|
||||
|
||||
//It must be worth more than 10 gold, so let's return it's true value
|
||||
else
|
||||
{ return nGP; }
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
//if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
|
||||
object oPC = GetItemActivator();
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
if(GetObjectType(oTarget) != OBJECT_TYPE_ITEM) return;
|
||||
if(!GetIsObjectValid(oTarget)) return;
|
||||
|
||||
//ID The type of item it is..!
|
||||
int nType;
|
||||
nType = GetBaseItemType(oItem);
|
||||
|
||||
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)
|
||||
{
|
||||
FloatingTextStringOnCreature("The item seller will not buy ammunition, sorry.", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
int nGP;
|
||||
nGP = GetIdentifiedGoldPieceValue(oTarget);
|
||||
|
||||
//Let's divide that amount by 100
|
||||
int oGP = nGP/100; //Let's break it down into 100 segments
|
||||
int pGP = oGP * 40; // 40% of the original value
|
||||
int nGold = pGP - 38; //All items should return at least 2 GP
|
||||
|
||||
//We dont' buy ammo!
|
||||
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)
|
||||
{
|
||||
if(GetPlotFlag(oItem)==FALSE)
|
||||
{
|
||||
//Cap Gold at 5k
|
||||
if(GetGoldPieceValue(oItem)>=5001)
|
||||
{GiveGoldToCreature(oPC, 5000);}
|
||||
else{GiveGoldToCreature(oPC, GetGoldPieceValue(oItem));}
|
||||
|
||||
DestroyObject(oTarget,0.0f);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
FloatingTextStringOnCreature("You cannot sell plot or undroppable items!", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if(GetResRef(oTarget)=="nw_it_contain006")
|
||||
{
|
||||
GiveGoldToCreature(oPC, 500);
|
||||
DestroyObject(oTarget,0.0f);
|
||||
return;
|
||||
}
|
||||
if(GetTag(oTarget)=="artifact")
|
||||
{
|
||||
GiveGoldToCreature(oPC, 300000);
|
||||
SetPlotFlag(oTarget, FALSE);
|
||||
DestroyObject(oTarget,0.0f);
|
||||
return;
|
||||
}
|
||||
if(GetTag(oTarget)=="legend")
|
||||
{
|
||||
GiveGoldToCreature(oPC, 200000);
|
||||
SetPlotFlag(oTarget, FALSE);
|
||||
DestroyObject(oTarget,0.0f);
|
||||
return;
|
||||
}
|
||||
//If the item is a plot item tell them they can't sell it!
|
||||
if(GetPlotFlag(oTarget) == TRUE)
|
||||
{
|
||||
FloatingTextStringOnCreature("You cannot sell plot items!", oPC, FALSE);
|
||||
return; //(stop here!)
|
||||
}
|
||||
//Let's make sure the player gets 2 gold no matter what.
|
||||
if(oGP >2)
|
||||
{
|
||||
GiveGoldToCreature(oPC, nGold);
|
||||
DestroyObject(oTarget);
|
||||
}
|
||||
//Otherwise give 2 gp.
|
||||
else
|
||||
{
|
||||
GiveGoldToCreature(oPC, 2);
|
||||
DestroyObject(oTarget);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
75
module/nss/ac_itool.nss
Normal file
75
module/nss/ac_itool.nss
Normal file
@@ -0,0 +1,75 @@
|
||||
//Script Name: ac_itool
|
||||
//////////////////////////////////////////
|
||||
//Created by: Genisys / Guile
|
||||
//ON: 7/29/08
|
||||
/////////////////////////////////////////
|
||||
/* **Notes**
|
||||
|
||||
This is a tagbased item activation script
|
||||
this works on tagbased scripting as this
|
||||
script is fired from the script "itool"
|
||||
|
||||
Whenever the item "Inventory Organizer"
|
||||
tagnamed "itool" is used, the PC is
|
||||
teleported to the Inventory Room to
|
||||
sort their items out in their inventory.
|
||||
|
||||
*/
|
||||
//////////////////////////////////////////
|
||||
string sDeny;
|
||||
|
||||
//Required Include (Because it's a tagbased item!)
|
||||
#include "x2_inc_switches"
|
||||
|
||||
|
||||
//Main Script
|
||||
void main()
|
||||
{
|
||||
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE)
|
||||
{return;}
|
||||
|
||||
object oPC = GetItemActivator();
|
||||
|
||||
|
||||
//If the system is in use, don't allow anyone to enter!
|
||||
if (GetLocalInt(oPC, "INVUSE")== 1)
|
||||
{
|
||||
sDeny="Inventory Room In Use, Try again later.";
|
||||
|
||||
SendMessageToPC(oPC, sDeny);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//Otherwise set that the room is in use!
|
||||
//This allows the PC into the room!!
|
||||
SetLocalInt(oPC, "INVROOMUSER", 1);
|
||||
|
||||
//Note this variable is removed when the PC leaves the area!
|
||||
SetLocalInt(GetModule(), "INVUSE", 1);
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("isystemway");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
SetLocalLocation(oPC, "inv_loc", GetLocation(oPC));
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(3.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
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));
|
||||
|
||||
}
|
16
module/nss/ac_legendaryaxes.nss
Normal file
16
module/nss/ac_legendaryaxes.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
#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 = oPC;
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "legaxeconv"));
|
||||
|
||||
}
|
26
module/nss/ac_legendarybow.nss
Normal file
26
module/nss/ac_legendarybow.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("legarrows1", oPC, 999);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(5000, 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);
|
||||
}
|
||||
|
||||
}
|
16
module/nss/ac_legendarydart.nss
Normal file
16
module/nss/ac_legendarydart.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
#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 = oPC;
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "legdartconv"));
|
||||
|
||||
}
|
25
module/nss/ac_legendaryslin.nss
Normal file
25
module/nss/ac_legendaryslin.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
#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) >= 5000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("legendbullets", oPC, 500);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(5000, 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);
|
||||
}
|
||||
}
|
16
module/nss/ac_legendarystar.nss
Normal file
16
module/nss/ac_legendarystar.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
#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 = oPC;
|
||||
|
||||
AssignCommand(oTarget, ActionStartConversation(oPC, "legstarconv"));
|
||||
|
||||
}
|
27
module/nss/ac_legendaryxbow.nss
Normal file
27
module/nss/ac_legendaryxbow.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
#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) >= 5000)
|
||||
{
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
CreateItemOnObject("legbolts1", oPC, 999);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(5000, 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);
|
||||
|
||||
}
|
||||
|
||||
}
|
12
module/nss/ac_mordenkainens.nss
Normal file
12
module/nss/ac_mordenkainens.nss
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oActivator=GetItemActivator();
|
||||
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectSpellResistanceIncrease(100), oActivator, 300.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 300.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 300.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));
|
||||
}
|
26
module/nss/ac_pccheck.nss
Normal file
26
module/nss/ac_pccheck.nss
Normal file
@@ -0,0 +1,26 @@
|
||||
//////////////////////////////////////////
|
||||
//** Created By **Guile / Genisys**
|
||||
//on 4/24/2008
|
||||
//This script will check to make sure
|
||||
//The player is playing a legal character
|
||||
//By checking AC / Hit Points / Feats / Ability Scores
|
||||
//Based Upon Level & Certain Classes
|
||||
//Note this script will Spam the message to all DMs and thet Server Log if..
|
||||
//The Player meets multiple Conditions, if it's only one message
|
||||
//I would would investigate first.
|
||||
//////////////////Main Script/////////////
|
||||
void main()
|
||||
{
|
||||
//Declare Major Variables:
|
||||
object oPC;
|
||||
object oTarget;
|
||||
object oItem;
|
||||
oPC = GetItemActivatedTarget();
|
||||
oTarget = oPC;
|
||||
oItem = GetItemActivated();
|
||||
|
||||
if(!GetIsPC(oPC)) return;
|
||||
|
||||
ExecuteScript("cheatercheck1", oTarget);
|
||||
|
||||
}
|
55
module/nss/ac_piperspipe.nss
Normal file
55
module/nss/ac_piperspipe.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetItemActivator();
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
object pTarget;
|
||||
int sRat = RACIAL_TYPE_BEAST;
|
||||
int nClass;
|
||||
|
||||
if (GetRacialType(oTarget)!= sRat)
|
||||
{
|
||||
FloatingTextStringOnCreature("Target must be a rat!", GetItemActivator());
|
||||
return;
|
||||
}
|
||||
|
||||
nClass = GetLevelByClass(CLASS_TYPE_BARD, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_SUBLIME_CHORD, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_VIRTUOSO, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_DRAGONSONG_LYRIST, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_DIRGESINGER, oPC);
|
||||
|
||||
if (nClass > 7)
|
||||
{
|
||||
effect eTurned = EffectTurned();
|
||||
|
||||
effect eLink = SupernaturalEffect(EffectLinkEffects(eTurned, eLink));
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, GetItemActivatedTarget(), 60.0f);
|
||||
|
||||
int nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_CHARM), oTarget);
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_CHARM), GetLocation(oTarget));
|
||||
|
||||
nInt = GetObjectType(oPC);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BARD_SONG ), oPC, 60.0f);
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_BARD_SONG ), GetLocation(oPC), 60.0f);
|
||||
|
||||
}
|
||||
|
||||
}
|
19
module/nss/ac_rodofthenamel.nss
Normal file
19
module/nss/ac_rodofthenamel.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
// Check if we have the correct event firing the script
|
||||
if (GetUserDefinedItemEventNumber() != X2_ITEM_EVENT_ACTIVATE) return;
|
||||
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
string tag = GetTag(oItem);;
|
||||
|
||||
string sReport;
|
||||
sReport = ">>> ID: " + GetPCPlayerName( target )
|
||||
+ "; Name: "+ GetName( target )
|
||||
+ "; CD Key:" + GetPCPublicCDKey( target )
|
||||
+ "; IP:" + GetPCIPAddress( target );
|
||||
SendMessageToPC(oActivator, sReport);
|
||||
}
|
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);
|
||||
}
|
||||
|
||||
}
|
50
module/nss/ac_ssring.nss
Normal file
50
module/nss/ac_ssring.nss
Normal file
@@ -0,0 +1,50 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE)
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You must target a Creature!");
|
||||
return;}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectACDecrease(20);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectSlow();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectSpellResistanceDecrease(24);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectSilence();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
|
||||
eEffect = EffectTurned();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 120.0f);
|
||||
}
|
84
module/nss/ac_stoneofrecall.nss
Normal file
84
module/nss/ac_stoneofrecall.nss
Normal file
@@ -0,0 +1,84 @@
|
||||
////////////////////////////////////
|
||||
//Created by Genisys / Guile 6/27/08
|
||||
////////////////////////////////////
|
||||
/*
|
||||
script name: "ac_stoneofrecall"
|
||||
|
||||
This is a tagbased item script which
|
||||
works off the tagnamed item
|
||||
"stoneofrecall" this script allows
|
||||
the user to teleport to a waypoint
|
||||
tagnamed "home" storing thier location
|
||||
till they use the stone again, which
|
||||
will teleport them back to where
|
||||
they original used the stone.
|
||||
|
||||
*/
|
||||
////////////////////////////////////
|
||||
|
||||
///Main Script///
|
||||
void main()
|
||||
{
|
||||
//Declare Major Variables
|
||||
object oPC = GetItemActivator();
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
location lLocation;
|
||||
location lStored = GetLocalLocation(oPC, "recall_loc");
|
||||
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
|
||||
|
||||
//Note Useable in Combat..
|
||||
if (GetIsInCombat(oPC))
|
||||
{
|
||||
FloatingTextStringOnCreature("This item is not useable in combat!", oPC, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
//If the stored location is valid..
|
||||
if (GetIsObjectValid(GetAreaFromLocation(lStored))==TRUE)
|
||||
{
|
||||
|
||||
//Apply a fancy visual effect :)
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC, 0.0f);
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
//Allow for the visual effect to finish.
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionJumpToLocation(lStored)));
|
||||
|
||||
//Remove the stored location..
|
||||
DelayCommand(7.0, DeleteLocalLocation(oPC, "recall_loc"));
|
||||
}
|
||||
|
||||
//If the PC doesn't have a stored location...
|
||||
else if(GetIsObjectValid(GetAreaFromLocation(lStored))==FALSE)
|
||||
{
|
||||
oPC = GetItemActivator();
|
||||
|
||||
oTarget = GetWaypointByTag("home");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
//Store the PC's current location first..
|
||||
SetLocalLocation(oPC, "recall_loc", GetLocation(oPC));
|
||||
|
||||
//Apply a fancy visual effect :)
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC, 0.0f);
|
||||
|
||||
DelayCommand(0.1, AssignCommand(oPC, ClearAllActions()));
|
||||
|
||||
//Teleport them to the waypoint tagnamed "home"
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
}
|
||||
|
||||
//Otherwise if both above fail..
|
||||
else
|
||||
{
|
||||
//Tell the PC there is a bug and ask them to report it.
|
||||
FloatingTextStringOnCreature("There is an error with the Recall Stone" +
|
||||
", please report this to the DMs.", GetItemActivator(), FALSE);
|
||||
}
|
||||
|
||||
//Script End
|
||||
}
|
48
module/nss/ac_teleportation.nss
Normal file
48
module/nss/ac_teleportation.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC;
|
||||
|
||||
object oTarget;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oPC);
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectVisualEffect(VFX_FNF_SUMMON_CELESTIAL);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
DelayCommand(4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
else
|
||||
DelayCommand(4.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oPC)));
|
||||
|
||||
|
||||
nInt = GetObjectType(oPC);
|
||||
|
||||
eEffect = EffectVisualEffect(VFX_IMP_TORNADO);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT)
|
||||
DelayCommand(8.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
else
|
||||
DelayCommand(9.0, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eEffect, GetLocation(oPC)));
|
||||
|
||||
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("startpoint");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
SetLocalLocation(oPC, "ls_stored_loc", GetLocation(oPC));
|
||||
|
||||
DelayCommand(10.0, AssignCommand(oPC, ClearAllActions()));
|
||||
|
||||
DelayCommand(13.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
eEffect = EffectVisualEffect(VFX_IMP_UNSUMMON);
|
||||
|
||||
DelayCommand(10.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, oPC));
|
||||
|
||||
}
|
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);
|
||||
}
|
||||
|
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"));
|
||||
|
||||
}
|
17
module/nss/addfeatjournal.nss
Normal file
17
module/nss/addfeatjournal.nss
Normal file
@@ -0,0 +1,17 @@
|
||||
//Put this script OnEnter
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE);
|
||||
|
||||
}
|
8
module/nss/addjournals.nss
Normal file
8
module/nss/addjournals.nss
Normal file
@@ -0,0 +1,8 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
//AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE);
|
||||
//AddJournalQuestEntry("x2spells", 1, oPC, FALSE, FALSE);
|
||||
AddJournalQuestEntry("feats", 1, oPC, FALSE, FALSE);
|
||||
}
|
20
module/nss/addjournalsnf.nss
Normal file
20
module/nss/addjournalsnf.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
//Put this script in the OnEnter Event of an Area or Tracks trigger you paint.
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
//Note these journal tagnames are CaSe SenSiTiVe!!
|
||||
AddJournalQuestEntry("spellz", 1, oPC, FALSE, FALSE);
|
||||
|
||||
AddJournalQuestEntry("featz", 1, oPC, FALSE, FALSE);
|
||||
|
||||
}
|
18
module/nss/addlegendjournal.nss
Normal file
18
module/nss/addlegendjournal.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
//Put this script OnEnter
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
AddJournalQuestEntry("legartjournal", 1, oPC, FALSE, FALSE);
|
||||
|
||||
|
||||
}
|
18
module/nss/addspellentry.nss
Normal file
18
module/nss/addspellentry.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
//Put this script OnEnter
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
AddJournalQuestEntry("spells", 1, oPC, FALSE, FALSE);
|
||||
|
||||
}
|
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();
|
||||
}
|
||||
}
|
19
module/nss/afx_entearcane.nss
Normal file
19
module/nss/afx_entearcane.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "afx_sfunc"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oEntering = GetEnteringObject();
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
// place here the % chance of rest being interruped excample here 33% chance of rest being interuped
|
||||
SetLocalInt(oArea, "nMonChance",70);
|
||||
// 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");
|
||||
|
||||
if(GetIsPC(oEntering) == TRUE) {
|
||||
afx_apply_effects(oEntering,OBJECT_SELF);
|
||||
}
|
||||
}
|
20
module/nss/afx_enterdrow1.nss
Normal file
20
module/nss/afx_enterdrow1.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "afx_sfunc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oEntering = GetEnteringObject();
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
// place here the % chance of rest being interruped excample here 33% chance of rest being interuped
|
||||
SetLocalInt(oArea, "nMonChance",70);
|
||||
// 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");
|
||||
|
||||
if(GetIsPC(oEntering) == TRUE) {
|
||||
afx_apply_effects(oEntering,OBJECT_SELF);
|
||||
}
|
||||
}
|
19
module/nss/afx_enterdrow2.nss
Normal file
19
module/nss/afx_enterdrow2.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "afx_sfunc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oEntering = GetEnteringObject();
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
// place here the % chance of rest being interruped excample here 33% chance of rest being interuped
|
||||
SetLocalInt(oArea, "nMonChance",99);
|
||||
// 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");
|
||||
if(GetIsPC(oEntering) == TRUE) {
|
||||
afx_apply_effects(oEntering,OBJECT_SELF);
|
||||
}
|
||||
}
|
20
module/nss/afx_enterrest.nss
Normal file
20
module/nss/afx_enterrest.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "afx_sfunc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
// place here the % chance of rest being interruped excample here 33% chance of rest being interuped
|
||||
SetLocalInt(oArea, "nMonChance",0);
|
||||
// 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","0");
|
||||
object oEntering = GetEnteringObject();
|
||||
if(GetIsPC(oEntering) == TRUE) {
|
||||
afx_apply_effects(oEntering,OBJECT_SELF);
|
||||
}
|
||||
}
|
20
module/nss/afx_entersouldev.nss
Normal file
20
module/nss/afx_entersouldev.nss
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "afx_sfunc"
|
||||
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
// place here the % chance of rest being interruped excample here 33% chance of rest being interuped
|
||||
SetLocalInt(oArea, "nMonChance",75);
|
||||
// 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","battdevour001");
|
||||
object oEntering = GetEnteringObject();
|
||||
if(GetIsPC(oEntering) == TRUE) {
|
||||
afx_apply_effects(oEntering,OBJECT_SELF);
|
||||
}
|
||||
}
|
138
module/nss/afx_mod_spawn.nss
Normal file
138
module/nss/afx_mod_spawn.nss
Normal file
@@ -0,0 +1,138 @@
|
||||
// Modified by AW Olorin on 6-11-2004
|
||||
// Added Module Version string Constant
|
||||
// Added Announcement period Constant (How many HB's between announcemnts)
|
||||
#include "x2_inc_switches"
|
||||
#include "x2_inc_restsys"
|
||||
#include "afx_sfunc"
|
||||
|
||||
const string POA_VERSION = "This server is running PoA version 1.68";
|
||||
const int ANNOUNCE_PERIOD = 600;
|
||||
void main()
|
||||
{
|
||||
|
||||
if (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT)
|
||||
{
|
||||
// * Setting the switch below will enable a seperate Use Magic Device Skillcheck for
|
||||
// * rogues when playing on Hardcore+ difficulty. This only applies to scrolls
|
||||
SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE);
|
||||
|
||||
// * Activating the switch below will make AOE spells hurt neutral NPCS by default
|
||||
// SetModuleSwitch (MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE);
|
||||
}
|
||||
|
||||
// * AI: Activating the switch below will make the creaures using the WalkWaypoint function
|
||||
// * able to walk across areas
|
||||
// SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE);
|
||||
|
||||
// * Spells: Activating the switch below will make the Glyph of Warding spell behave differently:
|
||||
// * The visual glyph will disappear after 6 seconds, making them impossible to spot
|
||||
// SetModuleSwitch (MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING, TRUE);
|
||||
|
||||
// * Craft Feats: Want 50 charges on a newly created wand? We found this unbalancing,
|
||||
// * but since it is described this way in the book, here is the switch to get it back...
|
||||
// SetModuleSwitch (MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES, TRUE);
|
||||
|
||||
// * Craft Feats: Use this to disable Item Creation Feats if you do not want
|
||||
// * them in your module
|
||||
// SetModuleSwitch (MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS, TRUE);
|
||||
|
||||
// * Palemaster: Deathless master touch in PnP only affects creatures up to a certain size.
|
||||
// * We do not support this check for balancing reasons, but you can still activate it...
|
||||
// SetModuleSwitch (MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH, TRUE);
|
||||
|
||||
// * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this
|
||||
// * did not fit into NWNs spell system and was confusing, so we took it out...
|
||||
// SetModuleSwitch (MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE);
|
||||
|
||||
// * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this
|
||||
// * did not fit into NWNs spell system and was confusing, so we took it out...
|
||||
// SetModuleSwitch (MODULE_SWITCH_RESTRICT_USE_POISON_TO_FEAT, TRUE);
|
||||
|
||||
// * Spellcasting: Some people don't like caster's abusing expertise to raise their AC
|
||||
// * Uncommenting this line will drop expertise mode whenever a spell is cast by a player
|
||||
// SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE);
|
||||
|
||||
|
||||
// * Item Event Scripts: The game's default event scripts allow routing of all item related events
|
||||
// * into a single file, based on the tag of that item. If an item's tag is "test", it will fire a
|
||||
// * script called "test" when an item based event (equip, unequip, acquire, unacquire, activate,...)
|
||||
// * is triggered. Check "x2_it_example.nss" for an example.
|
||||
// * This feature is disabled by default.
|
||||
SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE);
|
||||
|
||||
if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE)
|
||||
{
|
||||
// * If Tagbased scripts are enabled, and you are running a Local Vault Server
|
||||
// * you should use the line below to add a layer of security to your server, preventing
|
||||
// * people to execute script you don't want them to. If you use the feature below,
|
||||
// * all called item scrips will be the prefix + the Tag of the item you want to execute, up to a
|
||||
// * maximum of 16 chars, instead of the pure tag of the object.
|
||||
// * i.e. without the line below a user activating an item with the tag "test",
|
||||
// * will result in the execution of a script called "test". If you uncomment the line below
|
||||
// * the script called will be "1_test.nss"
|
||||
// SetUserDefinedItemEventPrefix("1_");
|
||||
|
||||
}
|
||||
|
||||
// * This initializes Bioware's wandering monster system as used in Hordes of the Underdark
|
||||
// * You can deactivate it, making your module load faster if you do not use it.
|
||||
// * If you want to use it, make sure you set "x2_mod_def_rest" as your module's OnRest Script
|
||||
// SetModuleSwitch (MODULE_SWITCH_USE_XP2_RESTSYSTEM, TRUE);
|
||||
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE)
|
||||
{
|
||||
|
||||
// * This allows you to specify a different 2da for the wandering monster system.
|
||||
// SetWanderingMonster2DAFile("des_restsystem");
|
||||
|
||||
//* Do not change this line.
|
||||
WMBuild2DACache();
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
}
|
42
module/nss/alchem.nss
Normal file
42
module/nss/alchem.nss
Normal file
@@ -0,0 +1,42 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName wondmer
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 12/15/2002 5:53:04 PM
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object o11;
|
||||
o11 = GetItemPossessedBy(oPC, "NW_WSWMLS013");
|
||||
if(GetIsObjectValid(o11) != 0){
|
||||
DestroyObject(o11);
|
||||
}
|
||||
object o12;
|
||||
o11 = GetItemPossessedBy(oPC, "BlueSkies");
|
||||
if(GetIsObjectValid(o12) != 0){
|
||||
DestroyObject(o12);
|
||||
}
|
||||
object o13;
|
||||
o11 = GetItemPossessedBy(oPC, "UndeadLeech");
|
||||
if(GetIsObjectValid(o13) != 0){
|
||||
DestroyObject(o13);
|
||||
}
|
||||
object o14;
|
||||
o11 = GetItemPossessedBy(oPC, "WBWMSH005");
|
||||
if(GetIsObjectValid(o14) != 0){
|
||||
DestroyObject(o14);
|
||||
}
|
||||
object o15;
|
||||
o11 = GetItemPossessedBy(oPC, "NW_WBWMSL008");
|
||||
if(GetIsObjectValid(o15) != 0){
|
||||
DestroyObject(o15);
|
||||
}
|
||||
// Either open the store with that tag or let the user know that no store exists.
|
||||
object oStore = GetNearestObjectByTag("alchem");
|
||||
if(GetObjectType(oStore) == OBJECT_TYPE_STORE)
|
||||
OpenStore(oStore, GetPCSpeaker());
|
||||
else
|
||||
ActionSpeakStringByStrRef(53090, TALKVOLUME_TALK);
|
||||
}
|
34
module/nss/allowcleric2open.nss
Normal file
34
module/nss/allowcleric2open.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
string sAllow;
|
||||
|
||||
//Put this script OnOpen
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
int nClass;
|
||||
|
||||
nClass = GetLevelByClass(CLASS_TYPE_CLERIC, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_FAVOURED_SOUL, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_HEALER, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_SHAMAN, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_ARCHIVIST, oPC);
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (nClass > 9)
|
||||
{
|
||||
sAllow="You feel the power of your pathos wash over you as you open the container.";
|
||||
|
||||
SendMessageToPC(oPC, sAllow);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
object oSelf = OBJECT_SELF;
|
||||
|
||||
AssignCommand(oPC, ActionMoveAwayFromObject(oSelf));
|
||||
|
||||
}
|
37
module/nss/allowpaladinonly.nss
Normal file
37
module/nss/allowpaladinonly.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "prc_class_const"
|
||||
|
||||
//Put this script OnOpen
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
|
||||
int nGoodEvil = GetAlignmentGoodEvil(oPC); //:: 2 = Good
|
||||
int nLawChaos = GetAlignmentLawChaos(oPC); //:: 4 = Lawful
|
||||
|
||||
int nAlignment = nGoodEvil + nLawChaos;
|
||||
|
||||
string sAllow;
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if ((GetHasFeat(FEAT_TURN_UNDEAD, oPC) && nAlignment == 6))
|
||||
|
||||
/*if ((GetLevelByClass(CLASS_TYPE_PALADIN, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_SOHEI, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_SOLDIER_OF_LIGHT, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_SACREDPURIFIER, oPC)
|
||||
+GetLevelByClass(CLASS_TYPE_MORNINGLORD, oPC) >8))*/
|
||||
{
|
||||
sAllow="Your great purity of spirit allows you to disturb this ancient evil and open the coffin to put an end to Razhids true power.";
|
||||
|
||||
SendMessageToPC(oPC, sAllow);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
object oSelf = OBJECT_SELF;
|
||||
AssignCommand(oPC, ActionMoveAwayFromObject(oSelf));
|
||||
|
||||
}
|
34
module/nss/altar1_yes.nss
Normal file
34
module/nss/altar1_yes.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//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
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
//get the pc who used the trapdoor
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
if(!HasItem(oPC, "SoulStone")){
|
||||
string name = GetPCPlayerName(oPC);
|
||||
SetXP(oPC, 0);
|
||||
BootPC(oPC);
|
||||
SendMessageToAllDMs( name + " has been invalidated for attempting to exploit teleporter.");
|
||||
|
||||
}
|
||||
|
||||
//get the target waypoint destination
|
||||
object oDrop = GetWaypointByTag("altar1");
|
||||
AssignCommand(oPC,TakeGoldFromCreature(5000, oPC, TRUE));
|
||||
SendMessageToPC(oPC, "Some of your gold was turned to lead during the teleport!");
|
||||
|
||||
|
||||
//jump the PC to the destination
|
||||
AssignCommand (oPC,JumpToObject(oDrop));
|
||||
object oItemToTake;
|
||||
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "SoulStone");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
|
||||
|
||||
}
|
17
module/nss/altar2_use.nss
Normal file
17
module/nss/altar2_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("HolyAltar2");
|
||||
|
||||
|
||||
//start trapdoor conversation
|
||||
AssignCommand (oPC,ActionStartConversation(oDoor));
|
||||
|
||||
}
|
36
module/nss/altar2_yes.nss
Normal file
36
module/nss/altar2_yes.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
//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
|
||||
#include "nw_i0_tool"
|
||||
void main()
|
||||
{
|
||||
|
||||
//get the pc who used the trapdoor
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
|
||||
if(!HasItem(oPC, "SoulStone")){
|
||||
string name = GetPCPlayerName(oPC);
|
||||
|
||||
SetXP(oPC, 0);
|
||||
BootPC(oPC);
|
||||
SendMessageToAllDMs( name + " has been invalidated for attempting to exploit teleporter.");
|
||||
|
||||
}
|
||||
|
||||
//get the target waypoint destination
|
||||
object oDrop = GetWaypointByTag("altar2");
|
||||
AssignCommand(oPC,TakeGoldFromCreature(5000, oPC, TRUE));
|
||||
SendMessageToPC(oPC, "Some of your gold was turned to lead during the teleport!");
|
||||
|
||||
|
||||
//jump the PC to the destination
|
||||
AssignCommand (oPC,JumpToObject(oDrop));
|
||||
object oItemToTake;
|
||||
oItemToTake = GetItemPossessedBy(GetPCSpeaker(), "SoulStone");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
DestroyObject(oItemToTake);
|
||||
|
||||
|
||||
}
|
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));
|
||||
|
||||
}
|
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)));
|
||||
}
|
7
module/nss/altardeath2.nss
Normal file
7
module/nss/altardeath2.nss
Normal file
@@ -0,0 +1,7 @@
|
||||
void main()
|
||||
{
|
||||
location lTarget = GetLocation(GetObjectByTag("HolyAltar2"));
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD), lTarget);
|
||||
|
||||
}
|
10
module/nss/alterofchaos1.nss
Normal file
10
module/nss/alterofchaos1.nss
Normal file
@@ -0,0 +1,10 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
AdjustAlignment(oPC, ALIGNMENT_CHAOTIC, 100);
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(5000, oPC, TRUE));
|
||||
|
||||
}
|
16
module/nss/alteroflaw.nss
Normal file
16
module/nss/alteroflaw.nss
Normal file
@@ -0,0 +1,16 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName alteroflaw
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 1/10/2006 6:50:50 AM
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
|
||||
// Remove some gold from the player
|
||||
TakeGoldFromCreature(500, GetPCSpeaker(), TRUE);
|
||||
|
||||
// Remove some xp from the player
|
||||
GiveXPToCreature(GetPCSpeaker(), -500);
|
||||
}
|
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));
|
||||
|
||||
|
||||
|
||||
}
|
22
module/nss/always_true.nss
Normal file
22
module/nss/always_true.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName always_true
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Script Wizard
|
||||
//:: Created On: 3/3/2009 1:37:12 PM
|
||||
//:://////////////////////////////////////////////
|
||||
int StartingConditional()
|
||||
{
|
||||
//Note the purpose of this script is to override ALL other lines in the
|
||||
//conversation, only use this if you want to disable a conversation
|
||||
//This line MUST be at the top of all other lines!
|
||||
|
||||
int i = 3;
|
||||
|
||||
//This is always TRUE (Show the line in the conversation)
|
||||
if(i==3)
|
||||
return TRUE;
|
||||
|
||||
else
|
||||
return FALSE;
|
||||
}
|
51
module/nss/ambush.nss
Normal file
51
module/nss/ambush.nss
Normal file
@@ -0,0 +1,51 @@
|
||||
void main()
|
||||
{
|
||||
object oPC= GetEnteringObject();
|
||||
if (GetIsPC(oPC)) {
|
||||
int NumOfParty = 0;
|
||||
object oPartyMember = GetFirstFactionMember(oPC, TRUE);
|
||||
while(GetIsObjectValid(oPartyMember)) {
|
||||
|
||||
if (GetArea(oPC) == GetArea(oPartyMember))
|
||||
{
|
||||
NumOfParty++;
|
||||
}
|
||||
oPartyMember = GetNextFactionMember(oPC, TRUE);
|
||||
}
|
||||
|
||||
|
||||
if (NumOfParty >= 3){return;}
|
||||
|
||||
|
||||
int roll = d100() ;
|
||||
if (NumOfParty == 2){roll = roll +1;}
|
||||
string percent = IntToString(roll);
|
||||
string msg = (", and is not activated on " + GetName(oPC) + ".");
|
||||
if (roll<=2){ msg = (". Drow Ambush activated on " + GetName(oPC) + ".");}
|
||||
|
||||
//SendMessageToAllDMs("Ambush trigger rolls a " + percent + msg);
|
||||
if (roll <= 2){
|
||||
location ambush1 = GetLocation(GetNearestObjectByTag("ambush1"));
|
||||
location ambush2 = GetLocation(GetNearestObjectByTag("ambush2"));
|
||||
location ambush3 = GetLocation(GetNearestObjectByTag("ambush3"));
|
||||
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowwizard001", ambush1);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowwizard001", ambush2);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowwarrior1", ambush3);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowwarrior1", ambush3);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowwarrior1", ambush3);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowbattlespider", ambush2);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowbattlespider", ambush2);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowbattlespider", ambush3);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "drowbattlespider", ambush3);
|
||||
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectVisualEffect(VFX_DUR_DARKNESS)),ambush1, 180.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectVisualEffect(VFX_DUR_DARKNESS)),ambush2, 180.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectVisualEffect(VFX_DUR_DARKNESS)),ambush3, 180.0);
|
||||
|
||||
FloatingTextStringOnCreature("IT'S AN AMBUSH!", oPC, TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
17
module/nss/anduin_use.nss
Normal file
17
module/nss/anduin_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("anduinescape");
|
||||
|
||||
|
||||
//start trapdoor conversation
|
||||
AssignCommand (oPC,ActionStartConversation(oDoor));
|
||||
|
||||
}
|
15
module/nss/anduinstaffcheck.nss
Normal file
15
module/nss/anduinstaffcheck.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(), "AnduinsStaff");
|
||||
return oItem != OBJECT_INVALID;
|
||||
}
|
||||
|
15
module/nss/animaldeath.nss
Normal file
15
module/nss/animaldeath.nss
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "NW_I0_GENERIC"
|
||||
void main()
|
||||
{
|
||||
|
||||
object oKiller = GetLastKiller();
|
||||
int noleech = 0;
|
||||
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
|
||||
int nAlign = GetAlignmentGoodEvil(oKiller);
|
||||
if((nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL))
|
||||
{
|
||||
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
|
||||
}
|
||||
ExecuteScript("sf_xp", OBJECT_SELF);
|
||||
}
|
||||
|
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");
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user