• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

I need some help for Quest Triggers

Status
Not open for further replies.
Level 4
Joined
Aug 15, 2010
Messages
53
Hi, first of all I apologize for my English.

I create this system, but don't work.

Codes 01;
  • QuestActive
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
    • Actions
      • Wait 0.10 game-time seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quest_Check[(Player number of (Owner of (Buying unit)))] Equal to <Empty String>
          • (Item-type of (Sold Item)) Equal to Quest: Bandit
        • Then - Actions
          • Set Quest_Check[(Player number of (Owner of (Buying unit)))] = Bandit
          • Set QuestLimit[(Player number of (Owner of (Buying unit)))] = 0
          • Leaderboard - Create a leaderboard for (Player group((Owner of (Buying unit)))) titled <Empty String>
          • Leaderboard - Add (Owner of (Buying unit)) to (Leaderboard 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 (Leaderboard of (Owner of (Buying unit))) to (0.00%, 80.00%, 20.00%) with 0.00% transparency
          • Leaderboard - Change the display style for (Leaderboard of (Owner of (Buying unit))) to Hide the title, Show labels, Hide values, and Hide icons
        • Else - Actions
And "Finish Quest" Codes 02;

  • QuestFinish
    • 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
          • Quest_Check[(Player number of (Owner of (Buying unit)))] Equal to Bandit
          • (Item-type of (Sold Item)) Equal to Quest: Bandit
          • QuestLimit[(Player number of (Owner of (Buying unit)))] Equal to 30
        • Then - Actions
          • Set Quest_Check[(Player number of (Owner of (Buying unit)))] = <Empty String>
          • Set QuestLimit[(Player number of (Owner of (Buying unit)))] = 0
          • Leaderboard - Destroy (Leaderboard of (Owner of (Buying unit)))
          • Player - Add 600 to (Owner of (Buying unit)) Current gold
          • Hero - Add 550 experience to (Buying unit), Show level-up graphics
          • Special Effect - Create a special effect attached to the origin of (Buying unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 30
            • Then - Actions
              • Hero - Create Scroll of Transformation and give it to (Buying unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 100) Less than or equal to 10
                • Then - Actions
                  • Hero - Create Ring of Regeneration and give it to (Buying unit)
                • Else - Actions
        • Else - Actions
And Kill Update Codes;

  • QuestKill
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) belongs to an ally of Player 2 (Blue)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quest_Check[(Player number of (Owner of (Buying unit)))] Equal to Bandit
          • (Unit-type of (Triggering unit)) Equal to Bandit (Edit)
          • 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 (Leaderboard 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
              • Quest_Check[(Player number of (Owner of (Buying unit)))] Equal to Bandit
              • (Unit-type of (Triggering unit)) Equal to Bandit (Edit)
              • QuestLimit[(Player number of (Owner of (Killing unit)))] Greater than or equal to 30
            • Then - Actions
              • Leaderboard - Change the label for (Owner of (Killing unit)) in (Leaderboard of (Owner of (Killing unit))) to Bandit: Quest Compl...
            • Else - Actions
Have a Quest

  • Quest Helper
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • ((Buying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Quest_Check[(Player number of (Owner of (Buying unit)))] Not equal to <Empty String>
          • (Item-class of (Sold Item)) Equal to Powerup
        • Then - Actions
          • Game - Display to (Player group((Owner of (Buying unit)))) the text: |cffFF8040You have ...
        • Else - Actions
Don't update kills this system and first buy quest item, writing "already have a quest"

How can I make the Quest System?
 
Status
Not open for further replies.
Top