const string NWNX_DISCORD_URL = "/api/webhooks/910201866284044318/r05Nuv82NgsY5R4-cAKxWw4UWRrec4RUoly-T1FupT4df8UPW-bGcWwj7vBXBOZvkPAi/slack"; #include "prc_inc_racial" //#include "journal_include" #include "pqj_inc" #include "inc_examine" #include "inc_gennui" #include "nwnx_webhook" #include "dmfi_init_inc" void GiveLangTokens(object oPC) { // Give class based language items if( GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 2 ) { if ( GetItemPossessedBy(oPC, "hlslang_108") == OBJECT_INVALID ) // Druidic { DelayCommand(1.0, FloatingTextStringOnCreature("Druidic language token acquired.", oPC)); CreateItemOnObject("hlslang_108", oPC); } } if( GetLevelByClass(CLASS_TYPE_ROGUE, oPC) >= 2 ) { if ( GetItemPossessedBy(oPC, "hlslang_9") == OBJECT_INVALID ) // Thieve's Cant { DelayCommand(1.0, FloatingTextStringOnCreature("Thieve's Cant token acquired.", oPC)); CreateItemOnObject("hlslang_9", oPC); } } // Give race based language tokens // TODO: Expand for PRC races. if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_ELF ) { // DelayCommand(0.5, AdjustReputation(oPC, GetObjectByTag("FACTION_ATHAS_SILVERHAND"), 90)); // Adjust faction reputation if ( GetItemPossessedBy(oPC, "hlslang_1") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Elven language token acquired.", oPC)); CreateItemOnObject("hlslang_1", oPC); } } if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFELF ) { if ( GetItemPossessedBy(oPC, "hlslang_1") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Elven language token acquired.", oPC)); CreateItemOnObject("hlslang_1", oPC); } } if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_DWARF ) { // DelayCommand(0.5, AdjustReputation(oPC, GetObjectByTag("ATHAS_FACTION_KLED"), 90)); // Adjust faction reputation if ( GetItemPossessedBy(oPC, "hlslang_4") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Dwarven language token acquired.", oPC)); CreateItemOnObject("hlslang_4", oPC); } } if( MyPRCGetRacialType(oPC) == RACIAL_TYPE_HALFLING ) { if ( GetItemPossessedBy(oPC, "hlslang_3") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Halfling language token acquired.", oPC)); CreateItemOnObject("hlslang_3", oPC); } } if( MyPRCGetRacialType(oPC) == 199 ) // Air Genasi { SetColor ( oPC, COLOR_CHANNEL_SKIN, 020); if ( GetItemPossessedBy(oPC, "hlslang_101") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Auran language token acquired.", oPC)); CreateItemOnObject("hlslang_101", oPC); } } if( MyPRCGetRacialType(oPC) == 200 ) // Earth Genasi { SetColor ( oPC, COLOR_CHANNEL_SKIN, 118); if ( GetItemPossessedBy(oPC, "hlslang_102") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Terran language token acquired.", oPC)); CreateItemOnObject("hlslang_102", oPC); } } if( MyPRCGetRacialType(oPC) == 202 ) // Fire Genasi { SetColor ( oPC, COLOR_CHANNEL_SKIN, 103); if ( GetItemPossessedBy(oPC, "hlslang_104") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Ignan language token acquired.", oPC)); CreateItemOnObject("hlslang_104", oPC); } } if( MyPRCGetRacialType(oPC) == 205 ) // Water Genasi { SetColor ( oPC, COLOR_CHANNEL_SKIN, 141); if ( GetItemPossessedBy(oPC, "hlslang_103") == OBJECT_INVALID ) { DelayCommand(1.0, FloatingTextStringOnCreature("Aquan language token acquired.", oPC)); CreateItemOnObject("hlslang_103", oPC); } } } void main() { //:: Set Major Variables object oPC = GetEnteringObject(); string sPlayerName = GetName(oPC); //:: NUI Magic by Daz //Examine_DisablePanels(oPC); PrintString(GetObjectUUID(oPC)); //:: Restore jounral entries RebuildJournalQuestEntries(oPC); //:: Add system journal entries AddPersistentJournalQuestEntry("JRNL_XPCHART", 1, oPC); AddPersistentJournalQuestEntry("JRNL_LA_BUYOFF", 1, oPC); AddPersistentJournalQuestEntry("JRNL_PRC8", 1, oPC); //:: Announce player string sMessage = sPlayerName+ " has entered the Lost Lands."; NWNX_WebHook_SendWebHookHTTPS("discordapp.com", NWNX_DISCORD_URL, sMessage, "Orcus"); // Make sure PC isn't set to Plot, for reasons SetPlotFlag(oPC, FALSE); // Reset PC size SetObjectVisualTransform(oPC, OBJECT_VISUAL_TRANSFORM_SCALE, 1.0f); // Initialize DMFI dmfiInitialize(oPC); // Begin BESIE Spawn System int bBESIEWidget; if(GetIsDM(oPC)) { SetLocalInt(GetModule(), "re_" + GetPCPlayerName(oPC), TRUE); object oItem = GetFirstItemInInventory(oPC); while(GetIsObjectValid(oItem)) { if(GetTag(oItem) == "BESIEWidget") bBESIEWidget = TRUE; oItem = GetNextItemInInventory(oPC); } if(!bBESIEWidget) CreateItemOnObject("besiewidget", oPC); } else DeleteLocalInt(GetModule(), "re_" + GetName(oPC)); // End BESIE Spawn System }