New Perl Command System
Well the new perl command system is in CVS. This lets you add new '#command' style in game commands written in perl. All old commands still work, this just allows you to extend it withouth coding in c++.
The commands go into a file named commands.pl in the same dir as the exe's. things in features.h: EMBPERL_COMMANDS - enable perl commands EMBPERL_XS & EMBPERL_XS_CLASSES - not required, but theres not a lot you can do without them. COMMANDS_PERL_OVERRIDE - allow perl commands to override C++ commands with the same name. the only required sub in commands.pl is commands_init... which should basically consist of a bunch of calls to command_add(command name, description, access_level). Example commands.pl file displaying some example perl commands, as well as some of the stuff you can do with XS classes: Code:
sub commands_init { |
This is a nifty idea...will #reloadquest refresh this file as well?
|
Quote:
|
Very good job FNW.
|
Wow! Nice work!
|
Cool
Keep up your great work FNW. For me it s easier to code in perl than C++. It seems to me that the new system has fixed also some broken quest commands. Sorry for my bad english. I m german. |
Damn, you're the man... this is very exciting. I shall put this to great use in the near future! 8)
|
question on
command_add("bank", "- spawn a temporary banker", 200); command_add("giveitem", " (itemid) [charges] - give an item to a mob", 200); what is the , 200 for at the end? and do we compile with perl like normal for this to compile? |
Its the same syntax as command.cpp but without the function name at the end..
So the integer would be the default minimum status. |
thanks cis, but i cant get the latest CVS to compile, it says im missing Common_profile.h you know where i can get this?
|
All times are GMT -4. The time now is 04:28 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.