Jump to content
  • 0

On/Off option to Disable GM's Attack/Skill


ngek202

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

On/Off option to Disable GM's Attack/Skill

I was thinking if there's a Source Mod that can do this to Control GM's behavior so that they won't Just randomly attack or help their friends/colleagues from getting Stuffs or intentionally feeding them..

this would be a very big help to control gm corruption.

or should be Inserted in SVN future release :)

Thanks in advance

Edited by ngek202
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  1315
  • Reputation:   372
  • Joined:  12/10/11
  • Last Seen:  

Off-topic but...why hire a GM you can't trust?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

I once had a Server and hired and trusted a good friend (a very close friend of mine) and turns out he wasn't to be trusted at all and end up ruining the balance (because of wanting stuffs he never gained thru Retail Server he gave in to the call of corruption LOL, he's a good RO Player in terms of PVP'ng PVM and all I envy him about that but just because of lust of wanting to be at top lol even when he's already a GM, so for short Immature)

It will just be a prevention so they won't give in to the Dark :)

Edited by ngek202
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  128
  • Reputation:   1
  • Joined:  03/19/12
  • Last Seen:  

Why don't you make your GM Staff make into a novice only and remove some commands that can make corrupt or kill some player?

just helping to your problem. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

@gmIgnore: Avoids all GMs from specified and inferior level from attacking, beeing attacked and using skills.

Usage: @gmIgnore 80(enable command to GMs from level 80 and lower)

@gmIgnore <optionalvalue>(just send command again to disable)

In path: ../src/map

Open map.c

Find:

int night_flag = 0; // 0=day, 1=night [Yor]

After ADD:

int gmIgnored = 0;

Open map.h

Find:

extern char db_path[256];

After ADD:

extern int gmIgnored;

Open battle.c

Find:

int strip_enemy = 1; //Flag which marks whether to remove the BCT_ENEMY status if it's also friend/ally.
struct block_list *s_bl = src, *t_bl = target;

After ADD:

int isIgnored = 0, gmLevel;

Find:

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

After ADD:

  if(s_bl->type == BL_PC)// Players & GMs can't hit this gm
  {
if((gmLevel = pc_get_group_level(sd)) && gmLevel < gmIgnored) // Target is the ignored GM
 isIgnored = 1;
else if((sd1 = BL_CAST(BL_PC, s_bl)) && (gmLevel = pc_get_group_level(sd1)) && gmLevel < gmIgnored) // Attacker is the ignored GM
 isIgnored = 1;
  }else{//Mobs can't hit this GM, this check doesn't work for homunculus though
if((gmLevel = pc_get_group_level(sd)) && gmLevel < gmIgnored) // Only GMs will suffer this
 isIgnored = 1;
  }

Find:

  if( sd->state.monster_ignore && flag&BCT_ENEMY )

Replace With:

  if( (sd->state.monster_ignore || isIgnored) && flag&BCT_ENEMY )

Find:

 case BL_MOB:
 {
  struct mob_data *md = BL_CAST(BL_MOB, t_bl);

After ADD:

  struct map_session_data *sd;
  sd = BL_CAST(BL_PC, s_bl);

  if((gmLevel = pc_get_group_level(sd)) && gmLevel < gmIgnored) // Gm can't hit mobs
return 0;

Open skill.c

Find:

int skill_check_condition_castbegin(struct map_session_data* sd, short skill, short lv) {
struct status_data *status;
struct status_change *sc;
struct skill_condition require;
int i;
nullpo_ret(sd);

if (lv <= 0 || sd->chatID) return 0;

Replace With:

int skill_check_condition_castbegin(struct map_session_data* sd, short skill, short lv) {
struct status_data *status;
struct status_change *sc;
struct skill_condition require;
int i, gmLevel;
nullpo_ret(sd);

if (lv <= 0 || sd->chatID) return 0;

if((gmLevel = pc_get_group_level(sd)) && gmLevel < gmIgnored)
 return 0;

Open atcommand.c

Insert gmIgnore function after some function you like:

/*==========================================
* @gmIgnore
* => Makes monsters ignore every GM from a gmlevel range. [MarkZD]
*------------------------------------------*/
ACMD_FUNC(gmIgnore)
{
int gmlevel;
char toPrint[CHAT_SIZE_MAX];
nullpo_retr(-1, sd);
gmlevel = atoi(message);

if (!gmIgnored) {
 if (!message || !*message || !gmlevel) {
  clif_displaymessage(fd, "Please, enter max level to restrict (usage: @gmIgnore <max gmlevel to be blocked || 0 or NULL to disable>).");
  return -1;
 }
 gmIgnored = gmlevel+1;
 sprintf(toPrint, "GMs up to level %d can't fight now.", gmlevel);
 clif_displaymessage(sd->fd, toPrint);
} else {
 gmIgnored = 0;
 clif_displaymessage(sd->fd, "All GMs can fight now");
}
return 0;
}

Add the AtCommandInfo:

 ACMD_DEF(gmIgnore),

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