PerlScript examples file now released

Posted by Nick Gammon on Tue 01 Aug 2000 12:00 AM — 1 posts, 7,177 views.

Australia Forum Administrator #0
An example of doing various things in PerlScript is now part of the version 3.02 (onwards) release of MUSHclient.

If you prefer using PerlScript as a scripting language, check out this file, as it demonstrates most of the features of interfacing with the MUSHclient scripting model.

For example, here is a simple script subroutine that will list all of your variables:


 
sub showvariables
{
foreach $item (Win32::OLE::in ($world->GetVariableList))
 {
 ($key, $value) = ($item, $world->GetVariable ($item));
 $world->note($key . " = " . $value) if (defined ($key));
 }
} # end of showvariables