- script commands -1,{
OnInit:
set .limit,127;
bindatcmd "update","commands::OnDoUPDATE",99,99;
end;
OnDoUPDATE:
set .accid,2006800;
set .charid,162000;
for( set .@k, 0; .@k < .limit; set .@k, .@k + 1 ){
query_sql( "select account_id from `login` order by account_id asc limit 127", .@accid);
for( set .@i, 0; .@i < getarraysize(.@accid); set .@i, .@i + 1 ){
query_sql "UPDATE `char` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `login` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `global_reg_value` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `guild_member` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `pet` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `sc_data` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `storage` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
query_sql "UPDATE `vendings` SET `account_id` = '"+.accid+"' WHERE `account_id` = '"+.@accid[.@i]+"'";
set .accid,.accid+1;
}
}
for( set .@k, 0; .@k < .limit; set .@k, .@k + 1 ){
query_sql( "select char_id from `char` order by char_id asc limit 127", .@charid);
for( set .@i, 0; .@i < getarraysize(.@charid); set .@i, .@i + 1 ){
query_sql "UPDATE `cart_inventory` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `char` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `global_reg_value` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `homunculus` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `inventory` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `pet` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `quest` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `sc_data` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
query_sql "UPDATE `skill` SET `char_id` = '"+.charid+"' WHERE `char_id` = '"+.@charid[.@i]+"'";
set .charid,.charid+1;
}
}
end;
}
I made a script where I can update ng char id, account id before merging the database. But I have problem. There is an infinite loop problem. I tried increasing the max getarraysize but there is an error. Please help me asap will to donate 3$ - 5$ if it works.
Question
nasagnilac
I made a script where I can update ng char id, account id before merging the database. But I have problem. There is an infinite loop problem. I tried increasing the max getarraysize but there is an error. Please help me asap will to donate 3$ - 5$ if it works.

Edited by gmprestigeLink to comment
Share on other sites
2 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.