Need help with multiple Sessions and WoW Looting...

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
jojotheslug
GamingTools Subscriber
Posts: 25
Joined: Sat Nov 18, 2006 9:25 pm

Need help with multiple Sessions and WoW Looting...

Post by jojotheslug » Wed Oct 10, 2007 4:43 pm

I need help trying to figure out how to have one session tell another session to do one of three things. Either call a function, execute an atom, or run a script.

Right now, I've got multiple bots working together in a group. But when it comes to looting, I'm using Master Looting with the leader of the group deciding which items the other members of the group receive. This isn't any big deal, but if any of the other bot's inventories are full, I'm trying to use Uplink Relay to tell the session to call the function to empty the necessary number of inventory slots.

I've tried all three of these strategies:

Code: Select all

Uplink Relay <session name> "Call <empty inventory slots function> <number of inventory slots to empty>"

Uplink Relay <session name> "ExecuteAtom <empty inventory slots function as atom> <<number of inventory slots to empty>"

Uplink Relay <session name> "RunScript <empty inventory slots function as main in it's own script> <number of inventory slots to empty>"
In all three cases, it keeps coming back as an 'Unknown Command'. Can anybody help me with this? It's driving me crazy...
-Jojo

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Thu Oct 11, 2007 8:51 am

1. You don't need to relay commands through the uplink anymore (as of probably a year ago), you can just use the relay command that is available in sessions.

2. runscript or atoms will work fine, you cannot use the Call command, as it will not be run in the context of a script, and the Call command is not used atomically.

3. You don't need to use the ExecuteAtom command. The atom simply needs to be global in scope.

The following form can be used to make a command called "mycommand", accessible globally (any possible entry point in the session), while the script is running. If the script is not running, the command won't exist.

Code: Select all

atom&#40;global&#41; mycommand&#40;int slots&#41;
&#123;
  echo MyCommand running, slots=$&#123;slots&#125;
&#125;
In the local session's console, or in the script itself, for example:
mycommand 6

And to relay it from another session or the uplink:
relay is2 mycommand 6

The ExecuteAtom command is there for completeness. You probably wouldnt need to use it unless you wanted to store the name of the command to execute in a variable.
For example:

Code: Select all

variable string somecommand=mycommand
$&#123;somecommand&#125; 6
/* The above will not execute as a command, it'll bomb out. */
ExecuteAtom $&#123;somecommand&#125; 6
/* The above works. */
That and it's leftover from when atoms were not automatically available in command form. The following works just as well:

Code: Select all

execute $&#123;somecommand&#125; 6
Execute is the equivalent of "ExecuteAtom" to execute any command. Same thing applies, it's generally only used when you need to store the actual command to execute in a variable.

Hope this covered all the bases for you.

jojotheslug
GamingTools Subscriber
Posts: 25
Joined: Sat Nov 18, 2006 9:25 pm

Post by jojotheslug » Thu Oct 11, 2007 2:10 pm

Thanks for the info. It'll save me alot of work. And by the way, I just wanted to personally thank you for creating something that not only kicks ass, but is so incredibly simple and straightforward to use.

It hit me a few days ago, just how fantastic a product InnerSpace actually is. Just how much my abilities with scripting things in InnerSpace have improved over the last several months. Not because I'm particularyly good at programming, but because LavishScript is so freaking intuitive. I'm in the process of debugging my bot system, right now, and it's about 80K lines of script (not including path nodes) and I've only encountered a few syntax errors and a couple of logic problems because the language is so unbelievably easy to understand.

So, once again, eventhough it's not worth much, but THANK YOU for creating something that is so amazing. Not to mention all the work you must have to do everyday just to maintain things.

-Jojo

Post Reply