• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[General] Quest System working but have some bugs...

Status
Not open for further replies.
Level 4
Joined
Aug 15, 2010
Messages
53
Hi, I have this Quest System and I want it for all players.
But I tested the map and find some bugs to multiplayer games. Quest Board hiding / destroying in game.

  • Bandit
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QuestActivated[(Player number of (Owner of (Buying unit)))] Equal to False
          • (Item-type of (Sold Item)) Equal to Quest: Bandit
        • Then - Actions
          • Set QuestActivated[(Player number of (Owner of (Buying unit)))] = True
          • Set BanditQuestActivated[(Player number of (Owner of (Buying unit)))] = True
          • Set QuestLimit[(Player number of (Owner of (Buying unit)))] = 0
          • Leaderboard - Create a leaderboard for (Player group((Owner of (Buying unit)))) titled <Empty String>
          • Set QuestBoard[(Player number of (Owner of (Buying unit)))] = (Last created leaderboard)
          • Leaderboard - Add (Owner of (Buying unit)) to QuestBoard[(Player number of (Owner of (Buying unit)))] with label (Bandit: + ((String(QuestLimit[(Player number of (Owner of (Buying unit)))])) + / 30)) and value 0
          • Leaderboard - Change the color of the label for (Owner of (Buying unit)) in QuestBoard[(Player number of (Owner of (Buying unit)))] to (0.00%, 80.00%, 20.00%) with 0.00% transparency
          • Leaderboard - Change the display style for QuestBoard[(Player number of (Owner of (Buying unit)))] to Hide the title, Show labels, Hide values, and Hide icons
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • QuestActivated[(Player number of (Owner of (Buying unit)))] Equal to True
              • BanditQuestActivated[(Player number of (Owner of (Buying unit)))] Equal to True
              • (Item-type of (Sold Item)) Not equal to Quest: Bandit
              • (Item-type of (Sold Item)) Not equal to Cancel Quest
              • (Item-class of (Sold Item)) Equal to Powerup
            • Then - Actions
              • Game - Display to (Player group((Owner of (Buying unit)))) the text: Already have a Ques...
              • Player - Add 50 to (Owner of (Buying unit)) Current gold
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • QuestActivated[(Player number of (Owner of (Buying unit)))] Equal to True
              • BanditQuestActivated[(Player number of (Owner of (Buying unit)))] Equal to True
              • (Item-type of (Sold Item)) Equal to Quest: Bandit
              • QuestLimit[(Player number of (Owner of (Buying unit)))] Less than 30
            • Then - Actions
              • Game - Display to (Player group((Owner of (Buying unit)))) the text: Already have a Ques...
              • Player - Add 50 to (Owner of (Buying unit)) Current gold
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • QuestActivated[(Player number of (Owner of (Buying unit)))] Equal to True
                  • BanditQuestActivated[(Player number of (Owner of (Buying unit)))] Equal to True
                  • (Item-type of (Sold Item)) Equal to Quest: Bandit
                  • QuestLimit[(Player number of (Owner of (Buying unit)))] Equal to 30
                • Then - Actions
                  • Set QuestActivated[(Player number of (Owner of (Buying unit)))] = False
                  • Set BanditQuestActivated[(Player number of (Owner of (Buying unit)))] = False
                  • Set QuestLimit[(Player number of (Owner of (Buying unit)))] = 0
                  • Leaderboard - Destroy QuestBoard[(Player number of (Owner of (Buying unit)))]
                  • Game - Display to (Player group((Owner of (Buying unit)))) the text: Won all bonuses to ...
                  • Player - Add 600 to (Owner of (Buying unit)) Current gold
                  • Hero - Add 150 experience to (Buying unit), Show level-up graphics
                • Else - Actions
And Kill Triggers;

  • BanditKill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an ally of Player 2 (Blue)) Equal to True
      • BanditQuestActivated[(Player number of (Owner of (Killing unit)))] Equal to True
      • (Unit-type of (Triggering unit)) Equal to Bandit (Edit)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QuestLimit[(Player number of (Owner of (Killing unit)))] Less than 30
        • Then - Actions
          • Set QuestLimit[(Player number of (Owner of (Killing unit)))] = (QuestLimit[(Player number of (Owner of (Killing unit)))] + 1)
          • Leaderboard - Change the label for (Owner of (Killing unit)) in QuestBoard[(Player number of (Owner of (Killing unit)))] to (Bandit: + ((String(QuestLimit[(Player number of (Owner of (Killing unit)))])) + / 30))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QuestLimit[(Player number of (Owner of (Killing unit)))] Equal to 30
        • Then - Actions
          • Leaderboard - Change the label for (Owner of (Killing unit)) in QuestBoard[(Player number of (Owner of (Killing unit)))] to Bandit: Quest Compl...
        • Else - Actions
And Cancel Quest

  • Cancel Quest
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Cancel Quest
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QuestActivated[(Player number of (Owner of (Triggering unit)))] Equal to True
          • BanditQuestActivated[(Player number of (Owner of (Triggering unit)))] Equal to True
        • Then - Actions
          • Set QuestActivated[(Player number of (Owner of (Triggering unit)))] = False
          • Set BanditQuestActivated[(Player number of (Owner of (Triggering unit)))] = False
          • Set QuestLimit[(Player number of (Owner of (Triggering unit)))] = 0
          • Leaderboard - Destroy QuestBoard[(Player number of (Owner of (Triggering unit)))]
        • Else - Actions
is this true? (for all players)
 
Status
Not open for further replies.
Top