Kido Posted February 28, 2014 Posted February 28, 2014 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:! Quote
Pneuma Posted March 1, 2014 Posted March 1, 2014 You'd need to use a sql script to query the char db and to delete the row of the character name or ID Quote
Kido Posted March 1, 2014 Author Posted March 1, 2014 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: Quote
Pneuma Posted March 1, 2014 Posted March 1, 2014 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 Quote
Patskie Posted March 1, 2014 Posted March 1, 2014 input .@name$; DELETE FROM `char` WHERE `char_id` = '" +getcharid(0, .@name$)+ "'"; Quote
sandbox Posted March 1, 2014 Posted March 1, 2014 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! Quote
Pneuma Posted March 1, 2014 Posted March 1, 2014 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. Quote
sandbox Posted March 1, 2014 Posted March 1, 2014 Was too lazy to write that for him and since i'm not that fluent with sql queries. Don't forget to backup @Kido! Quote
Pneuma Posted March 1, 2014 Posted March 1, 2014 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 Quote
Kido Posted March 1, 2014 Author Posted March 1, 2014 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: Quote
Question
Kido
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:!
9 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.