Jump to content

Question

Posted
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

4 answers to this question

Recommended Posts

Posted

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
Posted (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 by MrVandalBus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...