Okay downloaded Shayans engine BUT after following the instructions carefully it simply doesnt work! THe onenterclient script doesnt compile after I added the Shayan onenter script....
what must I do to solve this? Here is the script I tried to compile....though it keeps giving me a permanent duplication error...
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//:::::::::::::::::::::::: Shayan's Subrace Engine::::::::::::::::::::::::::::::
//:::::::::::::::::File Name: sha_on_cl_enter ::::::::::::::::::::::::::::::::::
//::::::::::::::::::::: OnClientEnter script :::::::::::::::::::::::::::::::::::
//:: Written By: Shayan.
//:: Contact: mail_shayan@yahoo.com
//
// Description: This script is used to check, and load or reload all the subracial
// properties on the PC entering the Module.
#include "sha_subr_methds"
void main()
{
SubraceOnClientEnter();
}
//:://////////////////////////////////////
// Persistent Journal Include Script.
//:://////////////////////////////////////
// _pw_journal_inc
//
// This version uses an item token carried by the player for persistent storage of
// the journal variables.
//:://////////////////////////////////////
#include "nw_i0_plot"
const string PERSISTENT_JOURNAL_TOKEN_TAG = "dmfi_pc_dicebag";
const string PERSISTENT_JOURNAL_TOKEN_RESREF = "dmfi_pc_dicebag";
//:://////////////////////////////////////
// object GetPersistentJournalToken( object oPC)
// Returns the persistent journal token item carried by the specified player. If the
// player specified is invalid it returns OBJECT_INVALID. If the player is not carrying
// a persistent journal token item, one is created on him and it is returned.
//:://////////////////////////////////////
// Parameters: object oPC - the player to retrieve the token from.
//
// Returns: OBJECT_INVALID if oPC is not a valid PC. Otherwise returns the persistent
// token item he is carrying or the one created on him if he didn't have one.
//:://////////////////////////////////////
object GetPersistentJournalToken( object oPC);
object GetPersistentJournalToken( object oPC)
{ if( !GetIsPC( oPC)) return OBJECT_INVALID;
object oPJToken = (HasItem( oPC, PERSISTENT_JOURNAL_TOKEN_TAG) ? GetItemPossessedBy( oPC, PERSISTENT_JOURNAL_TOKEN_TAG) : CreateItemOnObject( PERSISTENT_JOURNAL_TOKEN_RESREF, oPC, 1));
if( GetIsObjectValid( oPJToken))
{ SetItemCursedFlag( oPJToken, TRUE);
SetPlotFlag( oPJToken, TRUE);
}
return oPJToken;
}
//:://////////////////////////////////////
// void AddPersistentJournalQuestEntry( string sCategoryTag, int nEntryID, object oPC, int bAllPartyMembers = TRUE, int bAllPlayers = FALSE, int bAllowOverrideHigher = FALSE)
// Add a journal entry to a player using the persistent journal system. Works exactly
// like AddJournalQuestEntry.
//:://////////////////////////////////////
// Parameters: string sCategoryTag - the journal category tag.
// int nEntryID - the journal entry ID.
// object oPC - the player to have his journal updated.
// int bAllPartyMembers - TRUE to add the entry to oPC's entire party.
// FALSE to add the entry to oPC only.
// int bAllPlayers - TRUE to add the entry to all PCs in the module.
// FALSE to add the entry to oPC only.
// int bAllowOverrideHigher - TRUE overrides restriction that nState must be > current Journal Entry.
// FALSE enforces restriction that nState must be > current Journal Entry.
//
// Returns: None.
//:://////////////////////////////////////
void AddPersistentJournalQuestEntry( string sCategoryTag, int nEntryID, object oPC, int bAllPartyMembers = FALSE, int bAllPlayers = FALSE, int bAllowOverrideHigher = FALSE);
void AddPersistentJournalQuestEntry( string sCategoryTag, int nEntryID, object oPC, int bAllPartyMembers = FALSE, int bAllPlayers = FALSE, int bAllowOverrideHigher = FALSE)
{ if( (sCategoryTag == "") || (nEntryID < 0) || !GetIsPC( oPC)) return;
object oPJToken = GetPersistentJournalToken( oPC);
if( !GetIsObjectValid( oPJToken)) return;
if( bAllPlayers)
{ object oPlayer = GetFirstPC();
while( GetIsPC( oPlayer))
{ AddPersistentJournalQuestEntry( sCategoryTag, nEntryID, oPlayer, FALSE, FALSE, bAllowOverrideHigher);
oPlayer = GetNextPC();
}
}
else if( bAllPartyMembers)
{ object oParty = GetFirstFactionMember( oPC);
while( GetIsObjectValid( oParty ))
{ AddPersistentJournalQuestEntry( sCategoryTag, nEntryID, oParty, FALSE, FALSE, bAllowOverrideHigher);
oParty = GetNextFactionMember( oPC);
}
}
else
{ AddJournalQuestEntry( sCategoryTag, nEntryID, oPC, bAllPartyMembers, bAllPlayers, bAllowOverrideHigher);
int iEntry = GetLocalInt( oPC, "NW_JOURNAL_ENTRY" +sCategoryTag);
if( iEntry)
{ SetLocalInt( oPJToken, "NW_JOURNAL_ENTRY" +sCategoryTag, iEntry);
string sCategories = GetLocalString( oPJToken, "NW_JOURNAL_CATEGORIES");
string sSearch = sCategories;
while( sSearch != "")
{ int iPos = FindSubString( sSearch, "~#~");
switch( iPos)
{ case -1: if( sSearch == sCategoryTag) return;
sSearch = "";
break;
case 0: sSearch = GetStringRight( sSearch, GetStringLength( sSearch) -3);
break;
default: if( GetStringLeft( sSearch, iPos) == sCategoryTag) return;
sSearch = GetStringRight( sSearch, GetStringLength( sSearch) -(iPos +3));
break;
}
}
sCategories += ((sCategories == "") ? "" : "~#~") +sCategoryTag;
SetLocalString( oPJToken, "NW_JOURNAL_CATEGORIES", sCategories);
}
else DeleteLocalInt( oPJToken, "NW_JOURNAL_ENTRY" +sCategoryTag);
}
}
//:://////////////////////////////////////
// void RemovePersistentJournalQuestEntry( string sCategoryTag, object oPC, int bAllPartyMembers = TRUE, int bAllPlayers = FALSE)
// Removes a journal entry from a player using the persistent journal system. Works
// exactly like RemoveJournalQuestEntry.
//:://////////////////////////////////////
// Parameters: string sCategoryTag - the journal category tag.
// int nEntryID - the journal entry ID.
// object oPC - the player to have his journal updated.
// int bAllPartyMembers - TRUE to remove the entry from oPC's entire party.
// FALSE to remove the entry from oPC only.
// int bAllPlayers - TRUE to remove the entry from all PCs in the module.
// FALSE to remove the entry from oPC only.
//
// Returns: None.
//:://////////////////////////////////////
void RemovePersistentJournalQuestEntry( string sCategoryTag, object oPC, int bAllPartyMembers = TRUE, int bAllPlayers = FALSE);
void RemovePersistentJournalQuestEntry( string sCategoryTag, object oPC, int bAllPartyMembers = TRUE, int bAllPlayers = FALSE)
{ if( (sCategoryTag == "") || !GetIsPC( oPC)) return;
object oPJToken = GetPersistentJournalToken( oPC);
if( !GetIsObjectValid( oPJToken)) return;
if( bAllPlayers)
{ object oPlayer = GetFirstPC();
while( GetIsPC( oPlayer))
{ RemovePersistentJournalQuestEntry( sCategoryTag, oPlayer, FALSE, FALSE);
oPlayer = GetNextPC();
}
}
else if( bAllPartyMembers)
{ object oParty = GetFirstFactionMember( oPC);
while( GetIsObjectValid( oParty))
{ RemovePersistentJournalQuestEntry( sCategoryTag, oParty, FALSE, FALSE);
oParty = GetNextFactionMember( oPC);
}
}
else
{ RemoveJournalQuestEntry( sCategoryTag, oPC, bAllPartyMembers, bAllPlayers);
DeleteLocalInt( oPC, "NW_JOURNAL_ENTRY" +sCategoryTag);
DeleteLocalInt( oPJToken, "NW_JOURNAL_ENTRY" +sCategoryTag);
string sCategories = GetLocalString( oPJToken, "NW_JOURNAL_CATEGORIES");
int iPos = FindSubString( sCategories, "~#~" +sCategoryTag +"~#~");
if( iPos == -1)
{ iPos = FindSubString( sCategories, sCategoryTag +"~#~");
if( iPos == -1)
{ iPos = FindSubString( sCategories, "~#~" +sCategoryTag);
if( iPos == -1) sCategories = ((sCategories == sCategoryTag) ? "" : sCategories);
else sCategories = GetStringLeft( sCategories, iPos);
}
else sCategories = GetStringRight( sCategories, GetStringLength( sCategories) -(GetStringLength( sCategoryTag) +3));
}
else sCategories = GetStringLeft( sCategories, iPos) +GetStringRight( sCategories, GetStringLength( sCategories) -(GetStringLength( sCategoryTag) +3));
if( sCategories == "") DeleteLocalString( oPJToken, "NW_JOURNAL_CATEGORIES");
else SetLocalString( oPJToken, "NW_JOURNAL_CATEGORIES", sCategories);
}
}
//:://////////////////////////////////////
// void RestorePersistentJournal( object oPC)
// Restores a players journal by adding all his journal entries saved on the
// persistent journal token.
//:://////////////////////////////////////
// Parameters: object oPC - the player to have his journal updated.
//
// Returns: None.
//:://////////////////////////////////////
void RestorePersistentJournal( object oPC);
void RestorePersistentJournal( object oPC)
{ if( !GetIsPC( oPC)) return;
object oPJToken = GetPersistentJournalToken( oPC);
if( !GetIsObjectValid( oPJToken)) return;
string sCategories = GetLocalString( oPJToken, "NW_JOURNAL_CATEGORIES");
while( sCategories != "")
{ string sCategory = "";
int iPos = FindSubString( sCategories, "~#~");
switch( iPos)
{ case -1: sCategory = sCategories;
sCategories = "";
break;
case 0: sCategories = GetStringRight( sCategories, GetStringLength( sCategories) -3);
break;
default: sCategory = GetStringLeft( sCategories, iPos);
sCategories = GetStringRight( sCategories, GetStringLength( sCategories) -(iPos +3));
break;
}
if( sCategory != "")
{ int nEntry = GetLocalInt( oPJToken, "NW_JOURNAL_ENTRY" +sCategory);
AddJournalQuestEntry( sCategory, nEntry, oPC, FALSE, FALSE, TRUE);
}
}
}
// OnClientEnter
//#include "_pw_journal_inc"
//
//void main()
//{ object oEntering = GetEnteringObject();
// if( !GetIsObjectValid( oEntering)) return;
//
// RestorePersistentJournal( oEntering);
//}
void DisableAllPrestigeclasses(object oPC, int bExistingToo=FALSE)
{
if(bExistingToo || GetLevelByclass(class_TYPE_SHADOWDANCER,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowShadow",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_HARPER,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowHarper",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_ARCANE_ARCHER,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowArcher",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_ASSASSIN,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowAsasin",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_BLACKGUARD,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowBlkGrd",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_DIVINE_CHAMPION,oPC) < 1)
{
SetLocalInt(oPC,"X2_AllowDivcha",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_WEAPON_MASTER,oPC) < 1)
{
SetLocalInt(oPC,"X2_AllowWM",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_PALE_MASTER,oPC) < 1)
{
SetLocalInt(oPC,"X2_AllowPalema",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_SHIFTER,oPC) < 1)
{
SetLocalInt(oPC,"X2_AllowShiftr",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_DWARVEN_DEFENDER,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowDwDef",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_DRAGON_DISCIPLE,oPC) < 1)
{
SetLocalInt(oPC,"X1_AllowDrDis",1);
}
if(bExistingToo || GetLevelByclass(class_TYPE_PURPLE_DRAGON_KNIGHT,oPC) < 1)
{
SetLocalInt(oPC,"DLA_AllowPDK",1);
}
}
void main()
{
ExecuteScript ("cnr_module_oce", OBJECT_SELF);
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
DelayCommand(1000.0, SendMessageToPC(oPC, "For more information, requests or more go to
http://theforgotteni...freeforums.org. Have fun!"));
}
please I really need help with this!