Yay, I just made my first JASS thing ever. It's in GUI format though, don't hit me plz
trigger1
Events
Conditions
Actions
Custom script: endfunction
Custom script: function getcustomvalue takes unit u returns integer
Custom script: set udg_u = u
Set i = (Custom value of u)
Custom script: return udg_i
trigger2
Events
Player - Player 1 (Red) types a chat message containing set custom val as A substring
Conditions
Actions
Unit - Set the custom value of (Random unit from (Units currently selected by Player 1 (Red))) to (Integer((Substring((Entered chat string), 16, (Length of (Entered chat string))))))
trigger3
Events
Player - Player 1 (Red) types a chat message containing get custom val as An exact match
Conditions
Actions
Set asd = (Random unit from (Units currently selected by Player 1 (Red)))
Custom script: set udg_str = I2S (getcustomvalue(udg_asd))
Game - Display to (All players) the text: str
What ya say?