Tweaked XP onEnter script

Tweaked XP onEnter script.  Updated release archive.
This commit is contained in:
Jaysyn904
2024-01-26 10:05:19 -05:00
parent b3f2be61a7
commit a0fa1baf2b
10 changed files with 76 additions and 677 deletions

View File

@@ -3,13 +3,20 @@
void main()
{
//:: Declare major variables
object oPC = GetEnteringObject();
object oPC = GetEnteringObject();
string sTag = GetTag(OBJECT_SELF);
int iXP = GetXP(oPC);
int iParty = GetNumberPartyMembers(oPC);
//:: XP boost is only availible to new characters
if (iXP > 0 ) return;
if (iParty >= 2)
return;
//:: Make sure they can only get the boost once
if (GetLocalInt(oPC, sTag) >= 1) return;
GiveXPToCreature(oPC, 60000);
//:: Set variable on PC for XP boost.
SetLocalInt(oPC, sTag, 1);
//ActionStartConversation(oPC, "ho_lvlup_pc", TRUE, FALSE);
BeginConversation("ho_lvlup_pc", oPC);
}

View File

@@ -0,0 +1,22 @@
#include "x0_i0_partywide"
void main()
{
//:: Declare major variables
object oPC = GetEnteringObject();
string sTag = GetTag(OBJECT_SELF);
int iXP = GetXP(oPC);
//:: XP boost is only availible to new characters
if (iXP > 0 ) return;
//:: Make sure they can only get the boost once
if (GetLocalInt(oPC, sTag) >= 1) return;
GiveXPToCreature(oPC, 60000);
//:: Set variable on PC for XP boost.
SetLocalInt(oPC, sTag, 1);
}