Jump to content

Utility: Account Management System


Patskie

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Simple and useful script intended to boost players capability to manage their own account in-game. Feel free to use. Report bug and glitches immediately by messaging me here. Also suggestions are welcome and appreciated.
 
How to use :
- Just use @account in-game.
 
Script capabilities :
• My Account = Information of the current account.
• Change Mail = Change the e-mail of the current account.
• Change Gender = Change the gender of the current account ( 1 use per day limit ).
• Users Online = Show the list of user's online with their corresponding jobs.
• Set Password = Set a password for the account
• Delete Password = Delete a password for the account
• View Character = View all characters in an account
• Reset Position = Reset the position of the character in an account
• Reset Style = Reset the style of the character in an account.
• Reset Equipment = Reset the equipment of the character in an account.
 
Changelog :


1.0 - Initial release
1.1 - Remove unnecessary variables

 
Additional Information : 
• When password is set, Every time you log in it will asked for your password.
• To set the change sex time limit. Go to the script and find :

set #timer,gettimetick(2) + 86400;

86400 seconds is equivalent to 1 day.
 
TODO : Working on SQL OFFSET that will hold > 128 online players.
 
accountsystem.txt
accountsystem v1.1.txt

 

88x31.png
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

Edited by Patskie
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  09/24/12
  • Last Seen:  

Tagumoay idol

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Tagumoay idol

Lol /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   4
  • Joined:  05/23/12
  • Last Seen:  

nice bro.

-khayam

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  91
  • Reputation:   8
  • Joined:  03/03/12
  • Last Seen:  

Good Job :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

nice bro.

-khayam

 

 

Good Job :)

Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Hi Patskie,

Some comments to help you to improve your script :

  • Avoid setting #var for just some check : #insertlp$, #insertlp$, #accountvpw$, #cpassword$, ... you don't need to cache this variables on player account (we are limited so it's better to not polluate).
  • In this line, the @email$ variable is never set
    mes "Old e-mail: " +@email$;
  • The query will throw an error if there is more than 128 players online (an array can't store more than 128 values):
    query_sql "SELECT `name` , `class` , `base_level` , `job_level` FROM `char` WHERE `online` = '1'",.@name$,.@class,.@b_level,.@j_level;
  • It missing a escape_sql() in the line (can't be inject but can throw an error):
    query_sql "SELECT `online` FROM `char` WHERE `name` = '"+@name$[@m]+"'",@online;
  • I don't see the point to have 3 accounts variables to detect if a password is set (#setpwd, #dontp, #lockpw$), isn't it better to just use #lockpw$ and check if the variable is empty or not ?
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

@KeyWorld 

 

Ohh i see. why is it i must use escape_sql on these line query_sql "SELECT `online` FROM `char` WHERE `name` = '"+@name$[@m]+"'",@online; I know it can't be injected but how this line will throw an error? Thanks for suggesting

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

Patskie

It can throw an error in the case the player has an apostrophe on his name (some servers allowed it), but can't be injected because the pseudo can't contain more than 24 characters (and with 24 characters it's hard to do an interesting hack :P).

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Ohhh i see thannks for that...

 

 


Patskie
It can throw an error in the case the player has an apostrophe on his name (some servers allowed it), but can't be injected because the pseudo can't contain more than 24 characters (and with 24 characters it's hard to do an interesting hack  :P).

 

I just check the script_commands.txt on the doc folder. Is this what you are saying? :))

 

 

*escape_sql(<value>)
 
Converts the value to a string and escapes special characters so that it is safe to use in query_sql().
Returns the escaped form of the given value.
 
Example:
    set .@str$, "John's Laptop";
    set .@esc_str$, escape_sql(.@name$); // Escaped string: John\'s Laptop
Edited by Patskie
Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

nice but I have some problems in reseting the style, it doesnt work on me, Then the reset equip doesnt realy work actually to me, You can see that it reset the equip but if you alt+q it is still there. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

nice but I have some problems in reseting the style, it doesnt work on me, Then the reset equip doesnt realy work actually to me, You can see that it reset the equip but if you alt+q it is still there. 

You can reset equipment of a character when he or she is not online

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

how can I reset the character equip if he or she is not online using your script? Your script is like a control panel in game, right?

Lets say I'm having error in one of my character due to sprite error, Do I have to make another account then reset my account that having error?

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

this script work EA?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

this script work EA?

I guess so.

 

how can I reset the character equip if he or she is not online using your script? Your script is like a control panel in game, right?

Lets say I'm having error in one of my character due to sprite error, Do I have to make another account then reset my account that having error?

Use your other character with the same account ( with your character having error ) and there's an option there which character you want to reset.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

is it me? can you double check your script ingame, Try to reset your equip, Then check your equipment items if it goes into the inventory then check your display window if its gone. alt+q.I use a script like yours that i found here in rathena and he also get the same problem like yours and he didnt know the answer to that problem.Kindly check if your not busy because it's a good script for me if this script of yours work as intended.

 

This works for EA and im using it, except the reset equip. 

Edited by maynard
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  74
  • Topics Per Day:  0.02
  • Content Count:  171
  • Reputation:   0
  • Joined:  06/19/13
  • Last Seen:  

i try not work! i got error and when i type @account say no command unknow 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   1
  • Joined:  12/21/11
  • Last Seen:  

My bad,I forgot to tell you that i manually diff  have bindatcmd, Ea doesnt have bindatcmd only rathena has it. Search for bindatcmd and manually add it, Thats what I did to make it work. bindatcmd make my life easier, you can customized/make more @commands.

 

Back to topic I hope Patskie have a solution.

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

thanks for this :)

Edited by zhen
Link to comment
Share on other sites

  • 8 months later...

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   2
  • Joined:  11/19/11
  • Last Seen:  

What if i forgot my password?

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
Reply to this topic...

×   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...