Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Share Posted July 31, 2013 I Want add @afk Command - How to add it ? Quote Link to comment Share on other sites More sharing options...
Evelynn Posted July 31, 2013 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 93 Reputation: 14 Joined: 12/12/11 Last Seen: October 25, 2015 Share Posted July 31, 2013 (edited) /*========================================== * @afk * Turns on/off logout on player *------------------------------------------*/ static int atcommand_afk(const int fd, struct map_session_data* sd, const char* command, const char* message) { nullpo_retr(-1, sd); if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ) { //sd->state.monster_ignore = 1; sd->state.autotrade = 1; if( battle_config.at_timeout ) { int timeout = atoi(message); status_change_start(&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } clif_authfail_fd(fd, 15); } else clif_displaymessage(fd, "AFK is not allowed on this map."); return 0; } ACMD_DEF(afk) I am unsure if this still works with rA but you add it to your atcommand.c Edited July 31, 2013 by Evelynn Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 31, 2013 where to add /*========================================== * @afk * Turns on/off logout on player *------------------------------------------*/ static int atcommand_afk(const int fd, struct map_session_data* sd, const char* command, const char* message) { nullpo_retr(-1, sd); if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ) { //sd->state.monster_ignore = 1; sd->state.autotrade = 1; if( battle_config.at_timeout ) { int timeout = atoi(message); status_change_start(&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } clif_authfail_fd(fd, 15); } else clif_displaymessage(fd, "AFK is not allowed on this map."); return 0; } and ACMD_DEF(afk) am using 3CeAM Quote Link to comment Share on other sites More sharing options...
Evelynn Posted July 31, 2013 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 93 Reputation: 14 Joined: 12/12/11 Last Seen: October 25, 2015 Share Posted July 31, 2013 You add it to your atcommand.c. Find another other atcommand functions and paste the code right under it, do the same thing for ACMD_DEF. Find where all the other ACMD_DEF's are and paste it accordingly. Quote Link to comment Share on other sites More sharing options...
Hiryu Imajin Posted July 31, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted July 31, 2013 You add it to your atcommand.c. Find another other atcommand functions and paste the code right under it, do the same thing for ACMD_DEF. Find where all the other ACMD_DEF's are and paste it accordingly. We are using 3CeAM our atcommand.c it doesnt have ACMD_DEF It has this instead. ACMD_FUNC(font) <---example from the @font command Quote Link to comment Share on other sites More sharing options...
Evelynn Posted July 31, 2013 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 93 Reputation: 14 Joined: 12/12/11 Last Seen: October 25, 2015 Share Posted July 31, 2013 (edited) You add it to your atcommand.c. Find another other atcommand functions and paste the code right under it, do the same thing for ACMD_DEF. Find where all the other ACMD_DEF's are and paste it accordingly. We are using 3CeAM our atcommand.c it doesnt haveACMD_DEF It has this instead.ACMD_FUNC(font) <---example from the @font command Ah my apologies. I do not work with 3CeAM so I wouldn't have known this. Thank you for clarifying. Edited July 31, 2013 by Evelynn Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 31, 2013 Thats my atcommand.c atcommand.c how to add it -__- Quote Link to comment Share on other sites More sharing options...
Hiryu Imajin Posted July 31, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted July 31, 2013 (edited) Try this one out. Can we try this one out then. /*========================================== * @afk * Turns on/off logout on player *------------------------------------------*/ ACMD_FUNC(afk) { static int atcommand_afk(const int fd, struct map_session_data* sd, const char* command, const char* message) { nullpo_retr(-1, sd); if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ) { //sd->state.monster_ignore = 1; sd->state.autotrade = 1; if( battle_config.at_timeout ) { int timeout = atoi(message); status_change_start(&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } clif_authfail_fd(fd, 15); } else clif_displaymessage(fd, "AFK is not allowed on this map."); return 0; } And insert it before this line. ~Place the code here~ /*========================================== * atcommand_info[] structure definition *------------------------------------------*/ And please add this { "afk", 1,1, atcommand_afk }, after this line to add it on the commands { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; Rebuild your solution and test it in game. And i think you have to add one more in trunk/conf/atcommand_athena.conf after this line. clearweather: 99,99 ~put it here~ add: //This is for the settings of afk command it will set the GM level for the afk command. as 1,1 shows it will enable this command for GM level 1 afk: 1,1 Please give me feedback once your done if its working or not. Edited July 31, 2013 by redhotzip Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 31, 2013 where to add thise { "afk", 1,1, atcommand_afk }, Quote Link to comment Share on other sites More sharing options...
Hiryu Imajin Posted July 31, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted July 31, 2013 where to add thise { "afk", 1,1, atcommand_afk }, here: { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; same file just search for that line. Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 31, 2013 where to add thise { "afk", 1,1, atcommand_afk }, here: { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; same file just search for that line. thats my atcommand.c can u edit it for me ? cuz i dont understand u Quote Link to comment Share on other sites More sharing options...
Hiryu Imajin Posted July 31, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted July 31, 2013 (edited) where to add thise { "afk", 1,1, atcommand_afk }, here: { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; same file just search for that line. thats my atcommand.c can u edit it for me ? cuz i dont understand u Okay let me try. But please take a look at my CODED message there is the ~PUT IT HERE~ line, that is where you will put the code. x.x EDIT: That was not your atcommand.c o.o but try to read on my Coded messages, you'll need to replace the ~PUT IT HERE! with the code given. Edited July 31, 2013 by redhotzip Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 31, 2013 where to add thise { "afk", 1,1, atcommand_afk }, here: { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; same file just search for that line. thats my atcommand.c can u edit it for me ? cuz i dont understand u Okay let me try. But please take a look at my CODED message there is the ~PUT IT HERE~ line, that is where you will put the code. x.x mmm idk where is this file { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; Quote Link to comment Share on other sites More sharing options...
Evelynn Posted July 31, 2013 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 93 Reputation: 14 Joined: 12/12/11 Last Seen: October 25, 2015 Share Posted July 31, 2013 (edited) Sorry if this offends you in any way but... For future references, please try to attempt things yourself if you haven't tried. You were given a set of directions so... I'm not saying you didn't but it just seems as if you were wanting to be spoon fed. Not everyone will do this for you. At best, you could possibly try messing around with it until point of desperation. You do not learn by being spoon-fed. Attempt to find it by trying to find whats within the text. You will eventually find it that way. { "hommutation", 60,60, atcommand_hommutation }, Try looking up keywords "hommutation" inside the atcommand.c ( The document you were told to edit ). Edited July 31, 2013 by Evelynn Quote Link to comment Share on other sites More sharing options...
Hiryu Imajin Posted July 31, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted July 31, 2013 mmm idk where is this file { "hommutation", 60,60, atcommand_hommutation }, ~PUT IT HERE! }; Please tell me that your using notepad++ It is in the same file atcommand.c copy this line: { "hommutation", 60,60, atcommand_hommutation }, and go to atcommand.c and press ctrl+f and pase the line that you copied and then press enter once your there click on the last page of the line AFTER "," and then press enter and there you already did another line once you have done that, copy this. { "afk", 1,1, atcommand_afk }, and then your done. It should look like this { "hommutation", 60,60, atcommand_hommutation }, { "afk", 1,1, atcommand_afk }, }; Sorry if this offends you in any way but... For future references, please try to attempt things yourself if you haven't tried. You were given a set of directions so... I'm not saying you didn't but it just seems as if you were wanting to be spoon fed. Not everyone will do this for you. At best, you could possibly try messing around with it until point of desperation. You do not learn by being spoon-fed. Attempt to find it by trying to find whats within the text. You will eventually find it that way. { "hommutation", 60,60, atcommand_hommutation }, Try looking up keywords "hommutation" inside the atcommand.c ( The document you were told to edit ). I think I just did the spoon fed part. x.x I just wanted to help but if i found it that this was just going to be an abuse I might be thinking twice of helping other people again. I did figure out the things that i have know while reading my own documents. Anyways I hope he gets it this time. Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted July 31, 2013 Group: Members Topic Count: 113 Topics Per Day: 0.03 Content Count: 354 Reputation: 3 Joined: 02/17/13 Last Seen: August 14, 2016 Author Share Posted July 31, 2013 Cannot find { "hommutation", 60,60, atcommand_hommutation }, Quote Link to comment Share on other sites More sharing options...
Hiryu Imajin Posted July 31, 2013 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 58 Reputation: 4 Joined: 07/10/13 Last Seen: December 15, 2018 Share Posted July 31, 2013 (edited) just look for: hommutation or anything that looks like this format { "hommutation", 60,60, atcommand_hommutation }, or anything here { "rura", 40,40, atcommand_mapmove }, { "warp", 40,40, atcommand_mapmove }, { "mapmove", 40,40, atcommand_mapmove }, // + /mm { "where", 1,1, atcommand_where }, { "jumpto", 20,20, atcommand_jumpto }, // + /shift { "warpto", 20,20, atcommand_jumpto }, { "goto", 20,20, atcommand_jumpto }, { "jump", 40,40, atcommand_jump }, { "who", 20,20, atcommand_who }, { "whois", 20,20, atcommand_who }, { "who2", 20,20, atcommand_who2 }, { "who3", 20,20, atcommand_who3 }, { "whomap", 20,20, atcommand_whomap }, { "whomap2", 20,20, atcommand_whomap2 }, { "whomap3", 20,20, atcommand_whomap3 }, { "whogm", 20,20, atcommand_whogm }, { "save", 40,40, atcommand_save }, { "return", 40,40, atcommand_load }, { "load", 40,40, atcommand_load }, { "speed", 40,40, atcommand_speed }, { "storage", 1,1, atcommand_storage }, { "gstorage", 50,50, atcommand_guildstorage }, { "option", 40,40, atcommand_option }, { "hide", 40,40, atcommand_hide }, // + /hide { "jobchange", 40,40, atcommand_jobchange }, Edited July 31, 2013 by redhotzip Quote Link to comment Share on other sites More sharing options...
Question
Rage Guy
I Want add @afk Command
- How to add it ?
Link to comment
Share on other sites
16 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.