// // // Dom Queron's DAoC Respawn System // OnModuleStart Script // // You do not need to use this script. If you define no OnModuleStart Script // the system will always use the default values #include "nui_i_main" #include "gzinc_daoctools" //Added these two to get buffer to work #include "x2_inc_switches" #include "x2_inc_restsys" #include "nwnx_webhook" #include "nwnx_weapon" #include "nwnx_damage" //:: AmonBot Webhook const string NWNX_DISCORD_URL = "/api/webhooks/1187525263693725706/oRFVnrx9qq7mxmpwOaslNgaQoaVAchTlK-NGFOHv4_2fJMdl-AIAVfpid8L_Lm3gs3Qq/slack"; void main() { SetMaxHenchmen(2); SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_NUI_EVENT, "mod_nui"); SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_PLAYER_TARGET, "mod_target"); SetEventScript(GetModule(), EVENT_SCRIPT_MODULE_ON_PLAYER_GUIEVENT, "mod_gui"); NUI(); //:: Bypasses & replaces Devastating Critical with 10x damage NWNX_Weapon_SetDevastatingCriticalEventScript("on_devcrit"); NWNX_Damage_SetAttackEventScript("on_attack"); if (GetGameDifficulty() == GAME_DIFFICULTY_CORE_RULES || GetGameDifficulty() == GAME_DIFFICULTY_DIFFICULT) { // * Setting the switch below will enable a seperate Use Magic Device Skillcheck for // * rogues when playing on Hardcore+ difficulty. This only applies to scrolls SetModuleSwitch (MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE); // * Activating the switch below will make AOE spells hurt neutral NPCS by default // SetModuleSwitch (MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE); } // * AI: Activating the switch below will make the creaures using the WalkWaypoint function // * able to walk across areas SetModuleSwitch (MODULE_SWITCH_ENABLE_CROSSAREA_WALKWAYPOINTS, TRUE); // * Spells: Activating the switch below will make the Glyph of Warding spell behave differently: // * The visual glyph will disappear after 6 seconds, making them impossible to spot // SetModuleSwitch (MODULE_SWITCH_ENABLE_INVISIBLE_GLYPH_OF_WARDING, TRUE); // * Craft Feats: Want 50 charges on a newly created wand? We found this unbalancing, // * but since it is described this way in the book, here is the switch to get it back... SetModuleSwitch (MODULE_SWITCH_ENABLE_CRAFT_WAND_50_CHARGES, TRUE); // * Craft Feats: Use this to disable Item Creation Feats if you do not want // * them in your module // SetModuleSwitch (MODULE_SWITCH_DISABLE_ITEM_CREATION_FEATS, TRUE); // * Palemaster: Deathless master touch in PnP only affects creatures up to a certain size. // * We do not support this check for balancing reasons, but you can still activate it... SetModuleSwitch (MODULE_SWITCH_SPELL_CORERULES_DMASTERTOUCH, TRUE); // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this // * did not fit into NWNs spell system and was confusing, so we took it out... // SetModuleSwitch (MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE); // * Epic Spellcasting: Some Epic spells feed on the liveforce of the caster. However this // * did not fit into NWNs spell system and was confusing, so we took it out... // SetModuleSwitch (MODULE_SWITCH_RESTRICT_USE_POISON_TO_FEAT, TRUE); // * Spellcasting: Some people don't like caster's abusing expertise to raise their AC // * Uncommenting this line will drop expertise mode whenever a spell is cast by a player SetModuleSwitch (MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE); // * Item Event Scripts: The game's default event scripts allow routing of all item related events // * into a single file, based on the tag of that item. If an item's tag is "test", it will fire a // * script called "test" when an item based event (equip, unequip, acquire, unacquire, activate,...) // * is triggered. Check "x2_it_example.nss" for an example. // * This feature is disabled by default. SetModuleSwitch (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE); if (GetModuleSwitchValue (MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE) { // * If Tagbased scripts are enabled, and you are running a Local Vault Server // * you should use the line below to add a layer of security to your server, preventing // * people to execute script you don't want them to. If you use the feature below, // * all called item scrips will be the prefix + the Tag of the item you want to execute, up to a // * maximum of 16 chars, instead of the pure tag of the object. // * i.e. without the line below a user activating an item with the tag "test", // * will result in the execution of a script called "test". If you uncomment the line below // * the script called will be "1_test.nss" // SetUserDefinedItemEventPrefix("1_"); } SetLocalInt(GetModule(), "X2_SWITCH_ENABLE_UMD_SCROLLS", TRUE); if (GetLocalInt(GetModule(),"T1_MODULE_RESPAWNSYSTEM_SETUP") ==0) SetupRespawnSystem(GetModule()); //:: AmonBot Announce NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, "Welcome to the World of Amon! [Server Loaded]", "AmonBot"); }