cell_pvp

very cool idea, I can't test it right now tho, are players outside it, able to use buff/heal on players inside it?

 
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_ ....

 
Last edited by a moderator:
image.png

Just want to report this ms. annie, so I did try this plugin and receive this one while compiling.

 
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

 
Last edited by a moderator:
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?

image.png

and bone drop only on pvp cell, not for the entire town?

Just a random idea, ms.annie.

 
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

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

 
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

 
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?

 
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

 
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?

View attachment 6472

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?

 
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

 
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.

 
Last edited by a moderator:
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

 
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")

 
Last edited by a moderator:
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->nameid && (map->list[src->m].zone->disabled_skills->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->subtype != MZS_NONE) {
if( st->mode&MD_BOSS ) { /* is boss */
if( !( map->list[src->m].zone->disabled_skills->subtype&MZS_BOSS ) )
break;
} else { /* is not boss */
if( map->list[src->m].zone->disabled_skills->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

   • 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

 
Last edited by a moderator:
Back
Top