What happened to OC? - CLOSED Carnage?!
Sign in to follow this  
Followers 0
Kavawuvi

HaloMD's console apparently accepts (short) scripts

When trying to enable commands like sv_name and some other cool things for client servers, nil had accidentally caused HaloMD to treat everything as a script. I made this a topic, because I wondered how useful this would be for anyone.

http://protonnebula.com/misc-files/vids/scriptconsole.mp4

In the video, I used all of these:

(begin (sv_map_reset) (sleep 30) (sv_map_reset) (sleep 30) (sv_map_reset))
(begin (sv_map_reset) (sleep 30) (sv_map_reset) (sleep 30) (sv_map_reset) (cls))
unit_kill (unit (list_get (players) 0))
(begin (rcon 123 sv_map_reset) (sleep 30) (rcon 123 sv_map_reset) (sleep 30) (rcon 123 sv_map_reset))

Know that it will fail if invalid syntax is given. If you were to miss parenthesis somewhere, or some other syntax error, it won't do anything. Of course, it can also crash, like if you used unit_kill in ui.map or something when a player is nonexistent or otherwise dead. The topmost command also does not need outside parenthesis, so one could use "begin (...) (...)" instead of "(begin (...) (...))". I included the parenthesis because it's good form.

The console can only show so much text onscreen, and the buffer is fixed length, so long scripts aren't useful. However, I could make a HaloMD plugin that allows script files to be bound to one command, like a count of three script.

swamp, WaeV, Takka and 1 other like this

Share this post


Link to post
Share on other sites

Tiddy-bits:

Could you increase the buffer to allow longer scripts?

Yes, but the buffer is already big enough that Halo can't fit it all onscreen. I'd just send scripts directly to the command handler instead. Edited by 002

Share this post


Link to post
Share on other sites

If anyone's wondering, I was trying to find the branch that disallowed sv_name, sv_password and the like from working on non-dedis, and ended up either nopping a couple of jumps, or altered a boolean or two. Had also gained access to commands like medusa, but had no idea about scripts \=.

Share this post


Link to post
Share on other sites

This is awesome! Even if it doesn't stay part of HaloMD's feature set, at least one tool should offer this sort of functionality.

My idea was being able to insert a whole text file into Halo's script handler, so one could run Halo scripts with a plugin. Since it wouldn't be limited to the console's small buffer (since it's from the file, not the console prompt), one could put a full-sized script and execute it on the fly without ever needing to compile anything or build any cache file.

Floofies likes this

Share this post


Link to post
Share on other sites

My idea was being able to insert a whole text file into Halo's script handler, so one could run Halo scripts with a plugin. Since it wouldn't be limited to the console's small buffer (since it's from the file, not the console prompt), one could put a full-sized script and execute it on the fly without ever needing to compile anything or build any cache file.

Sure, that sounds doable. Write up a quick demo app as a proof of concept?

Share this post


Link to post
Share on other sites
2 minutes ago, Grey Hat said:

am i the only one who found this on a diffrent thing 

Huh?

Kavawuvi likes this

Oddly, this is familiar to you... as if from an old dream.  

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.