Jump to content
  • 0

How to exclude group_level higher than 0 in a source script ?


Lord Ganja

Question


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

I'm currently using this Extended PvP Cell.
 
However, I need it not to count GM's (group id higher than 0) or not to increase the PLAYER COUNT inside the PVP CELL when the gm entered the pvp cell.
 
 
I tried adding this in the  code but it just won't work
if(pc_get_group_level > 0 )
return 0;

 

Here's the code: in map.c

int map_pvp_area(struct map_session_data* sd, bool flag)
{
   if(pc_get_group_level > 0 ) // Tried Adding This one
   return 0;

	switch(flag) 
	{
		case 1:
			clif_map_property(sd, MAPPROPERTY_FREEPVPZONE);
			clif_maptypeproperty2(&sd->bl,SELF);
			if (sd->pvp_timer == INVALID_TIMER) {
				map[sd->bl.m].cell_pvpuser++;

				sd->pvp_timer  = add_timer(gettick()+200, pc_calc_pvprank_timer, sd->bl.id, 0);
				sd->pvp_rank  = 0;
				sd->pvp_lastusers = 0;
				sd->pvp_point  = 5;
				sd->pvp_won   = 0;
				sd->pvp_lost  = 0;
				sd->state.pvp  = 1;
				sd->pvpcan_walkout_tick = gettick();
			}
			break;
		default:
			clif_pvpset(sd, 0, 0, 2);
			map[sd->bl.m].cell_pvpuser--;

			if( sd->pvp_timer != INVALID_TIMER )
				delete_timer(sd->pvp_timer, pc_calc_pvprank_timer);

			sd->pvp_timer  = INVALID_TIMER;
			sd->state.pvp  = 0;
			break;
	}

	return 0;
}

Anybody help me? Thanks in advance!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

woops nvm, it's source. fml haha

Edited by iObserve
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...