Jump to content
  • 0

script moving a character from an account to another one


Question

4 answers to this question

Recommended Posts

  • 0
Posted
prontera,155,181,5	script	Sample	757,{
	mes "Enter character ID to move it to your account.";
	input .@value;
	query_sql("SELECT `account_id`, `char_id` FROM `char` WHERE `char_id` = "+.@value, .@aid, .@cid);
	
	if (!.@aid || !.@cid) {
		mes "Character doesn't exists.";
		close;
	}
	
	if (isloggedin(.@aid)) {
		mes "That account is logged in, please log off.";
		close;
	}
	
	query_sql("SELECT COUNT(1) FROM `char` WHERE `account_id` = "+getcharid(3), .@total_char);
	if (.@total_char >= 3) {
		mes "Your account already have more than 3 characters.";
		close;
	}
	
	query_sql("UPDATE `char` SET `account_id` = "+getcharid(3)+" WHERE `char_id` = "+.@cid);
	mes "Updated, please relog to see your new character.";
	close;
}

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...