#edit.
@Haruka Mayumi
Before closing the topic. Just one more question, please.
Using your model, I did the WOT Player Ranking, but I have a question about that.
My idea is when the player breaks the chest he will get +1 breakpoint in the player ranking And his guild will also get +1 point in the guild ranking.
The +1 breakpoint in the Player Ranking is ok.
My question is, how can I use the sql table 'count' both to add points for players and to add points for the guild? And what changes should I make in the ranking? Please.
case 1:
next;
mes @npcR$; // Players Ranking WOT
if(!(.@nb = query_sql("SELECT B.`name`,B.`guild_id`,A.`count` FROM `wot_ladder` AS A LEFT JOIN `char` AS B ON A.`char_id` = B.`char_id` ORDER BY `count` DESC LIMIT 10", .@name$,.@gid,.@count))) {
mes "No data found.";
close;
}
for ( .@i = 0; .@i < .@nb; .@i++ ) {
mes (.@i+1) +". "+ .@name$[.@i] +" ~ "+(getguildname(.@gid[.@i]) == "null" ? "None":getguildname(.@gid[.@i]))+" ~ "+ .@count[.@i] +" breaks.";
}
close;
case 2:
next;
mes @npcR$; // Guild Ranking WOT
query_sql "SELECT `guild_id`, `count` FROM `wot_ladder` WHERE '"+getcharid(2)+"' AND `count` > '0' ORDER BY `count` DESC LIMIT 10",.@nom$,.@bau;
for (set .@i,0; .@i < getarraysize(.@nom$); set .@i, .@i + 1)
mes (.@i+1)+"º^000000 - ^228B22"+.@nom$[.@i]+"^000000 - ^00B2EE"+.@bau[.@i]+"^000000";
break;
}
And, how to add + 1 Point Ranking Guild
announce "[War of Treasure]: The ["+strcharinfo(0)+"] from the ["+getguildname(.@guild_id)+"] guild destroyed a chest!",8;
// Breaker Point only for those who destroyed the chest. (Ranking Player)
query_sql("INSERT INTO `wot_ladder` SET `char_id` = '"+getcharid(0)+"', `count` = '1' ON DUPLICATE KEY UPDATE `count` = `count`+1");
Please.
Thank you very much. And I'm sorry. It is very complicated for me.