Is php still useable within Mushclient? I see the option for it in the dropdown and i can output the version, so i know i at least that have part setup, and i read a thread on the globals, but is it something thats worth pursuing to use? I use php on a daily basis so i'd like to give it a go but if i've got to go to some extremes to make it work i'll just use perl or lua.
phpscript
Posted by Yoblew on Thu 06 Aug 2009 08:33 PM — 3 posts, 12,253 views.
As far as I know, it works.
However different script engines, when shoe-horned into the Windows Script Interface, work with varying degrees of success. I think for a while PHP had an annoying side-effect that it would simply close the client and exit the entire process, if there was a syntax error in your script.
Personally, I would recommend using Lua instead. The structure of Lua is similar enough to PHP (and C for that matter) that it isn't too hard to pick up. I speak as someone who writes a lot of code in Lua, and also maintains my web pages in PHP.
There are some functions and functionality only available in Lua. For example, triggers get a table of all the style runs in the matching line. There are also some script extensions in Lua, like getting all the files in a directory.
The other advantage of Lua is, since it is bundled with MUSHclient, if you write a script or plugin in Lua, you can be sure other players can use it. If you use PHP, they have to install that first.
Oh, and the help files which come with MUSHclient have help built into them for all the standard Lua libraries, so you can quickly look up the syntax of things like string.find.
However different script engines, when shoe-horned into the Windows Script Interface, work with varying degrees of success. I think for a while PHP had an annoying side-effect that it would simply close the client and exit the entire process, if there was a syntax error in your script.
Personally, I would recommend using Lua instead. The structure of Lua is similar enough to PHP (and C for that matter) that it isn't too hard to pick up. I speak as someone who writes a lot of code in Lua, and also maintains my web pages in PHP.
There are some functions and functionality only available in Lua. For example, triggers get a table of all the style runs in the matching line. There are also some script extensions in Lua, like getting all the files in a directory.
The other advantage of Lua is, since it is bundled with MUSHclient, if you write a script or plugin in Lua, you can be sure other players can use it. If you use PHP, they have to install that first.
Oh, and the help files which come with MUSHclient have help built into them for all the standard Lua libraries, so you can quickly look up the syntax of things like string.find.
Thanks for the reply Nick. I think im starting to see some of the...nuances of using php as i started writing for it. I've used lua quite a bit back when i played WoW, so its not that i dislike it, i just thought it would be fun to do in php. However the tiny differences between actual php on a webpage/script and using it within mush are starting to drive me nuts. Most of it i assume is my general lack of knowledge regarding MUSH itself. I'm gonna keep pressing on with it for now. I think more then anything i need to learn how to use Mush itself.