Jump to content
  • 0

Reset Account Variables


Nokia

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

hello. i wanna reset account variables automatically, without clicking an npc or some else.

so well, i want an reset every day at 14:00 PM.. would be nice if the player dosent have to be online.

i guess the onhour event wont work for this, right? because the variables wont reset if the player is not online? so are there another ways to delete variables?

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   152
  • Joined:  02/21/12
  • Last Seen:  

you could delete them directly from the sql table.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

uhm, are they located in global_reg_value? i think i will just fail to find them and make a script for this, but i will it try some things now.

so yeah i found them i global_reg.. is there any example script to query sql them?

Edited by Nokia
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   6
  • Joined:  03/12/12
  • Last Seen:  

uhm, are they located in global_reg_value? i think i will just fail to find them and make a script for this, but i will it try some things now.

Yes. You could use the OnHour trigger but you can't reference any player. You'd have to make iterations starting from the first accountID (the last column in global_reg_value) and either use the DELETE or SET commands in an sql query (depending on what your definition of 'reset' is).

Note that no On[whatever] scripts actually have to be attached to a RID to execute themselves unless they do RID specific things.

Edited by Elliott
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  01/25/12
  • Last Seen:  

how about this

query_sql "DELETE FROM `global_reg_value` WHERE str LIKE '%#%'";

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   5
  • Joined:  12/28/11
  • Last Seen:  

Thanks, finally got it working:

query_sql "DELETE FROM `rathena`.`global_reg_value` WHERE `str`='#test'";

  • Upvote 1
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...