Advertisement
Guest User

Pan nositting

a guest
Jan 27th, 2014
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.07 KB | None | 0 0
  1. Index: map/atcommand.c
  2. ===================================================================
  3. --- map/atcommand.c (revision 15234)
  4. +++ map/atcommand.c (working copy)
  5. @@ -7813,7 +7813,7 @@
  6. clif_displaymessage(fd, "fireworks sakura leaves rain nightenabled");
  7. clif_displaymessage(fd, "nogo noexp nobaseexp nojobexp noloot");
  8. clif_displaymessage(fd, "nomvploot restricted loadevent nochat partylock");
  9. - clif_displaymessage(fd, "guildlock");
  10. + clif_displaymessage(fd, "guildlock nositting");
  11. clif_displaymessage(fd, "");
  12. clif_displaymessage(fd, "Restricted mapflag: use Zones (1-7) to set a zone, 0 to turn off all zones for the map");
  13. return -1;
  14. @@ -8031,8 +8031,9 @@
  15. }
  16. else if (!strcmpi(map_flag,"guildlock")) {
  17. map[m].flag.guildlock=state;
  18. - }
  19. - else
  20. + } else if( !strcmpi(map_flag,"nositting") ) {
  21. + map[m].flag.nositting=state;
  22. + } else
  23. {
  24. clif_displaymessage(fd, "Invalid Mapflag");
  25. return -1;
  26. Index: map/battle.c
  27. ===================================================================
  28. --- map/battle.c (revision 15234)
  29. +++ map/battle.c (working copy)
  30. @@ -4024,9 +4024,9 @@
  31. { "bg_magic_attack_damage_rate", &battle_config.bg_magic_damage_rate, 60, 0, INT_MAX, },
  32. { "bg_misc_attack_damage_rate", &battle_config.bg_misc_damage_rate, 60, 0, INT_MAX, },
  33. { "bg_flee_penalty", &battle_config.bg_flee_penalty, 20, 0, INT_MAX, },
  34. + { "can_sit_anywhere", &battle_config.can_sit_anywhere, 0, 99, INT_MAX, },
  35. };
  36.  
  37. -
  38. int battle_set_value(const char* w1, const char* w2)
  39. {
  40. int val = config_switch(w2);
  41. Index: map/battle.h
  42. ===================================================================
  43. --- map/battle.h (revision 15234)
  44. +++ map/battle.h (working copy)
  45. @@ -497,6 +497,7 @@
  46. int bg_magic_damage_rate;
  47. int bg_misc_damage_rate;
  48. int bg_flee_penalty;
  49. + int can_sit_anywhere;
  50. } battle_config;
  51.  
  52. void do_init_battle(void);
  53. Index: map/clif.c
  54. ===================================================================
  55. --- map/clif.c (revision 15234)
  56. +++ map/clif.c (working copy)
  57. @@ -9662,6 +9662,13 @@
  58. break;
  59. }
  60.  
  61. + if( sd->bl.m >= 0 && map[sd->bl.m].flag.nositting
  62. + && (pc_isGM(sd) < battle_config.can_sit_anywhere) )
  63. + {
  64. + clif_message(&sd->bl, "You can't sit in this map!");
  65. + return;
  66. + }
  67. +
  68. if(pc_issit(sd)) {
  69. //Bugged client? Just refresh them.
  70. clif_sitting(&sd->bl);
  71. Index: map/map.h
  72. ===================================================================
  73. --- map/map.h (revision 15234)
  74. +++ map/map.h (working copy)
  75. @@ -485,6 +485,7 @@
  76. unsigned guildlock :1;
  77. unsigned src4instance : 1; // To flag this map when it's used as a src map for instances
  78. unsigned reset :1; // [Daegaladh]
  79. + unsigned nositting : 1;
  80. } flag;
  81. struct point save;
  82. struct npc_data *npc[MAX_NPC_PER_MAP];
  83. Index: map/npc.c
  84. ===================================================================
  85. --- map/npc.c (revision 15234)
  86. +++ map/npc.c (working copy)
  87. @@ -3116,6 +3116,8 @@
  88. map[m].flag.guildlock=state;
  89. else if (!strcmpi(w3,"reset"))
  90. map[m].flag.reset=state;
  91. + else if (!strcmpi(w3,"nositting"))
  92. + map[m].flag.nositting=state;
  93. else
  94. ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer));
  95.  
  96. Index: map/script.c
  97. ===================================================================
  98. --- map/script.c (revision 15234)
  99. +++ map/script.c (working copy)
  100. @@ -361,7 +361,8 @@
  101. MF_MONSTER_NOTELEPORT,
  102. MF_PVP_NOCALCRANK, //50
  103. MF_BATTLEGROUND,
  104. - MF_RESET
  105. + MF_RESET,
  106. + MF_NOSITTING
  107. };
  108.  
  109. const char* script_op2name(int op)
  110. @@ -9659,7 +9660,8 @@
  111. case MF_MONSTER_NOTELEPORT: script_pushint(st,map[m].flag.monster_noteleport); break;
  112. case MF_PVP_NOCALCRANK: script_pushint(st,map[m].flag.pvp_nocalcrank); break;
  113. case MF_BATTLEGROUND: script_pushint(st,map[m].flag.battleground); break;
  114. - case MF_RESET: script_pushint(st,map[m].flag.reset); break;
  115. + case MF_RESET: script_pushint(st,map[m].flag.reset); break;
  116. + case MF_NOSITTING: script_pushint(st,map[m].flag.nositting); break;
  117. }
  118. }
  119.  
  120. @@ -9729,7 +9731,8 @@
  121. case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport=1; break;
  122. case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank=1; break;
  123. case MF_BATTLEGROUND: map[m].flag.battleground = (!val || atoi(val) < 0 || atoi(val) > 2) ? 1 : atoi(val); break;
  124. - case MF_RESET: map[m].flag.reset=1; break;
  125. + case MF_RESET: map[m].flag.reset=1; break;
  126. + case MF_NOSITTING: map[m].flag.nositting = 1; break;
  127. }
  128. }
  129.  
  130. @@ -9796,7 +9799,8 @@
  131. case MF_MONSTER_NOTELEPORT: map[m].flag.monster_noteleport=0; break;
  132. case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank=0; break;
  133. case MF_BATTLEGROUND: map[m].flag.battleground=0; break;
  134. - case MF_RESET: map[m].flag.reset=0; break;
  135. + case MF_RESET: map[m].flag.reset=0; break;
  136. + case MF_NOSITTING: map[m].flag.nositting = 0; break;
  137. }
  138. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement