PDA

View Full Version : Bonus form script?


Malxados
03-12-2009, 08:44 PM
Hello,
I was wondering what the script would look like to give the PC one/all of the lightsaber/force forms.
Thanks,
Malxados

Star Admiral
03-13-2009, 12:52 PM
This will only work for TSL. Try something like this.

void main() {
int i = 0;
int nSpell = xxx;
for( i = 0; i < 7; i++ ) {
GrantSpell( nSpell, GetFirstPC() );
nSpell++;
}
}

If I recall correctly, the lightsaber forms are listed in order in the spells.2da file. Replace the xxx in the script with the RowIndex of the first lightsaber form, should be around 250. I'll check once I get home.

- Star Admiral

Malxados
03-13-2009, 01:05 PM
Star Admiral strikes again!
Anywho, ya I've seen them in the spells.2da.
Thanks for the help. Also, would it work if I inserted "GetScriptParameter(1);" or whatever in there instead of the row number?
Thanks,
Malxados

EDIT: It seems to work with it, though I haven't tested it yet

Malxados
03-14-2009, 01:01 PM
That's odd. It seems to teach all of the lightsaber forms if I chose one and all the force forms if I choose one of them. That is a bit convenient though.

Star Admiral
03-14-2009, 02:59 PM
I thought you wanted the script to give you all the lightsaber forms. If you only want one power at a time, then you can get rid of the for loop.

void main() {
int nSpell = GetScriptParameter( 1 );
GrantSpell( nSpell, GetFirstPC() );
}

Hope it works. :)

- Star Admiral