Rage Guy Posted May 4, 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 May 4, 2013 how to add @afk command . Thanks for who is going to help me Quote Link to comment Share on other sites More sharing options...
0 skymia Posted June 22, 2017 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 02/19/17 Last Seen: May 26, 2024 Share Posted June 22, 2017 On 26/11/2013 at 11:33 PM, chatterboy said: All from above has error occur: Better use this guys! I made it haha... Compatible upto Rathena 17695 how to remove the message that he is in autotrade mode? i want is he can still receive the message even he is in afk mode Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 4, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted May 4, 2013 File Location: trunk/src/map/atcommand.c Find: ACMD_FUNC(reloadmsgconf) { map_msg_reload(); clif_displaymessage(fd, msg_txt(sd,463)); // Message configuration has been reloaded. return 0; } Add below: ACMD_FUNC(afk) { nullpo_retr(-1, sd); trade_tradeack(sd,4); 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); return 0; } Find: AtCommandInfo atcommand_base[] = { Add below: ACMD_DEF(afk), Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted May 4, 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 May 4, 2013 Can u pls make it to me cuz i may break my scipts == Quote Link to comment Share on other sites More sharing options...
iubantot Posted May 4, 2013 Group: Members Topic Count: 117 Topics Per Day: 0.03 Content Count: 312 Reputation: 34 Joined: 10/15/12 Last Seen: 7 hours ago Share Posted May 4, 2013 File Location: trunk/src/map/atcommand.c Find: ACMD_FUNC(reloadmsgconf) { map_msg_reload(); clif_displaymessage(fd, msg_txt(sd,463)); // Message configuration has been reloaded. return 0; } Add below: ACMD_FUNC(afk) { nullpo_retr(-1, sd); trade_tradeack(sd,4); 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); return 0; } Find: AtCommandInfo atcommand_base[] = { Add below: ACMD_DEF(afk), this error comes when i did this this happens while compiling . atcommand.c: In function âatcommand_afkâ: atcommand.c:8998: warning: passing argument 2 of âstatus_change_startâ makes pointer from integer without a cast atcommand.c:8998: error: too few arguments to function âstatus_change_startâ make[1]: *** [obj_sql/atcommand.o] Error 1 make[1]: Leaving directory `/eathena/src/map' Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 4, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted May 4, 2013 this error comes when i did this this happens while compiling . atcommand.c: In function âatcommand_afkâ: atcommand.c:8998: warning: passing argument 2 of âstatus_change_startâ makes pointer from integer without a cast atcommand.c:8998: error: too few arguments to function âstatus_change_startâ make[1]: *** [obj_sql/atcommand.o] Error 1 make[1]: Leaving directory `/eathena/src/map' Seems like you're using eAthena SVN. Quote Link to comment Share on other sites More sharing options...
Rage Guy Posted May 4, 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 May 4, 2013 · Hidden by Patskie, November 26, 2013 - No essence with the topic Hidden by Patskie, November 26, 2013 - No essence with the topic o.O Link to comment
iubantot Posted May 4, 2013 Group: Members Topic Count: 117 Topics Per Day: 0.03 Content Count: 312 Reputation: 34 Joined: 10/15/12 Last Seen: 7 hours ago Share Posted May 4, 2013 (edited) this error comes when i did this this happens while compiling . atcommand.c: In function âatcommand_afkâ: atcommand.c:8998: warning: passing argument 2 of âstatus_change_startâ makes pointer from integer without a cast atcommand.c:8998: error: too few arguments to function âstatus_change_startâ make[1]: *** [obj_sql/atcommand.o] Error 1 make[1]: Leaving directory `/eathena/src/map' Seems like you're using eAthena SVN. im using rAthena Edited May 4, 2013 by ivantuting Quote Link to comment Share on other sites More sharing options...
Jaburak Posted May 4, 2013 Group: Members Topic Count: 48 Topics Per Day: 0.01 Content Count: 1125 Reputation: 236 Joined: 07/30/12 Last Seen: April 13 Share Posted May 4, 2013 im using rAthena Try this one; ACMD_FUNC(afk) { nullpo_retr(-1, sd); if( map[sd->bl.m].flag.autotrade == battle_config.autotrade_mapflag ) { if (!message || !*message) { chat_createpcchat(sd, "(AFK)", "", 1, 1); trade_tradeack(sd,4); 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); } if((strlen(message) < 0)||(strlen(message) > 36)) { chat_createpcchat(sd, "(@afk) mail me~", "", 1, 1); trade_tradeack(sd,4); 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); } chat_createpcchat(sd, message, "", 1, 1); trade_tradeack(sd,4); 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; } Quote Link to comment Share on other sites More sharing options...
chatterboy Posted November 26, 2013 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 309 Reputation: 26 Joined: 11/26/12 Last Seen: November 22, 2024 Share Posted November 26, 2013 (edited) All from above has error occur: 1>c:\besprenro server\rathena-160\src\map\atcommand.c(3727): warning C4047: 'function' : 'block_list *' differs in levels of indirection from 'int'1>c:\besprenro server\rathena-160\src\map\atcommand.c(3727): warning C4024: 'status_change_start' : different types for formal and actual parameter 21>c:\besprenro server\rathena-160\src\map\atcommand.c(3727): error C2198: 'status_change_start' : too few arguments for call1>c:\besprenro server\rathena-160\src\map\atcommand.c(3742): warning C4047: 'function' : 'block_list *' differs in levels of indirection from 'int'1>c:\besprenro server\rathena-160\src\map\atcommand.c(3742): warning C4024: 'status_change_start' : different types for formal and actual parameter 21>c:\besprenro server\rathena-160\src\map\atcommand.c(3742): error C2198: 'status_change_start' : too few arguments for call1>c:\besprenro server\rathena-160\src\map\atcommand.c(3754): warning C4047: 'function' : 'block_list *' differs in levels of indirection from 'int'1>c:\besprenro server\rathena-160\src\map\atcommand.c(3754): warning C4024: 'status_change_start' : different types for formal and actual parameter 21>c:\besprenro server\rathena-160\src\map\atcommand.c(3754): error C2198: 'status_change_start' : too few arguments for call Better use this guys! I made it haha... Compatible upto Rathena 17695 /*========================================== * @afk by GM Chatterboy [besprenRO Script] * Turns on/off Autotrade for a specific player *------------------------------------------*/ACMD_FUNC(afk) { nullpo_retr(-1, sd); if( map[sd->bl.m].flag.autotrade != battle_config.autotrade_mapflag ) { clif_displaymessage(fd, msg_txt(sd,1179)); // Autotrade is not allowed on this map. return -1; } if( pc_isdead(sd) ) { clif_displaymessage(fd, msg_txt(sd,1180)); // You cannot autotrade when dead. return -1; } sd->state.autotrade = 1; if( battle_config.at_timeout ) { int timeout = atoi(message); status_change_start(NULL,&sd->bl, SC_AUTOTRADE, 10000, 0, 0, 0, 0, ((timeout > 0) ? min(timeout,battle_config.at_timeout) : battle_config.at_timeout) * 60000, 0); } channel_pcquit(sd,0xF); //leave all chan clif_authfail_fd(sd->fd, 15); return 0;} Edited November 26, 2013 by chatterboy Quote Link to comment Share on other sites More sharing options...
krashdragon Posted November 26, 2013 Group: Members Topic Count: 13 Topics Per Day: 0.00 Content Count: 56 Reputation: 4 Joined: 06/20/13 Last Seen: August 31, 2021 Share Posted November 26, 2013 Sir anakid how bout hercules? Quote Link to comment Share on other sites More sharing options...
Question
Rage Guy
how to add @afk command .
Thanks for who is going to help me
Link to comment
Share on other sites
10 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.