Gammon Forum
Entire forum
MUSHclient
General
Scripting in PHP
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Xavious
(41 posts) bio
|
Date
| Wed 15 Apr 2015 05:40 PM (UTC) |
Message
| I was pretty excited when I noticed PHP on the scripting drop down one day. However, it doesn't seem to be included after initially downloading MUSHclient. I stumbled upon this thread: http://www.gammon.com.au/forum/?id=5813
Does anyone know of a reliable place to download php5activescript.dll safely? I'm also curious if this is all that is required to support scripting in PHP. | top |
|
Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Date
| Reply #1 on Wed 15 Apr 2015 08:19 PM (UTC) |
Message
| It supports selecting PHP as the script engine, however installing the PHPscript DLL is something you have to do.
I haven't used PHP for ages, I presume if you got the scripting engine from the PHP site it would (probably) work, still.
However, I recommend using Lua, which is built in, and is less likely to be flaky. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Xavious
(41 posts) bio
|
Date
| Reply #2 on Thu 16 Apr 2015 12:21 PM (UTC) |
Message
| Thanks for the response Nick. Learning Lua is on my to do list. I started out using VBScript ages ago, because at the time I was learning Visual Basic at school and it came naturally.
Now I program in PHP professionally and I figured I could leverage that professional experience to give me an edge in mud scripting.
I'll either take a chance on one of these sketchy dll download sites or just buckle down and learn Lua! | top |
|
Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Date
| Reply #3 on Thu 16 Apr 2015 07:32 PM (UTC) |
Message
| I use PHP to do these web pages, and also for other projects I have to hand (like my home management system).
However having used Lua now I wouldn't attempt to use PHP for scripting in MUSHclient. For one thing, some things have Lua-only extensions (for example, trigger functions get style runs as an optional fourth argument).
Plus there are some Lua-only functions (in the "utils") table which do things like enumerate directories. Another big feature is the ability to serialize variables (including tables) making saving / restoring large numbers of variables easy.
Finally, Lua has co-routines which help you do things like send a message and wait for a response, without hanging the client. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
11,940 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.