Added XP Chart & LA Buy-off journal entries. Added release archive & folder. Full compile.
94 lines
2.9 KiB
Plaintext
94 lines
2.9 KiB
Plaintext
#include "lod_include"
|
|
#include "nw_i0_plot"
|
|
|
|
string sLevels;
|
|
int FindPreviousLevel( string sVar )
|
|
{
|
|
string sTmp;
|
|
int iPos = FindSubString( sLevels, sVar );
|
|
if ( iPos > -1 )
|
|
{
|
|
iPos += GetStringLength( sVar);
|
|
while ( GetSubString( sLevels, iPos, 1 ) != ";" )
|
|
sTmp += GetSubString( sLevels, iPos++, 1 );
|
|
if ( sTmp != "" )
|
|
{
|
|
return StringToInt( sTmp );
|
|
}
|
|
}
|
|
return -100;
|
|
}
|
|
|
|
void main()
|
|
{
|
|
object oEnteringPlayer = GetEnteringObject();
|
|
|
|
int bIsDead = GetCampaignInt("p_death","is_dead",oEnteringPlayer);
|
|
int bAlreadyJoinedThisReset = GetLocalInt(oEnteringPlayer, "alreadyJoined");
|
|
|
|
string sIP = GetPCIPAddress(oEnteringPlayer);
|
|
WriteTimestampedLogEntry(sIP);
|
|
|
|
if(!bAlreadyJoinedThisReset)
|
|
{
|
|
FloatingTextStringOnCreature("Please Read your Rules!", oEnteringPlayer, FALSE);
|
|
|
|
// Add Journal entries
|
|
AddJournalQuestEntry("rules1", 1, oEnteringPlayer, FALSE, FALSE, FALSE);
|
|
AddJournalQuestEntry("rules2", 1, oEnteringPlayer, FALSE, FALSE, FALSE);
|
|
AddJournalQuestEntry("BannedList", 1, oEnteringPlayer, FALSE, FALSE, FALSE);
|
|
AddJournalQuestEntry("forum", 1, oEnteringPlayer, FALSE, FALSE, FALSE);
|
|
AddJournalQuestEntry("xprules", 1, oEnteringPlayer, FALSE, FALSE, FALSE);
|
|
AddJournalQuestEntry("lvl_adj", 1, oEnteringPlayer, FALSE, FALSE, FALSE);
|
|
}
|
|
|
|
// This is to relate to the new check for the 5k gold for new char
|
|
if (GetXP(oEnteringPlayer) == 0)
|
|
{
|
|
GiveGoldToCreature(oEnteringPlayer, 5000);
|
|
GiveXPToCreature(oEnteringPlayer, 1);
|
|
}
|
|
|
|
string sName = GetPCPlayerName(oEnteringPlayer);
|
|
|
|
//SoulFlame - Added to simplify the DM check function. DM's should be added in
|
|
// the IsLodDM function of elv_guildchecker
|
|
if(IsLodDM(sName))
|
|
{
|
|
SetLocalInt(oEnteringPlayer, "IsDm", TRUE);
|
|
}
|
|
|
|
SetLocalInt(oEnteringPlayer, "sBleeding", TRUE);
|
|
|
|
if(bIsDead == TRUE)
|
|
{
|
|
ApplyPenalty(oEnteringPlayer);
|
|
SetCampaignInt("p_death","is_dead",FALSE,oEnteringPlayer);
|
|
|
|
if(bAlreadyJoinedThisReset)
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectDamage(GetCurrentHitPoints(oEnteringPlayer), DAMAGE_TYPE_DIVINE), oEnteringPlayer);
|
|
}
|
|
|
|
if(!bAlreadyJoinedThisReset)
|
|
SetLocalInt(oEnteringPlayer, "alreadyJoined", TRUE);
|
|
|
|
//Balance Hide
|
|
//Ba'al
|
|
|
|
|
|
|
|
int index, iLev, iCurLev;
|
|
sLevels = GetCampaignString( "mycampaign", GetPCPlayerName( oEnteringPlayer ) + GetName( oEnteringPlayer ) + "Levels" );
|
|
if ( sLevels != "" )
|
|
{
|
|
iCurLev = GetCurrentHitPoints( oEnteringPlayer );
|
|
iLev = FindPreviousLevel( "HP=" );
|
|
|
|
if ( iLev > -100 && iCurLev > iLev )
|
|
{
|
|
effect eDamage = EffectDamage( iCurLev - iLev, DAMAGE_TYPE_DIVINE, DAMAGE_POWER_ENERGY );
|
|
ApplyEffectToObject( DURATION_TYPE_INSTANT, eDamage, oEnteringPlayer );
|
|
}
|
|
}
|
|
}
|