• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Stacking Items Quest

Status
Not open for further replies.
Level 10
Joined
Mar 25, 2010
Messages
187
So i got an item stacking system, and i wanted to have quests
where you must collect X amount of certain items.
I can make the quests when you only need 1 item, but when you need for example 10 i won't work.
It stops counting after i pick up 1 item.
I will post the triggers here to give you a better overview.

  • Exotic Furs
    • Events
      • Unit - General Supplies 0121 <gen> Is selected
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Exotic Furs Count <gen>
      • Game - Display to (All players) the text: |c0000FF40Merchant ...
      • Special Effect - Destroy Quest_GiverSFX[4]
      • Quest - Create a Required quest titled Exotic Furs with the description A merchant has offe..., using icon path ReplaceableTextures\CommandButtons\BTNMilitia.blp
      • Set Q_Exotic_Furs = (Last created quest)
      • Quest - Create a quest requirement for Q_Exotic_Furs with the description Find 5 Black Fur Pe...
      • Set Recover_BlackFurs = (Last created quest requirement)
      • Quest - Display to (All players) the Quest Discovered message: |c008080C0New Quest...
  • Exotic Furs Count
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Black Fur Pelt
    • Actions
      • Set BlackFurPelt_Count = (BlackFurPelt_Count + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BlackFurPelt_Count Greater than or equal to 5
        • Then - Actions
          • Set B_ItemRecovery[3] = True
          • Quest - Mark Recover_BlackFurs as Completed
          • Quest - Display to (All players) the Quest Update message: Objective Completed...
          • Quest - Create a quest requirement for Q_Exotic_Furs with the description Return the furs to ...
          • Set Return_Merchant = (Last created quest requirement)
          • Trigger - Turn on Exotic Furs Complete <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
  • Exotic Furs Complete
    • Events
      • Unit - General Supplies 0121 <gen> Is selected
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • B_ItemRecovery[3] Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Charges remaining in (Item carried by Player1 of type Black Fur Pelt)) Greater than or equal to 5
            • Then - Actions
              • Trigger - Turn off (This trigger)
              • Trigger - Turn on Searing Shells <gen>
              • Game - Display to (All players) the text: |c0000FF40Merchant ...
              • Quest - Mark Return_Merchant as Completed
              • Quest - Mark Q_Exotic_Furs as Completed
              • Quest - Display to (All players) the Quest Completed message: Quest Completed
              • Player - Add 100 to Player 1 (Red) Current gold
              • Hero - Add 250 experience to Player1, Show level-up graphics
              • Special Effect - Create a special effect attached to the chest of Hero 0001 <gen> using Abilities\Spells\Other\Transmute\PileofGold.mdl
              • Item - Set charges remaining in (Item carried by Player1 of type Black Fur Pelt) to ((Charges remaining in (Item carried by Player1 of type Black Fur Pelt)) - 5)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Charges remaining in (Item carried by Player1 of type Black Fur Pelt)) Equal to 0
                • Then - Actions
                  • Item - Remove (Item carried by Player1 of type Black Fur Pelt)
                • Else - Actions
            • Else - Actions
        • Else - Actions
Thanks in advance to those who want to help.
 
Level 10
Joined
Mar 25, 2010
Messages
187
I tried that already, it didn't do anything :S

EDIT : Forgive me, but you were right. I fiddled with it and got it working now, this is what it looks like.

  • Delicous Rockberries Count
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Charges remaining in (Item carried by (Triggering unit) of type Delicous Rockberry)) Greater than or equal to 1
    • Actions
      • Game - Display to (All players) the text: Bingo!
      • Set Rockberry_Count = (Rockberry_Count + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Rockberry_Count Greater than or equal to 6
        • Then - Actions
          • Set B_ItemRecovery[1] = True
          • Quest - Mark Gather_Rockberry as Completed
          • Quest - Display to (All players) the Quest Update message: Objective Completed...
          • Quest - Create a quest requirement for Q_Delicous_Rockberries with the description Return the berries ...
          • Set Return_Alchemist = (Last created quest requirement)
          • Trigger - Turn on Delicous Rockberries Complete <gen>
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 10
Joined
Mar 25, 2010
Messages
187
Upon further testing i discovered that if you have some amount of the quest item ( yet not enough to complete the objective ) and you pick up an item, it will still count it towards the quest goals.
I though i'd fix this by removing the integer counter completely, though i fear this may result in even more problems. Not to mention i can't put messages like 2 / 6 items found etc.
 
Status
Not open for further replies.
Top