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

[Trigger] Multi-Number Effects help

Status
Not open for further replies.
Level 8
Joined
Mar 24, 2011
Messages
353
Do you remember the cheat "greedisgood X"
greedisgood = cheat base
X = number of Gold and Lumber at you gains
OK?

So I needed to do a trigger basically not "equal" but with the same "purpose" means?

In other words, how do one trigger that I write something on the front and a sum of numbers in the chat space after the game that, depending on which number I win or I will reduce that amount?

(in my case the amount will trigger manipulate life and mana of the selected units)

Thanks :D
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
  • Chat Command Add Gold
    • Events
      • Player - Player 1 (Red) types a chat message containing midashand as A substring
    • Conditions
    • Actions
      • Set numberLocation = 11
      • Player - Add (Integer((Substring((Entered chat string), numberLocation, (Length of (Entered chat string)))))) to Player 1 (Red) Current gold
numberLocation is an integer an is set to 11 based on the chat comand

midashand(space)#Till the end
1234567891011Length of the chat string
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
Starquizer, but in my case the amount will trigger manipulate life and mana of the selected units, not gold or lumber :/

The example I gave you is just an example to show you how to get the number from the chat command, all that is left now is that you use this number to your needs.

Remember that we actually get a string from the chat so you need to convert it to integer or real according to what you want the command to do.
 
Status
Not open for further replies.
Top