Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/01/24 in all areas

  1. View File WoE Rewards & Statistics This file is a different version from WoE rewards depending on time spent in castle. It has all the features listed there, plus a statistic rundown on each WoE, And the ability to track the damage dealt by each player during WoE. Features: Can reward players for every minute they spend inside a WoE castle Can reward players for every kill in WoE castle, and will also display the name of the killed/killer. Can reward players for every emperium break during WoE Can reward players depending on the damage dealt during WoE Excludes AFK players and players who are not in a guild. Announces kills with different colors depending on the killer's castle Can set a modifier for certain classes to gain more points than others Displays the number and names of all the guilds who participated in the last WoE Displays a top 10 ranking of players with the most kills, K/DA, and Damage dealt during WoE Submitter Mastagoon Submitted 05/12/2021 Category PvP, GvG, WoE, Battleground Video Content Author Mastagoon  
    1 point
  2. Let's use in here script_commands.txt example: https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L9179 you use it like this: totalCards = query_sql("SELECT COUNT(*) FROM player_cards WHERE account_id = '" + getcharid(3) + "'"); basically totalCards will receive 1 if the query_sql is executed successfully or 0 in case of failure, now the values to which you are doing the SELECT need a scope in which they will always be an array of values, in your case as a sum of all the values in the table referring to the account id, so the array will only have one index with the result, so you would have to do it like this: prontera,140,174,4 script Personal storage2#prt 113,{ OnInit: // Query of obtained cards query_sql("SELECT COUNT(*) FROM player_cards WHERE account_id = '" + getcharid(3) + "'",.@totalCards); // totalCards = query_sql("SELECT COUNT(card_id) FROM player_cards WHERE account_id = '" + getcharid(3) + "'"); mes "[Card Album]"; mes "Here, let me open"; mes "your Card record."; //Ex1 mes "You have collected " + .@totalCards + " cards out of 1009."; //Ex2 mes "You have collected " + .@totalCards[0] + " cards out of 1009."; mes "Thank you for using"; mes "the Kafra Service."; close; } Remembering that you cannot use the OnInit label and then use commands that are common to rid (player) without attaching rid (player) as in the case of the "mes","getcharid(3)" and "close" commands, this will cause an error on the stating emulator that there is no rid attached, I hope you understand what I tried to explain
    1 point
×
×
  • Create New...