Initial Commit

Initial Commit.
This commit is contained in:
Jaysyn904
2025-09-14 15:40:46 -04:00
parent 7083b33d71
commit 1eefc84201
19230 changed files with 11539227 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
// Handles unlocking of a chest or door to give the player experience for
// unlocking it. The formula by default is 5xp * the DC (minus 10) of the chest minus
// 5 * the number of Rogue levels the PC has. Low-levels and non-rogues are
// rewarded more for excelling in lock-picking because it is easier for real
// rogues, who don't need to use potions or lockpicks to succeed.
#include "trgs_i0_respawn"
#include "prc_class_const"
void main()
{
object oPicked = OBJECT_SELF;
object oPicker = GetLastUnlocked();
string sOnce = "UNLOCK_DO_ONCE";
if ( !GetLocalInt( oPicked, sOnce ) )
{
object oPC = GetLastUnlocked();
int nThief = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
+ GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
+ GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
+ GetLevelByClass(CLASS_TYPE_NINJA, oPC)
+ GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
+ GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC)
+ GetLevelByClass(CLASS_TYPE_ARCTRICK, oPC)
+ GetLevelByClass(CLASS_TYPE_HANDOTWM, oPC)
+ GetLevelByClass(CLASS_TYPE_NIGHTSHADE, oPC)
+ GetLevelByClass(CLASS_TYPE_NINJA_SPY, oPC)
+ GetLevelByClass(CLASS_TYPE_SHADOWLORD, oPC)
+ GetLevelByClass(CLASS_TYPE_SHADOW_SUN_NINJA, oPC)
+ GetLevelByClass(CLASS_TYPE_SHADOW_THIEF_AMN, oPC)
+ GetLevelByClass(CLASS_TYPE_UNSEEN_SEER, oPC)
+ GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
int nDC = ( GetLockUnlockDC( oPicked ) - 10 );
if ( nDC < 10 )
nDC = 10;
int nXP = ( nDC * DEFAULT_UNLOCK_XP ) - ( nThief * DEFAULT_UNLOCK_XP );
if ( nXP < DEFAULT_UNLOCK_XP )
nXP = DEFAULT_UNLOCK_XP;
GiveXPToCreature( oPicker, nXP );
SetLocalInt( oPicked, sOnce, TRUE );
}
}