Consolidated menus
Consolidated menus. Fixed AMS not restoring spell on rest. Full compile. Updated release archive.
This commit is contained in:
parent
a203d11310
commit
d44d9fef07
201549
_module/dlg/bak_skill_ctrap.dlg.json
Normal file
201549
_module/dlg/bak_skill_ctrap.dlg.json
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
956931
_module/dlg/x2_skill_ctrap.dlg.json
Normal file
956931
_module/dlg/x2_skill_ctrap.dlg.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -1168,7 +1168,7 @@
|
||||
},
|
||||
"Mod_OnPlrRest": {
|
||||
"type": "resref",
|
||||
"value": "onplayerrest"
|
||||
"value": "call_onpcrest"
|
||||
},
|
||||
"Mod_OnPlrTarget": {
|
||||
"type": "resref",
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
* call_onpcrest.nss
|
||||
* call_onpcrest.nss
|
||||
*
|
||||
* OnPlayerRest event caller
|
||||
* OnPlayerRest event caller
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ -11,7 +11,7 @@
|
||||
void main()
|
||||
{
|
||||
ExecuteScript("prc_rest", OBJECT_SELF);
|
||||
|
||||
ExecuteScript("onplayerrest", OBJECT_SELF);
|
||||
|
||||
}
|
||||
|
||||
ExecuteScript("x2_mod_def_rest", OBJECT_SELF);
|
||||
|
||||
}
|
||||
|
@ -9,14 +9,63 @@
|
||||
//:: Created By: Georg Zoeller
|
||||
//:: Created On: June 9/03
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Modified By: Deva Winblood
|
||||
//:: Modified Date: January 28th, 2008
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
#include "x2_inc_restsys"
|
||||
#include "x2_inc_switches"
|
||||
#include "x3_inc_horse"
|
||||
|
||||
effect eEffect;
|
||||
|
||||
void main()
|
||||
{
|
||||
//Declare Major Variables
|
||||
object oPC =GetLastPCRested();
|
||||
object oPlayer = oPC;
|
||||
string sName = GetStringLeft(GetName(oPC), 20);
|
||||
object oPP = oPC;
|
||||
|
||||
object oPC = GetLastPCRested();
|
||||
location lSaved = GetLocation(oPP);
|
||||
|
||||
int nRestType =GetLastRestEventType();
|
||||
int nHD = GetHitDice(oPC);
|
||||
|
||||
object oMount;
|
||||
|
||||
if (!GetLocalInt(GetModule(),"X3_MOUNT_NO_REST_DISMOUNT"))
|
||||
{ // make sure not mounted
|
||||
/* Deva, Jan 17, 2008
|
||||
Do not allow a mounted PC to rest
|
||||
*/
|
||||
if (HorseGetIsMounted(oPC))
|
||||
{ // cannot mount
|
||||
if (GetLocalInt(oPC,"X3_REST_CANCEL_MESSAGE_SENT"))
|
||||
{ // cancel message already played
|
||||
DeleteLocalInt(oPC,"X3_REST_CANCEL_MESSAGE_SENT");
|
||||
} // cancel message already played
|
||||
else
|
||||
{ // play cancel message
|
||||
FloatingTextStrRefOnCreature(112006,oPC,FALSE);
|
||||
SetLocalInt(oPC,"X3_REST_CANCEL_MESSAGE_SENT",TRUE); // sentinel
|
||||
// value to prevent message played a 2nd time on canceled rest
|
||||
} // play cancel message
|
||||
AssignCommand(oPC,ClearAllActions(TRUE));
|
||||
return;
|
||||
} // cannot mount
|
||||
} // make sure not mounted
|
||||
|
||||
if (!GetLocalInt(GetModule(),"X3_MOUNT_NO_REST_DESPAWN"))
|
||||
{ // if there is a paladin mount despawn it
|
||||
oMount=HorseGetPaladinMount(oPC);
|
||||
if (!GetIsObjectValid(oMount)) oMount=GetLocalObject(oPC,"oX3PaladinMount");
|
||||
if (GetIsObjectValid(oMount))
|
||||
{ // paladin mount exists
|
||||
if (oMount==oPC||!GetIsObjectValid(GetMaster(oMount))) AssignCommand(oPC,HorseUnsummonPaladinMount());
|
||||
else { AssignCommand(GetMaster(oMount),HorseUnsummonPaladinMount()); }
|
||||
} // paladin mount exists
|
||||
} // if there is a paladin mount despawn it
|
||||
|
||||
if (GetModuleSwitchValue(MODULE_SWITCH_USE_XP2_RESTSYSTEM) == TRUE)
|
||||
{
|
||||
@ -83,13 +132,124 @@ void main()
|
||||
{
|
||||
// No longer used but left in for the community
|
||||
// WMFinishPlayerRest(oPC); // removes sleep effect, etc
|
||||
}
|
||||
SetLocalInt(oPC, "REST_STARTED", 0);
|
||||
|
||||
//*******LOCATION SAVING OPTION************
|
||||
//Type // at the start of the Set and Send lines to deactivate this feature.
|
||||
|
||||
//For the guild only!
|
||||
//If they are in the guild...
|
||||
if(GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
|
||||
{
|
||||
if(GetAreaFromLocation(lSaved)!=OBJECT_INVALID)
|
||||
{
|
||||
//Store the PC's location, so they can come back here after relogging
|
||||
//SetCampaignLocation("LOCATIONS", GetName(oPC), lSaved, oPC);
|
||||
|
||||
//Tell the PC their location was saved..
|
||||
//SendMessageToPC(oPP, "Location Saved!");
|
||||
}
|
||||
}
|
||||
|
||||
//************CLEAR THE PC'S REPUTATION WITH ALL NPCS*****************
|
||||
if(GetIsPC(oPlayer))
|
||||
{
|
||||
|
||||
AssignCommand(oPlayer, ClearAllActions());
|
||||
|
||||
//Clear Reputation of PC
|
||||
if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10)
|
||||
{ SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
|
||||
SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer);
|
||||
}
|
||||
if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10)
|
||||
{ SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
|
||||
SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer);
|
||||
}
|
||||
if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10)
|
||||
{ SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad
|
||||
SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//*****EXPORT SINGLE CHARACTER******
|
||||
/*
|
||||
Delete the // at the start of the two lines below to -
|
||||
activate the player character auto saving features
|
||||
*/
|
||||
|
||||
//Save the PC's character instantly..
|
||||
if(GetLocalInt(GetModule(), "MULTI")==TRUE)
|
||||
{
|
||||
ExportAllCharacters();
|
||||
|
||||
SendMessageToPC(GetPCLevellingUp(), "All characters on the server are saved when any character rest.");
|
||||
}
|
||||
DelayCommand(1.0, ExportSingleCharacter(oPC)); //Allow them to deshift!
|
||||
FloatingTextStringOnCreature("Your character was saved.", oPC);
|
||||
}
|
||||
|
||||
//Remove any and ALL death tokens...
|
||||
object oToken;
|
||||
string sTag;
|
||||
if(GetItemPossessedBy(oPC, "death")!=OBJECT_INVALID)
|
||||
{
|
||||
oToken = GetFirstItemInInventory(oPC);
|
||||
while(GetIsObjectValid(oToken))
|
||||
{
|
||||
sTag = GetTag(oToken);
|
||||
if(sTag=="death")
|
||||
{ DestroyObject(oToken, 0.0f); }
|
||||
|
||||
oToken = GetNextItemInInventory(oPC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(nHD == 40 || GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
|
||||
{
|
||||
//If the player is Legendary Level 60 give them a cool power!
|
||||
if(GetXP(oPC) >5000000 || GetItemPossessedBy(oPC, "guildpass")!=OBJECT_INVALID)
|
||||
{
|
||||
//The legendary character is immune to death!
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_SKILL_DECREASE);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
||||
|
||||
//The legendary character is immune to poison!
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_ABILITY_DECREASE);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
||||
|
||||
//The legendary character is immune to disease!
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_NEGATIVE_LEVEL);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
||||
}
|
||||
|
||||
//Make ALL level 40s have 40% concealment
|
||||
|
||||
//Make them harder to hit 40% miss chance...
|
||||
eEffect = EffectConcealment(40);
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oPC);
|
||||
|
||||
//Apply the Ghost Like Visual to all Level 40 PCs
|
||||
//Type // at the start of the two lines below to de-activate this.
|
||||
if(nHD == 40)
|
||||
{
|
||||
DelayCommand(1.0, ApplyEffectToObject(DURATION_TYPE_PERMANENT,
|
||||
SupernaturalEffect(EffectVisualEffect(VFX_DUR_GLOW_WHITE)), oPC));
|
||||
}
|
||||
}
|
||||
|
||||
//if the PC is immortal (has the immotoken)
|
||||
if (GetItemPossessedBy(oPC, "immotoken")!= OBJECT_INVALID)
|
||||
{
|
||||
//See this script to adjust the immortal options..
|
||||
ExecuteScript("powerimmortal", oPC);
|
||||
}
|
||||
|
||||
//Your code goes here. (This happens when the PC is done resting..)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user