iAlreadyExist Posted June 5, 2022 Posted June 5, 2022 hello can someone share code after every match to update the points when someone have 9 match or something Quote
0 xRelic Posted June 6, 2022 Posted June 6, 2022 15 hours ago, haskovo said: hello can someone share code after every match to update the points when someone have 9 match or something what you mean update the points? and what pack you use? Quote
0 iAlreadyExist Posted June 6, 2022 Author Posted June 6, 2022 when someone make 9 matches to be appeared in the class not after olympiad finish i use acis Quote
0 An4rchy Posted June 6, 2022 Posted June 6, 2022 (edited) Olympiad.java Find this: private static final String SELECT_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles_eom, characters WHERE characters.obj_Id = olympiad_nobles_eom.char_id AND olympiad_nobles_eom.class_id = ? AND olympiad_nobles_eom.competitions_done >= ? ORDER BY olympiad_nobles_eom.olympiad_points DESC, olympiad_nobles_eom.competitions_done DESC, olympiad_nobles_eom.competitions_won DESC LIMIT 10"; Change it to this: private static final String SELECT_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles, characters WHERE characters.obj_Id = olympiad_nobles.char_id AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= ? ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10"; Find this: private void saveNobleData() Change it to this: public void saveNobleData() --- OlympiadGameNormal.java Find this: _playerOne.updateStat(COMP_DONE, 1); _playerTwo.updateStat(COMP_DONE, 1); Insert below: Olympiad.getInstance().saveNobleData(); Test and say if any problems. Not very optimal solution because it updates database for every single participant after each match, but I can't be bothered to explain to you how to make it update for 2 participants and you probably don't care to understand, so just use this or study the classes I mentioned and make your own sql statements. Edited June 6, 2022 by An4rchy Quote
0 iAlreadyExist Posted June 6, 2022 Author Posted June 6, 2022 i have this there private static final String GET_EACH_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles, characters WHERE characters.obj_Id = olympiad_nobles.char_id AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10"; Quote
0 An4rchy Posted June 7, 2022 Posted June 7, 2022 17 hours ago, haskovo said: i have this there private static final String GET_EACH_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles, characters WHERE characters.obj_Id = olympiad_nobles.char_id AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10"; Yes I think it's the same. Did you change it or was this the one in your source? Also are you using clean aCis or some custom pack based on aCis? Quote
0 iAlreadyExist Posted June 7, 2022 Author Posted June 7, 2022 i dont use custom pack i have made from clean acis but its old rev Quote
Question
iAlreadyExist
hello can someone share code after every match to update the points when someone have 9 match or something
6 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.
Note: Your post will require moderator approval before it will be visible.