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

Wrong Shop => Remove Item & Refund

Status
Not open for further replies.
Level 9
Joined
Oct 22, 2006
Messages
599
This is what I tried and it doesn't work. Also I have another trigger that will drop the item (Since the hero cannot use it) before this trigger is run.

  • Wrong Shop
    • 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
          • ((Owner of (Buying unit)) is in Mages) Equal to False
          • (Unit-type of (Triggering unit)) Equal to Witch
        • Then - Actions
          • Unit - Order (Buying unit) to give (Sold Item) to (Triggering unit)
          • Game - Display to (All players) the text: WRONG!!!! Cheking
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Buying unit)) is in Warriors) Equal to False
              • (Unit-type of (Triggering unit)) Equal to Blacksmith
            • Then - Actions
              • Unit - Order (Buying unit) to give (Sold Item) to (Triggering unit)
              • Game - Display to (All players) the text: WRONG!!!! Cheking
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of (Buying unit)) is in Archers) Equal to False
                  • (Unit-type of (Triggering unit)) Equal to Bow Maker
                • Then - Actions
                  • Unit - Order (Buying unit) to give (Sold Item) to (Triggering unit)
                  • Game - Display to (All players) the text: WRONG!!!! Cheking
                • Else - Actions
The message is shown but the unit is not ordered to sell the item.

Any Ideas?
 
Level 9
Joined
Apr 28, 2009
Messages
538
I'm not really sure, but if I remember right "Buying unit" responds to "Sells a Unit"

I guess that's the problem.
 
Level 9
Joined
Oct 22, 2006
Messages
599
I'm not really sure, but if I remember right "Buying unit" responds to "Sells a Unit"

I guess that's the problem.

Trigger Note
Buying unit

When responding to "Sells A Unit", "Sells An Item", or "Pawn An Item" unit events, this refers to the unit doing the buying.
Besides I have said above that the message is shown but the unit is not ordered to sell the item...
 
Level 9
Joined
Oct 22, 2006
Messages
599
Then I would have to change the event as well since...
Trigger Note
Hero manipulating item

When responding to "Uses/Acquires/Loses An Item" unit events, this refers to the Hero that is manipulating the item.
The item can be bought by a Shopper as well, which is not a Hero.
 
Status
Not open for further replies.
Top