View Full Version : [TSL] Recruit Script

Ferc Kast
07-09-2008, 02:07 PM
This is a recruit script I made a while back for TSL. I decided to finally release this as free source. You can use it in your TSL recruit mods, as long as you credit me in your readme file. This script has been tested, to ensure best results.

~~Download script (http://jcoolzombie.110mb.com/ccount/click.php?id=1)~~
void main(){
int iAction = GetScriptParameter(1);
if ( iAction == 1 ){
// Recruit "sNPC"
int iNPC = GetScriptParameter(2);
string sNPC = GetScriptStringParameter();
AddAvailableNPCByTemplate(iNPC, sNPC);
else if ( iAction == 2 ){
// Eliminate "Twins"
string sNPC = GetScriptStringParameter();
object oNPC = GetObjectByTag(sNPC);
SetGlobalFadeOut(1.0, 0.5);
DelayCommand(1.0, DestroyObject(oNPC));

Here's how to attach the script to your dialog:

Click on your last entry or reply in your dialog, then fill in the script #1 & script #2 rows with the values from the above picture.
In script #1, replace the 3 with the number of the NPC that you will replace. (Here (http://jcoolzombie.110mb.com/tsl/npcs.txt) is a list of the TSL NPC numbers.)
Next, change "YOUR_NPC_RESREF" to the resref from the recruited NPC's utc. (I.E. "p_test")
In script #2, replace "YOUR_NPC_TAG" to the tag of the pre-recruited NPC's utc. (I.E. "p_test001")

Note that this script & tutorial will only work in KotOR II: The Sith Lords, and not in KotOR I.

07-09-2008, 05:28 PM
Thank you Ferc. This script will really help me. Maybe I can do a little better with the mod nao (You should know what I mean)

07-09-2008, 05:33 PM
Thanks Ferc, recruiting is now easier! :)

The Betrayer
07-10-2008, 06:06 AM
Is this just a script for the recruiting part?

Ferc Kast
07-10-2008, 08:55 AM
Yes, this script is for the recruiting itself. Aside from this script, one would only need to follow Darth333's tutorial to recruit an NPC.

08-19-2008, 05:26 PM
Hey, i did a script like this 3 months ago:

Why it is not here?