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

Money Command {command that adds gold to a player according to message}

Status
Not open for further replies.
Level 1
Joined
Apr 28, 2009
Messages
2
Hey, I was wondering how can I add a command to a map, like:
!givememoney and it will give the person that wrote it 10,000 gold or w.e...
thank you!
 
Level 7
Joined
Mar 29, 2009
Messages
139
Do it at the trigger editor:

  • Money Command
    • Events
      • Player - Player 1 (Red) types a chat message containing !Givememoney as An exact match
    • Conditions
    • Actions
      • Player - Add 10000 to Player 1 (Red) Current gold
It should work fine. If you want another player to have this command too, just change the trigger to this:

  • Money Command
    • Events
      • Player - Player 2 (Blue) types a chat message containing !Givememoney as An exact match
    • Conditions
    • Actions
      • Player - Add 10000 to Player 2 (Blue) Current gold
If you want all players to have this command, just make more triggers and change player number.
If there is something you don't get or something more you want to know, just ask :)
 
Level 3
Joined
Jul 13, 2008
Messages
38
If you are wanting to add gold to a player based on how much they typed in this would be the trigger to use.

  • Money
    • Events
      • Player - Player 1 (Red) types a chat message containing !Money as A substring
    • Conditions
    • Actions
      • Player - Add (Integer((Substring((Entered chat string), 7, (Integer((Entered chat string))))))) to Player 1 (Red) Current gold
What ever number follows !Money will be added the player one's current gold.
 
Status
Not open for further replies.
Top