So I need to edit this script:
---------------------------------------------------------------------------
// ga_journal(string sCategoryTag, int nEntryID, int bAllPartyMembers, int bAllPlayers, int bAllowOverrideHigher)/* Wrapper to add an entry to PCSpeaker's journal. Parameters: string sCategoryTag = The tag of the Journal category (case sensitive). int nEntryID = The ID of the Journal entry. int bAllPartyMembers = If =1, the entry is added to the journal of all of oCreature's Party. (Default: =1) int bAllPlayers = If =1, the entry will show up in the journal of all PCs in the module. (Default: =0) int bAllowOverrideHigher = If =1, override restriction that nState must be > current Journal Entry. (Default: =0) */// BMA-OEI 10/14/05// BMA-OEI 1/11/06 removed default params
void main(string sCategoryTag "test1", int nEntryID "31", int bAllPartyMembers "1", int bAllPlayers "1", int bAllowOverrideHigher "1"){ object oPC = (GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker()); AddJournalQuestEntry(sCategoryTag, nEntryID, oPC, bAllPartyMembers, bAllPlayers, bAllowOverrideHigher);}
------------------------------------------------------------------------
So I can continue my quest. It says above that, for example, "int nEntryID = ID of journal entry" I understand this, but what I dont understand is how to EDIT this script, and put in my journal entry number. Where do i put the number in? (its 31) You ca see above I tried to enter in my information in the " " 's like "test1" is the name of my quest and "31" is the journal entry. Can someone please let me know how to properly insert this information? Thanks.
Simple question that needs an answer!
Débuté par
Leyf
, janv. 31 2011 01:52
#1
Posté 31 janvier 2011 - 01:52
#2
Posté 31 janvier 2011 - 02:03
First, I have the same problem when posting scripts. I've found the only way to do it without the lines running together is to use the Quick Reply.
Second, you do not edit the script. You pass the script the parameters from the conversation node. On the conversation node you want to have the journal updated on, add an action, enter ga_journal as the script name for the action, and then click the Refresh button next to the script name on the action line. It will then show the script parameters and you enter them there.
Third, I recommend you check out _Knightmare_s Scripting for noobs. It will help you get started with basic scripting.
Regards
Second, you do not edit the script. You pass the script the parameters from the conversation node. On the conversation node you want to have the journal updated on, add an action, enter ga_journal as the script name for the action, and then click the Refresh button next to the script name on the action line. It will then show the script parameters and you enter them there.
Third, I recommend you check out _Knightmare_s Scripting for noobs. It will help you get started with basic scripting.
Regards
Modifié par Kaldor Silverwand, 31 janvier 2011 - 02:10 .
#3
Posté 31 janvier 2011 - 11:42
Well jeeze, you've just shot down both my forum posts with knowledge
Thanks Kaldor! And I asked the question above because I want to Update my journal when I kill a quest boss...
(I just killed a troll named QUEST BOSS) Journal: "QUEST BOSS has just been defeated, I should return and tell the Dwarf of the good news."
I wanted somthing like that so i tried to apply and ga_journal to the On Death Script of the troll.
(I just killed a troll named QUEST BOSS) Journal: "QUEST BOSS has just been defeated, I should return and tell the Dwarf of the good news."
I wanted somthing like that so i tried to apply and ga_journal to the On Death Script of the troll.
#4
Posté 31 janvier 2011 - 08:59
Conversation (ga and gc) scripts are structured to allow parameters, but in most cases other than conversations (like events such as on death) you cannot pass parameters to scripts, so they don't work too well for that. For what you want to do use a death script and have it read local variables off of the creature that is dying to tell it what to do. The default creature death script will execute a script for you if you set the local string variable DeathScript on the creature to the name of the script you want to execute.
Here is a script that can be used to update the journal:
// bb_journal_update
// by Brendan Bellina
// April 2007
// This is used to update a journal entry
// Useful as a DeathScript for a creature whose death is
// related to a quest
// If the campaign Journal Sync setting is true then it should
// update all player journals, but otherwise it only updates
// the journal of the First PC.
// Requires variables:
// string JournalTag
// int JournalEntryID
void main()
{
string sJournalTag = GetLocalString(OBJECT_SELF, "JournalTag");
int nJournalEntryID = GetLocalInt(OBJECT_SELF, "JournalEntryID");
object oPC = GetFirstPC();
if (sJournalTag != "")
AddJournalQuestEntry(sJournalTag, nJournalEntryID, oPC, TRUE, FALSE, FALSE);
}
Again though, you don't edit this script. It is a general purpose script, just create it in the toolset and compile it. Then on the boss creature set the variables string DeathScript to the name of this script, string JournalTag to the tag of your Journal (test1), and int JournalEntryID to the ID of the journal entry (31). Make sure the variable types are correct. JournalEntryID must be defined as an integer.
Regards
Here is a script that can be used to update the journal:
// bb_journal_update
// by Brendan Bellina
// April 2007
// This is used to update a journal entry
// Useful as a DeathScript for a creature whose death is
// related to a quest
// If the campaign Journal Sync setting is true then it should
// update all player journals, but otherwise it only updates
// the journal of the First PC.
// Requires variables:
// string JournalTag
// int JournalEntryID
void main()
{
string sJournalTag = GetLocalString(OBJECT_SELF, "JournalTag");
int nJournalEntryID = GetLocalInt(OBJECT_SELF, "JournalEntryID");
object oPC = GetFirstPC();
if (sJournalTag != "")
AddJournalQuestEntry(sJournalTag, nJournalEntryID, oPC, TRUE, FALSE, FALSE);
}
Again though, you don't edit this script. It is a general purpose script, just create it in the toolset and compile it. Then on the boss creature set the variables string DeathScript to the name of this script, string JournalTag to the tag of your Journal (test1), and int JournalEntryID to the ID of the journal entry (31). Make sure the variable types are correct. JournalEntryID must be defined as an integer.
Regards
Modifié par Kaldor Silverwand, 31 janvier 2011 - 09:13 .
#5
Posté 31 janvier 2011 - 09:40
Good gods Kaldor, you must have been scripting for a long time
Thanks again!
#6
Posté 31 janvier 2011 - 11:09
It has been a few years. Always more to learn though.





Retour en haut






