Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Stratocaster

#1
What I'm trying to accomplish should have a simple solution but I have been stumped the past few days on figuring it out.

Here is what I want to do:

Scenario 1: If you select Option 1 ["Have you heard any rumors about any stolen rings?"] in the dialog and you DON'T have a specific item [Necklace], the NPC tells you his [Necklace] is missing and wants it back in exchange for information. This turns on Option 3 ["What is it I'm looking for again?"]. You must find the [Necklace] and bring it back to him.  The next time you talk to him with the [Necklace], Option 3 should be turned off, and it should turn on Option 2 [I believe I found your necklace (GIVE NECKLACE)].

Scenario 2: If you select Option 1 ["Have you heard any rumors about any stolen rings?"] in the dialog and you DO have the [Necklace] the NPC needs, the NPC will have unique dialog and skip right to giving you the information he was just promising and ending the dialog with him completely for the rest of the game.

The problem I have is, I can't figure out how to turn Option 2 on without conflicting with Scenario 2.

When triggering Option 1 WITH the necklace this code comes into effect. (Scenario 2.)

Code: ags

  if  (player.InventoryQuantity[iGoldNecklace.ID] == 1){
      cCalvan.Say("I think I have acquired such a necklace already.");
      ......yadda yadda yadda......
      cCalvan.LoseInventory(iGoldNecklace);
      dDialog9.SetOptionState(1,eOptionOffForever);
      dDialog9.SetOptionState(2,eOptionOffForever);
      dDialog9.SetOptionState(3,eOptionOffForever);
      return RUN_DIALOG_STOP_DIALOG;
  }


This works as it should.

When triggering Option 1 WITHOUT the necklace Option 1 dialog plays normally (Scenario 1.)

Code: ags

.....yadda yadda yadda.....
.....yadda yadda yadda.....
.....yadda find necklace.....
option-off-forever 1
option-on 3


So in (Scenario 1.), after Option 1 has been triggered (without necklace) and Option 3 comes on, how would I go about turning on Option 2 when the player speaks to the NPC again WITH the necklace without conflicting with (Scenario 2.)?

Right now I am using this code in @S //

Code: ags

  if  (player.InventoryQuantity[iGoldNecklace.ID] == 1){
  dDialog9.SetOptionState(3,eOptionOffForever);    
  dDialog9.SetOptionState(2,eOptionOn);
  }


Which of course turns on Option 2 in (Scenario 2.), which is what I DON'T want.

I'm not how to go about this.

This is the best way I can explain it so sorry for any confusion. Thanks to anyone who can help.
SMF spam blocked by CleanTalk