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

@ -865,7 +865,7 @@
"Mod_Description": {
"type": "cexolocstring",
"value": {
"0": "The Underworld 2\nCreated By: Guile / Genisys\nCreated On 4/17/07 to 8/29/10\n\nDiscord @ PRC Presents Channels"
"0": "Underworld 2 (PRC8/CEP3 version)\nCreated By: Guile / Genisys\nCreated On 4/17/07 to 8/29/10\n\nUpdated By: Jaysyn\n\nDiscord @ PRC Presents Channels"
}
},
"Mod_DuskHour": {
@ -1103,24 +1103,24 @@
"Mod_Name": {
"type": "cexolocstring",
"value": {
"0": "Underworld 2"
"0": "Underworld 2 (PRC8/CEP3)"
}
},
"Mod_OnAcquirItem": {
"type": "resref",
"value": "onaquireditem"
"value": "call_onacquired"
},
"Mod_OnActvtItem": {
"type": "resref",
"value": "onactivateitem"
"value": "call_onactivate"
},
"Mod_OnClientEntr": {
"type": "resref",
"value": "oncliententer"
"value": "call_onenter"
},
"Mod_OnClientLeav": {
"type": "resref",
"value": "onclientexit"
"value": "call_onexit"
},
"Mod_OnCutsnAbort": {
"type": "resref",
@ -1128,11 +1128,11 @@
},
"Mod_OnHeartbeat": {
"type": "resref",
"value": "onheartbeat"
"value": "call_onheartbeat"
},
"Mod_OnModLoad": {
"type": "resref",
"value": "onmoduleload"
"value": "call_onmodload"
},
"Mod_OnModStart": {
"type": "resref",
@ -1144,19 +1144,19 @@
},
"Mod_OnPlrChat": {
"type": "resref",
"value": "on_player_chat"
"value": "call_onpcchat"
},
"Mod_OnPlrDeath": {
"type": "resref",
"value": "onplayerdeath"
"value": "call_ondeath"
},
"Mod_OnPlrDying": {
"type": "resref",
"value": "bleeding"
"value": "call_ondying"
},
"Mod_OnPlrEqItm": {
"type": "resref",
"value": "onplayerequipted"
"value": "call_onpcequip"
},
"Mod_OnPlrGuiEvt": {
"type": "resref",
@ -1164,11 +1164,11 @@
},
"Mod_OnPlrLvlUp": {
"type": "resref",
"value": "onplayerlevelup"
"value": "call_onlevelup"
},
"Mod_OnPlrRest": {
"type": "resref",
"value": "onplayerrest"
"value": "call_onpcrest"
},
"Mod_OnPlrTarget": {
"type": "resref",
@ -1180,15 +1180,15 @@
},
"Mod_OnPlrUnEqItm": {
"type": "resref",
"value": "onunequipitem"
"value": "call_onunequip"
},
"Mod_OnSpawnBtnDn": {
"type": "resref",
"value": "onplayerrespawn"
"value": "call_onrespawn"
},
"Mod_OnUnAqreItem": {
"type": "resref",
"value": "onunaquireitem"
"value": "call_onunacquire"
},
"Mod_OnUsrDefined": {
"type": "resref",

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
_module/ncs/call_onexit.ncs Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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();

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

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

@ -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.

@ -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);

@ -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);

@ -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();

@ -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

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

@ -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..)

@ -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();

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

Binary file not shown.