Author Topic: Probably basic but im lost  (Read 15706 times)

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Probably basic but im lost
« on: March 04, 2008, 12:13:28 PM »
Ok so i didnt see anyone else asking this question so its probably something stupidly easy that I just cant figure out.

how do you remove cloaks besides just not having your Character wear one?


second question:
need to make a DM spell rather it be from and item or an altered spell its self that when cast will completely cure or all statues problems and  treat them as if rested reston spells and uses of items. so something like uber greater restore or something

-Cal

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #1 on: March 04, 2008, 01:49:00 PM »
Ok so i didnt see anyone else asking this question so its probably something stupidly easy that I just cant figure out.

how do you remove cloaks besides just not having your Character wear one?
No way to do this in 1.68.

However, there will be two options to turn off cloaks in 1.69:

1. Use the Null cloak model.

2. Turn off all cloaks (only for you) by setting a variable in the nwnplayer.ini file:

  [Game Options]
    Visible Cloaks=0

second question:
need to make a DM spell rather it be from and item or an altered spell its self that when cast will completely cure or all statues problems and  treat them as if rested reston spells and uses of items. so something like uber greater restore or something

-Cal
This can either be done with an item by enabling item-based scripting in the module or it can replace a spell by using the spellhook system to check if the caster is a DM. I can send you basic instructions for how to set up either of the two systems and write the scripts for you.

What module is this for?

-420

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #2 on: March 04, 2008, 02:30:18 PM »
Thats fine about the cloaks I need it mainly because i like to make clothes ( as every one knows) and its gettign in teh way considering I can alter the colors for them in game with dyes!.

I would prefer it to be a spell considering items don't work on PCs that would be in action like fighting or crafting so on causing the item to say the player is currently busy

I have a rather confusing spellhook system running at the moment so if you have msn or something of that nature you could PM me your name so I can go over it with you from there unless you would like me to copy and past it into the PM section or here for ya lol

-cal

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Re: Probably basic but im lost
« Reply #3 on: March 04, 2008, 02:34:28 PM »
Email? PM?

Share information with everyone!

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #4 on: March 04, 2008, 02:44:26 PM »
Edit because the code was just to long.

See my next post for .erf file


-Cal
« Last Edit: March 05, 2008, 09:35:34 AM by Calia »

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #5 on: March 04, 2008, 03:54:19 PM »
I would prefer it to be a spell considering items don't work on PCs that would be in action like fighting or crafting so on causing the item to say the player is currently busy
Heh, my DM items don't do that. I suspect that has to do with how the tag-based script is set up.

What spell would you like replaced? I'll whip up a script after lunch, post it, and tell you were it goes in that monster of a spellhook script.

-420

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #6 on: March 05, 2008, 09:33:53 AM »
Ok it was brought to my attention that the script cut off at the end so im adding the .erf for the file.

420 if your DM items don't do that I would love to use somthing like that that I could also use while logged in as a player. so spell wise I would prefer Greater Restoration if making an item ends up being to much :)

So a quick overview:I am trying to get this to work using a token system used to house the guilds, to my knowledge it is pretty well set up but I have not had the chance to test it completely if they are working.

things I need to fix that seem to be beyond me:
  • Damage and durations raised for those with proper token ( TokenoftheMagi, ThornToken)
  • Heal,Mass heal, Greater Restore, Harm to do 10 per-caster so that it tops off at 400 for those with a TokenoftheKnights,SkullToken.
  • I need be sure that only those with a TokenoftheMagi, ThornToken can use epic spells
  • That only those with a TokenoftheMagi can cast Mords, and Time stop

And last but not least while I know it might be asking alot notes on how the changes were made or somthign of that nature would be great so I can learn :D

thx so much

-Cal

[attachment deleted by admin]
« Last Edit: March 05, 2008, 11:39:11 AM by Calia »

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #7 on: March 10, 2008, 09:19:20 PM »
Sorry, been a bit busy last week.

I added a couple lines to the spellhook script (1375-1380) that adds an auto-rest effect to the target when a DM casts Greater Restoration. Let me know if it's what you're looking for. If so I'll create a tag-based item and script as an alternate.

-420

[attachment deleted by admin]
« Last Edit: March 10, 2008, 09:30:15 PM by 420 »

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Re: Probably basic but im lost
« Reply #8 on: March 10, 2008, 09:27:12 PM »
On another note I just spent the past 2 hours digging my car out of 3 feet of snow.  I'm probably spamming some otherwise intelligent topic but I'm too delirious right now to care.  Just wanted to announce that global "warming" is a scam.

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #9 on: March 10, 2008, 09:32:20 PM »
Just wanted to announce that global "warming" is a scam.
Heh, that's because it's "global climate destabilization" get with the times man, this isn't 2006.

-420

Offline Mo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
    • MSN Messenger - cochy@msn.com
    • View Profile
    • http://lucidmagic.net
    • Email
Re: Probably basic but im lost
« Reply #10 on: March 10, 2008, 09:48:22 PM »
Heh, that's because it's "global climate destabilization" get with the times man, this isn't 2006.

-420

Well it certainly is destabilized.  For those keeping track, we've had a total of 350cm of snow up until yesterday.  For you Americans that's 12 feet.  Yes, enough to bury two men standing on each others heads.  More than the past 2-3 years combined.

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #11 on: March 11, 2008, 10:26:36 AM »
That worked perfectly 420 :D your my hero hehe an item will be great im gonna attempt to make some of my DM tools usable as PC, along with a couple other items im trying to make :D i wish i could pull all the tag based stuff but i think its more tied into everything on the mod. then i even know considering the guild stuff I would much rather set up some type of database to handle guild factions and spell stuff though im almost tempted to just rework the spell script to up the damages and such for anyone not just guild members unless i make it go public


Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #12 on: March 11, 2008, 02:36:58 PM »
Here is the script for the item. I just cut and paste the section from the spellhook script and changed the target to work with tag-based items.

If you run into the problem where it won't work on PC's that are "busy" then I suspect it has something to do with the script "_kw_activate" which is called before the tag-based item script.

NOTE: Make an item with the same tag as the name of this script (whatever you choose to call it). The item should have the item property "Cast Spell: Activate Item (Long Range) [Unlimited Uses a Day]" on it.
Code: [Select]
//Script for a tag-based item that heals/rests target
//NOTE: The script name should match the tag of the item
//Created by 420 on 3/10/08

void main()
{
object oTarget = GetItemActivatedTarget();


        //All of the following was taken from 02_rokspellhook -420
        effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);

        effect eBad = GetFirstEffect(oTarget);
        //Search for negative effects
        while(GetIsEffectValid(eBad))
        {
            if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
                GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
                GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
                GetEffectType(eBad) == EFFECT_TYPE_CURSE ||
                GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
                GetEffectType(eBad) == EFFECT_TYPE_POISON ||
                GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
                GetEffectType(eBad) == EFFECT_TYPE_CHARMED ||
                GetEffectType(eBad) == EFFECT_TYPE_DOMINATED ||
                GetEffectType(eBad) == EFFECT_TYPE_DAZED ||
                GetEffectType(eBad) == EFFECT_TYPE_CONFUSED ||
                GetEffectType(eBad) == EFFECT_TYPE_FRIGHTENED ||
                GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL ||
                GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
                GetEffectType(eBad) == EFFECT_TYPE_SLOW ||
                GetEffectType(eBad) == EFFECT_TYPE_STUNNED ||
                // Stealth: added petrification, silence and sleep removal
                GetEffectType(eBad) == EFFECT_TYPE_PETRIFY ||
                GetEffectType(eBad) == EFFECT_TYPE_SILENCE ||
                GetEffectType(eBad) == EFFECT_TYPE_SLEEP)
            {
                RemoveEffect(oTarget, eBad);
            }
            eBad = GetNextEffect(oTarget);
        }

        //Stealth: modified full heal effect to only heal up to 100 HP
        if(GetRacialType(oTarget) != RACIAL_TYPE_UNDEAD)
        {
            //Apply the VFX impact and effects
            int nHeal = GetMaxHitPoints(oTarget) - GetCurrentHitPoints(oTarget);
            if (nHeal > 250) nHeal = 250;
            effect eHeal = EffectHeal(nHeal);
            ApplyEffectToObject(DURATION_TYPE_INSTANT, eHeal, oTarget);
        }

        //Modified by 420 on 3/10/08
        //DM Greater Restoration autorests target
        if(GetIsDM(OBJECT_SELF))
        {
        ForceRest(oTarget);
        }

        //Fire cast spell at event for the specified target
        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GREATER_RESTORATION, FALSE));
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
}

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #13 on: March 11, 2008, 03:56:15 PM »
Here is a very simple script that will toggle your appearance between "Human" and your "original" appearance. I say "simple" because it's very easy to break if you do something like polymorph before hand or your form is already human. For instance, I haven't tested this script out at all but I suspect that if you start out as a human and use this item it will turn you into a dwarf.

To make it an elf just copy the script and replace the two instances of APPEARANCE_TYPE_HUMAN with APPEARANCE_TYPE_ELF.

NOTE: Make an item with the same tag as the name of this script. The item should have the property "Cast Spell: Unique Power Self Only [Unlimited Uses a Day]" on it.
Code: [Select]
//Tag-based item script that will toggle between current appearance and Human
//Created by 420 on 3/10/08

void main()
{
object oPC = GetItemActivator();
object oItem = GetItemActivated();
int iForm = GetAppearanceType(oPC);

//Apply Human appearance if not currently Human
//Otherwise convert to "original" appearance
if(iForm != APPEARANCE_TYPE_HUMAN)
    {
    SetLocalInt(oPC, "TrueForm", iForm);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POLYMORPH), oPC);
    SetCreatureAppearanceType(oPC, APPEARANCE_TYPE_HUMAN);
    }
else
    {
    iForm = GetLocalInt(oPC, "TrueForm");
    ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_POLYMORPH), oPC);
    SetCreatureAppearanceType(oPC, iForm);
    }
}

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #14 on: March 12, 2008, 10:27:51 PM »
Thank you so much 420! these are perfect :D I will continue to work on the other things and hope you don't mind if I bounce questiosn off you here and there :)

-Cal

Offline Calia

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Email
Re: Probably basic but im lost
« Reply #15 on: March 14, 2008, 12:00:49 AM »
OK hope this is my last request for a while i think 420 might attempt to have me murdered at the rate i been going lol >.<,

Attempting to use Shayan's subrace engine with the leto NWNX2 stuff going, I have coded the custom subrace and everything but nothign seems to happen I have pasted the same code int the demo mod that came with the .rar file i have  and it worked perfectly....... so its some where I had been merging the needed liens of code into my best guess is its either in my onenter or my Onmodload  sections.

Onenter
Code: [Select]
#include "dl_magic"
#include "__kw_io_func"
#include "sha_subr_methds"
#include "tomkin_database"
#include "include_thrall"

int EnforceBan( object oPC );
int ExamineNumPlayers( object oPC );
string GetClass( object oPC );
string GetRace( object oPC );
void LogEntry( object oPC );

string SCHIBICD = "";
string STOMKINCD = "";


// Check for associates the PC may have created
void CheckForAssociates( object oPC );

void CheckForAssociates( object oPC )
{
    // Set a spcial variable on the server itself to take into account server
    // reboots where thralls may spawn over the life of the server!
    // SetLocalInt( GetModule(), GetPCPublicCDKey( oPC ) + "Thrall", 1 );
    // DBSaveString( "ThrallMaster", GetPCPublicCDKey( oPC ) + GetStringLeft( GetName( oPC ), 10 ), oPC );

    // Check to see if the PC has created an associate
    string sThrallCheck = DBGetString( "ThrallMaster", oPC );

    if( sThrallCheck != "" )
    {
        // Associate exists, let's see if the server has reset. This event
        // will be signified by a stored variable on the server itself. If
        // the variable is not found, then the PCs thrall needs to be recreated.
        int nThrall = GetLocalInt( GetModule(), GetPCPublicCDKey( oPC ) + "Thrall" );
        location locPC = DBGetLocation( "LOCATION", oPC );

        // PCs thrall still exists on the server somewhere, do not recreate!
        if( nThrall == 1 ) return;

        // Get all the values from the PCs database
        string sMaster = DBGetString( "ThrallMaster", oPC );
        string sType = DBGetString( "ThrallType", oPC );
        string sBones1 = DBGetString( "ThrallBones1Res", oPC );
        string sBones2 = DBGetString( "ThrallBones2Res", oPC );
        string sSkull = DBGetString( "ThrallSkullRes", oPC );
        string sClaws = DBGetString( "ThrallClawsRes", oPC );
        string sSpecial = DBGetString( "ThrallSpecialRes", oPC );

        // Create the associate itself
        object oThrall = CreateObject( OBJECT_TYPE_CREATURE,
            sType, locPC );

        // Apply any effects to the associate as necessary, add them as
        // a PCs henchman, and level them up to their appropriate power.
        if( GetStringLeft( sType, 5 ) == "necro" )
            DelayCommand( 0.5f, ApplyNecroEffects( sBones1, sBones2, sSkull,
                sClaws, sSpecial, oThrall ) );
        else if( GetStringLeft( sType, 5 ) == "champ" )
            DelayCommand( 0.5f, ApplyChampionEffects( sBones1, sBones2, sSkull,
                sClaws, sSpecial, oThrall ) );

        DelayCommand( 0.7f, AddHenchman( oPC, oThrall ) );
        DelayCommand( 1.0f, LevelUpThrall( oThrall, GetHitDice( oPC ) ) );

        // Save the information on the associate!
        sBones1 = GetStringLowerCase( GetStringLeft( sBones1, 16 ) );
        sBones2 = GetStringLowerCase( GetStringLeft( sBones2, 16 ) );
        sSkull = GetStringLowerCase( GetStringLeft( sSkull, 16 ) );
        sClaws = GetStringLowerCase( GetStringLeft( sClaws, 16 ) );
        sSpecial = GetStringLowerCase( GetStringLeft( sSpecial, 16 ) );

        SetLocalString( oThrall, "Master", GetPCPublicCDKey( oPC ) + GetSubString( GetName( oPC ), 0, 10 ) );
        SetLocalString( oThrall, "ThrallType", sType );
        SetLocalString( oThrall, "Bones1Res", sBones1 );
        SetLocalString( oThrall, "Bones2Res", sBones2 );
        SetLocalString( oThrall, "SkullRes", sSkull );
        SetLocalString( oThrall, "ClawsRes", sClaws );
        SetLocalString( oThrall, "SpecialRes", sSpecial );

        SendMessageToPC(oPC,"THRALLTYPE:"+sType);
        SendMessageToPC(oPC,"THRALLBONES1:"+sBones1);
        SendMessageToPC(oPC,"THRALLBONES2:"+sBones2);
        SendMessageToPC(oPC,"THRALLSKULL :"+sSkull);
        SendMessageToPC(oPC,"THRALLCLAWS :"+sClaws);
        SendMessageToPC(oPC,"THRALLSPECL :"+sSpecial);
    }
}


// Check and enforce the ban state of the PC!
int EnforceBan( object oPC )
{
    string sCDKey = GetPCPublicCDKey( oPC );
    int nBan = GetCampaignInt( "KRYNN", sCDKey, oPC );

    if( nBan == 3 ) { BootPC( oPC ); return 1; }

    // NOT banned
    return 0;
}


/*******************************************************************************
    GETS THE NUMBER OF PLAYERS CURRENTLY PLAYING THE MODULE.
    IF THE PLAYER LOGGING ON IS NOT A DM, ME, OR THE WIFE THEN
    INCREMENT THE NUMBER OF PLAYERS PLAYING BY ONE, AND SAVE
    THE NEW VALUE IN THE MODULE, RETURNING THE # OF PLAYERS.
*/
int ExamineNumPlayers( object oPC )
{
    if( GetIsDM( oPC ) ) return 0;
    if( GetPCPublicCDKey( oPC ) == STOMKINCD ) return 0;
    if( GetPCPublicCDKey( oPC ) == SCHIBICD ) return 0;

    int nPlayers = 0;
    string sCDKey;
    string sName;
    oPC = GetFirstPC();
    while( oPC != OBJECT_INVALID )
    {
        nPlayers++;

        sCDKey = GetPCPublicCDKey( oPC );
        if(
            GetIsDM( oPC ) ||
            sCDKey == STOMKINCD ||
            sCDKey == SCHIBICD
          )
        {
            nPlayers--;
        }

        oPC = GetNextPC();
    }

    return nPlayers;
}
//******************************************************************************

void LogEntry( object oPC )
{
    string sPrint = "Entering Player: " + GetName( oPC ) + " | " + GetPCPlayerName( oPC ) + " | IP: "
        + GetPCIPAddress(oPC);
    // Tell all the DMs that someone is logging on!
    SendMessageToAllDMs( sPrint );

    // Now add CDKey information and log it to the logfile.
    sPrint = sPrint + " | CDKey: " + GetPCPublicCDKey( oPC );
    sPrint = sPrint + " | TIME: " + IntToString( GetTimeHour() )
        + ":" + IntToString( GetTimeMinute() ) + ":"
        + IntToString( GetTimeSecond() );

    string sPrint2 = "Player Info: " + GetName( oPC ) + " | " + GetPCPlayerName( oPC ) + " | "
        + GetClass( oPC ) + " | " + IntToString( GetHitDice( oPC ) ) + " | " + GetRace( oPC );


    WriteTimestampedLogEntry( sPrint );
    WriteTimestampedLogEntry( sPrint2 );
}


string GetClass( object oPC )
{
    int i;
    int nClass = 0;
    int nSLen = 0;
    string sClass = "";
    string sCDKey = GetPCPublicCDKey( oPC );

    for( i = 0; i < 4; i++ )
    {
        nClass = GetClassByPosition(i, oPC);
        switch( nClass )
        {
            case CLASS_TYPE_ARCANE_ARCHER: sClass = sClass + "/Arcane Archer"; break;
            case CLASS_TYPE_ASSASSIN: sClass = sClass + "/Assassin"; break;
            case CLASS_TYPE_BARBARIAN: sClass = sClass + "/Barbarian"; break;
            case CLASS_TYPE_BARD: sClass = sClass + "/Bard"; break;
            case CLASS_TYPE_BLACKGUARD: sClass = sClass + "/Blackguard"; break;
            case CLASS_TYPE_CLERIC: sClass = sClass + "/Cleric"; break;
            case CLASS_TYPE_DIVINECHAMPION: sClass = sClass + "/Divine Champion"; break;
            case CLASS_TYPE_DRAGONDISCIPLE: sClass = sClass + "/Dragon Disciple"; break;
            case CLASS_TYPE_DWARVENDEFENDER: sClass = sClass + "/Dwarven Defender"; break;
            case CLASS_TYPE_DRUID: sClass = sClass + "/Druid"; break;
            case CLASS_TYPE_FIGHTER: sClass = sClass + "/Fighter"; break;
            case CLASS_TYPE_HARPER: sClass = sClass + "/Harper"; break;
            case CLASS_TYPE_MONK: sClass = sClass + "/Monk"; break;
            case CLASS_TYPE_PALADIN: sClass = sClass + "/Paladin"; break;
            case CLASS_TYPE_PALEMASTER: sClass = sClass + "/Pale Master"; break;
            case CLASS_TYPE_RANGER: sClass = sClass + "/Ranger"; break;
            case CLASS_TYPE_ROGUE: sClass = sClass + "/Rogue"; break;
            case CLASS_TYPE_SHADOWDANCER: sClass = sClass + "/Shadow Dancer"; break;
            case CLASS_TYPE_SHIFTER: sClass = sClass + "/Shifter"; break;
            case CLASS_TYPE_SORCERER: sClass = sClass + "/Sorcerer"; break;
            case CLASS_TYPE_WEAPON_MASTER: sClass = sClass + "/Weapon Master"; break;
            case CLASS_TYPE_WIZARD: sClass = sClass + "/Wizard"; break;
            default: break;
        }
    }

    nSLen = GetStringLength( sClass );
    nSLen--;
    sClass = GetSubString(sClass, 1, nSLen);

    return sClass;
}

string GetRace( object oPC )
{
    string sRace = "";

    sRace = GetSubRace( oPC );
    if( sRace != "" ) return sRace;

    if( GetRacialType( oPC ) == RACIAL_TYPE_DWARF ) return "Dwarf";
    if( GetRacialType( oPC ) == RACIAL_TYPE_ELF ) return "Elf";
    if( GetRacialType( oPC ) == RACIAL_TYPE_GNOME ) return "Gnome";
    if( GetRacialType( oPC ) == RACIAL_TYPE_HALFELF ) return "Half-Elf";
    if( GetRacialType( oPC ) == RACIAL_TYPE_HALFLING ) return "Kender";
    if( GetRacialType( oPC ) == RACIAL_TYPE_HALFORC ) return "Half-Orc";
    if( GetRacialType( oPC ) == RACIAL_TYPE_HUMAN ) return "Human";

    return "Invalid";

}


/*******************************************************************************
    MAIN ROUTINE BEGINS...
*/

void main()
{
    object oPC = GetEnteringObject();
    if( !GetIsPC( oPC ) ) return;

    // Check the ban on the PC
    // 0 = not banned
    // 1 = banned!
    if( EnforceBan( oPC ) == 1 ) return;

    //***** DM RESERVE SCRIPT! *************************************************
    //Check to make sure that the maximum number of players has not been reached.
    //
    int nPlayers = ExamineNumPlayers( oPC );
    if( nPlayers > 25 )
    {
        //All players will get autobooted.. DMs proceed

        DelayCommand( 4.0f, FloatingTextStringOnCreature( "Server limit reached, remaining slots for DMs only, auto-booting.", oPC, FALSE ) );
        DelayCommand( 7.0f, FloatingTextStringOnCreature( "Server limit reached, remaining slots for DMs only, auto-booting.", oPC, FALSE ) );
        DelayCommand( 15.0f, BootPC( oPC ) );
        return;
    }
    //**** END OF RESERVE SCRIPT ***********************************************

    // Begin PC processing
    SetLocalInt( oPC, "ENTERCHK", 0 );

    // Log and announce player entry.
    LogEntry( oPC );

    // Set the players recall point...also changed in OnAquireItem.
    SetRecall( oPC );

    // Clean the PC of contraband
    CleanPC( oPC );

    // Grant them any "module" items they do not have already
    GrantItems( oPC );

    //Last thing that we do is look for the death token from the player...
    // *MOVED TO _START_ONENTER AS WELL
    if( GetTag( GetArea( oPC ) ) != "START" )
    {
        object oToken = GetItemPossessedBy( oPC, "DeathToken" );
        if( GetIsObjectValid( oToken ) )
        {
            //the entering player has a token.. kill them!
            effect eDie = EffectDeath( TRUE, TRUE );
            FloatingTextStringOnCreature( "The Gods are displeased with you!", oPC, FALSE );

            AssignCommand( oPC, ClearAllActions() ); // Clears all actions of the PC
            DelayCommand( 0.2f, SetCommandable( FALSE, oPC ) );
            DelayCommand( 3.0f, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDie, oPC ) );
            DelayCommand( 4.0f, SetCommandable( TRUE, oPC ) );
        }
    }

 //Optional --- Support for NWNX added for Shayan's Subraces. (Remember to setup and import the neccessary files
//              for NWNX. The scripts are not included in the Subraces package).
//ExecuteScript("aps_onload", GetModule());

//--End NWNX

//----Modification for Shayan's Subrace Engine
   DelayCommand(2.0, ExecuteScript("sha_on_modload", GetModule()));
//----End Modification.

    // Look at the PC and determine of they have an associate saved!
    CheckForAssociates( oPC );

    // End of PC processing
    SetLocalInt( oPC, "ENTERCHK", 1 );
}

OnModLoad

Code: [Select]
#include "x2_inc_switches"
#include "x2_inc_restsys"

void main()
{
    SetModuleOverrideSpellscript( "02_rokspellhook" );


//----Modification for Shayan's Subrace Engine
   DelayCommand(2.0, ExecuteScript("sha_on_modload", GetModule()));
//----End Modification.

    // Tells the module use tag based scripts for item activate events.
    SetModuleSwitch( MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS, TRUE );

    // Tells the module to use the random monster encounter on the rest system
    SetModuleSwitch( MODULE_SWITCH_USE_XP2_RESTSYSTEM, TRUE );
    // Use a different 2da for the wandering monster system.
    // SetWanderingMonster2DAFile("des_restsystem");
    WMBuild2DACache();

    // Make rogues do a UMD skill check when using scrolls
    SetModuleSwitch( MODULE_SWITCH_ENABLE_UMD_SCROLLS, TRUE );

    // Make epic spells hurt their caster, if required
    SetModuleSwitch( MODULE_SWITCH_EPIC_SPELLS_HURT_CASTER, TRUE );

    // Prevent spellcaster's abusing expertise to raise their AC, drops
    // expertise whenever a spell is cast by a player
    SetModuleSwitch( MODULE_VAR_AI_STOP_EXPERTISE_ABUSE, TRUE );

    // Make creatures use mobile animations after they spawn.
    SetModuleSwitch( CREATURE_VAR_USE_SPAWN_AMBIENT, TRUE );

    // Hurt neutral NPCs
    SetModuleSwitch( MODULE_SWITCH_AOE_HURT_NEUTRAL_NPCS, TRUE );


}

so yeah heeh sowwie again for my lack of ability but I really have been trying at this one for two days ask Mo lol