Jump to content
  • 0

Disable GM monster drops / limite storage


Haikenz

Question


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  309
  • Reputation:   82
  • Joined:  11/15/11
  • Last Seen:  

1. Hello, I was looking at the Wiki in this tutorial, but it is outdated, I can not find the information they send. ( https://github.com/rathena/rathena/wiki/Disable_GM_monster_drops )

/src/map/mob.c (error)

   if( (mvp_sd && pc_isGM(mvp_sd)) || (sd && pc_isGM(sd)) )    {        if( mvp_sd && pc_isGM(mvp_sd) < battle_config.gm_monsterdrop_lv )            type |= 1;        else if( sd && pc_isGM(sd) < battle_config.gm_monsterdrop_lv )            type |= 1;    }

Sem_t_tulo.png

@Edit

	// Disable GM Drop Monster
	if( (mvp_sd && pc_isGM(mvp_sd)) || (sd && pc_isGM(sd)) ) {
		if( mvp_sd && pc_isGM(mvp_sd) < battle_config.gm_monsterdrop_lv )	type |= 1;
	else
		if( sd && pc_isGM(sd) < battle_config.gm_monsterdrop_lv )	type |= 1;
	}

Sem_t_tulo.png

I managed to fix most of the errors, but this is not possible ... someone who understands the source can help me in the last one

 

2. And another little thing, I wonder if it is possible for the VIP to have the storage 1000 and the Player normal 600

 

Edited by Haikenz
Edit 3: mob.c error
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  149
  • Reputation:   33
  • Joined:  12/24/11
  • Last Seen:  

Hey,

Permissions don't work that way anymore, since GM Levels have been changed to groups.

I made something that works around for this, but it is definetly not the intended usage of groups!

diff --git a/src/map/mob.c b/src/map/mob.c
index 04b76e7..c725c96 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2431,6 +2431,10 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 	if(src && src->type == BL_MOB)
 		mob_unlocktarget((struct mob_data *)src,tick);
 
+	if ((mvp_sd && pc_has_permission(mvp_sd, PC_PERM_DENY_MONSTERDROP)) < battle_config.gm_monsterdrop_lv || (sd && pc_has_permission(sd, PC_PERM_DENY_MONSTERDROP) < battle_config.gm_monsterdrop_lv)) {
+		type |= 1;
+	}
+
 	// filter out entries not eligible for exp distribution
 	memset(tmpsd,0,sizeof(tmpsd));
 	for(i = 0, count = 0, mvp_damage = 0; i < DAMAGELOG_SIZE && md->dmglog[i].id; i++) {

diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h
index 45e8b55..220d3af 100644
--- a/src/map/pc_groups.h
+++ b/src/map/pc_groups.h
@@ -50,6 +50,7 @@ enum e_pc_permission {
 	PC_PERM_BYPASS_STAT_ONCLONE = 0x02000000,
 	PC_PERM_BYPASS_MAX_STAT     = 0x04000000,
 	PC_PERM_CASHSHOP_SALE		= 0x08000000,
+	PC_PERM_DENY_MONSTERDROP	= 0x10000000,
 	//.. add other here
 	PC_PERM_ALLPERMISSION       = 0xFFFFFFFF,
 };
@@ -86,6 +87,7 @@ static const struct {
 	{ "bypass_stat_onclone",PC_PERM_BYPASS_STAT_ONCLONE },
 	{ "bypass_max_stat",PC_PERM_BYPASS_MAX_STAT },
 	{ "cashshop_sale", PC_PERM_CASHSHOP_SALE },
+	{ "deny_monster_drops", PC_PERM_DENY_MONSTERDROP },
 	{ "all_permission", PC_PERM_ALLPERMISSION },
 };
 

This adds a permission to the group system which if true denies monster drops. So by default nobody has it (except GM Group 99 [Admin], which means Admins won't receive any loot whatsoever. That's what I mean by uninteded usage). 

 

The question is: Why do you actually need it? 

 

To your second question: That's entirely possible, but you need to split VIP and non-VIP storage backend in some way or another. And what to do about people who loose VIP status? Deny access to those items? How do they know which are which?

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  309
  • Reputation:   82
  • Joined:  11/15/11
  • Last Seen:  

53 minutes ago, Jonne said:

To your second question: That's entirely possible, but you need to split VIP and non-VIP storage backend in some way or another. And what to do about people who loose VIP status? Deny access to those items? How do they know which are which?

 

I'm trying to do this:
Normal Player with Storage: 600
Player vip with storage: 1000

And taking advantage of another doubt:
Create Normal Char: 6 (only 6 can count in the account)
Create VIP Char: 12 (you can have 12 in the account)

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