Blue Jem Posted October 24, 2013 Posted October 24, 2013 how can add the command for AFK? i use latest SVN Quote
chriser Posted October 24, 2013 Posted October 24, 2013 http://rathena.org/board/topic/71389-afk-with-afk-hat/ Quote
Blue Jem Posted October 24, 2013 Author Posted October 24, 2013 i try but i got error from scr files Quote
chriser Posted October 24, 2013 Posted October 24, 2013 what error did you get? maybe I can help you with it. Quote
Kyroad Posted October 24, 2013 Posted October 24, 2013 (edited) Manual patch then recompile will solve your problem. Do not apply patch automatically. Edited October 24, 2013 by Kyroad Quote
Blue Jem Posted October 24, 2013 Author Posted October 24, 2013 skill.c: In function âskill_parse_row_nonearnpcrangedbâ: skill.c:18524: warning: comparison is always false due to limited range of data type CC atcommand.c atcommand.c: In function âatcommand_basecommandsâ: atcommand.c:9406: error: âatcommand_reloadmsgconfâ undeclared (first use in this function) atcommand.c:9406: error: (Each undeclared identifier is reported only once atcommand.c:9406: error: for each function it appears in.) make[1]: *** [obj_sql/atcommand.o] Error 1 make[1]: Leaving directory `/root/rathena/src/map' make: *** [map] Error 2 this is my atcommand.c http://pastebin.com/jS9W3UZj Quote
chriser Posted October 24, 2013 Posted October 24, 2013 try to change ACMD_DEF(join), ACMD_DEF(channel), ACMD_DEF(fontcolor), ACMD_DEF(langtype), ACMD_DEF(reloadmsgconf) }; to ACMD_DEF(join), ACMD_DEF(channel), ACMD_DEF(fontcolor), ACMD_DEF(langtype), //ACMD_DEF(reloadmsgconf) }; Quote
Kyroad Posted October 25, 2013 Posted October 25, 2013 (edited) in atcommand.c find: //wrong or no entry clif_displaymessage(fd,msg_txt(sd,460)); // Please enter a valid language (usage: @langtype <language>). clif_displaymessage(fd,msg_txt(sd,464)); // ---- Available languages: while(test!=-1){ //out of range test = msg_checklangtype(i,false); if(test == 1) clif_displaymessage(fd,msg_langtype2langstr(i)); i++; } return -1; } after that insert these lines: /*========================================== * @afk *------------------------------------------*/ ACMD_FUNC(afk) { nullpo_retr(-1, sd); if(sd->bl.m == map_mapname2mapid("prontera")) { clif_displaymessage(fd, "@afk is not allowed on this map."); return 0; } 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 ) { 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); 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(NULL, &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; } then find: ACMD_DEF(langtype), after that insert this line: ACMD_DEF(afk) in battle.c find: { "at_timeout", &battle_config.at_timeout, 0, 0, INT_MAX, }, then after that insert this line: { "afk_timeout", &battle_config.afk_timeout, 0, 0, INT_MAX, }, in battle.h find: int at_timeout; then after that insert this line: int afk_timeout; in misc.conf find: // 1 = Yes // 2 = Yes, when there are unread mails mail_show_status: 0 then after that insert these lines: // Set this to the amount of minutes afk chars will be kicked from the server. afk_timeout: 0 then after that recompile your server. Hope these helps you Edited October 25, 2013 by Kyroad Quote
Blue Jem Posted October 28, 2013 Author Posted October 28, 2013 yea i try this but thank you i got error 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9075): error C2143: syntax error : missing ';' before 'type' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9079): error C2059: syntax error : 'if' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9084): error C2059: syntax error : 'if' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9089): error C2059: syntax error : 'if' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9109): error C2059: syntax error : 'else' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9111): error C2059: syntax error : 'return' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9112): error C2059: syntax error : '}' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2143: syntax error : missing ')' before '(' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : ',' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2143: syntax error : missing ')' before 'constant' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2091: function returns function 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2143: syntax error : missing '{' before 'constant' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : '<Unknown>' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : ')' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9116): error C2059: syntax error : ')' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9117): error C2059: syntax error : 'while' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9123): error C2059: syntax error : 'return' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9124): error C2059: syntax error : '}' 1>c:\users\admin\desktop\rathena1\rathena12\trunk\src\map\atcommand.c(9850): warning C4013: 'atcommand_basecommands' undefined; assuming extern returning int error Quote
Kyroad Posted October 28, 2013 Posted October 28, 2013 (edited) I use the same patch and up to date trunk, it's working smoothly, i use rathena-10.sln for compiling Edited October 28, 2013 by Integer Quote
Blue Jem Posted October 28, 2013 Author Posted October 28, 2013 yea im using ra10 for recompiling what reathena version did you use 17689 Quote
Kyroad Posted October 28, 2013 Posted October 28, 2013 yea im using ra10 for recompiling what reathena version did you use 17689 r17689~ updated Quote
Kichi Posted October 30, 2013 Posted October 30, 2013 try thisrA @afk.patch I remove all outdate thing also the condition checkThis patch just force you to sit then add AFK hat only Quote
Question
Blue Jem
how can add the command for AFK? i use latest SVN
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.