UW2_PRC8/_module/nss/onmoduleload.nss
Jaysyn904 a513a8c6d0 Fixed Epic Spell research
Fixed Epic Spell research.  Cleaned up events.  Full compile.  Updated release.
2023-11-14 21:52:21 -05:00

129 lines
5.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//Script Name: onmoduleload
//////////////////////////////////////////
//Created By: Genisys (Guile)
//Created On: 7/23/08 (Updated 8/10/08)
/////////////////////////////////////////
/*
This script goes in your OnModuleLoad
Event found in the Module Properties
Event Tab.
*/
////////////////////////////////////////
//IMPORTANT SWITCH
//Set this to TRUE if it's a multiplayer game
const int MULTI = TRUE; //Default = FALSE (Single Player Mode);
// I did this
const string NWNX_DISCORD_URL = "/api/webhooks/713882600216723518/1EpwmMZ6F9VBjDt6uKmvGizGJUqYZgCC35Dyt3slQGUeDMJszHjKcDVbJXjr-a59v55u/slack";
//Required Includes
#include "nwnx"
#include "nwnx_util"
#include "nwnx_webhook"
//Required Include for the DM Chat Control Options
#include "dm_chat_inc"
#include "_inc_color_text_"
//Main Script
void main()
{
//Set whether we are using this module for multiplayer or single player..
SetLocalInt(GetModule(), "MULTI", MULTI);
//For Time Keeping...(This MUST BE HERE)
SetLocalInt(GetModule(), "DELAY_OK", 1);
////////////////////////////////////////////////////////
//Stop the treasure generation on creatures, so they won't drop loot..
SetLocalInt(GetModule(), "X2_L_NOTREASURE", FALSE);
//IMPORTANT: This part is part of 2 color systems!
//It must be in your OnModuleLoad Event Script!!
//This set color to placeables in the module, it requires that the placeable
//tagged color is placed in the module somewhere out of reach.
string sColor = GetName(GetObjectByTag("COLORS"));
SetCustomToken(1001, GetSubString(sColor, 0, 6)); //white
SetCustomToken(1002, GetSubString(sColor, 6, 6)); //yellow
SetCustomToken(1003, GetSubString(sColor, 12, 6)); //magenta
SetCustomToken(1004, GetSubString(sColor, 18, 6)); //cyan
SetCustomToken(1005, GetSubString(sColor, 24, 6)); //red
SetCustomToken(1006, GetSubString(sColor, 30, 6)); //green
SetCustomToken(1007, GetSubString(sColor, 36, 6)); //blue
//More Custom Color Tokens By Genisys
//NOTE: These custom tokens go ONLY in conversation lines to colorize text
//The example below is everything that would go on a Conversation Line
/*******EXAMPLE CONVERSATION LINE**************
<CUSTOM101>This text of the conversation would be red<CUSTOM100>
IMPORTANT: You must use <CUSTOM100> At the end EVERY TIME!*/
SetCustomToken(100, "</c>"); // CLOSE tag (Ends color, prevents run on!)
SetCustomToken(101, "<c<> >"); // red
SetCustomToken(102, "<c <20> >"); // green
SetCustomToken(103, "<c <20>>"); // blue
SetCustomToken(104, "<c <20><>>"); // cyan
SetCustomToken(105, "<c<> <20>>"); // magenta
SetCustomToken(106, "<c<><63> >"); // yellow
SetCustomToken(107, "<c >"); // black
SetCustomToken(108, "<c<> >"); // dark red
SetCustomToken(109, "<c <20> >"); // dark green
SetCustomToken(110, "<c <20>>"); // dark blue
SetCustomToken(111, "<c <20><>>"); // dark cyan
SetCustomToken(112, "<c<> <20>>"); // dark magenta
SetCustomToken(113, "<c<><63> >"); // dark yellow
SetCustomToken(114, "<c<><63><EFBFBD>>"); // grey
SetCustomToken(117, "<c<><63><EFBFBD>>"); // dark grey
SetCustomToken(115, "<c<><63> >"); // orange
SetCustomToken(116, "<c<><63> >"); // dark orange
SetCustomToken(117, "<cڥ#>"); // brown
SetCustomToken(118, "<c† >"); // dark brown
SetCustomToken(119, "<c<>k<EFBFBD>>"); // Light Purple
SetCustomToken(120, "<c <20> >"); // Neon Green
SetCustomToken(121, "<c <20><>>"); // Light Blue
SetCustomToken(122, "<c` <20>>"); // Purple
SetCustomToken(123, "<c <20> >"); //Neon Green
//Set the name on the Rainbow Chest!
object oRainbow = GetObjectByTag("rainbowchest");
object oRainbow2 = GetObjectByTag("rainbowchest2");
SetName(oRainbow, ChaoticText(GetName(oRainbow, TRUE)));
SetName(oRainbow2, ChaoticText(GetName(oRainbow2, TRUE)));
////////////////////////////////////////////////////////////////////////////
//Code added for the DM Chat Control Options..
GetChatConfigurations();
/////////SPELL HOOKING BY Genisys (Guile)///////////////////////////////////
//This part sets a local variable on the module to allow you to edit
//spells through the "myhook" script, which will give you greater control
//over spell casting in your module, including items and area casting!
//SetLocalString(GetModule(), "X2_S_UD_SPELLSCRIPT", "myhook");
//To disable spell hooking simply type // at the start of the line above
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
/////////////////AUTOMATIC CHARACTER SAVING FUCTION////////////////////////
//Note this function is Polymorphing Friendly (Designed for that purpose!)
if(MULTI == TRUE)
{
//:: DelayCommand(60.0, ExecuteScript("savepcinfo", OBJECT_SELF)); //:: Not needed for EE
}
//////////////////////////////////////////////////////////////////////////
//Your Code Goes here..
//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");
}