I have created this code for my server and inserted it on my agit_template.txt file but the problem is everytime the emp is broken it didn't return
query_sql "SELECT `char_id` FROM `char` WHERE `char_id` = '"+getcharid(0)+"'",@exist$;
if (getarraysize(@exist$) != 0){
query_sql "UPDATE `char` SET `empbreak` = `empbreak` + '1' WHERE `char_id` = '"+getcharid(0)+"'";
end;
}
query_sql "SELECT `guild_id` FROM `woe_guild_breaks` WHERE `guild_id` = '"+getcharid(2)+"'",@GDExist$;
if (getarraysize(@GDExist$) != 0){
query_sql "UPDATE `woe_guild_breaks` SET `id` = `id` + '1' WHERE `guild_id` = '"+getcharid(2)+"'";
} else {
query_sql "INSERT INTO `woe_guild_breaks` (`castle_id`, `guild_id`, `id`) VALUES ('15','"+getcharid(2)+"','1')";
end;
}