« blib/lib/auto/share/dist/Games-Axmud/plugins/convertlpc.pm
↑ Summary
blib/lib/auto/share/dist/Games-Axmud/plugins/wilderness.pm »
| 1 | #!/usr/bin/perl | ||
| 2 | package mcptest; | ||
| 3 | #: Version: 1.0 | ||
| 4 | #: Description: An example plugin that shows how to implement MCP packages | ||
| 5 | #: Author: A S Lewis | ||
| 6 | #: Copyright: This plugin is in the public domain, but you are encouraged to share any modifications | ||
| 7 | # and improvements you make! | ||
| 8 | |||
| 9 | # =-=-=-=-=-=-=-=-=-= | ||
| 10 | # PLUGIN INSTRUCTIONS | ||
| 11 | # =-=-=-=-=-=-=-=-=-= | ||
| 12 | # | ||
| 13 | # This example plugin implements an imaginary MCP package at an imaginary MUD, deathmud.com 6666. | ||
| 14 | # The imaginary package is therefore called dns-com-deathmud-pingpong. You can modify this | ||
| 15 | # plugin to implement any real MCP package | ||
| 16 | # | ||
| 17 | # The plugin needs to be loaded before you connect to a real world. Connect to any world in | ||
| 18 | # 'offline' mode, and then type: | ||
| 19 | # | ||
| 20 | # ;addinitialplugin -s | ||
| 21 | # ;save | ||
| 22 | |||
| 23 | use strict; | ||
| 24 | #use diagnostics; | ||
| 25 | use warnings; | ||
| 26 | |||
| 27 | # Modules used by this plugin | ||
| 28 | require _mcptest_objs; | ||
| 29 | |||
| 30 | # Standard BEGIN / END functions | ||
| 31 | BEGIN { | ||
| 32 | |||
| 33 | use Glib qw(TRUE FALSE); | ||
| 34 | } | ||
| 35 | |||
| 36 | END {} | ||
| 37 | |||
| 38 | # Tell Axmud to add the MCP package object defined by this plugin | ||
| 39 | $axmud::CLIENT->addPluginMcpPackages( | ||
| 40 | 'mcptest', | ||
| 41 | # The MCP package name | ||
| 42 | 'dns-com-deathmud-pingpong', | ||
| 43 | # The MCP package object, written in Perl, inheriting most of its code from GA::Generic::Mcp | ||
| 44 | # and defined by this plugin | ||
| 45 | 'Games::Axmud::Mcp::PingPong', | ||
| 46 | # Minimum version of the MCP package implemented by this plugin | ||
| 47 | '1.0', | ||
| 48 | # Maximum version of the MCP package implemented by this plugin | ||
| 49 | '1.0', | ||
| 50 | # List of MCP packages which this package supplants (in other words, a session won't use | ||
| 51 | # any of these package, if 'dns-com-deathmud-pingpong' can be used | ||
| 52 | 'dns-com-boringmud-pingpong', | ||
| 53 | 'dns-com-emptymud-pingpong', | ||
| 54 | ); | ||
| 55 | |||
| 56 | # Package must return a true value | ||
| 57 | 1 |