atcommand.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef _ATCOMMAND_H_
  4. #define _ATCOMMAND_H_
  5. struct map_session_data;
  6. //This is the distance at which @autoloot works,
  7. //if the item drops farther from the player than this,
  8. //it will not be autolooted. [Skotlex]
  9. //Note: The range is unlimited unless this define is set.
  10. //#define AUTOLOOT_DISTANCE AREA_SIZE
  11. extern char atcommand_symbol;
  12. extern char charcommand_symbol;
  13. typedef enum {
  14. COMMAND_ATCOMMAND = 1,
  15. COMMAND_CHARCOMMAND = 2,
  16. } AtCommandType;
  17. typedef int (*AtCommandFunc)(const int fd, struct map_session_data* sd, const char* command, const char* message);
  18. bool is_atcommand(const int fd, struct map_session_data* sd, const char* message, int type);
  19. void do_init_atcommand(void);
  20. void do_final_atcommand(void);
  21. void atcommand_db_load_groups(int* group_ids);
  22. bool atcommand_exists(const char* name);
  23. const char* msg_txt(int msg_number);
  24. int msg_config_read(const char* cfgName);
  25. void do_final_msg(void);
  26. extern int atcmd_binding_count;
  27. // @commands (script based)
  28. struct atcmd_binding_data {
  29. char command[50];
  30. char npc_event[50];
  31. int level;
  32. int level2;
  33. };
  34. struct atcmd_binding_data** atcmd_binding;
  35. struct atcmd_binding_data* get_atcommandbind_byname(const char* name);
  36. #endif /* _ATCOMMAND_H_ */