Mabuhay Posted June 4, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted June 4, 2013 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.aa_timeout)*60000,0); } can anyone explain that code for me? as much as possible, line by line. cuz i wanna learn src mod :3 Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 4, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 2 hours ago Share Posted June 4, 2013 if you have set afk_timeout ... then ... convert the value inside message variable into integer .... if the timeout( converted value ) larger than 0 .....@afk for a limited duration ... else...@afk unlimit time. afk_timeout = setting inside conf files timeout = minutes for @afk ( integer form ) message = minutes for @afk ( string form ) min( x,y ) = limit the value between x and y and..a typo mistake in battle_config.aa_timeout Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted June 4, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted June 4, 2013 (edited) Thanks emistry. PS: btw, how about this part sir emistry? status_change_start (NULL, &sd->bl, SC_AUTOTRADE, 10000,0,0,0,0, ... Edited June 4, 2013 by MrVandalBus Quote Link to comment Share on other sites More sharing options...
Emistry Posted June 4, 2013 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2371 Joined: 10/28/11 Last Seen: 2 hours ago Share Posted June 4, 2013 add the SC_AUTOTRADE .... Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted June 4, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Author Share Posted June 4, 2013 should have thought of that @_@ thanks again Quote Link to comment Share on other sites More sharing options...
Question
Mabuhay
can anyone explain that code for me? as much as possible, line by line. cuz i wanna learn src mod :3
Link to comment
Share on other sites
4 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.