Jump to content

Utility: Delete Character Command


Recommended Posts


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Delete Characters
This script allows you to delete characters in-game. When used it will ask the player to confirm and then kick them out of the server. When they log back their character and in all variables will be gone forever. It is handy since some of the new clients won't properly delete characters. The map server will get an error that says, "charif_ack_login_req failed - player not online". However all functions work great. I'm working on what error but I think it has to do with the script still going after the player is kicked. If anybody has any ideas let me know.

Delete_Character.txt Version 1.0

Delete_Character.txt Version 1.1

Delete_Character.txt Version 1.2

Edited by Peopleperson49
  • Upvote 3
  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

It removes the char, cart, storage and so on of the char account in the sql too o:?!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Yes this command removes everything from the players account for that character. However the sql is easy to modify if you just wanted to delete something specific. I created this because nomatter how much I try with the 20130807 I cannot get it to delete a character from an account. This is an easy solution. I hope you enjoy!

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

yup i had that problem too D: well thank you t's an amazing release for clients that have deletion problems o:!

 

up up +

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Thanks for that. Since your using check your map server and tell me if it says cannot find a table. That probably means that I included one of my custom ones and I need to remove that portion. You said you had that problem, were you able to fix it? Thanks.

 

In a funny note if your going to up up + post you should use the, "If you like this post click the "Vote this post up" button rep_up.png to the right of the post.". Anyways thanks again for using.

 

Peopleperson49

 

yup i had that problem too D: well thank you t's an amazing release for clients that have deletion problems o:!

 

up up +

Edited by Peopleperson49
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

yeah i could o:! it works now o: i just have to wait for the time and then i can delete it, huh by the way, i have my live server actually on D:! i'm kinda busy right now but in the night i can use my test server if you wish, which is online too but without ppl (backup server, pretty cheap the hots >:DD so o: add me to skype maybe (?) 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

It will still work just fine with the other tables added there. Just check the map server log when somebody uses it and post here. I believed I removed them all. I will remove them as soon as I see it. Won't affect the scripts operation or your server. I had already added your to skype earlier, lol.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

allright thanks so much ! /ok

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  949
  • Reputation:   174
  • Joined:  06/12/12
  • Last Seen:  

I think you should change this line

bindatcmd("deletecharacter",strnpcinfo(0)+"::OnDeleteCharacter");

to this

bindatcmd("deletecharacter",strnpcinfo(0)+"::OnDeleteCharacter",99,99);

so that only GM lvl 99 or whatever you set it to would only be the ones to use this command.. IME, it can be used by players which is dangerous.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Thats not a bad suggestion sandbox. I thought about it but the point for me was to supplement the fact that for some reason my client won't let me delete characters. So any player would need to be able to use it if needed. I could make it so a GM could use it on players only, but hopefully people arn't on other peoples accounts. If they safe guard it then there won't be any problems. But whose to stop somebody from getting on an account and dropping everything they have or other stuff?

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

What about the script asks first the account password then it cna procced to the deletion o:!! that way players wont be able to delete others ppl chars o:!!!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I added version 1.1 now that requires the player to input thier account password prior to deleting the character. Thanks for the suggestions.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

welcome o: see that downloads o:!!!

 

Edit:

 

May i suggest? after the player inputs the password, it would be cool that the script first makes the player use @storeall so if the player have forgot to store its items in storage, the script will do it for it o:!

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I could do that however with the deletecharacter command it deletes everything like they never existed. To have the server perform one more action like store everything wouldn't really be the best course. People using this command should know that they are deleting everything they have and to store what they want to keep. Anyways, maybe I missed what your intent was. Thanks for replying.

 

Peopleperson49

Edited by Peopleperson49
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Yup np o: i was just suggesting that right after the player inputes the password, the command will also use @storeall so if the player forgot something to keep in its storage the command will save it o:!

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

 

I delete my novice named Don Paule. and when i log in. my main character is deleted and not the novice, my donations items my equips my money is there. pls help.

 

A user just reported this.

I checked your script again and most likely am 100% sure that it cannot happen.

Especially since your delete the character on logging out. Thus it is IMPOSSIBLE to have another character deleted on logging out his Novice.

 

Any ideas?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

It's not possible to delete a character after you log back in. Its just not scripted that way. Also if it was related to that then all your characters you donation items, and zeny would be gone along with everything else.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

It's not possible to delete a character after you log back in. Its just not scripted that way. Also if it was related to that then all your characters you donation items, and zeny would be gone along with everything else.

 

Peopleperson49

 

So is there ANY possible way to delete character B when using your script on character A?

The only way I can think of is a bug rAthena-wise that both characters have the same character ID.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

If two characters had the same ID it would have deleted all items for that ID for both characters, nothing would have remained. But if they did somehow share the same ID you would know it because they would have pulled data from the same SQL tables. So both characters would have the exactly the same name, class, stats, items, zeny, etc... Sort of like the same character just happen to show up in two character slots. I don't think that would be an rAthena issue, but more of a SQL or phpadmin database issue of the server.

 

Since the script sets the .@char_id to that of the currently logged in character I still don't believe its possible. All actions following would be strictly limited to that character only. I have tested it and I cannot figure out a way to get it to mess up as described.

set .@char_id,getcharid(0);

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  100
  • Topics Per Day:  0.03
  • Content Count:  333
  • Reputation:   7
  • Joined:  03/01/14
  • Last Seen:  

If two characters had the same ID it would have deleted all items for that ID for both characters, nothing would have remained. But if they did somehow share the same ID you would know it because they would have pulled data from the same SQL tables. So both characters would have the exactly the same name, class, stats, items, zeny, etc... Sort of like the same character just happen to show up in two character slots. I don't think that would be an rAthena issue, but more of a SQL or phpadmin database issue of the server.

 

Since the script sets the .@char_id to that of the currently logged in character I still don't believe its possible. All actions following would be strictly limited to that character only. I have tested it and I cannot figure out a way to get it to mess up as described.

set .@char_id,getcharid(0);

Peopleperson49

 

Yes, I think your script is fine too..

I'm afraid that he either wants to scamm me or he did a mistake and does not tell me about it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

This is awesome dude.. Problem solve... With this thing... If got anything error i do contact you.. ^ ^ hahaha
Thx again sir...

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

A player used this command and reported that even after storing all items, after the player deleted the character the items of that character got deleted too.

 

I confirmed this with my gm account, i created some items, stored them and then used the command. After i loged back i opened my storage and the items were gone.

 

Edit:

i was having hope to find what items the player lost in the picklog but the script also deletes it x_x

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

Before delete, after put on storage I think he have to logoff to save the itens on storage or wait a couple time

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Before delete, after put on storage I think he have to logoff to save the itens on storage or wait a couple time

 

yeah i was thinking that because i also remembered that certain time the server saves the data of players so, the guy stored everything and deleted the character too quick, i guess that's what happened ):

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Nowhere in the script has it delete from the players storage.

 

Peopleperson49

 

query_sql("DELETE FROM `atcommandlog` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `BalanceRank` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `bonus_script` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `branchlog` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `buyingstore_items` WHERE `buyingstore_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `buyingstores` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `cashlog` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `cp_charprefs` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `cp_choko_rename_log` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `elemental` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `emprank` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `friends` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `guild` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `guild_member` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `homunculus` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `hotkey` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `memo` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `mercenary` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `mercenary_owner` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `mvplog` WHERE `kill_char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `mvprank` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `npclog` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `party` WHERE `leader_char`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `pet` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `picklog` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `pvprank` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `quest` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `sc_data` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `skill` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `skillcooldown` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `vendings` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `zenylog` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `inventory` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `cart_inventory` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `global_reg_value` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
query_sql("DELETE FROM `char` WHERE `char_id`='"+escape_sql(.@char_id)+"'");
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...