ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: cybercasper on October 30, 2016, 09:50:52 AM

Title: Tackling namespace global
Post by: cybercasper on October 30, 2016, 09:50:52 AM
Ok I have been wanting to make a master and slave script. With that being said I have read a lot about using namespace global but I don't completely understand that. It isn't set up like a normal script and thenslave account isn't either so can anyone provide some insight on that. I'm sure there are other ways to make a master / slave script but I read this is the best way and makes it seem less and less buggy
Title: Re: Tackling namespace global
Post by: Tidus on October 31, 2016, 07:09:52 AM
The main thing about using a global namespace is using global variables.  Using the variables allows for all scripts to change that variable within the Namespace and also use it.  So making a master is the one that changes the variables, and the slave reads those variables.  Makes it a very effective way of different chars to talk to eachother without having to communicate through game.  The only thing is, you have to run it in the same instance of EUO. It does not communicate between EUO instances. So you can't run EUO Master on one computer and EUO Slave on another computer and have it work.
Title: Re: Tackling namespace global
Post by: The Ghost on October 31, 2016, 08:24:57 AM
The only way to run it in two difference computer is to use the party option and journal.  meaning you need a robust journal scan. 
Title: Re: Tackling namespace global
Post by: TrailMyx on October 31, 2016, 09:54:11 AM
TIdus is exactly right.  For the global namespaces to work, you'll need to run all your scripts from the same EasyUO instance, with each script running in a separate tab.  You can also use system variables (*vars) to communicate between different instances of EUO on the same computer.  If you want to communicate between different computers, then you'll need a few additional things that aren't EUO related.
Title: Re: Tackling namespace global
Post by: cybercasper on November 01, 2016, 10:40:24 PM
Sorry for my wording that's what I mean same computer 2 different accounts
Title: Re: Tackling namespace global
Post by: cybercasper on November 04, 2016, 08:37:48 AM
so now i have a question what is the difference between uoxl swap and namespace for making a master and bot script. i know with namespace you have to make 2 seperate scripts. and with uoxl. i am trying to come up with a script to run on a master account and have 2 slaves all will be tamers for right now. so which one is a faster more effiecient way of making this script.
Title: Re: Tackling namespace global
Post by: TrailMyx on November 04, 2016, 08:53:28 AM
Really that's just two possible methods to control more than one client.  In theory you could have only one script running to control all clients, but that might be a bit slow because you have to loop through all the clients.  With global namespaces, you can have one script dedicated to a client instance, but be able to send status to other instances.  uoxl swap might be easier though.
Title: Re: Tackling namespace global
Post by: cybercasper on November 13, 2016, 06:26:42 PM
thanks trail just like i explained to gem but i would figure that one script would have been faster than swapping to multi scripts but thats in my own theory. i might just have to try both ways. it just seems that with namespace it doesnt really seem like it is scripting in easyuo language but more in a different language. i am not that proficient with variables