Jump to content

meko

Core Developers
  • Content Count

    355
  • Joined

  • Last visited

  • Days Won

    44

meko last won the day on April 12

meko had the most liked content!

About meko

  • Rank
    Advanced Member

Contact Methods

  • IRC Nickname
    meko

Profile Information

  • Gender
    Not Telling
  • Github
    Helianthella
  • Client Version
    ManaPlus

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You must execute the queries from sql-files/logs.sql to create the log tables
  2. the file is located at db/abra_db.txt
  3. the documentation has not been updated yet but you must define the constant CUSTOM_SKILL_RANGES at compile time, with the syntax being: {from, to}, {from, to}, ... In your case since you are only adding one skill you would define it as: {8443, 8443}, this means you would pass a -D compiler option like this: -DCUSTOM_SKILL_RANGES="{8443,8443}," ...which will insert it in skill_idx_ranges[]
  4. this just means mysql is not available in the apt repos so you should install mariadb-server instead of mysql-server and libmariadb-dev (and optionally the compatibility layer libmariadb-dev-compat) instead of libmysqlclient-dev
  5. Follow the installation instructions provided in the README file and make sure to configure your firewall and to open ports with your hosting provider
  6. meko

    auto revive

    OnPCDieEvent: if (!(isequipped(Helm_Of_Sun)) // no helm of sun || agitcheck() // WoE || getmapflag(strcharinfo(PC_MAP), mf_pvp) // map PvP || getunittype(killerrid) == UNITTYPE_PC) // killed by a player end; addtimer(1000, strnpcinfo(NPC_NAME) + "::OnAutoRevive"); end; OnAutoRevive: recovery(getcharid(CHAR_ID_ACCOUNT)); // revive the player end;
  7. /conf/network.conf
  8. Hercules has no LTS versions so the latest revision of the stable branch is always the most stable revision since we do not backport patches to older releases. Keep in mind that new bugs do appear from time to time but if you encounter some please report them so that they may be patched in the next release. If bugs are severe we also do pre-releases (denoted as vXX.XX.XX+Y) to address them in-between 2 releases
  9. MD5 is not encryption, it is only hashing. Ideally Argon2 or PBKDF2 should be used when storing passwords but the engine currently supports neither. There is a PR that implements PBKDF2 for Hercules but it is currently on hold
  10. From the error it appears that FluxCP is trying to connect to your mysql server but fails to reach it and the connection times out. You may have forgotten to update the DbConfig.Hostname when you moved to your new host
  11. Keep in mind that performing SQL queries is slow, especially when there's 200 rows of results so you should be using getunits() when possible. If you do not provide a map to getunits() it will search the whole server, just like the SQL query that is used in Ridleys script.
  12. this is untested but you could do something similar to: - script mapitem FAKE_NPC,{ end; OnCall: // @mapitem <nameid> <amount>{, <map>} [email protected]$ = [email protected]_parameters$[0]; [email protected] = atoi([email protected]_parameters$[1]); [email protected]$ = strcharinfo(PC_MAP); if ([email protected]_parameters == 3) { [email protected]$ == [email protected]_parameters$[2]; } else if ([email protected]_parameters != 2) { dispbottom("mapitem: illegal number of arguments."); dispbottom("Usage:"); dispbottom("@mapitem <nameid> <amount> for the current map"); dispbottom("@mapitem <nameid> <amount> <map> for another map"); end; } if (getmapinfo(MAPINFO_ID, [email protected]$) < 0) { dispbottom(sprintf("mapitem: map `%s` not found.", [email protected]$)); end; } [email protected] = getiteminfo([email protected]$, ITEMINFO_ID) < 0 ? getiteminfo(atoi([email protected]$), ITEMINFO_ID) : getiteminfo([email protected]$, ITEMINFO_ID); if ([email protected] < 0) { dispbottom(sprintf("mapitem: item `%s` does not exist.", [email protected]$)); end; } [email protected]$ = getiteminfo([email protected], ITEMINFO_AEGISNAME); if ([email protected] < 0 || [email protected] > .max) { dispbottom(sprintf("mapitem: trying to give %d `%s`, while the maximum allowed is %d.", [email protected], [email protected]$, .max)); end; } [email protected] = getunits(BL_PC, [email protected], false, [email protected]$); freeloop(true); for ([email protected] = 0; [email protected] < [email protected]; [email protected]) { if (.bound != false) { getitembound([email protected], [email protected], .bound, [email protected][[email protected]]); } else { getitem([email protected], [email protected], [email protected][[email protected]]); } } freeloop(false); [email protected] = [email protected]; [email protected] = [email protected] * [email protected]; dispbottom(sprintf("mapitem: gave %d `%s` (%d total) to %d players on map `%s`", [email protected], [email protected]$, [email protected], [email protected], [email protected]$)); end; OnInit: bindatcmd("itemmap", "mapitem::OnCall", 14, 99); .max = 100; .bound = IBT_ACCOUNT; // set to false to disable }
  13. If you want to do it from a script, you would use getunits(): [email protected] = getunits(BL_PC, [email protected], false, "geffen"); for ([email protected] = 0; [email protected] < [email protected]; [email protected]) { getitem(Bubble_Gum_Box_10, 1, [email protected][[email protected]]); }
  14. Running with root privileges is inherently insecure and so Hercules will complain when trying to start as the root user. You must create a new user and run Hercules under that new user (preferably as a daemon). To run a command with sudo your user must be in the sudoers file (you can edit it with visudo) but keep in mind that Hercules will also warn you when running with sudo (since it runs as root).
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.