• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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