How does one write a script to check two different journal e

Post » Thu Oct 15, 2009 10:26 pm

Hello all,

I was wondering if it would be possible to have a script require two entries from different journal topics to be passed before executing an action.

Example of a working script that checks one journal entry at a time:

begin bsQuest20HelpScript
if (GetJournalIndex AH_Quest20 < 10)
disable
elseif (GetJournalIndex AH_Quest20 == 10)
enable
elseif (GetJournalIndex AH_Quest20 > 10)
disable
endif
end bsQuest20HelpScript


Nonworking script with what I'm trying to do:

begin bsQuest20JoldiScript
if (GetJournalIndex AH_Quest20 < 10)
disable
elseif (GetJournalIndex AH_Quest20 == 10)
elseif (GetJournalIndex AH_JoldiQuest == 100)
enable
elseif (GetJournalIndex AH_Quest20 > 10)
disable
endif
end bsQuest20JoldiScript


The idea in the second script is to enable the object only if AH_Quest20 == 10 AND AH_JoldiQuest == 100 and disable it in any other case.

Any help provided would be greatly appreciated. Thanks in advance!
User avatar
Soph
 
Posts: 3499
Joined: Fri Oct 13, 2006 8:24 am

Post » Fri Oct 16, 2009 3:43 am

begin bsQuest20JoldiScriptshort MakeEnableset MakeEnable to 0if (GetJournalIndex AH_Quest20 == 10)	if (GetJournalIndex AH_JoldiQuest == 100)		set MakeEnable to 1	endifendifif ( MakeEnable == 1 )	if ( GetDisabled == 1 )		Enable	endifelse	if ( GetDisabled == 0 )		Disable	endifendifend bsQuest20JoldiScript

User avatar
Antonio Gigliotta
 
Posts: 3439
Joined: Fri Jul 06, 2007 1:39 pm

Post » Fri Oct 16, 2009 8:34 am

Thank you, Kir. I am very new to scripting, especially when it comes to syntax and playing around with scripts. The script you provided works perfectly for what I'm trying to do. Thanks again!
User avatar
lacy lake
 
Posts: 3450
Joined: Sun Dec 31, 2006 12:13 am


Return to III - Morrowind