Some commands that stopped working after I migrated to rathena
eathena:
query_sql("SELECT `account_id` FROM `char` WHERE `name`='"+.@names$+"'",#ACCOUNT__ID);
query_sql "UPDATE `login` SET `BLOCK_PJ` = '0' WHERE `account_id` = '"+#ACCOUNT__ID+"'";
query_sql ("SELECT `BLOCK_PJ` FROM `login` WHERE `account_id`='"+getcharid(3)+"'", .@BAN$);
query_sql "INSERT INTO `broadcast`(`name`,`last__broadcast`) VALUES ('"+strcharinfo(0)+"','"+@Megaphone$+"')";
query_sql ("SELECT `name`,`last__broadcast` FROM `broadcast` ORDER BY `ID__MSJ` DESC LIMIT 10", .@NAMES$[0] , .@MSJS$[0]);
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='fallsdoei' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;
set @nb,query_sql("INSERT INTO `itemizer` VALUES(NULL,'"+ escape_sql(@ep_item_id) +"','"+ escape_sql(@ep_item_count) +"','"+ escape_sql(getitemname(@ep_item_id)) +"','"+ escape_sql(getcharid(0)) +"','"+ escape_sql(strcharinfo(0)) +"','N/A','"+ escape_sql(strcharinfo(0)) +"','"+ escape_sql(@when$) +"','gm','1')");
set @result,query_sql("SELECT `id`,`item_id`,`item_name`,`item_amount`,`reason`,`by_gm` FROM `itemizer` WHERE (`char_id` = '"+ getcharid(0) +"' AND `for` = 'player' AND `collected` = 0) LIMIT 127",
set @nb,query_sql("UPDATE `itemizer` SET `collected` = 1 WHERE (`id` = '"+ @db_id[@choice] +"') LIMIT 1");
set @result,query_sql("SELECT `item_name`,`item_amount`,`reason`,`by_gm`,`when` FROM `itemizer` WHERE (`char_id` = '"+ getcharid(0) +"' AND `for` = 'player' AND `collected` = 1) ORDER BY `when` DESC LIMIT "+ @offset +","+ @rows_per_page,
query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '"+ .@guild_id +"'",.@guild_lv;
query_sql "SELECT `guild_id` FROM `guild` WHERE `name` = '" +escape_sql(.@guildname$) +"'", .@guildid;
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='bempcount' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='showbrokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name2$, .@count2;
query_sql "SELECT COUNT(castle_id) FROM guild_castle WHERE guild_id="+getcharid(2), .@count;
query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
dbis complete withall the tables(eAthena+rathena+custom)
Question
Anime s2
Some commands that stopped working after I migrated to rathena
eathena:
query_sql("SELECT `account_id` FROM `char` WHERE `name`='"+.@names$+"'",#ACCOUNT__ID);
query_sql "UPDATE `login` SET `BLOCK_PJ` = '0' WHERE `account_id` = '"+#ACCOUNT__ID+"'";
query_sql ("SELECT `BLOCK_PJ` FROM `login` WHERE `account_id`='"+getcharid(3)+"'", .@BAN$);
query_sql "INSERT INTO `broadcast`(`name`,`last__broadcast`) VALUES ('"+strcharinfo(0)+"','"+@Megaphone$+"')";
query_sql ("SELECT `name`,`last__broadcast` FROM `broadcast` ORDER BY `ID__MSJ` DESC LIMIT 10", .@NAMES$[0] , .@MSJS$[0]);
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='fallsdoei' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;
set @nb,query_sql("INSERT INTO `itemizer` VALUES(NULL,'"+ escape_sql(@ep_item_id) +"','"+ escape_sql(@ep_item_count) +"','"+ escape_sql(getitemname(@ep_item_id)) +"','"+ escape_sql(getcharid(0)) +"','"+ escape_sql(strcharinfo(0)) +"','N/A','"+ escape_sql(strcharinfo(0)) +"','"+ escape_sql(@when$) +"','gm','1')");
set @result,query_sql("SELECT `id`,`item_id`,`item_name`,`item_amount`,`reason`,`by_gm` FROM `itemizer` WHERE (`char_id` = '"+ getcharid(0) +"' AND `for` = 'player' AND `collected` = 0) LIMIT 127",
set @nb,query_sql("UPDATE `itemizer` SET `collected` = 1 WHERE (`id` = '"+ @db_id[@choice] +"') LIMIT 1");
set @result,query_sql("SELECT `item_name`,`item_amount`,`reason`,`by_gm`,`when` FROM `itemizer` WHERE (`char_id` = '"+ getcharid(0) +"' AND `for` = 'player' AND `collected` = 1) ORDER BY `when` DESC LIMIT "+ @offset +","+ @rows_per_page,
query_sql "SELECT `guild_lv` FROM `guild` WHERE `guild_id` = '"+ .@guild_id +"'",.@guild_lv;
query_sql "SELECT `guild_id` FROM `guild` WHERE `name` = '" +escape_sql(.@guildname$) +"'", .@guildid;
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='bempcount' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name$, .@count;
query_sql "SELECT `char`.char_id,`char`.`name`,global_reg_value.`value` FROM global_reg_value LEFT JOIN `char` ON global_reg_value.char_id=`char`.char_id WHERE global_reg_value.str='showbrokeemp' ORDER BY CAST(`global_reg_value`.`value` AS UNSIGNED) DESC LIMIT 10", .@char_id, .@name2$, .@count2;
query_sql "SELECT COUNT(castle_id) FROM guild_castle WHERE guild_id="+getcharid(2), .@count;
query_sql "select account_id from `char` where online = 1 order by rand() limit 1", .@aid;
db is complete with all the tables (eAthena + rathena+custom)
sry for my bad english
Anyone?
Edited by Anime s2Link to comment
Share on other sites
7 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.