PDA

View Full Version : I need another script.


Darth Xander
12-31-2007, 08:52 AM
Hey people I need yet again another script. I need a script that makes a specific npc disappear/vanish on the spot.

e-varmint
12-31-2007, 09:05 AM
Hey people I need yet again another script. I need a script that makes a specific npc disappear/vanish on the spot.

This should work. Just substitute your NPC tag for m70vacardseller.

void main()
{
object ojawa=GetObjectByTag("m70vacardseller");
ActionDoCommand(SetCommandable(TRUE,ojawa));
AssignCommand (ojawa,ActionDoCommand(DestroyObject(ojawa)));
}

Darth Xander
12-31-2007, 09:40 AM
Thanks e-varmint but I need one last script, I need a script that makes a party memebr play pazaak with the pc no mattrr what module you are in, BTW this is for K1.

Marius Fett
12-31-2007, 10:48 AM
While we're on the subject of scripts, I need one that starts a dialog.

Thanks :)

e-varmint
12-31-2007, 11:05 AM
Thanks e-varmint but I need one last script, I need a script that makes a party memebr play pazaak with the pc no mattrr what module you are in, BTW this is for K1.

Sadly, that is beyond my ability level at the moment. Here is what the Script function in Kotor tool says, if it is of any help:

// 364: Starts a game of pazaak.
// - nOpponentPazaakDeck: Index into PazaakDecks.2da; specifies which deck the opponent will use.
// - sEndScript: Script to be run when game finishes.
// - nMaxWager: Max player wager. If <= 0, the player's credits won't be modified by the result of the game and the wager screen will not show up.
// - bShowTutorial: Plays in tutorial mode (nMaxWager should be 0).

void PlayPazaak(int nOpponentPazaakDeck, string sEndScript, int nMaxWager, int bShowTutorial=FALSE, object oOpponent=OBJECT_INVALID);

If I am interpreting it correctly, you will need to decide which deck to use, what the maximum wager is, and what script should fire when the game ends. I seem to recall a mod being released that enables high-stakes pazaak. If you can find it, there should be a script that you can examine to see how it was done.

Edit: here is a link I found.
http://www.hosey.org/kotor/pazaak/

Edit2: To avoid getting scolded, I would like to point out that I am not, in any way, suggesting the piracy of another person's work. I am only suggesting the study of an existing script to determine the proper syntax.


While we're on the subject of scripts, I need one that starts a dialog.

Thanks :)

Here is an example that should work in K1. Substitute the name of your dialog for vr_utility


void main()
{

ActionStartConversation(GetFirstPC(), "vr_utility", 0, 0, 0, "", "", "", "", "", "", 0);

}

Marius Fett
12-31-2007, 11:18 AM
Cheers!

Odd question:

Do I put more 0's where youve written ""?

e-varmint
12-31-2007, 11:23 AM
Cheers!

Odd question:

Do I put more 0's where youve written ""?

All you need to change is the name of the dialog file. The example script is one that I use in a mod, so I know that it will work as-is. I do not know what will happen if you alter the "",s.

Marius Fett
12-31-2007, 11:24 AM
Ok thanks! :)