Updated event system

Added caller scripts to the PC events.  Full compile.  Updated release.
This commit is contained in:
Jaysyn904
2023-11-13 13:16:17 -05:00
parent 80853afccf
commit f69e979e53
58 changed files with 278 additions and 33 deletions

View File

@@ -16,7 +16,7 @@
#include "nw_i0_tool"
void bleed(int iBleedAmt)
{
ExecuteScript("prc_ondying", OBJECT_SELF);
object oPC = GetLastPlayerDying();
if (!GetIsPC(oPC)){

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onacquired.nss
*
* OnAcquiredItem event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onaquire", OBJECT_SELF);
ExecuteScript("onacquireditem", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onactivate.nss
*
* OnActivateItem event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_activate", OBJECT_SELF);
ExecuteScript("onactivateitem", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_ondeath.nss
*
* OnPlayerDeath event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_ondeath", OBJECT_SELF);
ExecuteScript("onplayerdeath", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_ondying.nss
*
* OnPlayerDying event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_ondying", OBJECT_SELF);
ExecuteScript("bleeding", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onenter.nss
*
* OnClientEnter event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onenter", OBJECT_SELF);
ExecuteScript("oncliententer", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onexit.nss
*
* OnClientExit event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_leave", OBJECT_SELF);
ExecuteScript("onclientexit", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onheartbeat.nss
*
* OnHeartbeat event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onheartbeat", OBJECT_SELF);
ExecuteScript("onheartbeat", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onlevelup.nss
*
* OnPlayerLevelUp event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_levelup", OBJECT_SELF);
ExecuteScript("onplayerlevelup", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onmodload.nss
*
* OnModuleLoad event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onmodload", OBJECT_SELF);
ExecuteScript("onmoduleload", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onpcchat.nss
*
* OnPlayerChat event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onplayerchat", OBJECT_SELF);
ExecuteScript("on_player_chat", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onpcequip.nss
*
* OnPlayerEquipItem event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_equip", OBJECT_SELF);
ExecuteScript("onplayerequipted", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onpcrest.nss
*
* OnPlayerRest event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_rest", OBJECT_SELF);
ExecuteScript("onplayerrest", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onrespawn.nss
*
* OnPlayerRespawn event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onrespawn", OBJECT_SELF);
ExecuteScript("onplayerrespawn", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onunacquire.nss
*
* OnPlayerUnacquireItem event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_onunaquire", OBJECT_SELF);
ExecuteScript("onunacquireitem", OBJECT_SELF);
}

View File

@@ -0,0 +1,17 @@
//:://////////////////////////////////////////////
/*
* call_onunequip.nss
*
* OnPlayerUnequipItem event caller
*
*
*/
//:://////////////////////////////////////////////
void main()
{
ExecuteScript("prc_unequip", OBJECT_SELF);
ExecuteScript("onunequipitem", OBJECT_SELF);
}

View File

@@ -16,8 +16,6 @@
#include "x2_inc_switches"
void main()
{
ExecuteScript("prc_onaquire", OBJECT_SELF);
//IMPORTANT THIS MUST BE IN YOUR OnAcquireItem Module Event Script
//This is a fix for the Inventory Organizing System!
object oPC = GetModuleItemAcquiredBy();

View File

@@ -37,7 +37,7 @@ void SendMessageToAllPC(string sMessage);
//Main Script
void main()
{
ExecuteScript("prc_onenter", OBJECT_SELF);
//Declare Major Variables..
object oPC;

View File

@@ -24,7 +24,6 @@ void SendMessageToAllPC(string sMessage);
//Main Script
void main()
{
ExecuteScript("prc_onleave", OBJECT_SELF);
object oPC = GetExitingObject();
if(GetIsDM(oPC))

View File

@@ -19,7 +19,7 @@ Event of the Module Properties
//Main Script
void main()
{
ExecuteScript("prc_onheartbeat", OBJECT_SELF);
//IMPORTANT NOTE: If you are using nwnx2 to load your server you will
//want to open up the OnModuleLoad script to activate the NWNX2 Reset
//and below you will need to follow the directions to turn off normal reset.

View File

@@ -35,7 +35,6 @@ const string NWNX_DISCORD_URL = "/api/webhooks/713882600216723518/1EpwmMZ6F9VBjD
//Main Script
void main()
{
ExecuteScript("prc_onmodload", OBJECT_SELF);
//Set whether we are using this module for multiplayer or single player..
SetLocalInt(GetModule(), "MULTI", MULTI);

View File

@@ -55,7 +55,7 @@ const int nReward2 = 800;
// Raise OnDeath function (Standard Bioware Function)
void Raise(object oPlayer)
{
ExecuteScript("prc_ondeath", OBJECT_SELF);
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION);
effect eBad = GetFirstEffect(oPlayer);

View File

@@ -15,7 +15,7 @@ Likewise players cannot equipt items tagnamed "arena" outside of the arena.
//Main Script
void main()
{
ExecuteScript("prc_equip", OBJECT_SELF);
//Declare Major Variables
object oItem = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();

View File

@@ -89,7 +89,6 @@ else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_KNO
//a legal character or not, just delete the // below to use
//DelayCommand(2.0, ExecuteScript("cheatercheck4", oPC));
ExecuteScript("prc_levelup", oPC);
//////////////////////////////////////////////////////////////////////////
//SimTools Languages

View File

@@ -36,8 +36,6 @@ void Raise(object oPlayer);
//Main Script
void main()
{
ExecuteScript("prc_onrespawn", OBJECT_SELF);
object oPC = GetLastRespawnButtonPresser();
if (!GetIsPC(oPC)) return;

View File

@@ -212,7 +212,7 @@ if(GetLocalInt(GetModule(), "MULTI")==TRUE)
ExecuteScript("powerimmortal", oPC);
}
ExecuteScript("prc_rest", oPC);
//ExecuteScript("prc_rest", oPC);
//Your code goes here. (This happens when the PC is done resting..)

View File

@@ -21,8 +21,6 @@ Scripting will still fire reguardless.
#include "x2_inc_switches"
void main()
{
ExecuteScript("prc_onunaquire", OBJECT_SELF);
//IMPORTANT THIS MUST BE IN YOUR OnUnAcquireItem Module Event Script
//This is a fix for the Inventory Organizing System!
object oPC = GetModuleItemLostBy();

View File

@@ -21,7 +21,6 @@
//Main Script
void main()
{
ExecuteScript("prc_unequip", OBJECT_SELF);
object oItem = GetPCItemLastUnequipped();
object oPC = GetPCItemLastUnequippedBy();