
Also note that certain types of items will not require all the variables to be defined (many defined above are for illistration purposes only).Ĭurrently the scripts dont do alot, as what they are supposed to control hasn't been implemented fully (i am starting the scripting early to allow total integration of scripting into the server to allow maximum customizability).ī) the main body of the script is executed (everything which can be executed)Ĭ) the script finishes running, leaving the registered variables in memory.ĭ) the special functions defined are called for their appropriate action. Each different type of script will have a library of functions available to use (there will also be a standard library which will consist of all the common functions). The item, as you may have guessed (or read) is a potion. By doing this we should have a highly extensible server (and by deferring many tasks into higher-level scripting realm we should hopefully have a more secure server ).Ĭode: Select all // Define required variables will have their actions executed by a script (and the server will provide a necessary means to do so). The way i currently think scripting would work is this (most actions will be deferred from server into scripting, only having the server do essential tasks and provide an interface to the scripts). While i am only using Squirrel for testing at the moment, it could might as well replace Lua, as Squirrel is a Lua clone with _many_ similarities. A Ruby binding would exist now if i could find some decent documentation on it (i haven't been able to find good embedding documentation, if you know of any give me a shout ). But by no means will be be the only language available on TMW server (the language of choice will be compiled into TMW server via defines, or possibly we could have multiple scripting environments chosen at runtime).

Yeah, currently Squirrel is being used as a "sandbox" scripting language for testing.
