Advertisement
akbare

add storage mapflag nostorage

Jan 1st, 2024
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | Gaming | 0 0
  1. https://rathena.org/board/topic/76567-disable-storage/
  2.  
  3. Hello,
  4.  
  5. I solved this issue by creating my custom mapflag and here is manual, how to do it ?
  6.  
  7. open: src/map/map.hpp
  8. find:
  9.  
  10. enum e_mapflag : int16 {
  11. insert BEFORE "MF_MAX"
  12.  
  13. MF_NOSTORAGE,
  14. MF_MAX
  15. };
  16. open: src/map/script_constants.hpp
  17. find:
  18.  
  19. /* mapflags */
  20. export_constant(MF_NOMEMO);
  21. export_constant(MF_NOTELEPORT);
  22. add to end of this block:
  23.  
  24. export_constant(MF_NOSTORAGE);
  25. open src/map/atcommand.cpp
  26. find:
  27.  
  28. if (map_getmapflag(m_id, MF_NOCOSTUME))
  29. strcat(atcmd_output, " NoCostume |");
  30. add:
  31.  
  32. if (map_getmapflag(m_id, MF_NOSTORAGE))
  33. strcat(atcmd_output, " NoStorage |");
  34. find:
  35.  
  36. ACMD_FUNC(storage)
  37. {
  38. nullpo_retr(-1, sd);
  39. add:
  40.  
  41. if (map_getmapflag(sd->bl.m, MF_NOSTORAGE)) {
  42. clif_displaymessage(fd, msg_txt(sd, 1516)); // Command is disabled on this map.
  43. return -1;
  44. }
  45. find:
  46.  
  47. ACMD_FUNC(guildstorage)
  48. {
  49. nullpo_retr(-1, sd);
  50. add:
  51.  
  52. if (map_getmapflag(sd->bl.m, MF_NOSTORAGE)) {
  53. clif_displaymessage(fd, msg_txt(sd, 1516)); // Command is disabled on this map.
  54. return -1;
  55. }
  56. open: conf/msg_conf/map_msg.conf
  57. to end of this document, add new line:
  58.  
  59. 1516: Command is disabled on this map.
  60. Be careful, if this ID is already used, you must to change id, to latest available and change this id in "msg_txt(sd, yourid)"
  61.  
  62. Recompile your project.
  63.  
  64. Create file in npc/mapflag/nostorage.txt
  65. Insert into file:
  66.  
  67. prontera mapflag nostorage
  68. Add line to npc/script_mapflags.conf
  69.  
  70. npc: npc/mapflag/nostorage.txt
  71. Reload NPC scripts.
  72.  
  73. At this time, @storage and @guildstorage commands are not allowed in prontera.
  74.  
  75. ENJOY ?
  76.  
  77. Edited April 6, 2021 by Seva
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement