• 🏆 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!

[Trigger] Auto-Item Combination

Status
Not open for further replies.
Level 22
Joined
Aug 27, 2013
Messages
3,973
So I wanted to make a system when someone buy an item recipe, it'll automatically buy the items needed and if the gold is enough for everything, it'll automatically combine the item. But I think the trigger I made isn't really good. Too much ITE Blocks, smh. I need help to simplify it if possible.

The required items are:
-Leather Boots
-Ring of Regeneration
-Sobi Mask
  • BoM Recipe Scroll
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Boots of Medivh (Fake)
    • Actions
      • Item - Remove (Item being manipulated)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) Current gold) Greater than or equal to 975
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to False
              • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
            • Then - Actions
              • Hero - Create Boots of Medivh and give it to (Hero manipulating item)
              • Player - Add -975 to (Triggering player) Current gold
              • Special Effect - Create a special effect attached to the origin of (Hero manipulating item) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to True
                  • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                • Then - Actions
                  • Hero - Create Sobi Mask and give it to (Hero manipulating item)
                  • Player - Add -300 to (Triggering player) Current gold
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to False
                      • ((Hero manipulating item) has an item of type Sobi Mask) Equal to True
                    • Then - Actions
                      • Hero - Create Ring of Regeneration and give it to (Hero manipulating item)
                      • Player - Add -275 to (Triggering player) Current gold
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to True
                          • ((Hero manipulating item) has an item of type Sobi Mask) Equal to True
                        • Then - Actions
                          • Hero - Create Leather Boots and give it to (Hero manipulating item)
                          • Player - Add -400 to (Triggering player) Current gold
                        • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering player) Current gold) Greater than or equal to 400
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to False
                  • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                  • ((Hero manipulating item) has an item of type Leather Boots) Equal to False
                • Then - Actions
                  • Hero - Create Leather Boots and give it to (Hero manipulating item)
                  • Player - Add -400 to (Triggering player) Current gold
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to False
                      • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                      • ((Hero manipulating item) has an item of type Leather Boots) Equal to True
                    • Then - Actions
                      • Hero - Create Ring of Regeneration and give it to (Hero manipulating item)
                      • Player - Add -300 to (Triggering player) Current gold
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to True
                          • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                          • ((Hero manipulating item) has an item of type Leather Boots) Equal to True
                        • Then - Actions
                          • Hero - Create Sobi Mask and give it to (Hero manipulating item)
                          • Player - Add -275 to (Triggering player) Current gold
                        • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering player) Current gold) Greater than or equal to 300
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to False
                      • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                    • Then - Actions
                      • Hero - Create Ring of Regeneration and give it to (Hero manipulating item)
                      • Player - Add -300 to (Triggering player) Current gold
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Hero manipulating item) has an item of type Ring of Regeneration) Equal to True
                          • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                        • Then - Actions
                          • Hero - Create Sobi Mask and give it to (Hero manipulating item)
                          • Player - Add -275 to (Triggering player) Current gold
                        • Else - Actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((Triggering player) Current gold) Greater than or equal to 275
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Hero manipulating item) has an item of type Sobi Mask) Equal to False
                        • Then - Actions
                          • Hero - Create Sobi Mask and give it to (Hero manipulating item)
                          • Player - Add -275 to (Triggering player) Current gold
                        • Else - Actions
                    • Else - Actions
                      • Game - Display to (Player group((Triggering player))) for 5.00 seconds the text: |cffffcc00Not enoug...

Do tell me if there's something wrong in the trigger or anything. Perhaps there are things I shouldn't do that I didn't know about. Thanks in advance.
 
Level 11
Joined
May 16, 2016
Messages
730
So I wanted to make a system when someone buy an item recipe, it'll automatically buy the items needed and if the gold is enough for everything, it'll automatically combine the item. But I think the trigger I made isn't really good. Too much ITE Blocks, smh. I need help to simplify it if possible.
Here is very friendly system like you want. All you have to do is edit RECIPE LIST trigger. The triggering price must equal price of items in the item editor.

In the RECIPE LIST here is an example of creating Crown +5).
To get it you must buy a free Scroll 1.
and Ring armor +5, Claws +15, Reflection Necklace, Blink Blade x2. All items required except the scroll cost 100 gold each. The system won't allow you to buy items that you have already. It would buy items only if you don't have it and only if you have enough goldz.
 

Attachments

  • Recipes.w3x
    21.9 KB · Views: 59
Last edited:
Status
Not open for further replies.
Top