Guest User

Untitled

a guest
Nov 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. Index: battle.c
  2. ===================================================================
  3. --- battle.c (revision 16767)
  4. +++ battle.c (working copy)
  5. @@ -5121,7 +5121,7 @@
  6. {
  7. struct mob_data *md = BL_CAST(BL_MOB, t_bl);
  8.  
  9. - if( !((agit_flag || agit2_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
  10. + if( !((agit_flag || agit2_flag || koe_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
  11. return 0; // Disable guardians/emperiums owned by Guilds on non-woe times.
  12. break;
  13. }
  14. @@ -5184,7 +5184,7 @@
  15. case BL_MOB:
  16. {
  17. struct mob_data *md = BL_CAST(BL_MOB, s_bl);
  18. - if( !((agit_flag || agit2_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
  19. + if( !((agit_flag || agit2_flag || koe_flag) && map[m].flag.gvg_castle) && md->guardian_data && md->guardian_data->guild_id )
  20. return 0; // Disable guardians/emperium owned by Guilds on non-woe times.
  21.  
  22. if( !md->special_state.ai )
  23. Index: map.c
  24. ===================================================================
  25. --- map.c (revision 16767)
  26. +++ map.c (working copy)
  27. @@ -125,6 +125,8 @@
  28. int agit2_flag = 0;
  29. int night_flag = 0; // 0=day, 1=night [Yor]
  30.  
  31. +int koe_flag = 0; // Emistry's koe_toggle
  32. +
  33. struct charid_request {
  34. struct charid_request* next;
  35. int charid;// who want to be notified of the nick
  36. Index: map.h
  37. ===================================================================
  38. --- map.h (revision 16767)
  39. +++ map.h (working copy)
  40. @@ -600,6 +600,7 @@
  41. extern int agit_flag;
  42. extern int agit2_flag;
  43. extern int night_flag; // 0=day, 1=night [Yor]
  44. +extern int koe_flag; // koe_toggle [Emistry]
  45. extern int enable_spy; //Determines if @spy commands are active.
  46. extern char db_path[256];
  47.  
  48. Index: script.c
  49. ===================================================================
  50. --- script.c (revision 16767)
  51. +++ script.c (working copy)
  52. @@ -16958,7 +16958,22 @@
  53. return 0;
  54. }
  55.  
  56. +/* ===================
  57. + * Toggle KOE System
  58. + * koe_toggle(0); => disable koe
  59. + * koe_toggle(1); => enable koe
  60. + * =================== */
  61. +BUILDIN_FUNC(koe_toggle) {
  62.  
  63. + if( script_getnum(st,2) ){
  64. + koe_flag = 1;
  65. + }else{
  66. + koe_flag = 0;
  67. + }
  68. + script_pushint(st, koe_flag);
  69. +
  70. + return 0;
  71. +}
  72. +
  73. +
  74. // declarations that were supposed to be exported from npc_chat.c
  75. #ifdef PCRE_SUPPORT
  76. BUILDIN_FUNC(defpattern);
  77. @@ -17397,6 +17412,7 @@
  78. BUILDIN_DEF(get_revision,""),
  79. BUILDIN_DEF(freeloop,"i"),
  80. BUILDIN_DEF(getrandgroupitem, "ii"),
  81. + BUILDIN_DEF(koe_toggle,"i"),
  82. /**
  83. * @commands (script based)
  84. **/
Add Comment
Please, Sign In to add comment