Premium Syreldar 1886 Posted June 1, 2017 Premium Share Posted June 1, 2017 (edited) This is the hidden content, please Sign In or Sign Up Download -> This is the hidden content, please Sign In or Sign Up (Update 2023-02-03) (IPS sometimes adds invisible characters when copying and pasting with IPS Code...) 24/08/2017: Polished up other functions. Added party_get_member_count, Added party_get_member_pids, Added clear_dungeon, Added table_get_keyword_index, Added table_is_any_subarray_containing_keyword, Added table_get_subarray_keyword_index 26/08/2017: Added table_shuffle. 12/12/2017: Added open_shop (Opens a shop without needing to use 2 lines of code); 30/04/2018: Reworked table_shuffle, since it was not working properly. Added InDungeon() [bool]. Added ToDungeonIndex(map_index) [int]. 01/06/2018: Added factorial (factorial(5) returns 120); 14/11/2019: (Did you miss me?) Updated the whole list, better code and even more functions! 25/12/2021: Added is_valid_number, is_integer_number. (safe funcs you should be using on numerical inputs) table_shuffle now creates a copy of the table and works on it instead of changing the table itself. The end result is the same, but the table passed as argument remains untouched. Reworked get_time_format. Renamed IsOdd to is_odd. 25/6/2022: Added get_gold_format Added BuildSkillListOfLevel Minor fixes. 25/10/2022: Fixed IntToRomanStr typo 29/01/2023: Rewritten. Added some new stuff. Provided more examples and data for each func. 20/03/2023: Added get_random_number_within_except(range_min, range_max, except_table). 25/04/2023: Added table_get_count(table). Added is_valid_num_field(num). Added is_valid_table_field(table). Added is_valid_func_field(func). Added time_remaining_until(os.date("%H:%M")). 11/05/2023: Added color_str(color, text). Updated some global calls for the latest globals.lua update. 26/09/2023: Added num_to_char(num). Added char_to_num(string). Added string_to_ascii_array(string). Added ascii_array_to_string(table). Added skill_level_to_id(num). Added skill_id_to_level(string). Added time_to_sec(num, string). (Kept the old separated functions for backwards compatibility) Little get_time_format improvement, it's still backwards-compatible. 01/24/2024 (last update): The func 'is_valid_number' now has an "allow_zero" arg. and default values. Added 'count_digits(num)'. Added 'get_nth_digit(num, index)'. Added 'generate_num_array(limit)'. Added 'get_time_after_seconds(sec)'. Added 'mirror_shuffle(original_table, shuffled_table, target_table)' Renamed BuildSkillList to BuildSkillList2 in order to avoid conflicts with the default func from ymir. Edited May 17 by Syreldar 24/01/2024 updates. 147 5 1 4 1 1 1 49 9 102 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted August 24, 2017 Author Premium Share Posted August 24, 2017 Reserved. 2 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted December 12, 2017 Author Premium Share Posted December 12, 2017 12/12/2017: Added open_shop; "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted June 1, 2018 Author Premium Share Posted June 1, 2018 01/06/2018: Added factorial. (factorial(5) returns 120); 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4929 Posted June 16, 2018 Bot Share Posted June 16, 2018 player_killed_by_me when you kill a player. ( when kill beginif npc.is_pc() don't work ) Link to comment Share on other sites More sharing options...
Braxy 623 Posted June 17, 2018 Share Posted June 17, 2018 I suggest not to help this guy, he would probably write a shit code using your functions and ofc after that he would probably post it on a romanian forum with "copy rights". Let him write the function himself. P.S: Because i'm a good guy i suggest you to write a function that returns a boolean if the npc is pc and then you may use the function as check on the kill statement 2 As long as I'll be a threat for you , i will always be your target :3 Link to comment Share on other sites More sharing options...
Premium msnas 1427 Posted June 17, 2018 Premium Share Posted June 17, 2018 On 6/16/2018 at 8:02 PM, AndyOpris said: player_killed_by_me when you kill a player. ( when kill beginif npc.is_pc() don't work ) when kill with npc.is_pc() begin syschat'1 player killed' end Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted June 29, 2018 Author Premium Share Posted June 29, 2018 On 6/16/2018 at 9:02 PM, AndyOpris said: player_killed_by_me when you kill a player. ( when kill beginif npc.is_pc() don't work ) ? 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted November 14, 2019 Author Premium Share Posted November 14, 2019 14/11/2019: (Did you miss me?) Updated the whole list, better code and even more functions! "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted January 15, 2020 Author Premium Share Posted January 15, 2020 15/01/2019: Added BinToNum(bin) and NumToBin(num). "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Mr.Black 129 Posted February 2, 2020 Share Posted February 2, 2020 (edited) Late but awesome Edited February 2, 2020 by Mr.Black Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted December 25, 2021 Author Premium Share Posted December 25, 2021 25/12/2021: Added is_valid_number, is_integer_number. (safe funcs you should be using on numerical inputs) table_shuffle now creates a copy of the table and works on it instead of changing the table itself. The end result is the same, but the table passed as argument remains untouched. Reworked get_time_format. Renamed IsOdd to is_odd. Merry christmas! 2 4 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted June 25, 2022 Author Premium Share Posted June 25, 2022 25/6/2022: Added get_gold_format Added BuildSkillListOfLevel Minor fixes. 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted October 25, 2022 Author Premium Share Posted October 25, 2022 25/10/2022: Fixed IntToRomanStr typo "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted January 29, 2023 Author Premium Share Posted January 29, 2023 29/01/2023: Rewritten. Added some new stuff. Provided more examples and data for each func. 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted March 20, 2023 Author Premium Share Posted March 20, 2023 (edited) 20/03/2023: Added get_random_number_within_except(range_min, range_max, except_table) Edited March 20, 2023 by Syreldar "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted April 25, 2023 Author Premium Share Posted April 25, 2023 25/04/2023: Added table_get_count(table). Added is_valid_num_field(num). Added is_valid_table_field(table). Added is_valid_func_field(func). Added time_remaining_until(os.date("%H:%M")). "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted May 11, 2023 Author Premium Share Posted May 11, 2023 11/05/2023: Added color_str(color, text). Updated some global calls for the latest globals.lua update. 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted September 26, 2023 Author Premium Share Posted September 26, 2023 (edited) 26/09/2023: Added num_to_char(num). Added char_to_num(string). Added string_to_ascii_array(string). Added ascii_array_to_string(table). Added skill_level_to_id(num). Added skill_id_to_level(string). Added time_to_sec(num, string). (Kept the old functions as wrapper funcs for backwards compatibility) Edited September 26, 2023 by Syreldar 1 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Premium Syreldar 1886 Posted January 24 Author Premium Share Posted January 24 (edited) 24/01/2024 (last update): The func 'is_valid_number' now has an "allow_zero" arg. and default values. Added 'count_digits(num)'. Added 'get_nth_digit(num, index)'. Added 'generate_num_array(limit)'. Added 'get_time_after_seconds(sec)'. Added 'mirror_shuffle(original_table, shuffled_table, target_table)' Renamed BuildSkillList to BuildSkillList2 in order to avoid conflicts with the default func from ymir. it's been fun. Edited January 25 by Syreldar 1 1 1 "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Recommended Posts