| Author |
Sticky: Post
Working Scripts Here |
| Rockey
|
Posted: Thursday, 27 June 05:33AM |
1. How to use Sub Races in a Module
2. Ok, here is a script that I whipped up for Subclasses. You can use it
to get an idea of how to add/subtract abilities, skills, and effects on
a player due to subrace.
3. To try it out, edit the Module and place this script into the Module
Properties->Events->OnClientEnter, then
make a character w/ the subrace of
BadAssElf
What this script will do is tell you your subclass (in the text window,
only if your a BadAssElf), raise your strength and constitution by +2,
add +1 hitpoint per level (or hitdie really), and add +30 to ALL skills.
This is a crappy subrace, but its an example
I havent figured out how to modify the talents or the feats yet. If you
save your character while in a game w/ this script running, it will show
your abilities (strength, etc) restored to where it should be, but the
bonuses it offers on other die rolls seems to be with the modified
value. But, when you reload your character in the same world w/ the
script, the do not add together and work as they should. And if you go
to a non-script world, you are as you should be (non-modified,
everything returns to normal).
4. Here is the script:
NWScript: void main()
{
object oNewPlayer = GetEnteringObject();
if (GetIsPC(oNewPlayer)) {
string sSubRace = GetSubRace(oNewPlayer);
string sDeity = GetDeity(oNewPlayer);
SendMessageToPC(oNewPlayer, "You are a " + sSubRace);
if (sSubRace == "BadAssElf") {
ApplyEffectToObject( DURATION_TYPE_PERMANENT,
EffectAbilityIncrease( ABILITY_STRENGTH, 2),
oNewPlayer, 0.0);
ApplyEffectToObject( DURATION_TYPE_PERMANENT,
EffectAbilityIncrease( ABILITY_CONSTITUTION, 2),
oNewPlayer, 0.0);
ApplyEffectToObject( DURATION_TYPE_PERMANENT,
EffectSkillIncrease(SKILL_ALL_SKILLS, 30),
oNewPlayer, 0.0);
int iPlayerHitDice = GetHitDice(oNewPlayer);
ApplyEffectToObject( DURATION_TYPE_PERMANENT,
EffectTemporaryHitpoints(1 * iPlayerHitDice),
oNewPlayer, 0.0);
}
}
}
|
|