From 52ed37bd877a4f462171a1501ec1ab2c4fd19eea Mon Sep 17 00:00:00 2001 From: cookiecrumbs Date: Sun, 22 Jul 2012 05:15:32 +0000 Subject: Added the ability to bind atcommands to NPC events (ex: NPCNAME::OnEvent); original version by ToastOfDoom however heavily modified by I enabling command level at the invoking/character (@/#) level and fixes to prevent console errors as well as fixes aimed to ensure compatibility with rAthena. Updated the script_commands.txt documentation with the following script commands: bindatcmd, unbindatcmd and useatcmd. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16471 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/map/atcommand.h') diff --git a/src/map/atcommand.h b/src/map/atcommand.h index aaf477a97..9bc844664 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -34,4 +34,17 @@ const char* msg_txt(int msg_number); int msg_config_read(const char* cfgName); void do_final_msg(void); +#define MAX_ATCMD_BINDINGS 100 + +// @commands (script based) +typedef struct Atcmd_Binding { + char command[50]; + char npc_event[50]; + int level; + int level2; +} Atcmd_Binding; + +struct Atcmd_Binding atcmd_binding[MAX_ATCMD_BINDINGS]; +struct Atcmd_Binding* get_atcommandbind_byname(const char* name); + #endif /* _ATCOMMAND_H_ */ -- cgit v1.2.3-70-g09d2