• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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