atcommand.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. // $Id: atcommand.h 148 2004-09-30 14:05:37Z MouseJstr $
  2. #ifndef _ATCOMMAND_H_
  3. #define _ATCOMMAND_H_
  4. enum AtCommandType {
  5. AtCommand_None = -1,
  6. AtCommand_Broadcast = 0,
  7. AtCommand_LocalBroadcast,
  8. AtCommand_MapMove,
  9. AtCommand_ResetState,
  10. AtCommand_RuraP,
  11. AtCommand_Rura,
  12. AtCommand_Warp,
  13. AtCommand_Where,
  14. AtCommand_JumpTo,
  15. AtCommand_Jump,
  16. AtCommand_Who,
  17. AtCommand_Who2,
  18. AtCommand_Who3,
  19. AtCommand_WhoMap,
  20. AtCommand_WhoMap2,
  21. AtCommand_WhoMap3,
  22. AtCommand_WhoGM,
  23. AtCommand_Save,
  24. AtCommand_Load,
  25. AtCommand_Speed,
  26. AtCommand_Storage,
  27. AtCommand_GuildStorage,
  28. AtCommand_Option,
  29. AtCommand_Hide,
  30. AtCommand_JobChange,
  31. AtCommand_JobChange2,
  32. AtCommand_JobChange3,
  33. AtCommand_Die,
  34. AtCommand_Kill,
  35. AtCommand_Alive,
  36. AtCommand_Kami,
  37. AtCommand_KamiB,
  38. AtCommand_Heal,
  39. AtCommand_Item,
  40. AtCommand_Item2,
  41. AtCommand_ItemReset,
  42. AtCommand_ItemCheck,
  43. AtCommand_BaseLevelUp,
  44. AtCommand_JobLevelUp,
  45. AtCommand_H,
  46. AtCommand_Help,
  47. AtCommand_GM,
  48. AtCommand_PvPOff,
  49. AtCommand_PvPOn,
  50. AtCommand_GvGOff,
  51. AtCommand_GvGOn,
  52. AtCommand_Model,
  53. AtCommand_Go,
  54. AtCommand_Spawn,
  55. AtCommand_Monster,
  56. AtCommand_MonsterSmall,
  57. AtCommand_MonsterBig,
  58. AtCommand_KillMonster,
  59. AtCommand_KillMonster2,
  60. AtCommand_Refine,
  61. AtCommand_Produce,
  62. AtCommand_Memo,
  63. AtCommand_GAT,
  64. AtCommand_Packet,
  65. AtCommand_StatusPoint,
  66. AtCommand_SkillPoint,
  67. AtCommand_Zeny,
  68. AtCommand_Param,
  69. AtCommand_Strength,
  70. AtCommand_Agility,
  71. AtCommand_Vitality,
  72. AtCommand_Intelligence,
  73. AtCommand_Dexterity,
  74. AtCommand_Luck,
  75. AtCommand_GuildLevelUp,
  76. AtCommand_MakeEgg,
  77. AtCommand_PetFriendly,
  78. AtCommand_PetHungry,
  79. AtCommand_PetRename,
  80. AtCommand_CharPetRename, // by Yor
  81. AtCommand_Recall,
  82. AtCommand_CharacterJob,
  83. AtCommand_CharacterJob2,
  84. AtCommand_CharacterJob3,
  85. AtCommand_Revive,
  86. AtCommand_CharacterStats,
  87. AtCommand_CharacterStatsAll,
  88. AtCommand_CharacterOption,
  89. AtCommand_CharacterSave,
  90. AtCommand_CharacterLoad,
  91. AtCommand_Night,
  92. AtCommand_Day,
  93. AtCommand_Doom,
  94. AtCommand_DoomMap,
  95. AtCommand_Raise,
  96. AtCommand_RaiseMap,
  97. AtCommand_CharacterBaseLevel,
  98. AtCommand_CharacterJobLevel,
  99. AtCommand_Kick,
  100. AtCommand_KickAll,
  101. AtCommand_AllSkill,
  102. AtCommand_QuestSkill,
  103. AtCommand_CharQuestSkill,
  104. AtCommand_LostSkill,
  105. AtCommand_CharLostSkill,
  106. AtCommand_SpiritBall,
  107. AtCommand_Party,
  108. AtCommand_Guild,
  109. AtCommand_AgitStart,
  110. AtCommand_AgitEnd,
  111. AtCommand_MapExit,
  112. AtCommand_IDSearch,
  113. AtCommand_CharSkReset,
  114. AtCommand_CharStReset,
  115. AtCommand_CharReset,
  116. //by chbrules
  117. AtCommand_CharModel,
  118. AtCommand_CharSKPoint,
  119. AtCommand_CharSTPoint,
  120. AtCommand_CharZeny,
  121. AtCommand_RecallAll,
  122. AtCommand_ReloadItemDB,
  123. AtCommand_ReloadMobDB,
  124. AtCommand_ReloadSkillDB,
  125. #ifndef TXT_ONLY
  126. AtCommand_Rehash,
  127. #else /* TXT_ONLY */
  128. AtCommand_ReloadScript,
  129. #endif /* TXT_ONLY */
  130. AtCommand_ReloadGMDB,
  131. AtCommand_MapInfo,
  132. AtCommand_Dye,
  133. AtCommand_Hstyle,
  134. AtCommand_Hcolor,
  135. AtCommand_StatAll,
  136. AtCommand_CharChangeSex, // by Yor
  137. AtCommand_CharBlock, // by Yor
  138. AtCommand_CharBan, // by Yor
  139. AtCommand_CharUnBlock, // by Yor
  140. AtCommand_CharUnBan, // by Yor
  141. AtCommand_MountPeco, // by Valaris
  142. AtCommand_CharMountPeco, // by Yor
  143. AtCommand_GuildSpy, // [Syrus22]
  144. AtCommand_PartySpy, // [Syrus22]
  145. AtCommand_RepairAll, // [Valaris]
  146. AtCommand_GuildRecall, // by Yor
  147. AtCommand_PartyRecall, // by Yor
  148. // AtCommand_Nuke, // [Valaris]
  149. AtCommand_Enablenpc,
  150. AtCommand_Disablenpc,
  151. AtCommand_ServerTime, // by Yor
  152. AtCommand_CharDelItem, // by Yor
  153. AtCommand_Jail, // by Yor
  154. AtCommand_UnJail, // by Yor
  155. AtCommand_Disguise, // [Valaris]
  156. AtCommand_UnDisguise, // by Yor
  157. AtCommand_CharDisguise, // Kalaspuff
  158. AtCommand_CharUnDisguise, // Kalaspuff
  159. AtCommand_EMail, // by Yor
  160. AtCommand_Hatch,
  161. AtCommand_Effect, // by Apple
  162. AtCommand_Char_Item_List, // by Yor
  163. AtCommand_Char_Storage_List, // by Yor
  164. AtCommand_Char_Cart_List, // by Yor
  165. AtCommand_AddWarp, // by MouseJstr
  166. AtCommand_Follow, // by MouseJstr
  167. AtCommand_SkillOn, // by MouseJstr
  168. AtCommand_SkillOff, // by MouseJstr
  169. AtCommand_Killer, // by MouseJstr
  170. AtCommand_NpcMove, // by MouseJstr
  171. AtCommand_Killable, // by MouseJstr
  172. AtCommand_CharKillable, // by MouseJstr
  173. AtCommand_Chareffect, // by MouseJstr
  174. AtCommand_Chardye, // by MouseJstr
  175. AtCommand_Charhairstyle, // by MouseJstr
  176. AtCommand_Charhaircolor, // by MouseJstr
  177. AtCommand_Dropall, // by MouseJstr
  178. AtCommand_Chardropall, // by MouseJstr
  179. AtCommand_Storeall, // by MouseJstr
  180. AtCommand_Charstoreall, // by MouseJstr
  181. AtCommand_Skillid, // by MouseJstr
  182. AtCommand_Useskill, // by MouseJstr
  183. AtCommand_Summon,
  184. AtCommand_Rain,
  185. AtCommand_Snow,
  186. AtCommand_Sakura,
  187. AtCommand_Fog,
  188. AtCommand_Leaves,
  189. AtCommand_AdjGmLvl, // MouseJstr
  190. AtCommand_AdjCmdLvl, // MouseJstr
  191. AtCommand_Trade, // MouseJstr
  192. AtCommand_Send,
  193. AtCommand_SetBattleFlag,
  194. AtCommand_UnMute,
  195. AtCommand_UpTime, // by MC Cameri
  196. AtCommand_ChangeSex, // by MC Cameri
  197. AtCommand_Mute, // [celest]
  198. AtCommand_WhoZeny, // [Valaris] <-- LOL...(MC Cameri) worth it.
  199. AtCommand_HappyHappyJoyJoy, // [Valaris]
  200. AtCommand_Refresh, // by MC Cameri
  201. AtCommand_PetId, // by MC Cameri
  202. AtCommand_Identify, // by MC Cameri
  203. // SQL-only commands start
  204. #ifndef TXT_ONLY
  205. AtCommand_CheckMail, // [Valaris]
  206. AtCommand_ListMail, // [Valaris]
  207. AtCommand_ListNewMail, // [Valaris]
  208. AtCommand_ReadMail, // [Valaris]
  209. AtCommand_SendMail, // [Valaris]
  210. AtCommand_DeleteMail, // [Valaris]
  211. AtCommand_SendPriorityMail, // [Valaris]
  212. AtCommand_Sound, // [Valaris]
  213. AtCommand_RefreshOnline, // [Valaris]
  214. // SQL-only commands end
  215. #endif
  216. // end
  217. AtCommand_Unknown,
  218. AtCommand_MAX
  219. };
  220. typedef enum AtCommandType AtCommandType;
  221. typedef struct AtCommandInfo {
  222. AtCommandType type;
  223. const char* command;
  224. int level;
  225. int (*proc)(const int, struct map_session_data*,
  226. const char* command, const char* message);
  227. } AtCommandInfo;
  228. AtCommandType
  229. is_atcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl);
  230. AtCommandType atcommand(
  231. const int level, const char* message, AtCommandInfo* info);
  232. int get_atcommand_level(const AtCommandType type);
  233. char * msg_txt(int msg_number); // [Yor]
  234. int atcommand_item(const int fd, struct map_session_data* sd,const char* command, const char* message); // [Valaris]
  235. int atcommand_rura(const int fd, struct map_session_data* sd,const char* command, const char* message); // [Yor]
  236. int atcommand_spawn(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Valaris]
  237. int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Yor]
  238. int atcommand_recall(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Yor]
  239. int atcommand_config_read(const char *cfgName);
  240. int msg_config_read(const char *cfgName);
  241. char *str_lower(char *str);
  242. #endif