Jump to content
  • 0

cell_pvp


Bifrost

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/07/12
  • Last Seen:  

I'd like to make a PvP arena in a specific area of my main town. I know I could work with cell_basilica, but that would show the PvP counter to all players on the map. Could someone make a working cell_pvp cellflag that I could use?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

That is not possible. A Map can be PvP Enabled (Everyone sees the Counter) or Disabled (No one can see the Counter). You CAN activate PVP on specific Titles but that still wont show up the Counter for them unfortunately :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/07/12
  • Last Seen:  

You CAN activate PVP on specific Titles but that still wont show up the Counter for them unfortunately :(

That's actually exactly what I'd like to do.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

Oh lol, I thought you want that the Counter Shows up when someone enters a specific area *laughs*

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/07/12
  • Last Seen:  

Oh lol, I thought you want that the Counter Shows up when someone enters a specific area *laughs*

Nope, I want an arena in the middle of my main town that has PvP turned on. It doesn't need a pvp counter, I just want players to be able to fight IN there and not outside.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/07/12
  • Last Seen:  

I still need this. Could anyone help?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/07/12
  • Last Seen:  

I'm terribly sorry for triple posting, but Zimtkeks said it was possible, so I still have hope... :/

Tried something myself and couldn't compile afterwards.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

There is a cell_pvp mod from someone on this Forum but he/she does not release it for free.

So I am trying to make a work around for it.

Try this and tell me if it worked!: (Open Spoiler)

const.txt

cell_walkable 0
cell_shootable 1
cell_water 2
cell_npc 3
cell_basilica 4
cell_landprotector 5
cell_novending 6
cell_nochat 7
cell_pvp 8

//cell_gettype 0
cell_chkwall 1
cell_chkwater 2
cell_chkcliff 3
cell_chkpass 4
cell_chkreach 5
cell_chknopass 6
cell_chknoreach 7
//cell_chkstack 8
cell_chknpc 9
cell_chkbasilica 10
cell_chklandprotector 11
cell_chknovending 12
cell_chknochat 13
cell_chkpvp 14

map.h

// used by map_setcell()
typedef enum {
CELL_WALKABLE,
CELL_SHOOTABLE,
CELL_WATER,
CELL_PVP,

CELL_NPC,
CELL_BASILICA,
CELL_LANDPROTECTOR,
CELL_NOVENDING,
CELL_NOCHAT,
} cell_t;

// used by map_getcell()
typedef enum {
CELL_GETTYPE, // retrieves a cell's 'gat' type

CELL_CHKWALL, // wall (gat type 1)
CELL_CHKWATER, // water (gat type 3)
CELL_CHKCLIFF, // cliff/gap (gat type 5)

CELL_CHKPASS, // passable cell (gat type non-1/5)
CELL_CHKREACH, // Same as PASS, but ignores the cell-stacking mod.
CELL_CHKNOPASS, // non-passable cell (gat types 1 and 5)
CELL_CHKNOREACH, // Same as NOPASS, but ignores the cell-stacking mod.
CELL_CHKSTACK, // whether cell is full (reached cell stacking limit)

CELL_CHKNPC,
CELL_CHKBASILICA,
CELL_CHKLANDPROTECTOR,
CELL_CHKNOVENDING,
CELL_CHKNOCHAT,
CELL_CHKPVP,
} cell_chk;

struct mapcell
{
// terrain flags
unsigned char
walkable : 1,
shootable : 1,
water : 1;

// dynamic flags
unsigned char
npc : 1,
basilica : 1,
landprotector : 1,
novending : 1,
nochat : 1,
pvp : 1;

map.c

void map_setcell(int m, int x, int y, cell_t cell, bool flag)
{
int j;

if( m < 0 || m >= map_num || x < 0 || x >= map[m].xs || y < 0 || y >= map[m].ys )
return;

j = x + y*map[m].xs;

switch( cell ) {
case CELL_WALKABLE: map[m].cell[j].walkable = flag; break;
case CELL_SHOOTABLE: map[m].cell[j].shootable = flag; break;
case CELL_WATER: map[m].cell[j].water = flag; break;

case CELL_NPC: map[m].cell[j].npc = flag; break;
case CELL_BASILICA: map[m].cell[j].basilica = flag; break;
case CELL_LANDPROTECTOR: map[m].cell[j].landprotector = flag; break;
case CELL_NOVENDING: map[m].cell[j].novending = flag; break;
case CELL_NOCHAT: map[m].cell[j].nochat = flag; break;
case CELL_PVP: map[m].cell[j].pvp = flag; break;
default:
ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
break;
}
}





// base cell type checks
case CELL_CHKNPC:
return (cell.npc);
case CELL_CHKBASILICA:
return (cell.basilica);
case CELL_CHKLANDPROTECTOR:
return (cell.landprotector);
case CELL_CHKNOVENDING:
return (cell.novending);
case CELL_CHKNOCHAT:
return (cell.nochat);
case CELL_CHKPVP:
return (cell.pvp);

battle.c

switch( t_bl->type )
{ //Checks on target master
case BL_PC:
{
struct map_session_data *sd;
if( t_bl == s_bl ) break;
sd = BL_CAST(BL_PC, t_bl);

if (map_getcell(m,t_bl->x,t_bl->y,CELL_CHKPVP))
return 0;

if( sd->state.monster_ignore && flag&BCT_ENEMY )
return 0; // Global inminuty only to Attacks
if( sd->status.karma && s_bl->type == BL_PC && ((TBL_PC*)s_bl)->status.karma )
state |= BCT_ENEMY; // Characters with bad karma may fight amongst them
if( sd->state.killable ) {
state |= BCT_ENEMY; // Everything can kill it
strip_enemy = 0;
}

switch( s_bl->type )
{ //Checks on source master
case BL_PC:
{
struct map_session_data *sd = BL_CAST(BL_PC, s_bl);

if (map_getcell(m,t_bl->x,t_bl->y,CELL_CHKPVP))
return 0;


if( s_bl != t_bl )
{
if( sd->state.killer )
{
state |= BCT_ENEMY; // Can kill anything
strip_enemy = 0;
}

Edited by GM Zimtkeks
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  17
  • Reputation:   0
  • Joined:  06/07/12
  • Last Seen:  

Thanks, I'll try that.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

Tell me if it worked or not ^^

Sorry I am still new to all of this, so I still got a lot to learn :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...