atcommand.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  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, Now #petrename
  81. AtCommand_Recall,
  82. // AtCommand_CharacterJob, // Now #jobchange
  83. AtCommand_Revive,
  84. // AtCommand_CharacterStats, // Now #stats
  85. AtCommand_CharacterStatsAll,
  86. // AtCommand_CharacterOption, // Now #option
  87. // AtCommand_CharacterSave, // Now #save
  88. AtCommand_CharacterLoad,
  89. AtCommand_Night,
  90. AtCommand_Day,
  91. AtCommand_Doom,
  92. AtCommand_DoomMap,
  93. AtCommand_Raise,
  94. AtCommand_RaiseMap,
  95. AtCommand_CharacterBaseLevel,
  96. AtCommand_CharacterJobLevel,
  97. AtCommand_Kick,
  98. AtCommand_KickAll,
  99. AtCommand_AllSkill,
  100. AtCommand_QuestSkill,
  101. AtCommand_CharQuestSkill,
  102. AtCommand_LostSkill,
  103. AtCommand_CharLostSkill,
  104. AtCommand_SpiritBall,
  105. AtCommand_Party,
  106. AtCommand_Guild,
  107. AtCommand_AgitStart,
  108. AtCommand_AgitEnd,
  109. AtCommand_MapExit,
  110. AtCommand_IDSearch,
  111. AtCommand_CharSkReset,
  112. AtCommand_CharStReset,
  113. //by chbrules
  114. AtCommand_CharModel,
  115. AtCommand_CharSKPoint,
  116. AtCommand_CharSTPoint,
  117. // AtCommand_CharZeny, //now #zeny
  118. AtCommand_RecallAll,
  119. AtCommand_ReloadItemDB,
  120. AtCommand_ReloadMobDB,
  121. AtCommand_ReloadSkillDB,
  122. AtCommand_ReloadScript,
  123. AtCommand_ReloadGMDB,
  124. AtCommand_ReloadAtcommand,
  125. AtCommand_ReloadBattleConf,
  126. AtCommand_ReloadStatusDB,
  127. AtCommand_ReloadPcDB,
  128. AtCommand_MapInfo,
  129. AtCommand_Dye,
  130. AtCommand_Hstyle,
  131. AtCommand_Hcolor,
  132. AtCommand_StatAll,
  133. AtCommand_CharChangeSex, // by Yor
  134. AtCommand_CharBlock, // by Yor
  135. AtCommand_CharBan, // by Yor
  136. AtCommand_CharUnBlock, // by Yor
  137. AtCommand_CharUnBan, // by Yor
  138. AtCommand_MountPeco, // by Valaris
  139. AtCommand_CharMountPeco, // by Yor
  140. AtCommand_GuildSpy, // [Syrus22]
  141. AtCommand_PartySpy, // [Syrus22]
  142. AtCommand_RepairAll, // [Valaris]
  143. AtCommand_GuildRecall, // by Yor
  144. AtCommand_PartyRecall, // by Yor
  145. AtCommand_Nuke, // [Valaris]
  146. AtCommand_Enablenpc,
  147. AtCommand_Hidenpc,
  148. AtCommand_Disablenpc,
  149. AtCommand_ServerTime, // by Yor
  150. AtCommand_CharDelItem, // by Yor
  151. AtCommand_Jail, // by Yor
  152. AtCommand_UnJail, // by Yor
  153. AtCommand_Disguise, // [Valaris]
  154. AtCommand_UnDisguise, // by Yor
  155. AtCommand_CharDisguise, // Kalaspuff
  156. AtCommand_CharUnDisguise, // Kalaspuff
  157. AtCommand_EMail, // by Yor
  158. AtCommand_Hatch,
  159. AtCommand_Effect, // by Apple
  160. // AtCommand_Char_Item_List, // by Yor, now #itemlist
  161. // AtCommand_Char_Storage_List, // by Yor, now #storagelist
  162. AtCommand_Char_Cart_List, // by Yor
  163. AtCommand_AddWarp, // by MouseJstr
  164. AtCommand_Follow, // by MouseJstr
  165. AtCommand_SkillOn, // by MouseJstr
  166. AtCommand_SkillOff, // by MouseJstr
  167. AtCommand_Killer, // by MouseJstr
  168. AtCommand_NpcMove, // by MouseJstr
  169. AtCommand_Killable, // by MouseJstr
  170. AtCommand_CharKillable, // by MouseJstr
  171. // AtCommand_Chareffect, // by MouseJstr, now #effect
  172. AtCommand_Dropall, // by MouseJstr
  173. AtCommand_Chardropall, // by MouseJstr
  174. AtCommand_Storeall, // by MouseJstr
  175. AtCommand_Charstoreall, // by MouseJstr
  176. AtCommand_Skillid, // by MouseJstr
  177. AtCommand_Useskill, // by MouseJstr
  178. AtCommand_Summon,
  179. AtCommand_Rain,
  180. AtCommand_Snow,
  181. AtCommand_Sakura,
  182. AtCommand_Fog,
  183. AtCommand_Leaves,
  184. AtCommand_AdjGmLvl, // MouseJstr
  185. AtCommand_AdjCmdLvl, // MouseJstr
  186. AtCommand_Trade, // MouseJstr
  187. AtCommand_Send,
  188. AtCommand_SetBattleFlag,
  189. AtCommand_UnMute,
  190. AtCommand_Clearweather, // by Dexity
  191. AtCommand_UpTime, // by MC Cameri
  192. AtCommand_ChangeSex, // by MC Cameri
  193. AtCommand_Mute, // [celest]
  194. AtCommand_WhoZeny, // [Valaris] <-- LOL...(MC Cameri) worth it.
  195. AtCommand_HappyHappyJoyJoy, // [Valaris]
  196. AtCommand_Refresh, // by MC Cameri
  197. AtCommand_PetId, // by MC Cameri
  198. AtCommand_Identify, // by MC Cameri
  199. AtCommand_Gmotd, // Added by MC Cameri, created by davidsiaw
  200. AtCommand_MiscEffect, // by MC Cameri
  201. AtCommand_MobSearch,
  202. AtCommand_CleanMap,
  203. AtCommand_NpcTalk,
  204. AtCommand_PetTalk,
  205. AtCommand_Users,
  206. // SQL-only commands start
  207. #ifndef TXT_ONLY
  208. AtCommand_CheckMail, // [Valaris]
  209. AtCommand_ListMail, // [Valaris]
  210. AtCommand_ListNewMail, // [Valaris]
  211. AtCommand_ReadMail, // [Valaris]
  212. AtCommand_SendMail, // [Valaris]
  213. AtCommand_DeleteMail, // [Valaris]
  214. AtCommand_SendPriorityMail, // [Valaris]
  215. // AtCommand_Sound, // [Valaris]
  216. AtCommand_RefreshOnline, // [Valaris]
  217. // SQL-only commands end
  218. #endif
  219. AtCommand_SkillTree, // by MouseJstr
  220. AtCommand_Marry, // by MouseJstr
  221. AtCommand_Divorce, // by MouseJstr
  222. AtCommand_Rings, // by MouseJstr
  223. AtCommand_Grind, // by MouseJstr
  224. AtCommand_Grind2, // by MouseJstr
  225. AtCommand_DMStart, // by MouseJstr
  226. AtCommand_DMTick, // by MouseJstr
  227. AtCommand_JumpToId, // by Dino9021
  228. AtCommand_JumpToId2, // by Dino9021
  229. AtCommand_RecallId, // by Dino9021
  230. AtCommand_RecallId2, // by Dino9021
  231. AtCommand_KickId, // by Dino9021
  232. AtCommand_KickId2, // by Dino9021
  233. AtCommand_ReviveId, // by Dino9021
  234. AtCommand_ReviveId2, // by Dino9021
  235. AtCommand_KillId, // by Dino9021
  236. AtCommand_KillId2, // by Dino9021
  237. AtCommand_CharKillableId, // by Dino9021
  238. AtCommand_CharKillableId2, // by Dino9021
  239. AtCommand_Sound,
  240. AtCommand_UndisguiseAll,
  241. AtCommand_DisguiseAll,
  242. AtCommand_ChangeLook,
  243. AtCommand_AutoLoot, //by Upa-Kun
  244. AtCommand_MobInfo, //by Lupus
  245. AtCommand_Adopt, // by Veider
  246. // end
  247. AtCommand_Unknown,
  248. AtCommand_MAX
  249. };
  250. typedef enum AtCommandType AtCommandType;
  251. typedef struct AtCommandInfo {
  252. AtCommandType type;
  253. const char* command;
  254. int level;
  255. int (*proc)(const int, struct map_session_data*,
  256. const char* command, const char* message);
  257. } AtCommandInfo;
  258. AtCommandType
  259. is_atcommand(const int fd, struct map_session_data* sd, const char* message, int gmlvl);
  260. AtCommandType atcommand(
  261. struct map_session_data *sd,
  262. const int level, const char* message, AtCommandInfo* info);
  263. int get_atcommand_level(const AtCommandType type);
  264. char * msg_txt(int msg_number); // [Yor]
  265. int atcommand_item(const int fd, struct map_session_data* sd,const char* command, const char* message); // [Valaris]
  266. int atcommand_rura(const int fd, struct map_session_data* sd,const char* command, const char* message); // [Yor]
  267. int atcommand_spawn(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Valaris]
  268. int atcommand_jumpto(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Yor]
  269. int atcommand_recall(const int fd, struct map_session_data* sd, const char* command, const char* message); // [Yor]
  270. int atcommand_config_read(const char *cfgName);
  271. int msg_config_read(const char *cfgName);
  272. void do_final_msg();
  273. char *estr_lower(char *str);
  274. char * job_name(int class_);
  275. int e_mail_check(char *email);
  276. #endif