Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: conf/battle/misc.conf
- ===================================================================
- --- conf/battle/misc.conf (revision 17195)
- +++ conf/battle/misc.conf (working copy)
- @@ -101,6 +101,9 @@
- // Set this to the amount of minutes autotrade chars will be kicked from the server.
- at_timeout: 0
- +// Set this to the amount of minutes afk chars will be kicked from the server.
- +afk_timeout: 0
- +
- // Auction system, fee per hour. Default is 12000
- auction_feeperhour: 12000
- Index: src/map/atcommand.c
- ===================================================================
- --- src/map/atcommand.c (revision 17195)
- +++ src/map/atcommand.c (working copy)
- @@ -8790,6 +8790,45 @@
- #undef MC_CART_MDFY
- }
- +/*==========================================
- +* @afk
- +*------------------------------------------*/
- +ACMD_FUNC(afk) {
- + nullpo_retr(-1, sd);
- +
- + if(pc_isdead(sd)) {
- + clif_displaymessage(fd, "Cannot @afk if you are dead.");
- + return -1;
- + }
- +
- + if( (map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag) && (sd->bl.m != map_mapname2mapid("prontera")) )
- + {
- + if(map[sd->bl.m].flag.pvp || map[sd->bl.m].flag.gvg)
- + {
- + clif_displaymessage(fd, "You may not use the @afk maps PVP or GVG.");
- + return -1;
- + }
- +
- + sd->state.autotrade = 1;
- + sd->state.monster_ignore = 1;
- + pc_setsit(sd);
- + skill_sit(sd,1);
- + clif_sitting(&sd->bl,1);
- + clif_changelook(&sd->bl,LOOK_HEAD_TOP,471);
- + clif_specialeffect(&sd->bl, 234,AREA);
- +
- + if( battle_config.afk_timeout )
- + {
- + int timeout = atoi(message);
- + status_change_start(&sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ((timeout > 0) ? min(timeout,battle_config.afk_timeout) : battle_config.afk_timeout)*60000,0);
- + }
- + clif_authfail_fd(fd, 15);
- + } else
- + clif_displaymessage(fd, "@afk is not allowed on this map.");
- +
- + return 0;
- +}
- +
- /**
- * Fills the reference of available commands in atcommand DBMap
- **/
- @@ -9050,7 +9089,8 @@
- ACMD_DEF2("rmvperm", addperm),
- ACMD_DEF(unloadnpcfile),
- ACMD_DEF(cart),
- - ACMD_DEF(mount2)
- + ACMD_DEF(mount2),
- + ACMD_DEF(afk)
- };
- AtCommandInfo* atcommand;
- int i;
- Index: src/map/battle.c
- ===================================================================
- --- src/map/battle.c (revision 17195)
- +++ src/map/battle.c (working copy)
- @@ -5870,6 +5870,7 @@
- { "quest_exp_rate", &battle_config.quest_exp_rate, 100, 0, INT_MAX, },
- { "at_mapflag", &battle_config.autotrade_mapflag, 0, 0, 1, },
- { "at_timeout", &battle_config.at_timeout, 0, 0, INT_MAX, },
- + { "afk_timeout", &battle_config.afk_timeout, 0, 0, INT_MAX, },
- { "homunculus_autoloot", &battle_config.homunculus_autoloot, 0, 0, 1, },
- { "idle_no_autoloot", &battle_config.idle_no_autoloot, 0, 0, INT_MAX, },
- { "max_guild_alliance", &battle_config.max_guild_alliance, 3, 0, 3, },
- Index: src/map/battle.h
- ===================================================================
- --- src/map/battle.h (revision 17195)
- +++ src/map/battle.h (working copy)
- @@ -434,6 +434,7 @@
- int quest_exp_rate;
- int autotrade_mapflag;
- int at_timeout;
- + int afk_timeout;
- int homunculus_autoloot;
- int idle_no_autoloot;
- int max_guild_alliance;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement