Jump to content

Home

scripting help w/inventory - TSL


newbiemodder

Recommended Posts

Hey scripting gurus out there, I have a question. I have this script

 

void main () {



if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx"))) {
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "yyyyyyyy"))) {
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "zzzzzzzz"))) {

AddJournalQuestEntry("XYZ",30); }}}


} 

 

This script is on some placeables that is checked when inventory is disturbed, and when I have all three items journal entry 30 is triggered. Which I want to keep.

 

My question, how do I alter this script so that if I don't have all three items when the placeable is disturbed journal entry 20 is triggered instead?

 

Thanks.

Link to comment
Share on other sites

Hey scripting gurus out there, I have a question. I have this script

 

void main () {



if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx"))) {
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "yyyyyyyy"))) {
if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "zzzzzzzz"))) {

AddJournalQuestEntry("XYZ",30); }}}


} 

 

This script is on some placeables that is checked when inventory is disturbed, and when I have all three items journal entry 30 is triggered. Which I want to keep.

 

My question, how do I alter this script so that if I don't have all three items when the placeable is disturbed journal entry 20 is triggered instead?

 

Thanks.

 

Well you could do the simple thing... make it to where you need only one...

 

so...

 

 

void main () {



if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx"))) {


AddJournalQuestEntry("XYZ",20); }


} 

 

Btw I just copied and pasted your script, it may be wrong, I didn't actually search it lol

Link to comment
Share on other sites

Hi,

 

I don't know if it works, but you might want to try that:

 

void main () {



if (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "xxxxxxxx")) && (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "yyyyyyyy")) && (GetIsObjectValid(GetItemPossessedBy(GetFirstPC(), "zzzzzzzz"))))) 
{

AddJournalQuestEntry("XYZ",30); }

else {

AddJournalQuestEntry("XYZ",20); }


}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...