Core Developers
  • Content count

  • Joined

  • Last visited

  • Days Won


meko last won the day on April 5

meko had the most liked content!


About meko

  • Rank
    Advanced Member

Contact Methods

  • IRC Nickname

Profile Information

  • Gender
    Not Telling
  1. chmod u+x ./{login,char,map}-server If you want to keep the file ownership and permissions intact when copying from linux to windows you should first make a tarball on the source machine and then download this instead of downloading every file one by one (ie via FTP)
  2. apply sql-files/logs.sql
  3. released version 10, which adds array_sort() and array_rsort() uses the Lomuto implementation of the Quicksort algorithm works with both string arrays (arr$) and integer arrays (arr)
  4. all of the array functions take the given index into account, this means if you give array[8] it is only executed from index 8 onwards. for array_shuffle this is not of much use but for array_shift, for example, it can be quite useful consider an array that is 0, 1, 2, 3, 4 and that you want to remove 2: you would do array_shift(array[2]) and the array would become 0, 1, 3, 4
  5. @AnnieRuru I just released version 9, which adds array_filter() and makes array_shuffle() use the Durstenfeld implementation of the Fisher-Yates algorithm
  6. please direct all further comments here:
  7. if you explain what you are trying to accomplish I could help you find a suitable solution
  8. You can't just get the player ID (account id) out of thin air, you have to get it from somewhere. If you have a ScriptState (st) you can get it from st->rid if you have a block_list (bl) you can get it from bl->id if you have a map_session_data (sd) you can get it from sd-> if you have a nickname you can get the sd with map->nick2sd(nick) and then get the id with sd->
  9. you want players to be able to toggle pk_mode for everyone or you want them to be able to opt-in to attacking and being attacked?
  10. I would rather advise you to use doc/script_commands.txt and the doc folder in general since it is always up-to-date. The wiki is infrequently updated
  11. if (playerattached()) { getitem(MY_ITEM, 1); }
  12. use close(); instead of end(); also menu() is deprecated, so please use select()
  13. function foobar { [email protected]_argument$ = getarg(0); // get the value of the first argument passed to foobar() [email protected]$ = "Hello " + [email protected]_argument$; // add the value of the first argument to "Hello" return [email protected]$; // exit the function, while returning the value of [email protected]$ } mes(foobar("world")); // Hello World
  14. [email protected]$ = [email protected] % (10 ** ([email protected] + 1)) / (10 ** [email protected]) + [email protected]$; // x = (y mod (10 ** (z + 1)) / (10 ** z)) // x = y mod 10 // this means it can be simplified to: [email protected]$ = ([email protected] % 10) + [email protected]$; but I believe your original script had an error because it uses both [email protected] and [email protected]$