Fixed Epic Spell research
Fixed Epic Spell research. Cleaned up events. Full compile. Updated release.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_activate", OBJECT_SELF);
|
||||
ExecuteScript("prc_onactivate", OBJECT_SELF);
|
||||
|
||||
ExecuteScript("onactivateitem", OBJECT_SELF);
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_onmodload", OBJECT_SELF);
|
||||
|
||||
ExecuteScript("x2_mod_def_load", OBJECT_SELF);
|
||||
ExecuteScript("onmoduleload", OBJECT_SELF);
|
||||
|
||||
}
|
@@ -15,7 +15,6 @@
|
||||
#include "x2_inc_switches"
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_activate", OBJECT_SELF);
|
||||
object oItem = GetItemActivated();
|
||||
|
||||
// * Generic Item Script Execution Code
|
||||
@@ -33,5 +32,4 @@ void main()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -1,638 +0,0 @@
|
||||
// Added & modified by Guile on 12/31/06 from original Paths of Ascension Game.
|
||||
// Added Message Stone functionality and recoded some of the tag
|
||||
// checks for better effeciency. (No need to call GetTag() on each check).
|
||||
|
||||
// Removes underscores from the dm set message and replaces them with spaces.
|
||||
#include "x2_inc_switches"
|
||||
|
||||
string CleanMessage(string sMessage);
|
||||
|
||||
void main()
|
||||
|
||||
{
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
string tag = GetTag(oItem);
|
||||
|
||||
if(tag == "TimeCrystal")
|
||||
{
|
||||
int timer = GetLocalInt(GetModule(), "loadtimer");
|
||||
int timeup = (timer*6)/60;
|
||||
int restarttime = ((2600 - timer)*6)/60;
|
||||
string timesince = IntToString(timeup);
|
||||
string timetill = IntToString(restarttime);
|
||||
SendMessageToPC(oPlayer, "Server has been up about " + timesince + "minutes, and will restart in about " + timetill + " minutes.");
|
||||
|
||||
}
|
||||
|
||||
if(tag == "sf_socket_item")
|
||||
{
|
||||
ExecuteScript("sf_socket_item", OBJECT_SELF);
|
||||
|
||||
}
|
||||
|
||||
if(tag == "itemseller")
|
||||
{
|
||||
object oPC = GetItemActivator();
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
if(GetObjectType(oTarget) != OBJECT_TYPE_ITEM) return;
|
||||
if(!GetIsObjectValid(oTarget)) return;
|
||||
if(GetPlotFlag(oTarget) == TRUE) return;
|
||||
int iValue = GetGoldPieceValue(oTarget);
|
||||
int iAssess = iValue/40;
|
||||
GiveGoldToCreature(oPC, iAssess);
|
||||
DestroyObject(oTarget);
|
||||
}
|
||||
|
||||
|
||||
if(tag == "ArcaneSheath")
|
||||
{
|
||||
if (GetLevelByClass( CLASS_TYPE_WIZARD,oPlayer) >= 20 || GetLevelByClass( CLASS_TYPE_SORCERER,oPlayer) >= 20){
|
||||
effect scim ;
|
||||
scim = EffectSummonCreature( "dancingscimit001", VFX_IMP_UNSUMMON, 1.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, scim, oPlayer, 5000.0);
|
||||
}
|
||||
if (GetLevelByClass( CLASS_TYPE_WIZARD,oPlayer) <= 19 && GetLevelByClass( CLASS_TYPE_SORCERER,oPlayer) <= 19 ){
|
||||
if (GetArea(GetNearestObjectByTag("nocrown", oPlayer)) == GetArea(oPlayer)){
|
||||
location loc = GetLocation(oPlayer);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "dancingscimit001", loc);
|
||||
}
|
||||
if (GetArea(GetNearestObjectByTag("nocrown", oPlayer)) != GetArea(oPlayer)){
|
||||
SendMessageToPC(oPlayer, "You can't use that here.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(tag == "AutoFollow")
|
||||
DelayCommand(0.2, AssignCommand(oActivator, ActionForceFollowObject(target, 3000.0)));
|
||||
|
||||
if(tag == "jumpball")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
// Check if item target is valid.
|
||||
|
||||
if (GetIsObjectValid(GetItemActivatedTarget()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Next, do a Fly/Land animation and send the PC over to whereever
|
||||
// was clicked with the activated item.
|
||||
|
||||
effect eFly;
|
||||
location lTarget;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
lTarget = GetItemActivatedTargetLocation();
|
||||
eFly = EffectDisappearAppear(lTarget);
|
||||
|
||||
// Cutscene effects! Totally unnecessary, really, but cute.
|
||||
DelayCommand(2.5, FadeToBlack(oPC, FADE_SPEED_FASTEST));
|
||||
DelayCommand(4.2, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
|
||||
|
||||
// Duration MUST be 3.0 or higher. Higher for busy areas.
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 4.0);
|
||||
|
||||
}
|
||||
|
||||
if(tag == "TheHandofGod")
|
||||
{
|
||||
if (GetIsPC(target) && !GetIsDM(target))
|
||||
{
|
||||
string bReport;
|
||||
bReport = (GetName(target) + GetPCPlayerName(target));
|
||||
|
||||
|
||||
SetCampaignInt("booted", bReport, 5, target);
|
||||
AssignCommand(target, ClearAllActions());
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
|
||||
SendMessageToPC(target, "YOU HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!!");
|
||||
DelayCommand(10.0, BootPC(target));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(GetResRef(oItem) == "createlistener")
|
||||
{
|
||||
if(GetLocalObject(oPlayer, "Listener")!= OBJECT_INVALID){ SendMessageToPC(oPlayer, "You already have a listener"); return;}
|
||||
object oListener = CreateObject(OBJECT_TYPE_CREATURE, "listener", GetLocation(oPlayer));
|
||||
SetLocalObject(oListener, "Master", oPlayer);
|
||||
SetLocalObject(oPlayer, "Listener", oListener);
|
||||
effect eInvis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY); // players shouldn't see their listener
|
||||
effect eEther = EffectEthereal(); // prevents monsters attacking the listener
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oListener, 999999.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEther, oListener, 999999.0);
|
||||
AssignCommand(oListener, ActionForceFollowObject(oPlayer));
|
||||
SetListening(oListener, TRUE);
|
||||
SetListenPattern(oListener, "**::**", 5432);
|
||||
}
|
||||
|
||||
if(tag == "rodofthedead")
|
||||
{
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "rodbuffconv", TRUE));
|
||||
|
||||
}
|
||||
|
||||
if(tag == "MordenkainensRing")
|
||||
{
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(100), oActivator, 100.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 100.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 100.0));
|
||||
}
|
||||
|
||||
if(tag == "herocrystal44")
|
||||
{
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(4), oActivator, 200.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectModifyAttacks(1), oActivator, 200.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_10, DAMAGE_TYPE_POSITIVE), oActivator, 200.0));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_10, DAMAGE_TYPE_MAGICAL), oActivator, 200.0));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator));
|
||||
DelayCommand(0.7, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(42), oActivator, 200.0));
|
||||
DelayCommand(0.8, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment (66), oActivator, 200.0));
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageReduction(5, DAMAGE_POWER_PLUS_TWENTY),oActivator, 200.0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(tag == "ElixirofImmortality")
|
||||
{
|
||||
SetPlotFlag ( oActivator, TRUE);
|
||||
DelayCommand(600.0, SetPlotFlag ( oActivator, FALSE));
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 600.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oActivator, 600.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator, 600.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator, 600.0));
|
||||
}
|
||||
|
||||
if(tag == "artmech44")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectRegenerate(30, 2.0), oActivator, 100.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment (60), oActivator, 100.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(40), oActivator, 100.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 100.0));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 100.0));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator, 100.0));
|
||||
|
||||
}
|
||||
|
||||
if(tag == "RodofTheNameless")
|
||||
{
|
||||
string sReport;
|
||||
sReport = ">>> ID: " + GetPCPlayerName( target )
|
||||
+ "; Name: "+ GetName( target )
|
||||
+ "; CD Key:" + GetPCPublicCDKey( target )
|
||||
+ "; IP:" + GetPCIPAddress( target );
|
||||
SendMessageToPC(oActivator, sReport);
|
||||
}
|
||||
|
||||
if(tag == "restarter")
|
||||
{
|
||||
ExportAllCharacters();
|
||||
SendMessageToPC(oPlayer, "All characters on the server have been saved to the server vault.");
|
||||
SendMessageToAllDMs( "All characters have been saved.");
|
||||
DelayCommand(6.0, StartNewModule("UNDERWORLD"));
|
||||
}
|
||||
|
||||
if(tag == "CrystalBall")
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
if(tag == "thecrystalshard")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDamage(200, DAMAGE_TYPE_COLD, DAMAGE_POWER_ENERGY);
|
||||
|
||||
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_IMP_FROST_S), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FROST_S), GetLocation(oTarget));
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(6000, oPC, TRUE));
|
||||
|
||||
}
|
||||
|
||||
if(tag == "TournamentTrophy")
|
||||
{
|
||||
AssignCommand(oActivator, ActionSpeakString("I am a Tournament Champion!!"));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator, 300.0f);
|
||||
}
|
||||
|
||||
if(GetTag (oItem)=="hc_acidflask" ||
|
||||
GetTag (oItem)=="hc_alchfire" ||
|
||||
GetTag (oItem)=="hc_holywater" ||
|
||||
GetTag (oItem)=="hc_tangle" ||
|
||||
GetTag (oItem)=="hc_thunder" ||
|
||||
GetTag (oItem)=="hc_oilflask")
|
||||
{
|
||||
object oOther=GetItemActivatedTarget();
|
||||
SetLocalObject(oPlayer,"GRENADE",oItem);
|
||||
SetLocalObject(oPlayer,"GRENADETARGET",oOther);
|
||||
ExecuteScript("hc_grenade", oPlayer);
|
||||
}
|
||||
|
||||
if(GetTag (oItem) == "EmoteWand")
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "emotewand", TRUE));
|
||||
|
||||
if(GetTag (oItem) == "telerod")
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "teleconv", TRUE));
|
||||
|
||||
if(GetTag (oItem) == "shadowsword44")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE)
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectSlow();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 12.0f);
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 12.0f);
|
||||
|
||||
eEffect = EffectNegativeLevel(2);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
||||
|
||||
eEffect = EffectCurse(0, 0, 1, 0, 0, 0);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
||||
|
||||
eEffect = EffectDamage(30, DAMAGE_TYPE_NEGATIVE, DAMAGE_POWER_ENERGY);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, GetItemActivatedTarget());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(tag == "circle")
|
||||
{
|
||||
if (!GetIsDM(oActivator))
|
||||
return;
|
||||
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
location loc = GetLocation(GetWaypointByTag("swim"));
|
||||
object oItemToTake;
|
||||
oItemToTake = GetItemPossessedBy(oTarget, "SavingPen2");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
{
|
||||
DestroyObject(oItemToTake);
|
||||
AssignCommand (oTarget,JumpToLocation(loc));
|
||||
}
|
||||
}
|
||||
|
||||
if(tag == "HeartStone")
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 100), oActivator, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_FLAME_S), oActivator, 60.0);
|
||||
}
|
||||
|
||||
if (tag == "ArmageddonStaff")
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
if(GetIsDM(oTest))
|
||||
nFound = TRUE;
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
SendMessageToAllDMs("Armageddon Staff Activated by " + dmname);
|
||||
WriteTimestampedLogEntry("Armageddon Staff Activated by " + dmname);
|
||||
SetLocalInt(GetModule(), "loadtimer", 2597) ;
|
||||
string time = IntToString(GetLocalInt(GetModule(), "loadtimer"));
|
||||
WriteTimestampedLogEntry("Timekeeper = " + time);
|
||||
object oWarn = GetFirstPC();
|
||||
while ((oWarn != OBJECT_INVALID))
|
||||
{
|
||||
location lVis = GetLocation(oWarn);
|
||||
SendMessageToPC(oWarn, "Emergency Reload Sequence Activated");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION), lVis, 5.0);
|
||||
oWarn = GetNextPC();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tag == "ScalesofSentencing")
|
||||
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are Mortal and this is not yours!!!!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("sentenced");
|
||||
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
//only do the jump if the location is valid.
|
||||
//though not flawless, we just check if it is in a valid area.
|
||||
//the script will stop if the location isn't valid - meaning that
|
||||
//nothing put after the teleport will fire either.
|
||||
//the current location won't be stored, either
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(1.0, AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("sentenced")))));
|
||||
|
||||
FloatingTextStringOnCreature("You have been placed in prison by a DM for violation of server rules.", oPC);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (tag == "BootsofBannishing")
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
{
|
||||
if(GetIsDM(oTest))
|
||||
{
|
||||
nFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
ApplyEffectAtLocation ( DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget), 12.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_TENTACLE), oTarget, 8.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_GHOSTLY_PULSE), oTarget, 8.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("Oh NO! Im being sucked into the depths of Hell!!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I will be at the mercy of a powerfull demon! HELP ME!!!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(5.9, AssignCommand(oTarget, ClearAllActions()));
|
||||
DelayCommand(6.0, AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("tortureway")))));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("There is no escape from Hell! Only repeated brutal torture!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I deserve this hellish judgements for my misdeeds!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(20.0, AssignCommand(oTarget, ActionSpeakString("If I had known the consequences of my actions, I would have chosen a different path!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
|
||||
|
||||
if(tag == "SavingPen")
|
||||
SendMessageToPC(oPlayer, "This saving pen is no longer valid, does not save your character, and you may dispose of it.");
|
||||
|
||||
if(tag == "SavingPen2")
|
||||
{
|
||||
ExportAllCharacters();
|
||||
SendMessageToPC(oPlayer, "All characters on the server have been saved to the server vault.");
|
||||
SendMessageToAllDMs( "All characters have been saved.");
|
||||
}
|
||||
|
||||
if(tag == "GemofTeleportation")
|
||||
{
|
||||
int a = GetHitDice(oActivator);
|
||||
int b = a*a*15 ;
|
||||
AssignCommand(oActivator, TakeGoldFromCreature(b, oActivator, TRUE));
|
||||
SendMessageToPC(oActivator, "Some of your gold was turned to lead during the teleport!");
|
||||
|
||||
location lHome = GetLocation(GetWaypointByTag("home"));
|
||||
location lCandy = GetLocation(oActivator);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oActivator, 30.0);
|
||||
DelayCommand(15.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_PWKILL), lCandy, 2.5));
|
||||
DelayCommand(15.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3), lCandy, 5.0));
|
||||
DelayCommand(19.0,AssignCommand(oActivator, ActionJumpToLocation(lHome)));
|
||||
}
|
||||
|
||||
if(tag == "gemofteleporting")
|
||||
{
|
||||
location lHome = GetLocation(GetWaypointByTag("home"));
|
||||
location lCandy = GetLocation(oActivator);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oActivator, 10.0);
|
||||
DelayCommand(10.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_PWKILL), lCandy, 2.5));
|
||||
DelayCommand(10.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3), lCandy, 5.0));
|
||||
DelayCommand(14.0,AssignCommand(oActivator, ActionJumpToLocation(lHome)));
|
||||
}
|
||||
|
||||
if(tag == "Signet")
|
||||
{
|
||||
if(GetIsPC(oActivator))
|
||||
{
|
||||
location lSafe = GetLocation(GetWaypointByTag("Safe"));
|
||||
location lReturn = GetLocation(oActivator);
|
||||
location oCandy = GetLocation(oPlayer);
|
||||
string xxVarName = "xx"+GetPCPlayerName(oPlayer);
|
||||
object oModule = GetModule();
|
||||
location xxLoc = GetLocation(oPlayer);
|
||||
SetLocalLocation (oModule, xxVarName, xxLoc);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_BLINDDEAF), oCandy, 4.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_BLINDDEAF), lSafe, 7.0);
|
||||
DelayCommand(3.0,AssignCommand(oActivator, ActionJumpToLocation(lSafe)));
|
||||
SendMessageToPC(oActivator, "You have been teleported to a pocket dimension.");
|
||||
SendMessageToPC(oActivator, "You will be returned to the material plane in 45 seconds.");
|
||||
DelayCommand(42.0,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_BLINDDEAF), lSafe, 7.0));
|
||||
DelayCommand(45.0, AssignCommand(oActivator, ActionJumpToLocation(lReturn)));
|
||||
}
|
||||
}
|
||||
if (tag == "Punisher")
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
{
|
||||
if(GetIsDM(oTest))
|
||||
{
|
||||
nFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
location lWrath = GetLocation(oTarget);
|
||||
effect eExpl = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
effect eExpl2 = EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION);
|
||||
effect eSmoke = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
effect eBUMP = EffectVisualEffect(VFX_FNF_BLINDDEAF);
|
||||
|
||||
DelayCommand(0.2,ApplyEffectToObject(DURATION_TYPE_INSTANT,eExpl,OBJECT_SELF));
|
||||
|
||||
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,eSmoke,OBJECT_SELF));
|
||||
DelayCommand(1.3,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eExpl2,OBJECT_SELF, 5.0));
|
||||
DelayCommand(1.8,ApplyEffectToObject(DURATION_TYPE_INSTANT,eBUMP,OBJECT_SELF));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDispelMagicAll(40)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectCurse(20,20,20,20,20,20)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectBlindness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDarkness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDeaf()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSilence()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSlow()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ANTI_LIGHT_10), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_DARKNESS), oTarget, 60.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("I have offended the Gods, and must be punished!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I wander the realms in my accursed state as a pointed reminder... Don't anger the DM!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("I know now that the DM will punish me for misbehaving!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I promise to behave if only you will take this horrific curse off of me!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
|
||||
if (tag == "pclist")
|
||||
AssignCommand(oActivator, ActionStartConversation(oActivator, "c_pcl_activate", TRUE));
|
||||
|
||||
|
||||
if(GetTag(oItem)=="AutoFollow")
|
||||
{
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
|
||||
if(GetIsObjectValid(oTarget))
|
||||
{
|
||||
AssignCommand ( oActivator, ActionForceFollowObject(oTarget));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetTag(oItem)=="DMsEffectWand") // DM Effect Wand code here
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
// get the wand's activator and target, put target info into local vars on activator
|
||||
object oMyActivator = GetItemActivator();
|
||||
object oMyTarget = GetItemActivatedTarget();
|
||||
SetLocalObject(oMyActivator, "dmfx_wandtarget", oMyTarget);
|
||||
location lMyLoc = GetItemActivatedTargetLocation();
|
||||
SetLocalLocation(oMyActivator, "dmfx_wandloc", lMyLoc);
|
||||
|
||||
//Make the activator start a conversation with itself
|
||||
AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "conv_dmfxwand", TRUE));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(tag == "ClarityTester")
|
||||
{
|
||||
CreateItemOnObject("immortalcrown2",oActivator,1);
|
||||
CreateItemOnObject("it_mpotion008",oActivator,1);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@@ -1,639 +0,0 @@
|
||||
// Added & modified by Guile on 12/31/06 from original Paths of Ascension Game.
|
||||
// Added Message Stone functionality and recoded some of the tag
|
||||
// checks for better effeciency. (No need to call GetTag() on each check).
|
||||
|
||||
// Removes underscores from the dm set message and replaces them with spaces.
|
||||
|
||||
|
||||
|
||||
string CleanMessage(string sMessage);
|
||||
|
||||
void main()
|
||||
|
||||
{
|
||||
object oItem=GetItemActivated();
|
||||
object oActivator=GetItemActivator();
|
||||
object oPlayer = GetItemActivator();
|
||||
object target = GetItemActivatedTarget();
|
||||
string tag = GetTag(oItem);
|
||||
|
||||
if(tag == "TimeCrystal")
|
||||
{
|
||||
int timer = GetLocalInt(GetModule(), "loadtimer");
|
||||
int timeup = (timer*6)/60;
|
||||
int restarttime = ((2600 - timer)*6)/60;
|
||||
string timesince = IntToString(timeup);
|
||||
string timetill = IntToString(restarttime);
|
||||
SendMessageToPC(oPlayer, "Server has been up about " + timesince + "minutes, and will restart in about " + timetill + " minutes.");
|
||||
|
||||
}
|
||||
|
||||
if(tag == "sf_socket_item")
|
||||
{
|
||||
ExecuteScript("sf_socket_item", OBJECT_SELF);
|
||||
|
||||
}
|
||||
|
||||
if(tag == "itemseller")
|
||||
{
|
||||
object oPC = GetItemActivator();
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
if(GetObjectType(oTarget) != OBJECT_TYPE_ITEM) return;
|
||||
if(!GetIsObjectValid(oTarget)) return;
|
||||
if(GetPlotFlag(oTarget) == TRUE) return;
|
||||
int iValue = GetGoldPieceValue(oTarget);
|
||||
int iAssess = iValue/30;
|
||||
GiveGoldToCreature(oPC, iAssess);
|
||||
DestroyObject(oTarget);
|
||||
}
|
||||
|
||||
|
||||
if(tag == "ArcaneSheath")
|
||||
{
|
||||
if (GetLevelByClass( CLASS_TYPE_WIZARD,oPlayer) >= 20 || GetLevelByClass( CLASS_TYPE_SORCERER,oPlayer) >= 20){
|
||||
effect scim ;
|
||||
scim = EffectSummonCreature( "dancingscimit001", VFX_IMP_UNSUMMON, 1.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, scim, oPlayer, 5000.0);
|
||||
}
|
||||
if (GetLevelByClass( CLASS_TYPE_WIZARD,oPlayer) <= 19 && GetLevelByClass( CLASS_TYPE_SORCERER,oPlayer) <= 19 ){
|
||||
if (GetArea(GetNearestObjectByTag("nocrown", oPlayer)) == GetArea(oPlayer)){
|
||||
location loc = GetLocation(oPlayer);
|
||||
CreateObject( OBJECT_TYPE_CREATURE, "dancingscimit001", loc);
|
||||
}
|
||||
if (GetArea(GetNearestObjectByTag("nocrown", oPlayer)) != GetArea(oPlayer)){
|
||||
SendMessageToPC(oPlayer, "You can't use that here.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(tag == "AutoFollow")
|
||||
DelayCommand(0.2, AssignCommand(oActivator, ActionForceFollowObject(target, 3000.0)));
|
||||
|
||||
if(tag == "jumpball")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
// Check if item target is valid.
|
||||
|
||||
if (GetIsObjectValid(GetItemActivatedTarget()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Next, do a Fly/Land animation and send the PC over to whereever
|
||||
// was clicked with the activated item.
|
||||
|
||||
effect eFly;
|
||||
location lTarget;
|
||||
oPC = GetItemActivator();
|
||||
|
||||
lTarget = GetItemActivatedTargetLocation();
|
||||
eFly = EffectDisappearAppear(lTarget);
|
||||
|
||||
// Cutscene effects! Totally unnecessary, really, but cute.
|
||||
DelayCommand(2.5, FadeToBlack(oPC, FADE_SPEED_FASTEST));
|
||||
DelayCommand(4.2, FadeFromBlack(oPC, FADE_SPEED_FASTEST));
|
||||
|
||||
// Duration MUST be 3.0 or higher. Higher for busy areas.
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eFly, oPC, 4.0);
|
||||
|
||||
}
|
||||
|
||||
if(tag == "TheHandofGod")
|
||||
{
|
||||
if (GetIsPC(target) && !GetIsDM(target))
|
||||
{
|
||||
string bReport;
|
||||
bReport = (GetName(target) + GetPCPlayerName(target));
|
||||
|
||||
|
||||
SetCampaignInt("booted", bReport, 5, target);
|
||||
AssignCommand(target, ClearAllActions());
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
AssignCommand(target, ActionSpeakString("I HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!"));
|
||||
|
||||
SendMessageToPC(target, "YOU HAVE BEEN SMACKED BY THE HAND OF GOD!!!!!!");
|
||||
DelayCommand(10.0, BootPC(target));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(GetResRef(oItem) == "createlistener")
|
||||
{
|
||||
if(GetLocalObject(oPlayer, "Listener")!= OBJECT_INVALID){ SendMessageToPC(oPlayer, "You already have a listener"); return;}
|
||||
object oListener = CreateObject(OBJECT_TYPE_CREATURE, "listener", GetLocation(oPlayer));
|
||||
SetLocalObject(oListener, "Master", oPlayer);
|
||||
SetLocalObject(oPlayer, "Listener", oListener);
|
||||
effect eInvis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY); // players shouldn't see their listener
|
||||
effect eEther = EffectEthereal(); // prevents monsters attacking the listener
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eInvis, oListener, 999999.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEther, oListener, 999999.0);
|
||||
AssignCommand(oListener, ActionForceFollowObject(oPlayer));
|
||||
SetListening(oListener, TRUE);
|
||||
SetListenPattern(oListener, "**::**", 5432);
|
||||
}
|
||||
|
||||
if(tag == "rodofthedead")
|
||||
{
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "rodbuffconv", TRUE));
|
||||
|
||||
}
|
||||
|
||||
if(tag == "MordenkainensRing")
|
||||
{
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(100), oActivator, 100.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 100.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 100.0));
|
||||
}
|
||||
|
||||
if(tag == "herocrystal44")
|
||||
{
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectAttackIncrease(4), oActivator, 200.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectModifyAttacks(1), oActivator, 200.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_10, DAMAGE_TYPE_POSITIVE), oActivator, 200.0));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageIncrease(DAMAGE_BONUS_10, DAMAGE_TYPE_MAGICAL), oActivator, 200.0));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator));
|
||||
DelayCommand(0.7, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(42), oActivator, 200.0));
|
||||
DelayCommand(0.8, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment (66), oActivator, 200.0));
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDamageReduction(5, DAMAGE_POWER_PLUS_TWENTY),oActivator, 200.0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(tag == "ElixirofImmortality")
|
||||
{
|
||||
SetPlotFlag ( oActivator, TRUE);
|
||||
DelayCommand(600.0, SetPlotFlag ( oActivator, FALSE));
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 600.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_MAGIC_RESISTANCE), oActivator, 600.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator, 600.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator, 600.0));
|
||||
}
|
||||
|
||||
if(tag == "artmech44")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
||||
DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectRegenerate(30, 2.0), oActivator, 100.0));
|
||||
DelayCommand(0.2, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectConcealment (60), oActivator, 100.0));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellResistanceIncrease(40), oActivator, 100.0));
|
||||
DelayCommand(0.4, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SPELLTURNING), oActivator, 100.0));
|
||||
DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_SANCTUARY), oActivator, 100.0));
|
||||
DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectVisualEffect(VFX_DUR_PROT_PREMONITION), oActivator, 100.0));
|
||||
|
||||
}
|
||||
|
||||
if(tag == "RodofTheNameless")
|
||||
{
|
||||
string sReport;
|
||||
sReport = ">>> ID: " + GetPCPlayerName( target )
|
||||
+ "; Name: "+ GetName( target )
|
||||
+ "; CD Key:" + GetPCPublicCDKey( target )
|
||||
+ "; IP:" + GetPCIPAddress( target );
|
||||
SendMessageToPC(oActivator, sReport);
|
||||
}
|
||||
|
||||
if(tag == "restarter")
|
||||
{
|
||||
ExportAllCharacters();
|
||||
SendMessageToPC(oPlayer, "All characters on the server have been saved to the server vault.");
|
||||
SendMessageToAllDMs( "All characters have been saved.");
|
||||
DelayCommand(6.0, StartNewModule("UNDERWORLD"));
|
||||
}
|
||||
|
||||
if(tag == "CrystalBall")
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
if(tag == "thecrystalshard")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE))
|
||||
{
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;
|
||||
}
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectDamage(200, DAMAGE_TYPE_COLD, DAMAGE_POWER_ENERGY);
|
||||
|
||||
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_IMP_FROST_S), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_FROST_S), GetLocation(oTarget));
|
||||
|
||||
oPC = GetItemActivatedTarget();
|
||||
|
||||
AssignCommand(oPC, TakeGoldFromCreature(6000, oPC, TRUE));
|
||||
|
||||
}
|
||||
|
||||
if(tag == "TournamentTrophy")
|
||||
{
|
||||
AssignCommand(oActivator, ActionSpeakString("I am a Tournament Champion!!"));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZED), oActivator, 300.0f);
|
||||
}
|
||||
|
||||
if(GetTag (oItem)=="hc_acidflask" ||
|
||||
GetTag (oItem)=="hc_alchfire" ||
|
||||
GetTag (oItem)=="hc_holywater" ||
|
||||
GetTag (oItem)=="hc_tangle" ||
|
||||
GetTag (oItem)=="hc_thunder" ||
|
||||
GetTag (oItem)=="hc_oilflask")
|
||||
{
|
||||
object oOther=GetItemActivatedTarget();
|
||||
SetLocalObject(oPlayer,"GRENADE",oItem);
|
||||
SetLocalObject(oPlayer,"GRENADETARGET",oOther);
|
||||
ExecuteScript("hc_grenade", oPlayer);
|
||||
}
|
||||
|
||||
if(GetTag (oItem) == "EmoteWand")
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "emotewand", TRUE));
|
||||
|
||||
if(GetTag (oItem) == "telerod")
|
||||
AssignCommand (oPlayer, ActionStartConversation (oPlayer, "teleconv", TRUE));
|
||||
|
||||
if(GetTag (oItem) == "shadowsword44")
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if ((GetObjectType(GetItemActivatedTarget())!=OBJECT_TYPE_CREATURE)
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "Improper use of item!");
|
||||
return;}
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetItemActivatedTarget();
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectSlow();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 12.0f);
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
eEffect = EffectBlindness();
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 12.0f);
|
||||
|
||||
eEffect = EffectNegativeLevel(2);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
||||
|
||||
eEffect = EffectCurse(0, 0, 1, 0, 0, 0);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
||||
|
||||
eEffect = EffectDamage(30, DAMAGE_TYPE_NEGATIVE, DAMAGE_POWER_ENERGY);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eEffect, GetItemActivatedTarget());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(tag == "circle")
|
||||
{
|
||||
if (!GetIsDM(oActivator))
|
||||
return;
|
||||
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
location loc = GetLocation(GetWaypointByTag("swim"));
|
||||
object oItemToTake;
|
||||
oItemToTake = GetItemPossessedBy(oTarget, "SavingPen2");
|
||||
if(GetIsObjectValid(oItemToTake) != 0)
|
||||
{
|
||||
DestroyObject(oItemToTake);
|
||||
AssignCommand (oTarget,JumpToLocation(loc));
|
||||
}
|
||||
}
|
||||
|
||||
if(tag == "HeartStone")
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 100), oActivator, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD), oActivator, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_IMP_FLAME_S), oActivator, 60.0);
|
||||
}
|
||||
|
||||
if (tag == "ArmageddonStaff")
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
if(GetIsDM(oTest))
|
||||
nFound = TRUE;
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
SendMessageToAllDMs("Armageddon Staff Activated by " + dmname);
|
||||
WriteTimestampedLogEntry("Armageddon Staff Activated by " + dmname);
|
||||
SetLocalInt(GetModule(), "loadtimer", 2597) ;
|
||||
string time = IntToString(GetLocalInt(GetModule(), "loadtimer"));
|
||||
WriteTimestampedLogEntry("Timekeeper = " + time);
|
||||
object oWarn = GetFirstPC();
|
||||
while ((oWarn != OBJECT_INVALID))
|
||||
{
|
||||
location lVis = GetLocation(oWarn);
|
||||
SendMessageToPC(oWarn, "Emergency Reload Sequence Activated");
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION), lVis, 5.0);
|
||||
oWarn = GetNextPC();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tag == "ScalesofSentencing")
|
||||
|
||||
{
|
||||
object oPC;
|
||||
|
||||
if (!GetIsDM(GetItemActivator())
|
||||
){
|
||||
|
||||
SendMessageToPC(GetItemActivator(), "You are Mortal and this is not yours!!!!");
|
||||
return;}
|
||||
|
||||
oPC = GetItemActivator();
|
||||
|
||||
object oTarget;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("sentenced");
|
||||
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
//only do the jump if the location is valid.
|
||||
//though not flawless, we just check if it is in a valid area.
|
||||
//the script will stop if the location isn't valid - meaning that
|
||||
//nothing put after the teleport will fire either.
|
||||
//the current location won't be stored, either
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
AssignCommand(oPC, ClearAllActions());
|
||||
|
||||
DelayCommand(1.0, AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("sentenced")))));
|
||||
|
||||
FloatingTextStringOnCreature("You have been placed in prison by a DM for violation of server rules.", oPC);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (tag == "BootsofBannishing")
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
{
|
||||
if(GetIsDM(oTest))
|
||||
{
|
||||
nFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
ApplyEffectAtLocation ( DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget), 12.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_TENTACLE), oTarget, 8.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_GHOSTLY_PULSE), oTarget, 8.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("Oh NO! Im being sucked into the depths of Hell!!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I will be at the mercy of a powerfull demon! HELP ME!!!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(5.9, AssignCommand(oTarget, ClearAllActions()));
|
||||
DelayCommand(6.0, AssignCommand(oTarget, ActionJumpToLocation(GetLocation(GetWaypointByTag("tortureway")))));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("There is no escape from Hell! Only repeated brutal torture!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I deserve this hellish judgements for my misdeeds!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(20.0, AssignCommand(oTarget, ActionSpeakString("If I had known the consequences of my actions, I would have chosen a different path!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
|
||||
|
||||
if(tag == "SavingPen")
|
||||
SendMessageToPC(oPlayer, "This saving pen is no longer valid, does not save your character, and you may dispose of it.");
|
||||
|
||||
if(tag == "SavingPen2")
|
||||
{
|
||||
ExportAllCharacters();
|
||||
SendMessageToPC(oPlayer, "All characters on the server have been saved to the server vault.");
|
||||
SendMessageToAllDMs( "All characters have been saved.");
|
||||
}
|
||||
|
||||
if(tag == "GemofTeleportation")
|
||||
{
|
||||
int a = GetHitDice(oActivator);
|
||||
int b = a*a*15 ;
|
||||
AssignCommand(oActivator, TakeGoldFromCreature(b, oActivator, TRUE));
|
||||
SendMessageToPC(oActivator, "Some of your gold was turned to lead during the teleport!");
|
||||
|
||||
location lHome = GetLocation(GetWaypointByTag("home"));
|
||||
location lCandy = GetLocation(oActivator);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oActivator, 30.0);
|
||||
DelayCommand(15.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_PWKILL), lCandy, 2.5));
|
||||
DelayCommand(15.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3), lCandy, 5.0));
|
||||
DelayCommand(19.0,AssignCommand(oActivator, ActionJumpToLocation(lHome)));
|
||||
}
|
||||
|
||||
if(tag == "gemofteleporting")
|
||||
{
|
||||
location lHome = GetLocation(GetWaypointByTag("home"));
|
||||
location lCandy = GetLocation(oActivator);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_PARALYZE_HOLD), oActivator, 10.0);
|
||||
DelayCommand(10.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_PWKILL), lCandy, 2.5));
|
||||
DelayCommand(10.0, ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_3), lCandy, 5.0));
|
||||
DelayCommand(14.0,AssignCommand(oActivator, ActionJumpToLocation(lHome)));
|
||||
}
|
||||
|
||||
if(tag == "Signet")
|
||||
{
|
||||
if(GetIsPC(oActivator))
|
||||
{
|
||||
location lSafe = GetLocation(GetWaypointByTag("Safe"));
|
||||
location lReturn = GetLocation(oActivator);
|
||||
location oCandy = GetLocation(oPlayer);
|
||||
string xxVarName = "xx"+GetPCPlayerName(oPlayer);
|
||||
object oModule = GetModule();
|
||||
location xxLoc = GetLocation(oPlayer);
|
||||
SetLocalLocation (oModule, xxVarName, xxLoc);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_BLINDDEAF), oCandy, 4.0);
|
||||
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_BLINDDEAF), lSafe, 7.0);
|
||||
DelayCommand(3.0,AssignCommand(oActivator, ActionJumpToLocation(lSafe)));
|
||||
SendMessageToPC(oActivator, "You have been teleported to a pocket dimension.");
|
||||
SendMessageToPC(oActivator, "You will be returned to the material plane in 45 seconds.");
|
||||
DelayCommand(42.0,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_FNF_BLINDDEAF), lSafe, 7.0));
|
||||
DelayCommand(45.0, AssignCommand(oActivator, ActionJumpToLocation(lReturn)));
|
||||
}
|
||||
}
|
||||
if (tag == "Punisher")
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
object oTest = GetFirstPC();
|
||||
string sTestName = GetPCPlayerName(oActivator);
|
||||
int nFound = FALSE;
|
||||
while (GetIsObjectValid(oTest) && (! nFound))
|
||||
{
|
||||
if (GetPCPlayerName(oTest) == sTestName)
|
||||
{
|
||||
if(GetIsDM(oTest))
|
||||
{
|
||||
nFound = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
}
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
string pcname = GetPCPlayerName(oTarget);
|
||||
string dmname = GetPCPlayerName(oActivator);
|
||||
|
||||
SendMessageToAllDMs("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
WriteTimestampedLogEntry("Boots of Bannishing Activated on " + pcname + " by " + dmname);
|
||||
location lWrath = GetLocation(oTarget);
|
||||
effect eExpl = EffectVisualEffect(VFX_FNF_STRIKE_HOLY);
|
||||
effect eExpl2 = EffectVisualEffect(VFX_FNF_DISPEL_DISJUNCTION);
|
||||
effect eSmoke = EffectVisualEffect(VFX_FNF_LOS_EVIL_30);
|
||||
effect eBUMP = EffectVisualEffect(VFX_FNF_BLINDDEAF);
|
||||
|
||||
DelayCommand(0.2,ApplyEffectToObject(DURATION_TYPE_INSTANT,eExpl,OBJECT_SELF));
|
||||
|
||||
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_INSTANT,eSmoke,OBJECT_SELF));
|
||||
DelayCommand(1.3,ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eExpl2,OBJECT_SELF, 5.0));
|
||||
DelayCommand(1.8,ApplyEffectToObject(DURATION_TYPE_INSTANT,eBUMP,OBJECT_SELF));
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDispelMagicAll(40)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectCurse(20,20,20,20,20,20)), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectBlindness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDarkness()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectDeaf()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSilence()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectSlow()), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_ANTI_LIGHT_10), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE), oTarget, 60.0);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectVisualEffect(VFX_DUR_DARKNESS), oTarget, 60.0);
|
||||
AssignCommand(oTarget, ActionSpeakString("I have offended the Gods, and must be punished!", TALKVOLUME_SHOUT));
|
||||
DelayCommand(5.0, AssignCommand(oTarget, ActionSpeakString("I wander the realms in my accursed state as a pointed reminder... Don't anger the DM!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(10.0, AssignCommand(oTarget, ActionSpeakString("I know now that the DM will punish me for misbehaving!", TALKVOLUME_SHOUT)));
|
||||
DelayCommand(15.0, AssignCommand(oTarget, ActionSpeakString("I promise to behave if only you will take this horrific curse off of me!", TALKVOLUME_SHOUT)));
|
||||
}
|
||||
|
||||
if (tag == "pclist")
|
||||
AssignCommand(oActivator, ActionStartConversation(oActivator, "c_pcl_activate", TRUE));
|
||||
|
||||
|
||||
if(GetTag(oItem)=="AutoFollow")
|
||||
{
|
||||
object oTarget = GetItemActivatedTarget();
|
||||
|
||||
if(GetIsObjectValid(oTarget))
|
||||
{
|
||||
AssignCommand ( oActivator, ActionForceFollowObject(oTarget));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(GetTag(oItem)=="DMsEffectWand") // DM Effect Wand code here
|
||||
{
|
||||
if(GetIsDM(oActivator) != TRUE)
|
||||
{
|
||||
SendMessageToPC(oActivator,"You are mortal and this is not yours!");
|
||||
DestroyObject(oItem);
|
||||
return;
|
||||
}
|
||||
// get the wand's activator and target, put target info into local vars on activator
|
||||
object oMyActivator = GetItemActivator();
|
||||
object oMyTarget = GetItemActivatedTarget();
|
||||
SetLocalObject(oMyActivator, "dmfx_wandtarget", oMyTarget);
|
||||
location lMyLoc = GetItemActivatedTargetLocation();
|
||||
SetLocalLocation(oMyActivator, "dmfx_wandloc", lMyLoc);
|
||||
|
||||
//Make the activator start a conversation with itself
|
||||
AssignCommand(oMyActivator, ActionStartConversation(oMyActivator, "conv_dmfxwand", TRUE));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(tag == "ClarityTester")
|
||||
{
|
||||
CreateItemOnObject("immortalcrown2",oActivator,1);
|
||||
CreateItemOnObject("it_mpotion008",oActivator,1);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@@ -16,18 +16,12 @@ const int MULTI = TRUE; //Default = FALSE (Single Player Mode);
|
||||
const string NWNX_DISCORD_URL = "/api/webhooks/713882600216723518/1EpwmMZ6F9VBjDt6uKmvGizGJUqYZgCC35Dyt3slQGUeDMJszHjKcDVbJXjr-a59v55u/slack";
|
||||
|
||||
//Required Includes
|
||||
#include "x2_inc_switches"
|
||||
#include "x2_inc_restsys"
|
||||
// I did this
|
||||
#include "nwnx"
|
||||
#include "nwnx_util"
|
||||
#include "nwnx_webhook"
|
||||
|
||||
|
||||
|
||||
//Required Include for the DM Chat Control Options
|
||||
#include "dm_chat_inc"
|
||||
|
||||
#include "_inc_color_text_"
|
||||
|
||||
|
||||
@@ -127,94 +121,8 @@ if(MULTI == TRUE)
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//Your Code Goes here..
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//STANDARD BIOWARE XP2 FUNCTIONS/////////////////////////////////////////////
|
||||
//////////////////////////////////////////MODULE SWITCHES///////////////////
|
||||
|
||||
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, FALSE);
|
||||
|
||||
// * 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();
|
||||
}
|
||||
|
||||
//Main Script End
|
||||
NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, "Man lives in the sunlit world of what he believes to be reality. But... there is, unseen by most, an underworld, a place that is just as real, but not as brightly lit...", "Master of the Void");
|
||||
}
|
||||
|
120
_module/nss/x2_mod_def_load.nss
Normal file
120
_module/nss/x2_mod_def_load.nss
Normal file
@@ -0,0 +1,120 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Example XP2 OnLoad Script
|
||||
//:: x2_mod_def_load
|
||||
//:: (c) 2003 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Put into: OnModuleLoad Event
|
||||
|
||||
This example script demonstrates how to tweak the
|
||||
behavior of several subsystems in your module.
|
||||
|
||||
For more information, please check x2_inc_switches
|
||||
which holds definitions for several variables that
|
||||
can be set on modules, creatures, doors or waypoints
|
||||
to change the default behavior of Bioware scripts.
|
||||
|
||||
Warning:
|
||||
Using some of these switches may change your games
|
||||
balancing and may introduce bugs or instabilities. We
|
||||
recommend that you only use these switches if you
|
||||
know what you are doing. Consider these features
|
||||
unsupported!
|
||||
|
||||
Please do NOT report any bugs you experience while
|
||||
these switches have been changed from their default
|
||||
positions.
|
||||
|
||||
Make sure you visit the forums at nwn.bioware.com
|
||||
to find out more about these scripts.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Georg Zoeller
|
||||
//:: Created On: 2003-07-16
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_switches"
|
||||
#include "x2_inc_restsys"
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user