[Nexus] Read file lines into script

I've been using the Nexus client so far due mostly due to the convenience of it, but I haven't been able to figure out any way to handle file IO for scripting. Does anyone know if this is possible? I could see there being problems with accessing the file system in browser, but I'm sure something similar could be implemented with Nexus. Maybe there would be a way with functions or scripts?  

More generally, the use case would be something where I have a series of commands saved and want to execute them in a specific order. For example, say I want to write a file with: 

heartstone
simulacrum
study mask 
study fetish 
study book
study book

The goal would then be able to execute that file line by line, where an alias like readDefense could read line x, increment x by 1, etc. I know I could handle this specific case with some combination of aliases and reflexes based on the completion message of each action, but I want the more generally applicable case and I want more control over it. I know this is pretty trivial in Tintin++ and Cmud, and probably not too difficult in Mudlet, but not sure about Nexus.



Comments

  • In general, you can't really read/write local files from the browser using javascript, for security reasons. It may be possible, but there are probably better ways to do anything you want to do.

    For example, if you want to save a series of commands like that, it would be far simpler to just store them in an array instead of a text file. That makes it a lot easier to read, modify, reorder, add, remove, count, and do various other things to the list.
  • FYI: 'STUDY KARMA' (also 'STUDY KARMIC') picks the first karmic item in your inventory to study it without specifying its type (mask/book/fetish/gem/etc). 
Sign In or Register to comment.