Tweaked XP onEnter script
Tweaked XP onEnter script. Updated release archive.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
22
_module/nss/hu_lvlup_pc.nss
Normal file
22
_module/nss/hu_lvlup_pc.nss
Normal 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);
|
||||
|
||||
}
|
Reference in New Issue
Block a user