PDA

View Full Version : [TSL] Recruit Script


Ferc Kast
07-09-2008, 03: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();
RemoveAvailableNPC(iNPC);
AddAvailableNPCByTemplate(iNPC, sNPC);
DelayCommand(1.5,ShowPartySelectionGUI());
}
else if ( iAction == 2 ){
// Eliminate "Twins"
string sNPC = GetScriptStringParameter();
object oNPC = GetObjectByTag(sNPC);
ActionPauseConversation();
SetGlobalFadeOut(1.0, 0.5);
DelayCommand(1.0, DestroyObject(oNPC));
DelayCommand(1.0,SetGlobalFadeIn(0.7,0.0));
ActionResumeConversation();
}
}

Here's how to attach the script to your dialog:
http://c.imagehost.org/0079/recruit.png

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.

TriggerGod
07-09-2008, 06:28 PM
YAY! :D
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)

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

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

Ferc Kast
07-10-2008, 09: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.

DarthNandis
08-19-2008, 06:26 PM
Hey, i did a script like this 3 months ago:
http://www.lucasforums.com/showthread.php?t=188853

Why it is not here?