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

Trade Gold for Lumber

Status
Not open for further replies.
Level 7
Joined
Jul 25, 2008
Messages
292
I was wondering if there was a way to exchange gold for lumber. I was originaly going to do it by buying an item for a certain amount of gold and then selling it for a certain amount of lumber but I could not figure out how to do this. I also do not want it to be a 1 for 1 exchange as lumber is far to easy to come about on my game...
 
Level 11
Joined
Jul 7, 2010
Messages
709
Here:
  • Gold System
    • Events
      • Player - Player 1 (Red) types a chat message containing Empty String as A substring
      • Player - Player 2 (Blue) types a chat message containing Empty String as A substring
      • Player - Player 3 (Teal) types a chat message containing Empty String as A substring
      • Player - Player 4 (Purple) types a chat message containing Empty String as A substring
      • Player - Player 5 (Yellow) types a chat message containing Empty String as A substring
      • Player - Player 6 (Orange) types a chat message containing Empty String as A substring
      • Player - Player 7 (Green) types a chat message containing Empty String as A substring
      • Player - Player 8 (Pink) types a chat message containing Empty String as A substring
      • Player - Player 9 (Gray) types a chat message containing Empty String as A substring
      • Player - Player 10 (Light Blue) types a chat message containing Empty String as A substring
      • Player - Player 11 (Dark Green) types a chat message containing Empty String as A substring
      • Player - Player 12 (Brown) types a chat message containing Empty String as A substring
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Substring((Entered chat string), 1, 7)) Equal to (==) -lumber
        • Then - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering player) Current gold) Greater than or equal to (>=) 100
            • Then - Actions
              • Player - Set (Triggering player) Current gold to (((Triggering player) Current gold) - 100)
              • Player - Add 300 to (Triggering player) Current lumber
            • Else - Actions
              • Game - Display to (All players) the text: You do not have enough gold to trade.
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Substring((Entered chat string), 1, 5)) Equal to (==) -gold
            • Then - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Triggering player) Current lumber) Greater than or equal to (>=) 300
                • Then - Actions
                  • Player - Set (Triggering player) Current lumber to (((Triggering player) Current lumber) - 300)
                  • Player - Add 100 to (Triggering player) Current gold
                • Else - Actions
                  • Game - Display to (All players) the text: You do not have enough lumber to trade.
            • Else - Actions
EDIT2:
Added Map, Also made it so you can change the valves of Gold > Lumber and Lumber > Gold
 

Attachments

  • Trade System.w3x
    17.3 KB · Views: 97
Last edited:
Level 7
Joined
Jul 25, 2008
Messages
292
"Player - Player 1 (Red) types a chat message containing Empty String as A substring"

I cannot seem to replicate the option "Empty string" and if I copy your triggers it breaks it itself... any ideas?

Edit: ah, never mind. just realised how stupid that question is
 
Last edited:
Status
Not open for further replies.
Top