Jump to content
  • 0

@afk source mod


LatSo

Question


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

http://rathena.org/board/topic/71389-afk-with-afk-hat/

 

is there any way to check if a player is on afk?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  270
  • Reputation:   20
  • Joined:  12/10/11
  • Last Seen:  

You could use a bindatcmd that triggers the command and sets a variable when used. Then onpclogin, you can set that variable back to 0

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

but will it still do the real @afk command?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  93
  • Reputation:   14
  • Joined:  12/12/11
  • Last Seen:  

I do not know if bindatcmd will overwrite the original @afk or not. You should probably test it and see

 

If that doesnt work then, heres something that may pull it off.

the AFK command is based off of the Autotrade command.

 

You can add a new script function to check if player is on autotrade mode

Using if Player's Session Data state = sd->state.autotrade

 

return 1;

 

NOTE: This is my theory on how it could be achieved. It may not be 100% guaranteed.

Edited by Evelynn
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

or i could edit the name of @afk into something like @afkx then bindatcmd the @afk that will automatically run the @afkx command. 

 

sorry bad english. you think this will work?

 

or disable the @afk command in the players command and replace it with bindatcmd @logout that will automatically trigger the real @afk after setting a variable to a player.

Edited by LatSo
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  93
  • Reputation:   14
  • Joined:  12/12/11
  • Last Seen:  

Your theory will work as well. I do not see an issue with that.

That is most likely the easiest and simplest way.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

thanks for brainstorming with me :D

Link to comment
Share on other sites

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.

×
×
  • Create New...