AnnieRuru 957 Posted October 25, 2020 (edited) I've actually done this once when I was just started learn source coding of course over time I've become better, but decided use this 'cell_pvp' name because of popular search result ... this isn't setcell type modification, but a script/at command that can only set only in a square/rectangle shape this modification has some resemblance based on this patch Download: 1.7 plugin this should work just like in this video - script jdhsjkfh FAKE_NPC,{ OnInit: cell_pvp "prontera", 150, 180, 160, 190, CELL_PVP_RESPAWN_DISABLE, CELL_PVP_SKILL_ALLOW, CELL_PVP_BONEDROP_NONE; end; } Create a PvP zone using script command, *cell_pvp "<mapname>", <x1>, <y1>, <x2>, <y2>, <respawn>, <skillallow>, <bonedrop>;<respawn> flag are: CELL_PVP_RESPAWN_DISABLE CELL_PVP_RESPAWN_INSTANT CELL_PVP_RESPAWN_NORMAL <skillallow> : disallow skill usage outside pvp zone. This will disallow receiving buffs from players outside PvP Zone CELL_PVP_SKILL_DISALLOW CELL_PVP_SKILL_ALLOW <bonedrop> : drop player's name bone inside pvp zone when dead. -> This will always overwrite the `battle_config.bone_drop` value from conf\map\battle\player.conf CELL_PVP_BONEDROP_NONE CELL_PVP_BONEDROP_ALWAYS GM can also create a PvP zone on the map @cell_pvp 150 180 160 190 1 0 0 create a specific pvp zone on the map, with instant respawn and disallow skill outside PvP zone use `@pvpoff` or script command `*pvpoff` to turn off the pvp zone after version 1.2 the weird bug has been fix, now you can let your players create a simple pvp zone in guild house or player's custom house by using `*cell_pvp` script command enable by using `*cell_pvp` script command, disable by `*pvpoff` ... rinse and repeat Remember as a GM you can enable the MF_PVP_NOPARTY and MF_PVP_NOGUILD mapflag by @mapflag pvp_noparty 1 @mapflag pvp_noguild 1 Spoiler 1.0 - plugin - has a weird bug caused by VECTOR_ ... ? 1.1a - plugin - disable any skill casting outside pvp zone except GM that has PC_PERM_SKILL_UNCONDITIONAL - FIX A FUCKING BUG THAT NOBODY CAN HIT ANYTHING 1.2 - plugin - rewrite this damn thing with addToMAPD/removeFromMAPD instead of using VECTOR_ - fix can't re-enable `@cell_pvp` at the expense of overwrite `@pvpoff` atcommand and `*pvpoff` script command 1.3 - plugin - add respawn behavior and allow/disallow skill configuration - add announcement when GM use `@cell_pvp` atcommand 1.3a - plugin - fix pk server doesn't calculate the pvp points correctly 1.4 - plugin - fix pk server doesn't calculate the pvp points correctly when set pk_mode to 2 or 3 - add bone drop configuration 1.5 - plugin - fix unused struct error happens on certain compiler 1.6 - plugin - fix party/guild skill (eg: Magnificat/Gloria) not working with CELL_PVP_SKILL_ALLOW due to missing BCT_ENEMY check 1.7 - plugin - fix the pvp circle shouldn't show up until you walk into PvP zone Edited October 31, 2020 by AnnieRuru 2 evilpuncker and Kuroyama reacted to this Quote Share this post Link to post Share on other sites
evilpuncker 504 Posted October 26, 2020 very cool idea, I can't test it right now tho, are players outside it, able to use buff/heal on players inside it? 1 AnnieRuru reacted to this Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 26, 2020 (edited) 10 hours ago, evilpuncker said: are players outside it, able to use buff/heal on players inside it? HAHAHAHA !! why I missed that part of the video hmm ... how to fix this ... priest outside the zone can cast santuary just 1 cell away of pvp zone to heal people standing at the edge of the zone ... hmm, maybe only the placement skill make it can only cast battle_config.area_size away from the pvp zone I think just disable skill casting outside the zone 1.1a - plugin - disable any skill casting outside pvp zone except GM that has PC_PERM_SKILL_UNCONDITIONAL - FIX A FUCKING BUG THAT NOBODY CAN HIT ANYTHING I think I'm going to rewrite this as addToMAPD/removeFromMAPD instead of using VECTOR_ .... Edited October 26, 2020 by AnnieRuru 1 evilpuncker reacted to this Quote Share this post Link to post Share on other sites
Kuroyama 6 Posted October 26, 2020 Just want to report this ms. annie, so I did try this plugin and receive this one while compiling. Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 26, 2020 1.2 - plugin - rewrite this damn thing with addToMAPD/removeFromMAPD instead of using VECTOR_ - fix can't re-enable `@cell_pvp` at the expense of overwrite `@pvpoff` atcommand and `*pvpoff` script command 3 hours ago, Kuroyama said: Just want to report this ms. annie, so I did try this plugin and receive this one while compiling. how old is your emulator ? https://github.com/HerculesWS/Hercules/pull/2699 at least 5 months old ? Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 27, 2020 (edited) 1.3 - plugin - add respawn behavior and allow/disallow skill configuration - add announcement when GM use `@cell_pvp` atcommand 1.3a - fix pk server doesn't calculate the pvp points correctly Edited October 27, 2020 by AnnieRuru Quote Share this post Link to post Share on other sites
Kuroyama 6 Posted October 27, 2020 On 10/26/2020 at 11:55 PM, AnnieRuru said: 1.2 - plugin - rewrite this damn thing with addToMAPD/removeFromMAPD instead of using VECTOR_ - fix can't re-enable `@cell_pvp` at the expense of overwrite `@pvpoff` atcommand and `*pvpoff` script command how old is your emulator ? https://github.com/HerculesWS/Hercules/pull/2699 at least 5 months old ? Hi ms. annie, I already used the plugin by updating my svn. However, got a little concern. This ain't a big deal but is there a way to remove this circle "pvp" thing whenever the character is outside of the pvp cell? and bone drop only on pvp cell, not for the entire town? Just a random idea, ms.annie. Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 27, 2020 Just now, Kuroyama said: is there a way to remove this circle "pvp" thing whenever the character is outside of the pvp cell? not that I know of it needs to relog Just now, Kuroyama said: and bone drop only on pvp cell, not for the entire town? 1.4 - plugin - fix pk server doesn't calculate the pvp points correctly when set pk_mode to 2 or 3 - add bone drop configuration 1 Kuroyama reacted to this Quote Share this post Link to post Share on other sites
Dduwsmitt 4 Posted October 29, 2020 hello is it okay to just ignore these warnings? 1 AnnieRuru reacted to this Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 29, 2020 NO - I am perfectionist 1.5 - plugin - fix unused struct error happens on certain compiler actually its ok to ignore, this error didn't even show up on my visual studio hahaha 2 Dduwsmitt and xJhay reacted to this Quote Share this post Link to post Share on other sites
Dduwsmitt 4 Posted October 30, 2020 Hello i just discovered that when a map has a CELL_PVP area, - you cannot use PARTY BUFFS outside CELL_PVP area even with CELL_PVP_SKILL_ALLOW if you are in a PARTY / Solo Party is there any way to resolve this? 1 AnnieRuru reacted to this Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 30, 2020 yeah I forgot to add BCT_ENEMY check in battle_check_target function 1.6 - plugin - fix party/guild skill (eg: Magnificat/Gloria) not working with CELL_PVP_SKILL_ALLOW due to missing BCT_ENEMY check 1 1 IndieRO and Dduwsmitt reacted to this Quote Share this post Link to post Share on other sites
Kuroyama 6 Posted October 31, 2020 On 10/28/2020 at 12:08 AM, Kuroyama said: Hi ms. annie, I already used the plugin by updating my svn. However, got a little concern. This ain't a big deal but is there a way to remove this circle "pvp" thing whenever the character is outside of the pvp cell? and bone drop only on pvp cell, not for the entire town? Just a random idea, ms.annie. Hi ms. @AnnieRuru, regarding this circle thing. So uhh the "mapflag pvp_nocalcrank" disable it. Like for example you put prontera mapflag pvp_nocalcrank then open @pvpon, no circle will up. Maybe its possible to affect the cell_pvp too? Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 31, 2020 you mean this ? prontera mapflag pvp prontera mapflag pvp_nocalcrank even I'm not too sure about this ... that "no need to hold shift to attack" is done by changing clif->map_property(sd, MAPPROPERTY_FREEPVPZONE); and the pvp counter is show up by clif->pvpset(sd, <rank>, <total>, <type>); #include "common/hercules.h" #include "map/pc.h" #include "map/clif.h" #include "common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "test_mapproperty", SERVER_TYPE_MAP, "x.x", HPM_VERSION, }; ACMD(a) { int type = atoi(message); clif->map_property(sd, type); clif->maptypeproperty2(&sd->bl, SELF); switch(type) { default: clif->message(fd, "You are in MAPPROPERTY_NOTHING zone"); break; case 1: clif->message(fd, "You are in MAPPROPERTY_FREEPVPZONE zone"); break; case 2: clif->message(fd, "You are in MAPPROPERTY_EVENTPVPZONE zone"); break; case 3: clif->message(fd, "You are in MAPPROPERTY_AGITZONE zone"); break; case 4: clif->message(fd, "You are in MAPPROPERTY_PKSERVERZONE zone"); break; case 5: clif->message(fd, "You are in MAPPROPERTY_PVPSERVERZONE zone"); break; case 6: clif->message(fd, "You are in MAPPROPERTY_DENYSKILLZONE zone"); break; } return true; } ACMD(b) { int rank, total, type; if (sscanf(message, "%d %d %d", &rank, &total, &type) < 3) { clif->message(fd, "need 3 argument"); return false; } clif->pvpset(sd, rank, total, type); return true; } HPExport void plugin_init (void) { addAtcommand("a", a); addAtcommand("b", b); } I tried playing around with clif->map_property and only MAPPROPERTY_FREEPVPZONE and MAPPROPERTY_PVPSERVERZONE work the rest can't even show up the pvp rank counter (the one shows at the bottom right down corner of the screen) the weird part is ... we didn't actually use MAPPROPERTY_PKSERVERZONE for pk server, we just didn't send the clif->pvpset packet ... well if it doesn't break, then don't need to fix it in theory though ... maybe it can be done in practice though ... this is all I manage to do 1.7 - plugin - fix the pvp circle shouldn't show up until you walk into PvP zone -> but the circle cannot be remove until relog or move to other map if you can find out how to really remove the pvp circle without losing the pvp counter please tell me how to do it, I'm also interest to know 1 Dduwsmitt reacted to this Quote Share this post Link to post Share on other sites
Kuroyama 6 Posted October 31, 2020 40 minutes ago, AnnieRuru said: if you can find out how to really remove the pvp circle without losing the pvp counter please tell me how to do it, I'm also interest to know Hi ms. @AnnieRuru, I honestly seen this one wayback from the eathena days. You got the option to remove either the circle or the counter or even both. It's a src thing as far as I remember. But somehow, I just try and experiment the pvp_nocalcrank by referring to this: https://rathena.org/board/topic/84524-how-to-remove-this/ https://rathena.org/board/topic/110598-how-to-set-certain-map-pk/ and came up with the thought that maybe this is possible for cell_pvp as well. Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted October 31, 2020 (edited) as I said previously, pk server and pvp_nocalcrank mapflag just doesn't send the clif->pvpset packet well you seems didn't understand what I said in previous post then try this yourself, play around with the commented lines https://gist.github.com/AnnieRuru/b6ed52d55baad1a587dc9eeff2902c99#file-cell_pvp_commented-c-L91-L110 then you get what I mean yes, it looks like it can be done in theory, but I'm not too sure is it gravity hard-coded in the client side ... or ...? Edited October 31, 2020 by AnnieRuru Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted November 3, 2020 I launch rathena test server just to make sure again, tested `@pvpon` and then `@pvpoff` the circle will stay, this is same for both rathena and hercules but there is a weird thing after I tested on rathena ... the attack cursor become normal on rathena on hercules, after `@pvpoff` the cursor still stay as sword ... means it doesn't unload the mapproperty properly hmmm ...... maybe should file a bug report about this https://github.com/HerculesWS/Hercules/issues/2892 Quote Share this post Link to post Share on other sites
xJhay 8 Posted November 3, 2020 (edited) Hello mam, got a little request/concern/inquires? I put this cell_pvp script on my main town prontera. In my map_zone_db, I disable something skills like large aoe skills for towns (ex: storm gust, lov, meteor assault, etc...) Is there any chance that those skills will be enable once inside cell_pvp? Edit: • additional info : Behavior of the penalty of no skill outside cell_pvp is for the whole map, not with near cell_pvp. please correct me if I'm wrong with this but I don't think that's intentional or? (i just try to inc_agi myself far from cell_pvp but it won't let me") Edited November 3, 2020 by xJhay Additional Info Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted November 3, 2020 (edited) if (src != NULL && (sd == NULL || sd->auto_cast_current.type != AUTOCAST_ITEM)) { // Items that cast skills using 'itemskill' will not be handled by map_zone_db. int i; for(i = 0; i < map->list[src->m].zone->disabled_skills_count; i++) { if( skill_id == map->list[src->m].zone->disabled_skills[i]->nameid && (map->list[src->m].zone->disabled_skills[i]->type&src->type) ) { if (src->type == BL_PC) { ShowDebug("run"); #if PACKETVER >= 20080311 clif->skill_mapinfomessage(sd, 2); #else clif->messagecolor_self(sd->fd, COLOR_CYAN, msg_sd(sd, 50)); #endif } else if (src->type == BL_MOB && map->list[src->m].zone->disabled_skills[i]->subtype != MZS_NONE) { if( st->mode&MD_BOSS ) { /* is boss */ if( !( map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS ) ) break; } else { /* is not boss */ if( map->list[src->m].zone->disabled_skills[i]->subtype&MZS_BOSS ) break; } } return 0; } } } hhhmmmmmmm.................................................... what the f*** is this ...... it runs from `status_check_skilluse` function and I can't just hook this to change 1 or 0 because it will mess up all other skill check conditions ... well nothing is impossible but this one is ..... kinda lame to say the least for the time being try this https://gist.github.com/AnnieRuru/f6f75c9cbeb60cd49161757a2bcf3d09 later I make a PR to address this EDIT to your 7 hours ago, xJhay said: • additional info : Behavior of the penalty of no skill outside cell_pvp is for the whole map, not with near cell_pvp. please correct me if I'm wrong with this but I don't think that's intentional or? (i just try to inc_agi myself far from cell_pvp but it won't let me") this is intentional no skill outside cell_pvp is meant for an event so like you can create a custom zone combine with npc guild_vs2,50,50,0 script dfkjsbkfsjb FAKE_NPC,4,4,{ end; OnInit: bindatcmd "pvpzone", strnpcinfo(NPC_NAME_UNIQUE)+"::Onaaa", 99, 100; end; OnTouch: if (strcharinfo(PC_NAME) != .playerA$ && strcharinfo(PC_NAME) != .playerB$) { warp "guild_vs2", 40,40; mes "You are not a participant"; close; } end; OnUnTouch: if (strcharinfo(PC_NAME) == .playerA$ || strcharinfo(PC_NAME) == .playerB$) mapannounce "guild_vs2", strcharinfo(PC_NAME) +" has leave the PvP Zone", bc_map; end; Onaaa: if (strcharinfo(PC_MAP) != strnpcinfo(NPC_MAP)) { mes "This command can only use on "+ strnpcinfo(NPC_MAP); close; } mes "[GM Menu]"; mes "Player A -> "+ .playerA$; mes "Player B -> "+ .playerB$; next; switch(select("input player A", "input player B", "toggle PvP Zone")) { case 1: mes "input Player A"; next; input .playerA$; close; case 2: mes "input Player B"; next; input .playerB$; close; case 3: if (getmapflag(strnpcinfo(NPC_MAP), MF_PVP)) pvpoff strnpcinfo(NPC_MAP); else cell_pvp "guild_vs2", 46, 46, 53, 53, CELL_PVP_RESPAWN_INSTANT, CELL_PVP_SKILL_DISALLOW, CELL_PVP_BONEDROP_NONE; close; } close; } some lazy effort with no name length check or player name login check but yeah you get the point Edited November 3, 2020 by AnnieRuru Quote Share this post Link to post Share on other sites
Dduwsmitt 4 Posted December 10, 2020 (edited) Hello just want to report in my recent discovery that Bard/Dancer buffs doesnt work on party members OUTSIDE cell_pvp area even with CELL_PVP_SKILL_ALLOW. Using pre-renewal with OLD Song effect diff All Party members are outside cell_pvp area Edited December 16, 2020 by Dduwsmitt added more info Quote Share this post Link to post Share on other sites
Dduwsmitt 4 Posted December 16, 2020 Currently not working on Release v2020.12.14 due to refactored codes: - `unit->blown()` (renamed to `unit->push()`) - `path->blownpos()` (related to the `unit->blown()` change) Quote Share this post Link to post Share on other sites
noobzter003 3 Posted February 3, 2021 i got this error how to fix this? im using latest herc file. thanks in advance. Quote Share this post Link to post Share on other sites
Kuya Jeo 120 Posted February 3, 2021 20 minutes ago, noobzter003 said: i got this error how to fix this? im using latest herc file. thanks in advance. The cell_pvp_1.7.c is outdated, try to update the plugin Quote Share this post Link to post Share on other sites
noobzter003 3 Posted February 3, 2021 12 minutes ago, Kuya Jeo said: The cell_pvp_1.7.c is outdated, try to update the plugin how to update it? Quote Share this post Link to post Share on other sites
noobzter003 3 Posted February 3, 2021 4 hours ago, noobzter003 said: i got this error how to fix this? im using latest herc file. thanks in advance. Done TQ Quote Share this post Link to post Share on other sites