I'm not new to PERL, but I am new to the MUSH Client interface. I'm trying to write a script to learn languages faster (a nice beginner thing to get a good feel).
Everytime I try, 'languagelearn common' it sends 'language' because @_ and subsequently $Langauge are always empty. What exactly am I doing wrong here? I think it's something on the alias side, but not sure.
sub OnLanguageLearn {
my ($thename, $theoutput, $wildcards) = @_;
$Language = $world->trim ($world->GetAliasInfo ($thename, 101));
if ($Language eq "") {
$world->send("language");
return;
}
for($i = 0; $i < 10; ++$i) {
$world->send ("language learn $Language");
}
}
Quote:
<alias
script="OnLanguageLearn"
match="^languagelearn(.*)$"
enabled="y"
regexp="y"
ignore_case="y"
sequence="100"
>
<alias
script="OnLanguageLearn"
match="^languagelearn(.*)$"
enabled="y"
regexp="y"
ignore_case="y"
sequence="100"
>
Everytime I try, 'languagelearn common' it sends 'language' because @_ and subsequently $Langauge are always empty. What exactly am I doing wrong here? I think it's something on the alias side, but not sure.