//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************** This text of the conversation would be red IMPORTANT: You must use At the end EVERY TIME!*/ SetCustomToken(100, ""); // CLOSE tag (Ends color, prevents run on!) SetCustomToken(101, ""); // red SetCustomToken(102, ""); // green SetCustomToken(103, ""); // blue SetCustomToken(104, ""); // cyan SetCustomToken(105, ""); // magenta SetCustomToken(106, ""); // yellow SetCustomToken(107, ""); // black SetCustomToken(108, ""); // dark red SetCustomToken(109, ""); // dark green SetCustomToken(110, ""); // dark blue SetCustomToken(111, ""); // dark cyan SetCustomToken(112, ""); // dark magenta SetCustomToken(113, ""); // dark yellow SetCustomToken(114, ""); // grey SetCustomToken(117, ""); // dark grey SetCustomToken(115, ""); // orange SetCustomToken(116, ""); // dark orange SetCustomToken(117, ""); // brown SetCustomToken(118, ""); // dark brown SetCustomToken(119, ""); // Light Purple SetCustomToken(120, ""); // Neon Green SetCustomToken(121, ""); // Light Blue SetCustomToken(122, ""); // Purple SetCustomToken(123, ""); //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"); }