Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: conf/groups.conf
- ===================================================================
- --- conf/groups.conf (revision 16785)
- +++ conf/groups.conf (working copy)
- @@ -269,6 +269,11 @@
- use_check: true
- use_changemaptype: true
- all_commands: true
- + disable_pickup: true
- + disable_exp: true
- + disable_store: true
- + disable_skill_usage: true
- + disable_drops: true
- }
- }
- )
- Index: src/map/clif.c
- ===================================================================
- --- src/map/clif.c (revision 16785)
- +++ src/map/clif.c (working copy)
- @@ -10302,7 +10302,7 @@
- unsigned short* item_list = (unsigned short*)RFIFOP(fd,4);
- int result;
- - if( sd->state.trading || !sd->npc_shopid )
- + if( sd->state.trading || !sd->npc_shopid || pc_has_permission(sd,PC_PERM_DISABLE_STORE) )
- result = 1;
- else
- result = npc_buylist(sd,n,item_list);
- @@ -10330,7 +10330,7 @@
- n = (RFIFOW(fd,2)-4) /4;
- item_list = (unsigned short*)RFIFOP(fd,4);
- - if (sd->state.trading || !sd->npc_shopid)
- + if (sd->state.trading || !sd->npc_shopid || pc_has_permission(sd,PC_PERM_DISABLE_STORE) )
- fail = 1;
- else
- fail = npc_selllist(sd,n,item_list);
- @@ -12358,7 +12358,10 @@
- }
- sprintf(command, "/kick %s (%d)", status_get_name(target), status_get_class(target));
- log_atcommand(sd, command);
- - status_percent_damage(&sd->bl, target, 100, 0, true); // can invalidate 'target'
- + if(pc_has_permission(sd,PC_PERM_DISABLE_DROPS))
- + status_kill(target);
- + else
- + status_percent_damage(&sd->bl, target, 100, 0, true); // can invalidate 'target'
- }
- break;
- @@ -14314,7 +14317,7 @@
- int fail = 0;
- nullpo_retv(sd);
- - if( sd->state.trading || !sd->npc_shopid )
- + if( sd->state.trading || !sd->npc_shopid || pc_has_permission(sd,PC_PERM_DISABLE_STORE))
- fail = 1;
- else
- {
- Index: src/map/pc.c
- ===================================================================
- --- src/map/pc.c (revision 16785)
- +++ src/map/pc.c (working copy)
- @@ -3905,6 +3905,9 @@
- if(!check_distance_bl(&fitem->bl, &sd->bl, 2) && sd->ud.skillid!=BS_GREED)
- return 0; // ‹——£‚ª‰“‚¢
- + if( pc_has_permission(sd,PC_PERM_DISABLE_PICK_UP) )
- + return 0;
- +
- if (sd->status.party_id)
- p = party_search(sd->status.party_id);
- @@ -5576,6 +5579,9 @@
- if(!battle_config.pvp_exp && map[sd->bl.m].flag.pvp) // [MouseJstr]
- return 0; // no exp on pvp maps
- + if( pc_has_permission(sd,PC_PERM_DISABLE_EXP) )
- + return 0;
- +
- if(sd->status.guild_id>0)
- base_exp-=guild_payexp(sd,base_exp);
- Index: src/map/pc_groups.h
- ===================================================================
- --- src/map/pc_groups.h (revision 16785)
- +++ src/map/pc_groups.h (working copy)
- @@ -43,6 +43,11 @@
- PC_PERM_DISABLE_PVM = 0x040000,
- PC_PERM_DISABLE_PVP = 0x080000,
- PC_PERM_DISABLE_CMD_DEAD = 0x100000,
- + PC_PERM_DISABLE_PICK_UP = 0x200000,
- + PC_PERM_DISABLE_STORE = 0x400000,
- + PC_PERM_DISABLE_EXP = 0x800000,
- + PC_PERM_DISABLE_DROPS = 0x1000000,
- + PC_PERM_DISABLE_SKILL_USAGE = 0x2000000,
- };
- static const struct {
- @@ -70,6 +75,11 @@
- { "disable_pvm", PC_PERM_DISABLE_PVM },
- { "disable_pvp", PC_PERM_DISABLE_PVP },
- { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
- + { "disable_pickup", PC_PERM_DISABLE_PICK_UP },
- + { "disable_store", PC_PERM_DISABLE_STORE },
- + { "disable_exp", PC_PERM_DISABLE_EXP },
- + { "disable_drops", PC_PERM_DISABLE_DROPS },
- + { "disable_skill_usage", PC_PERM_DISABLE_SKILL_USAGE },
- };
- #endif // _PC_GROUPS_H_
- Index: src/map/skill.c
- ===================================================================
- --- src/map/skill.c (revision 16785)
- +++ src/map/skill.c (working copy)
- @@ -4621,7 +4621,6 @@
- return 1;
- if(status_isdead(src))
- return 1;
- -
- if( src != bl && status_isdead(bl) ) {
- /**
- * Skills that may be cast on dead targets
- @@ -12076,6 +12075,9 @@
- nullpo_ret(sd);
- if (lv <= 0 || sd->chatID) return 0;
- +
- + if ( pc_has_permission(sd, PC_PERM_DISABLE_SKILL_USAGE) )
- + return 0;
- if( pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL) && sd->skillitem != skill )
- { //GMs don't override the skillItem check, otherwise they can use items without them being consumed! [Skotlex]
Advertisement
Add Comment
Please, Sign In to add comment