RATDOG/_module/nss/tgdc_explore_inc.nss
Jaysyn904 9e1780d1bc Journal & quest persistence
Journal & quest persistence
2022-06-18 01:53:20 -04:00

75 lines
2.9 KiB
Plaintext

#include "pqj_inc"
//Checks to see if the player has been in the current area and
//if they have not, sends description and awards XP.
//oPC = Player nReveal: 1 = Reveals whole map - 0 = Does not - 2 Hides Map
//Info Type can be classed as the following:
void PlayerExplore(object oPC, int nReveal);
void PlayerExplore(object oPC, int nReveal)
{
if (!GetIsPC(oPC)) return;
if (nReveal == 1)ExploreAreaForPlayer(GetArea(oPC), oPC, TRUE);
if (nReveal == 2)ExploreAreaForPlayer(GetArea(oPC), oPC, FALSE);
//GET AREA DETAILS
object oArea = GetArea(oPC);
string sArea = GetTag(oArea);
//DATABASE FUNCTIONS GO HERE
int nHasExplored = GetCampaignInt("Exploring Athas", sArea, oPC);
if (nHasExplored == 1) return;
//AREAS START FROM HERE
//ADD ONE "if (sArea =="") FOR EACH AREA YOU WISH TO DESCRIBE
if (sArea == "ALT_ALTARUK")//THE VARIABLE USED IS THE TAG OF THE AREA
{
//EDIT THE XP GIVEN AND JOURNAL ENTRY ID NUMBER TO SUIT
AddPersistentJournalQuestEntry("Exploring Athas", 1, oPC, FALSE, FALSE);//ONLY CHANGE THE ID NUMBER
GiveXPToCreature(oPC, 20);//DEFAULT IS 10 XP
SetCampaignInt("Exploring Athas", sArea, 1, oPC);//DO NOT CHANGE THIS NUMBER
return;
}
if (sArea == "KLED_VILLAGE")//THE VARIABLE USED IS THE TAG OF THE AREA
{
//EDIT THE XP GIVEN AND JOURNAL ENTRY ID NUMBER TO SUIT
AddPersistentJournalQuestEntry("Exploring Athas", 2, oPC, FALSE, FALSE);//ONLY CHANGE THE ID NUMBER
GiveXPToCreature(oPC, 20);//DEFAULT IS 10 XP
SetCampaignInt("Exploring Athas", sArea, 1, oPC);//DO NOT CHANGE THIS NUMBER
return;
}
if (sArea == "TYR_CARAVANWAY")//THE VARIABLE USED IS THE TAG OF THE AREA
{
//EDIT THE XP GIVEN AND JOURNAL ENTRY ID NUMBER TO SUIT
AddPersistentJournalQuestEntry("Exploring Athas", 3, oPC, FALSE, FALSE);//ONLY CHANGE THE ID NUMBER
GiveXPToCreature(oPC, 10);//DEFAULT IS 10 XP
SetCampaignInt("Exploring Athas", sArea, 1, oPC);//DO NOT CHANGE THIS NUMBER
return;
}
if (sArea == "URIK_OBSIDGATE")//THE VARIABLE USED IS THE TAG OF THE AREA
{
//EDIT THE XP GIVEN AND JOURNAL ENTRY ID NUMBER TO SUIT
AddPersistentJournalQuestEntry("Exploring Athas", 4, oPC, FALSE, FALSE);//ONLY CHANGE THE ID NUMBER
GiveXPToCreature(oPC, 30);//DEFAULT IS 10 XP
SetCampaignInt("Exploring Athas", sArea, 1, oPC);//DO NOT CHANGE THIS NUMBER
return;
}
if (sArea == "SilverSpringsOasis")//THE VARIABLE USED IS THE TAG OF THE AREA
{
//EDIT THE XP GIVEN AND JOURNAL ENTRY ID NUMBER TO SUIT
AddPersistentJournalQuestEntry("Exploring Athas", 5, oPC, FALSE, FALSE);//ONLY CHANGE THE ID NUMBER
GiveXPToCreature(oPC, 40);//DEFAULT IS 10 XP
SetCampaignInt("Exploring Athas", sArea, 1, oPC);//DO NOT CHANGE THIS NUMBER
return;
}
return;
}
//void main(){}