Jump to content
  • 0

Npc that deletes a char in an account o:


Kido

Question


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

Well i just want to request a npc that deletes a character on a player account by inputing the name when talked to

only usable by gm lv 99

 

this due to some clients can't delete the char or are having problems with that

 

thanks in advance o:!

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

You'd need to use a sql script to query the char db and to delete the row of the character name or ID

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:  

i know, that's what im asking because i dont know hot to put the input for search  name in the sql and then delet D:

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

i know, that's what im asking because i dont know hot to put the input for search  name in the sql and then delet D:

 

I believe something like this...

input .charid$;
set .charid$, .charid$;
DELETE FROM `ragnarok`.`char` WHERE `char_id`='.charid$';

I'm not 100% sure this will work but you can test it

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:  


input .@name$;

DELETE FROM `char` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'";

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:  

You might want to delete also the char's items in `inventory`,`cart_inventory`, etc. and also his friends, party info, etc. xD what a pain!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

You might want to delete also the char's items in `inventory`,`cart_inventory`, etc. and also his friends, party info, etc. xD what a pain!

	input .@Name$;
	query_sql("DELETE FROM `char` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `cart_inventory` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `elemental` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `friends` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `global_reg_value` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `guild` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `guild_member` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `homunculus` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `hotkey` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `inventory` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `memo` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `mercenary` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `mercenary_owner` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `party` WHERE `leader_char` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `pet` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `quest` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `sc_data` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `skill` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");
	query_sql("DELETE FROM `skillcooldown` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'");

Done.

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:  

Was too lazy to write that for him and since i'm not that fluent with sql queries. Don't forget to backup @Kido!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

Was too lazy to write that for him and since i'm not that fluent with sql queries. Don't forget to backup @Kido!

 

I'm not fluent either; but I'm currently working on an NPC that uses sql...so I used a part of what Patskie said and copied/pasted and renamed the parts needed

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 confuses me a bit o:

 

but i can half understand it o:!

 

thank you i will try to play with it and see if it works o;!

 

gonna update any results o:

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