Chun3 Posted September 27, 2019 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 67 Reputation: 9 Joined: 08/22/19 Last Seen: February 2, 2020 Share Posted September 27, 2019 View File PK mode if MVP is alive. When a mvp spawns on his natural map, the pk mode goes on, when he dies, off. @monster or script commands doesn't trigger. Submitter Chun3 Submitted 09/27/2019 Category Source Modifications Video Content Author Chun Quote Link to comment Share on other sites More sharing options...
noobzter003 Posted September 29, 2019 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 109 Reputation: 5 Joined: 03/17/16 Last Seen: Tuesday at 08:12 AM Share Posted September 29, 2019 (edited) Great release mate!! but it is possible put range the pk mode, not in whole map. example, 40 Cell near the boss Edited September 29, 2019 by noobzter003 Quote Link to comment Share on other sites More sharing options...
Psy Ops Posted September 29, 2019 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 70 Reputation: 0 Joined: 06/19/18 Last Seen: January 24, 2023 Share Posted September 29, 2019 Great release! Quote Link to comment Share on other sites More sharing options...
Chun3 Posted September 29, 2019 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 67 Reputation: 9 Joined: 08/22/19 Last Seen: February 2, 2020 Author Share Posted September 29, 2019 9 hours ago, noobzter003 said: Great release mate!! but it is possible put range the pk mode, not in whole map. example, 40 Cell near the boss Will search for it later, since you have x and y from the respawn, just need to know how to set cellflagpvp using src 3 hours ago, Psy Ops said: Great release! Thanks! Quote Link to comment Share on other sites More sharing options...
PsyOps Posted February 19, 2020 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: 3 hours ago Share Posted February 19, 2020 Hi, just a question. Tried the script. This is my error. Currently using rathena trunk from 2019 February. Quote Link to comment Share on other sites More sharing options...
Obiwan Posted April 25, 2020 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 88 Reputation: 0 Joined: 08/25/12 Last Seen: November 2, 2021 Share Posted April 25, 2020 On 2/19/2020 at 10:42 PM, Dev G Inc said: Hi, just a question. Tried the script. This is my error. Currently using rathena trunk from 2019 February. anyone have this fix diff for latest rathena Quote Link to comment Share on other sites More sharing options...
Jayz Posted April 25, 2020 Group: Members Topic Count: 59 Topics Per Day: 0.01 Content Count: 407 Reputation: 55 Joined: 07/24/12 Last Seen: October 22, 2024 Share Posted April 25, 2020 51 minutes ago, Obiwan said: anyone have this fix diff for latest rathena This fix source already added on the description, next time read before click //On latest rAthena: open src/map/mob.c on int mob_delayspawn find md->spawn_timer = INVALID_TIMER; mob_spawn(md); change to md->spawn_timer = INVALID_TIMER; mob_spawn(md); ++ if( md->state.boss ) { ++ map_setmapflag(bl->m, MF_PVP, true); ++ } on int mob_spawn find if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; change to if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; ++ if(md->spawn->state.boss) map_setmapflag(md->bl.m, MF_PVP, true); on int mob_dead find // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); change to (Config your mvp_tomb_enabled on battle folder.) // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); ++ if(md->spawn->state.boss) { ++ map_setmapflag(md->bl.m, MF_PVP, false); ++ } recompile and is ready. Quote Link to comment Share on other sites More sharing options...
Obiwan Posted April 25, 2020 Group: Members Topic Count: 25 Topics Per Day: 0.01 Content Count: 88 Reputation: 0 Joined: 08/25/12 Last Seen: November 2, 2021 Share Posted April 25, 2020 (edited) 2 hours ago, Zack- said: This fix source already added on the description, next time read before click //On latest rAthena: open src/map/mob.c on int mob_delayspawn find md->spawn_timer = INVALID_TIMER; mob_spawn(md); change to md->spawn_timer = INVALID_TIMER; mob_spawn(md); ++ if( md->state.boss ) { ++ map_setmapflag(bl->m, MF_PVP, true); ++ } on int mob_spawn find if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; change to if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; ++ if(md->spawn->state.boss) map_setmapflag(md->bl.m, MF_PVP, true); on int mob_dead find // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); change to (Config your mvp_tomb_enabled on battle folder.) // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); ++ if(md->spawn->state.boss) { ++ map_setmapflag(md->bl.m, MF_PVP, false); ++ } recompile and is ready. mob.cpp: In function ‘int mob_delayspawn(int, t_tick, int, intptr_t)’: mob.cpp:1052:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1088:54: error: a function-definition is not allowed here before ‘{’ tok en int mob_count_sub(struct block_list *bl, va_list ap) { ^ mob.cpp:1105:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1207:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1241:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1268:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1330:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1356:70: error: a function-definition is not allowed here before ‘{’ tok en static int mob_ai_sub_hard_bg_ally(struct block_list *bl,va_list ap) { ^ mob.cpp:1374:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1398:64: error: a function-definition is not allowed here before ‘{’ tok en static int mob_warpchase_sub(struct block_list *bl,va_list ap) { ^ mob.cpp:1430:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1516:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1565:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1660:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1686:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1977:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:1993:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2004:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2079:31: error: a function-definition is not allowed here before ‘{’ tok en static TIMER_FUNC(mob_ai_lazy){ ^ mob.cpp:2087:31: error: a function-definition is not allowed here before ‘{’ tok en static TIMER_FUNC(mob_ai_hard){ ^ mob.cpp:2103:75: error: a function-definition is not allowed here before ‘{’ tok en void mob_setdropitem_option(struct item *itm, struct s_mob_drop *mobdrop) { ^ mob.cpp:2120:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2136:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2154:39: error: a function-definition is not allowed here before ‘{’ tok en static TIMER_FUNC(mob_delay_item_drop){ ^ mob.cpp:2182:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2218:29: error: a function-definition is not allowed here before ‘{’ tok en TIMER_FUNC(mob_timer_delete){ ^ mob.cpp:2240:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2257:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2264:24: error: a function-definition is not allowed here before ‘{’ tok en TIMER_FUNC(mob_respawn){ ^ mob.cpp:2273:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2397:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:2442:1: error: a function-definition is not allowed here before ‘{’ toke n { ^ mob.cpp:5734:1: error: expected ‘}’ at end of input } ^ make[1]: *** [obj/mob.o] Error 1 make[1]: Leaving directory `/root/trunk/src/map' make: *** [map] Error 2 hello i got this error i did what on the diff files update: fixed now thank you Edited April 25, 2020 by Obiwan Quote Link to comment Share on other sites More sharing options...
PsyOps Posted April 25, 2020 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: 3 hours ago Share Posted April 25, 2020 3 hours ago, Zack- said: This fix source already added on the description, next time read before click //On latest rAthena: open src/map/mob.c on int mob_delayspawn find md->spawn_timer = INVALID_TIMER; mob_spawn(md); change to md->spawn_timer = INVALID_TIMER; mob_spawn(md); ++ if( md->state.boss ) { ++ map_setmapflag(bl->m, MF_PVP, true); ++ } on int mob_spawn find if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; change to if (md->spawn) { //Respawn data md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; ++ if(md->spawn->state.boss) map_setmapflag(md->bl.m, MF_PVP, true); on int mob_dead find // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); change to (Config your mvp_tomb_enabled on battle folder.) // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); ++ if(md->spawn->state.boss) { ++ map_setmapflag(md->bl.m, MF_PVP, false); ++ } recompile and is ready. Thanks Boss Zack Quote Link to comment Share on other sites More sharing options...
kalabasa Posted September 29, 2020 Group: Members Topic Count: 123 Topics Per Day: 0.05 Content Count: 478 Reputation: 14 Joined: 11/30/17 Last Seen: January 23 Share Posted September 29, 2020 Hi there! good script can you also add modification to disable @warp command directly to that particular map when mvp are alive and can @warp again after mvp is killed Quote Link to comment Share on other sites More sharing options...
Gouki Posted January 9, 2021 Group: Members Topic Count: 88 Topics Per Day: 0.05 Content Count: 261 Reputation: 13 Joined: 08/12/20 Last Seen: November 21, 2024 Share Posted January 9, 2021 Looks like this diff, doesn't work on latest rathena? I already tried to replace my working mob.cpp and recompiled and got same errors. Quote Link to comment Share on other sites More sharing options...
JinYuichi Posted January 9, 2021 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 110 Reputation: 30 Joined: 11/24/14 Last Seen: Saturday at 02:51 AM Share Posted January 9, 2021 @@ -1058,6 +1058,9 @@ TIMER_FUNC(mob_delayspawn){ } md->spawn_timer = INVALID_TIMER; mob_spawn(md); + if( md->state.boss ) { + map_setmapflag(bl->m, MF_PVP, true); + } } return 0; } @ -1139,6 +1142,7 @@ int mob_spawn (struct mob_data *md) md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; + if(md->spawn->state.boss) map_setmapflag(md->bl.m, MF_PVP, true); if( (md->bl.x == 0 && md->bl.y == 0) || md->spawn->xs || md->spawn->ys ) { //Monster can be spawned on an area. @ -3158,6 +3162,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map_getmapflag(md->bl.m, MF_NOTOMB) != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); + if(md->spawn->state.boss) { + map_setmapflag(md->bl.m, MF_PVP, false); + } if( !rebirth ) mob_setdelayspawn(md); //Set respawning. @Almond Snicker Quote Link to comment Share on other sites More sharing options...
Gouki Posted January 9, 2021 Group: Members Topic Count: 88 Topics Per Day: 0.05 Content Count: 261 Reputation: 13 Joined: 08/12/20 Last Seen: November 21, 2024 Share Posted January 9, 2021 9 hours ago, JinYuichi said: @@ -1058,6 +1058,9 @@ TIMER_FUNC(mob_delayspawn){ } md->spawn_timer = INVALID_TIMER; mob_spawn(md); + if( md->state.boss ) { + map_setmapflag(bl->m, MF_PVP, true); + } } return 0; } @ -1139,6 +1142,7 @@ int mob_spawn (struct mob_data *md) md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; + if(md->spawn->state.boss) map_setmapflag(md->bl.m, MF_PVP, true); if( (md->bl.x == 0 && md->bl.y == 0) || md->spawn->xs || md->spawn->ys ) { //Monster can be spawned on an area. @ -3158,6 +3162,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map_getmapflag(md->bl.m, MF_NOTOMB) != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); + if(md->spawn->state.boss) { + map_setmapflag(md->bl.m, MF_PVP, false); + } if( !rebirth ) mob_setdelayspawn(md); //Set respawning. @Almond Snicker I think I know now where it went wrong comparing to your diff, I'll try this later when I get home thank you! Quote Link to comment Share on other sites More sharing options...
simplexjay2 Posted January 29, 2021 Group: Members Topic Count: 56 Topics Per Day: 0.01 Content Count: 224 Reputation: 4 Joined: 02/09/12 Last Seen: April 20, 2024 Share Posted January 29, 2021 @@ -1058,6 +1058,9 @@ TIMER_FUNC(mob_delayspawn){ } md->spawn_timer = INVALID_TIMER; mob_spawn(md); + if( md->state.boss ) { + map_setmapflag(bl->m, MF_PVP, true); } } return 0; } @ -1139,6 +1142,7 @@ int mob_spawn (struct mob_data *md) md->bl.m = md->spawn->m; md->bl.x = md->spawn->x; md->bl.y = md->spawn->y; + if(md->spawn->state.boss) map_setmapflag(md->bl.m, MF_PVP, true); if( (md->bl.x == 0 && md->bl.y == 0) || md->spawn->xs || md->spawn->ys ) { //Monster can be spawned on an area. @ -3158,6 +3162,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) // MvP tomb [GreenBox] if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map_getmapflag(md->bl.m, MF_NOTOMB) != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); + if(md->spawn->state.boss) { + map_setmapflag(md->bl.m, MF_PVP, false); + } if( !rebirth ) mob_setdelayspawn(md); //Set respawning. This is Working for me Quote Link to comment Share on other sites More sharing options...
ADMSarah Posted March 10, 2024 Group: Members Topic Count: 18 Topics Per Day: 0.03 Content Count: 143 Reputation: 10 Joined: 08/19/23 Last Seen: 18 hours ago Share Posted March 10, 2024 Question: Do we need to use normal account only? I've tried and test the recent diff nothing errors happen on the console but when I try it ingame using GM accounts I think PK mode is not open.? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.