Jump to content

Syreldar's quest functions


Recommended Posts

  • Premium

This is the hidden content, please

Download -> 

This is the hidden content, please
 (Update 2023-02-03) (IPS sometimes adds invisible characters when copying and pasting with IPS Code...)

24/08/2017:

  1. Polished up other functions.
  2. Added party_get_member_count,
  3. Added party_get_member_pids,
  4. Added clear_dungeon,
  5. Added table_get_keyword_index,
  6. Added table_is_any_subarray_containing_keyword,
  7. Added table_get_subarray_keyword_index

26/08/2017:

  1. Added table_shuffle.

12/12/2017:

  1. Added open_shop (Opens a shop without needing to use 2 lines of code);

30/04/2018:

  1. Reworked table_shuffle, since it was not working properly.
  2. Added InDungeon() [bool].
  3. Added ToDungeonIndex(map_index) [int].

01/06/2018:

  1. Added factorial (factorial(5) returns 120);

14/11/2019:

  1. (Did you miss me?) Updated the whole list, better code and even more functions!

25/12/2021:

  1. Added is_valid_number, is_integer_number. (safe funcs you should be using on numerical inputs)
  2. 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.
  3. Reworked get_time_format.
  4. Renamed IsOdd to is_odd.

25/6/2022:

  1. Added get_gold_format
  2. Added BuildSkillListOfLevel
  3. Minor fixes.

25/10/2022:

  1. Fixed IntToRomanStr typo

29/01/2023:

  1. Rewritten.
  2. Added some new stuff.
  3. Provided more examples and data for each func.

20/03/2023:

  1. Added get_random_number_within_except(range_min, range_max, except_table).

25/04/2023:

  1. Added table_get_count(table).
  2. Added is_valid_num_field(num).
  3. Added is_valid_table_field(table).
  4. Added is_valid_func_field(func).
  5. Added time_remaining_until(os.date("%H:%M")).

11/05/2023:

  1. Added color_str(color, text).
  2. Updated some global calls for the latest globals.lua update.

26/09/2023:

  1. Added num_to_char(num).
  2. Added char_to_num(string).
  3. Added string_to_ascii_array(string).
  4. Added ascii_array_to_string(table).
  5. Added skill_level_to_id(num).
  6. Added skill_id_to_level(string).
  7. Added time_to_sec(num, string). (Kept the old separated functions for backwards compatibility)
  8. Little get_time_format improvement, it's still backwards-compatible.

01/24/2024 (last update):

  1. The func 'is_valid_number' now has an "allow_zero" arg. and default values.
  2. Added 'count_digits(num)'.
  3. Added 'get_nth_digit(num, index)'.
  4. Added 'generate_num_array(limit)'.
  5. Added 'get_time_after_seconds(sec)'.
  6. Added 'mirror_shuffle(original_table, shuffled_table, target_table)'
  7. Renamed BuildSkillList to BuildSkillList2 in order to avoid conflicts with the default func from ymir.
Edited by Syreldar
24/01/2024 updates.
  • Metin2 Dev 132
  • Eyes 4
  • Dislove 1
  • Angry 4
  • Sad 1
  • Smile Tear 1
  • Confused 1
  • Good 45
  • Love 9
  • Love 87

 

"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

  • 2 months later...
  • Premium

Reserved.

  • Love 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

  • 3 months later...
  • Premium

12/12/2017:

  1. 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

  • 5 months later...
  • Premium

01/06/2018:

  1. Added factorial. (factorial(5) returns 120);
  • Love 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

  • 3 weeks later...
  • Bronze

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 :)

  • Love 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

  • 2 weeks later...
  • Premium
On 6/16/2018 at 9:02 PM, AndyOpris said:

player_killed_by_me 
when you kill a player.

 

 ( when kill begin
if npc.is_pc() 

don't work )

?

  • Love 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

  • 1 year later...
  • Premium

14/11/2019:

  1. (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

  • 2 months later...
  • Premium

15/01/2019:

  1. 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

  • 3 weeks later...
  • 1 year later...
  • Premium

25/12/2021:

  1. Added is_valid_number, is_integer_number. (safe funcs you should be using on numerical inputs)
  2. 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.
  3. Reworked get_time_format.
  4. Renamed IsOdd to is_odd.

Merry christmas!

  • Good 2
  • Love 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

  • 5 months later...
  • Premium

25/6/2022:

  1. Added get_gold_format
  2. Added BuildSkillListOfLevel
  3. Minor fixes.
  • Love 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

  • 4 months later...
  • Premium

25/10/2022:

  1. 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

  • 3 months later...
  • Premium

29/01/2023:

  1. Rewritten.
  2. Added some new stuff.
  3. Provided more examples and data for each func.
  • Good 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

  • 1 month later...
  • Premium

20/03/2023:

  1. Added get_random_number_within_except(range_min, range_max, except_table)
Edited 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

  • 1 month later...
  • Premium

25/04/2023:

  1. Added table_get_count(table).
  2. Added is_valid_num_field(num).
  3. Added is_valid_table_field(table).
  4. Added is_valid_func_field(func).
  5. 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

  • 3 weeks later...
  • Premium

11/05/2023:

  1. Added color_str(color, text).
  2. Updated some global calls for the latest globals.lua update.
  • Good 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

  • 4 months later...
  • Premium

26/09/2023:

  1. Added num_to_char(num).
  2. Added char_to_num(string).
  3. Added string_to_ascii_array(string).
  4. Added ascii_array_to_string(table).
  5. Added skill_level_to_id(num).
  6. Added skill_id_to_level(string).
  7. Added time_to_sec(num, string). (Kept the old functions as wrapper funcs for backwards compatibility)
Edited by Syreldar
  • Metin2 Dev 1
  • Love 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

  • 3 months later...
  • Premium

24/01/2024 (last update):

  1. The func 'is_valid_number' now has an "allow_zero" arg. and default values.
  2. Added 'count_digits(num)'.
  3. Added 'get_nth_digit(num, index)'.
  4. Added 'generate_num_array(limit)'.
  5. Added 'get_time_after_seconds(sec)'.
  6. Added 'mirror_shuffle(original_table, shuffled_table, target_table)'
  7. Renamed BuildSkillList to BuildSkillList2 in order to avoid conflicts with the default func from ymir.

it's been fun.

Edited by Syreldar
  • Metin2 Dev 1
  • Sad 1
  • Good 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



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.