Jump to content

Home

a new way to build a lightsaber


rocky348

Recommended Posts

Ok here we go, the mod i am currently working on replaces the way you build your first lightsaber. It no longer needs the parts. After the acadamy when you normaly get the dialog from baodur about building a lightsaber, you get a workbench like dialog that lets you build your ligtsaber. The problem i am having is I still get the parts, and it puts entries into the journal. How can i make it so that I don't get a journal entry about creating a lightsaber? I dont really care about getting the parts, but I don't like the fact that there is a journal entry which refures to BaoDur building the lightsaber. BTW in the baodur dialog, i deleted the option that says ok i got all the parts.

 

ciao for now

Link to comment
Share on other sites

  • 2 weeks later...

ok the following script is a modified copy of the "a_give_quest_ls" script:

 

// Gives the player the next component needed for the lightsaber quest.

// kds, 09/06/04

 

#include "k_inc_treas_k2"

 

void main()

{

 

int i = 1;

string sItem;

string sString = GetScriptStringParameter();

object oItem = OBJECT_SELF;

object oRecipient;

if(sString != "") oRecipient = GetObjectByTag(sString);

else oRecipient = GetPartyLeader();

 

if(GetJournalEntry("LightsaberQuest") < 40)

{

for(i; GetIsObjectValid(oItem); i++)

{

 

oItem = GetItemPossessedBy (GetPartyLeader(),sItem);

}

CreateItemOnObject( "pc_colo_100", oRecipient, 1 );

CreateItemOnObject( "pc_colo_101", oRecipient, 1 );

CreateItemOnObject( "pc_colo_102", oRecipient, 1 );

CreateItemOnObject( "pc_colo_103", oRecipient, 1 );

CreateItemOnObject( "pc_colo_104", oRecipient, 1 );

AddJournalQuestEntry("LightsaberQuest",40);

}

else sItem = GetTreasureSpecific(GetGlobalNumber("G_PC_LEVEL")-2+Random(5),140);

}

 

 

if anybody can see some redundant or unused stuff that i can take out, please let me know. One thing though it MUST call for all three objects in the one script. Also, iis there a way to set the journal index to 40 without actually writting to the journal?

 

ciao for now

Link to comment
Share on other sites

ok people, never mind, i figured it out. Here is what the script looks like now. I believe i took out all the redundant, or extra stuff:

// This script is used to give the player the new lightsaber crystals.  Note it replaces the 
// original script which gives you the lspart.  This script was modified by rocky348

#include "k_inc_treas_k2"

void main()
{

   object oRecipient;
   oRecipient = GetPartyLeader();
   string rItem;
if(GetGlobalNumber("NEW_LIGHTSABER_QUEST") < 40)
{          
   CreateItemOnObject( "pc_colo_100", oRecipient, 1 );
   CreateItemOnObject( "pc_colo_101", oRecipient, 1 );
   CreateItemOnObject( "pc_colo_102", oRecipient, 1 );
   CreateItemOnObject( "pc_colo_103", oRecipient, 1 );
   CreateItemOnObject( "pc_colo_104", oRecipient, 1 );
   SetGlobalNumber("NEW_LIGHTSABER_QUEST",40);
}
else rItem = GetTreasureSpecific(GetGlobalNumber("G_PC_LEVEL")-2+Random(5),140);
CreateItemOnObject( rItem, oRecipient, 1 );
}

 

ciao for now

 

ps yes i am aware i didnt have to keep the # 40, but i decided to.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...