• 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.

SPELL :: Command Line

Status
Not open for further replies.
Level 4
Joined
Jun 30, 2013
Messages
76
Ladies and gentlemen!
Does any1 know what is Windows Command Prompt, or better, a UNIX one? Probably, you do. Would be really good to insert operating code over the game. It can't take more than 2MB(2 large books). If it has success, all mapmakers may just copy-paste it to their map instead of writing their own pack of commands. And it's interesting to softly script being inside the game.
The idea is quite simple, but i couldn't make it as real as i wanted to. link. It's only basics, something I've done before i got this idea.
Every player has his own String array variables. E.g. for player red String1[0], String2[0], String3[0].
String structure: [command trigger][command] [number] [text]
E.g. to set player 3's colour to teal:
~colo 03 teal
To set password (for superuser command) to " sudoku ":
~pswd 00(means nothing) sudoku
To do a command allowed only to superuser:
~sudo 03 kick (kick player 3)
When i want to execute a command written in advance, i write
~exec 00 String1
Why is String that important? For very fast control(e.g. if the command helps controlling the units in battle, e.g. to attack buildings first of all ON/OFF) and to avoid writing one command 10 times.

If some1 endorses my idea, has better one, has been trying to do this, or just wants to speak out, reply. I'll mention all your answers even if they do contain only crapwords. But before saying that it's bullshit, think of why is command prompt still in use even it does exist GUI on every OS X nowadays.
 
Level 4
Joined
Jun 30, 2013
Messages
76
Heh, all pictures i have u can see following the one only link in the post.
What am i trying to do - to make it possible to call general mini-spells in wc3 as it's done in command lines.

E.g., It can work other way: implement 20 most common spells and call em by running a string.

The only problem is that's hard to do, because the one who writes the string will be like a monkey with grenade.
 
Last edited:
what you want is a simple lexer

look in my sig at resources under JASS for String Parser. It requires spaces and stuff (sry), but it'll do type checking and so on. I also have a Cmd thing in there that can evaluate expressions with ~ and evaluate commands with - ;).

The readme was the original thread post with a huge tutorial on how to use it. You can do a post preview or something to read it ^)^, or put it in your pastebin
 
Status
Not open for further replies.
Top