From 7e10f1611d51f1d0c6d9efce6efe3e046cdd3aca Mon Sep 17 00:00:00 2001 From: Mysteries Date: Tue, 29 Jan 2013 20:02:52 -0500 Subject: Updated placeholders. --- conf/mapflag/battleground.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'conf') diff --git a/conf/mapflag/battleground.txt b/conf/mapflag/battleground.txt index 86dcf95f0..f7404c139 100644 --- a/conf/mapflag/battleground.txt +++ b/conf/mapflag/battleground.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Battleground map setting. //===== By: ================================================== //= Epoque //===== Current Version: ===================================== //= 1.0a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Defines a Battleground map. //= Additional parameter '2' shows scoreboard. -- cgit v1.2.3-60-g2f50 From 5e16466de34d7d0ad99354bd6c83346683d0b051 Mon Sep 17 00:00:00 2001 From: Mysteries Date: Tue, 29 Jan 2013 21:30:29 -0500 Subject: Updated some more placholders. --- conf/mapflag/gvg.txt | 6 ++-- conf/mapflag/jail.txt | 6 ++-- conf/mapflag/night.txt | 4 +-- conf/mapflag/nightmare.txt | 6 ++-- conf/mapflag/nobranch.txt | 6 ++-- conf/mapflag/noexp.txt | 6 ++-- conf/mapflag/noicewall.txt | 6 ++-- conf/mapflag/noloot.txt | 4 +-- conf/mapflag/nomemo.txt | 6 ++-- conf/mapflag/nopenalty.txt | 6 ++-- conf/mapflag/nopvp.txt | 6 ++-- conf/mapflag/noreturn.txt | 6 ++-- conf/mapflag/nosave.txt | 6 ++-- conf/mapflag/noskill.txt | 6 ++-- conf/mapflag/noteleport.txt | 6 ++-- conf/mapflag/novending.txt | 4 +-- conf/mapflag/nowarp.txt | 6 ++-- conf/mapflag/nowarpto.txt | 6 ++-- conf/mapflag/partylock.txt | 6 ++-- conf/mapflag/pvp.txt | 6 ++-- conf/mapflag/pvp_noguild.txt | 6 ++-- conf/mapflag/pvp_noparty.txt | 6 ++-- conf/mapflag/reset.txt | 4 +-- conf/mapflag/restricted.txt | 4 +-- conf/mapflag/town.txt | 4 +-- doc/ea_job_system.txt | 2 +- doc/effect_list.txt | 4 +-- doc/item_bonus.txt | 6 ++-- doc/item_db.txt | 4 +-- doc/map_cache.txt | 10 +++---- doc/md5_hashcheck.txt | 4 +-- doc/mob_db_mode_list.txt | 8 ++--- doc/packet_struct_notation.txt | 4 +-- doc/permissions.txt | 4 +-- doc/quest_variables.txt | 2 +- doc/sample/delitem2.txt | 4 +-- doc/sample/getequipcardid.txt | 2 +- doc/sample/getequipid.txt | 4 +-- doc/sample/getiteminfo.txt | 2 +- doc/sample/getmonsterinfo.txt | 2 +- doc/sample/gstorage_test.txt | 4 +-- doc/sample/localized_npc.txt | 6 ++-- doc/sample/npc_live_dialogues.txt | 2 +- doc/sample/npc_shop_test.txt | 4 +-- doc/sample/npc_test_array.txt | 4 +-- doc/sample/npc_test_chat.txt | 4 +-- doc/sample/npc_test_checkweight.txt | 4 +-- doc/sample/npc_test_duplicate.txt | 4 +-- doc/sample/npc_test_func.txt | 4 +-- doc/sample/npc_test_npctimer.txt | 4 +-- doc/sample/npc_test_npctimer2.txt | 4 +-- doc/sample/npc_test_pcre.txt | 2 +- doc/sample/npc_test_quest.txt | 4 +-- doc/sample/npc_test_setitemx.txt | 2 +- doc/sample/npc_test_setmapflag.txt | 2 +- doc/sample/npc_test_skill.txt | 2 +- doc/sample/npc_test_time.txt | 2 +- doc/script_commands.txt | 58 +++++++++++++++++-------------------- doc/whisper_sys.txt | 4 +-- doc/woe_time_explanation.txt | 2 +- 60 files changed, 133 insertions(+), 189 deletions(-) (limited to 'conf') diff --git a/conf/mapflag/gvg.txt b/conf/mapflag/gvg.txt index 31430d856..055a1d733 100644 --- a/conf/mapflag/gvg.txt +++ b/conf/mapflag/gvg.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Guild versus Guild mode. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.2 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Players can attack other guilds, and will have their guild //= icons shown. WoE damage reductions will also take place. diff --git a/conf/mapflag/jail.txt b/conf/mapflag/jail.txt index 024a5cd6f..0a8b00846 100644 --- a/conf/mapflag/jail.txt +++ b/conf/mapflag/jail.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Jail. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= pvp: Turns on PvP mode //= pvp_noparty: Can't attack player in same party diff --git a/conf/mapflag/night.txt b/conf/mapflag/night.txt index 4584f068f..c3e8a47fe 100644 --- a/conf/mapflag/night.txt +++ b/conf/mapflag/night.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Night mode. //===== By: ================================================== //= Skotlex //===== Current Version: ===================================== //= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Enables night mode effects. //===== Additional Comments: ================================= diff --git a/conf/mapflag/nightmare.txt b/conf/mapflag/nightmare.txt index 9c7d3f8f7..106ee665a 100644 --- a/conf/mapflag/nightmare.txt +++ b/conf/mapflag/nightmare.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Nightmare mode. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Players drop items/equipment on death. //= pvp_nightmaredrop id,type,percent diff --git a/conf/mapflag/nobranch.txt b/conf/mapflag/nobranch.txt index f9eea4890..a05c37df5 100644 --- a/conf/mapflag/nobranch.txt +++ b/conf/mapflag/nobranch.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable Dead Branch use. //===== By: ================================================== -//= rAthena Dev Team +//= HerculesDev Team //===== Current Version: ===================================== //= 1.8 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables the following items: //= Dead Branch (604), Bloody Branch (12103), diff --git a/conf/mapflag/noexp.txt b/conf/mapflag/noexp.txt index 4161a923c..0b6fe20c6 100644 --- a/conf/mapflag/noexp.txt +++ b/conf/mapflag/noexp.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable EXP gain. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.7 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Same as 'nobaseexp' and 'nojobexp' combined. //===== Additional Comments: ================================= diff --git a/conf/mapflag/noicewall.txt b/conf/mapflag/noicewall.txt index 392bf16e0..5b6e6ad12 100644 --- a/conf/mapflag/noicewall.txt +++ b/conf/mapflag/noicewall.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable Ice Wall. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.8 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Blocks usage of WZ_ICEWALL. //===== Additional Comments: ================================= diff --git a/conf/mapflag/noloot.txt b/conf/mapflag/noloot.txt index adab17a5d..380dc506c 100644 --- a/conf/mapflag/noloot.txt +++ b/conf/mapflag/noloot.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable monster drops. //===== By: ================================================== //= Epoque //===== Current Version: ===================================== //= 1.0a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Same as 'nomobloot' and 'nomvploot' combined. //===== Additional Comments: ================================= diff --git a/conf/mapflag/nomemo.txt b/conf/mapflag/nomemo.txt index 12321f7c1..dbb35a164 100644 --- a/conf/mapflag/nomemo.txt +++ b/conf/mapflag/nomemo.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable Warp Portal memory. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.8b -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Prevents players from using /memo on a map. //= Also disables marriage warp skills. diff --git a/conf/mapflag/nopenalty.txt b/conf/mapflag/nopenalty.txt index 2517a3759..083d86105 100644 --- a/conf/mapflag/nopenalty.txt +++ b/conf/mapflag/nopenalty.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable death penalty. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.4 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Same as 'noexppenalty' and 'nozenypenalty' combined. //===== Additional Comments: ================================= diff --git a/conf/mapflag/nopvp.txt b/conf/mapflag/nopvp.txt index 3bb9d681a..9f876c49b 100644 --- a/conf/mapflag/nopvp.txt +++ b/conf/mapflag/nopvp.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable Player versus Player mode. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.1a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Prevents PvP mode on a map. //===== Additional Comments: ================================= diff --git a/conf/mapflag/noreturn.txt b/conf/mapflag/noreturn.txt index da694de91..696d81460 100644 --- a/conf/mapflag/noreturn.txt +++ b/conf/mapflag/noreturn.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable return warp. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.6 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables the following items: //= Butterfly Wing (602), Siege Teleport Scroll (14591), diff --git a/conf/mapflag/nosave.txt b/conf/mapflag/nosave.txt index fe7e03dfa..59a59fcae 100644 --- a/conf/mapflag/nosave.txt +++ b/conf/mapflag/nosave.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable auto-save. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.7 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Characters logging out on the specified map will be warped //= to the map specified in the last field, or "SavePoint". diff --git a/conf/mapflag/noskill.txt b/conf/mapflag/noskill.txt index 8a25aa137..81540b45a 100644 --- a/conf/mapflag/noskill.txt +++ b/conf/mapflag/noskill.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable skill use. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.1 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables all skills on the map. //===== Additional Comments: ================================= diff --git a/conf/mapflag/noteleport.txt b/conf/mapflag/noteleport.txt index 4ef0639ee..df25145d8 100644 --- a/conf/mapflag/noteleport.txt +++ b/conf/mapflag/noteleport.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable teleportation. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.6a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables all means of teleportation within a map. //= Script commands 'warp', 'areawarp', 'warpchar', diff --git a/conf/mapflag/novending.txt b/conf/mapflag/novending.txt index 816d52252..5f7ef8e82 100644 --- a/conf/mapflag/novending.txt +++ b/conf/mapflag/novending.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable vending. //===== By: ================================================== //= Epoque //===== Current Version: ===================================== //= 1.0a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables skill MC_VENDING on a map. //===== Additional Comments: ================================= diff --git a/conf/mapflag/nowarp.txt b/conf/mapflag/nowarp.txt index bc41d29a6..cfeb938a2 100644 --- a/conf/mapflag/nowarp.txt +++ b/conf/mapflag/nowarp.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable warping. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.3 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables use of @go to a map. //===== Additional Comments: ================================= diff --git a/conf/mapflag/nowarpto.txt b/conf/mapflag/nowarpto.txt index 0f9734799..2490b8e61 100644 --- a/conf/mapflag/nowarpto.txt +++ b/conf/mapflag/nowarpto.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Disable warpto. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.3 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables use of @warp to a map. //===== Additional Comments: ================================= diff --git a/conf/mapflag/partylock.txt b/conf/mapflag/partylock.txt index 3afda71d5..e8d7051f2 100644 --- a/conf/mapflag/partylock.txt +++ b/conf/mapflag/partylock.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Party lock. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Blocks all party modifications on a map: //= /organize, /leave, /invite, @changeleader diff --git a/conf/mapflag/pvp.txt b/conf/mapflag/pvp.txt index 8463b8923..4e3ca5762 100644 --- a/conf/mapflag/pvp.txt +++ b/conf/mapflag/pvp.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Player versus Player mode. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Enables PvP on a map. //===== Additional Comments: ================================= diff --git a/conf/mapflag/pvp_noguild.txt b/conf/mapflag/pvp_noguild.txt index 731739dd1..166b65764 100644 --- a/conf/mapflag/pvp_noguild.txt +++ b/conf/mapflag/pvp_noguild.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Ignore guilds. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.1 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Ignores guild alliances on GvG-enabled maps. //===== Additional Comments: ================================= diff --git a/conf/mapflag/pvp_noparty.txt b/conf/mapflag/pvp_noparty.txt index abc9529d2..bd5e866f6 100644 --- a/conf/mapflag/pvp_noparty.txt +++ b/conf/mapflag/pvp_noparty.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Ignore parties. //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 1.2 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Ignores party alliances on PvP-enabled maps. //===== Additional Comments: ================================= diff --git a/conf/mapflag/reset.txt b/conf/mapflag/reset.txt index 24adf9f3a..5354580b9 100644 --- a/conf/mapflag/reset.txt +++ b/conf/mapflag/reset.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Enable Neuralizer use. //===== By: ================================================== //= Daegaladh //===== Current Version: ===================================== //= 1.0 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Maps where Neuralizer (12213) can be used. //===== Additional Comments: ================================= diff --git a/conf/mapflag/restricted.txt b/conf/mapflag/restricted.txt index f4bd6d175..9c2a44bd8 100644 --- a/conf/mapflag/restricted.txt +++ b/conf/mapflag/restricted.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Restricted. //===== By: ================================================== //= Komurka //===== Current Version: ===================================== //= 1.3 -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Disables items configured in item_noequip.txt //= and skills configured in skill_nocast_db.txt. diff --git a/conf/mapflag/town.txt b/conf/mapflag/town.txt index 8dabb2c4a..319785524 100644 --- a/conf/mapflag/town.txt +++ b/conf/mapflag/town.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Mapflag: Town. //===== By: ================================================== //= Epoque //===== Current Version: ===================================== //= 1.0a -//===== Compatible With: ===================================== -//= rAthena SVN //===== Description: ========================================= //= Designates a map as a town, granting mailbox access. //===== Additional Comments: ================================= diff --git a/doc/ea_job_system.txt b/doc/ea_job_system.txt index f29278f50..e25f10689 100644 --- a/doc/ea_job_system.txt +++ b/doc/ea_job_system.txt @@ -1,4 +1,4 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= eAthena Job System //===== By: ================================================== //= Skotlex diff --git a/doc/effect_list.txt b/doc/effect_list.txt index c24791260..19b323cc6 100644 --- a/doc/effect_list.txt +++ b/doc/effect_list.txt @@ -1,7 +1,7 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= Client Effects List //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20120822 //===== Description: ========================================= diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index 490f3bc24..e331dbf7b 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -1,7 +1,7 @@ -//===== rAthena Documentation ================================ -//= rAthena Item Bonuses List +//===== Hercules Documentation ================================ +//= Hercules Item Bonuses List //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121219 //===== Description: ========================================= diff --git a/doc/item_db.txt b/doc/item_db.txt index d474b08c9..8aa09ce53 100644 --- a/doc/item_db.txt +++ b/doc/item_db.txt @@ -1,7 +1,7 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= Item Database //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20120904 //===== Description: ========================================= diff --git a/doc/map_cache.txt b/doc/map_cache.txt index 9bb401863..99e54ef06 100644 --- a/doc/map_cache.txt +++ b/doc/map_cache.txt @@ -1,11 +1,11 @@ -//===== rAthena Documentation ================================ -//= rAthena Map Cache Builder and Format Documentation +//===== Hercules Documentation ================================ +//= Hercules Map Cache Builder and Format Documentation //===== By: ================================================== //= DracoRPG //===== Current Version: ===================================== //= 20070724 //===== Description: ========================================= -//= A complete manual for rAthena's map cache generator as +//= A complete manual for Hercules' map cache generator as //= well as a reference on the map cache format used. //============================================================ @@ -14,7 +14,7 @@ Preface: Since SVN revision ~10000, the map-server no longer knows how to read GRFs directly. It reads maps from a "map cache" file that contains all and only the useful data about the maps. A map cache containing every official -kRO Sakray map currently supported by rAthena is provided as a default. +kRO Sakray map currently supported by Hercules is provided as a default. If you have custom maps or want to minimize the size of your map cache because your server does not load all of them (multi-map-server or light test server), you can use the map cache builder to generate a new one fitting your needs. @@ -22,7 +22,7 @@ Map cache builder manual: ------------------------------------------------------------------------------- The source code for the map cache builder is located in src/tool/. It can be built using "make tools" if you use the Makefile -or using the "mapcache" project under Visual Studio. Named "mapcache", the executable will be in your rAthena main folder. +or using the "mapcache" project under Visual Studio. Named "mapcache", the executable will be in your Hercules main folder. The map cache builder needs 3 file paths : one is a list of GRFs and/or data directory containing the maps, the second is the list of maps to add to the map cache, and the last one is the path of the map cache to generate. Default values for those paths are "tools/mapcache/grf_files.txt", "db/map_index.txt" and "db/(pre-)re/map_cache.dat". diff --git a/doc/md5_hashcheck.txt b/doc/md5_hashcheck.txt index b374335cb..10760a695 100644 --- a/doc/md5_hashcheck.txt +++ b/doc/md5_hashcheck.txt @@ -1,7 +1,7 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= MD5 Hash Check //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20120921 //===== Description: ========================================= diff --git a/doc/mob_db_mode_list.txt b/doc/mob_db_mode_list.txt index 4c2b85e4a..f747e38b0 100644 --- a/doc/mob_db_mode_list.txt +++ b/doc/mob_db_mode_list.txt @@ -1,11 +1,11 @@ -//===== rAthena Documentation ================================ -//= rAthena Monster Modes Reference +//===== Hercules Documentation ================================ +//= Hercules Monster Modes Reference //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20120630 //===== Description: ========================================= -//= A reference description of rAthena's mob_db 'mode' field. +//= A reference description of Hercules' mob_db 'mode' field. //============================================================ Bit Legend: diff --git a/doc/packet_struct_notation.txt b/doc/packet_struct_notation.txt index 25951acb5..c1598f3be 100644 --- a/doc/packet_struct_notation.txt +++ b/doc/packet_struct_notation.txt @@ -1,4 +1,4 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= Packet Structure Notation //===== By: ================================================== //= Ai4rei @@ -29,7 +29,7 @@ The first line contains a brief description of what the packet does, or what it is good for, followed by it's AEGIS name in parentheses; first two letters of the AEGIS name specify origin (first letter) and destination (second letter) of the packet. If the packet's name -is not known or is not applicable (rAthena server-server packets), +is not known or is not applicable (Hercules server-server packets), specify at least these two letters to indicate the direction of the packet. Do not use S(end)/R(ecv) for this, as it is inaccurate and location dependent (if the description is copied to different server diff --git a/doc/permissions.txt b/doc/permissions.txt index 129d384f4..619282c94 100644 --- a/doc/permissions.txt +++ b/doc/permissions.txt @@ -1,7 +1,7 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= Permission List //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20120606 //===== Description: ========================================= diff --git a/doc/quest_variables.txt b/doc/quest_variables.txt index 8b9a6f3a3..556210dca 100644 --- a/doc/quest_variables.txt +++ b/doc/quest_variables.txt @@ -1,4 +1,4 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= Permanent Quest Variables //===== By: ================================================== //= Lupus diff --git a/doc/sample/delitem2.txt b/doc/sample/delitem2.txt index 6810a3c26..f38d59c27 100644 --- a/doc/sample/delitem2.txt +++ b/doc/sample/delitem2.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Delitem2 //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20070315 //===== Description: ========================================= diff --git a/doc/sample/getequipcardid.txt b/doc/sample/getequipcardid.txt index 9c2e506d4..0447bf533 100644 --- a/doc/sample/getequipcardid.txt +++ b/doc/sample/getequipcardid.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Getequipcardid //===== By: ================================================== //= Lupus diff --git a/doc/sample/getequipid.txt b/doc/sample/getequipid.txt index 02d80780f..654c58f3b 100644 --- a/doc/sample/getequipid.txt +++ b/doc/sample/getequipid.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Getequipid //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121003 //===== Description: ========================================= diff --git a/doc/sample/getiteminfo.txt b/doc/sample/getiteminfo.txt index f2076cc75..15b81b749 100644 --- a/doc/sample/getiteminfo.txt +++ b/doc/sample/getiteminfo.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Getiteminfo //===== By: ================================================== //= Lupus diff --git a/doc/sample/getmonsterinfo.txt b/doc/sample/getmonsterinfo.txt index 084924739..079d9e7e9 100644 --- a/doc/sample/getmonsterinfo.txt +++ b/doc/sample/getmonsterinfo.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Getmonsterinfo //===== By: ================================================== //= Lupus diff --git a/doc/sample/gstorage_test.txt b/doc/sample/gstorage_test.txt index 9745b4b09..559f7f76e 100644 --- a/doc/sample/gstorage_test.txt +++ b/doc/sample/gstorage_test.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Guild Storage Test //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20070315 //===== Description: ========================================= diff --git a/doc/sample/localized_npc.txt b/doc/sample/localized_npc.txt index b3946162e..91bf46062 100644 --- a/doc/sample/localized_npc.txt +++ b/doc/sample/localized_npc.txt @@ -1,11 +1,9 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample localized NPC //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= v1.0 -//===== Compatible With: ===================================== -//= rAthena with setd, getd //===== Description: ========================================= //= Example of a localized NPC. //= diff --git a/doc/sample/npc_live_dialogues.txt b/doc/sample/npc_live_dialogues.txt index 6ba1c7ee2..22422d9af 100644 --- a/doc/sample/npc_live_dialogues.txt +++ b/doc/sample/npc_live_dialogues.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Live Dialogue //===== By: ================================================== //= Lupus diff --git a/doc/sample/npc_shop_test.txt b/doc/sample/npc_shop_test.txt index c86562cb4..fa58f3f52 100644 --- a/doc/sample/npc_shop_test.txt +++ b/doc/sample/npc_shop_test.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Shops //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20090206 //===== Description: ========================================= diff --git a/doc/sample/npc_test_array.txt b/doc/sample/npc_test_array.txt index 97aa5baf0..b6185adbc 100644 --- a/doc/sample/npc_test_array.txt +++ b/doc/sample/npc_test_array.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Array Test //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20090206 //===== Description: ========================================= diff --git a/doc/sample/npc_test_chat.txt b/doc/sample/npc_test_chat.txt index 7a8a65471..24176b802 100644 --- a/doc/sample/npc_test_chat.txt +++ b/doc/sample/npc_test_chat.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Chat Test //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121003 //===== Description: ========================================= diff --git a/doc/sample/npc_test_checkweight.txt b/doc/sample/npc_test_checkweight.txt index 195ff856e..e2560cedf 100644 --- a/doc/sample/npc_test_checkweight.txt +++ b/doc/sample/npc_test_checkweight.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: CheckWeight //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121113 //===== Description: ========================================= diff --git a/doc/sample/npc_test_duplicate.txt b/doc/sample/npc_test_duplicate.txt index 46684c3d2..237e7e57d 100644 --- a/doc/sample/npc_test_duplicate.txt +++ b/doc/sample/npc_test_duplicate.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Duplicate Test //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20070915 //===== Description: ========================================= diff --git a/doc/sample/npc_test_func.txt b/doc/sample/npc_test_func.txt index 1a60ac69d..fbde70cd1 100644 --- a/doc/sample/npc_test_func.txt +++ b/doc/sample/npc_test_func.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Functions //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20120901 //===== Description: ========================================= diff --git a/doc/sample/npc_test_npctimer.txt b/doc/sample/npc_test_npctimer.txt index f3f661b6d..f3c2d8bee 100644 --- a/doc/sample/npc_test_npctimer.txt +++ b/doc/sample/npc_test_npctimer.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: NPC Timers //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121003 //===== Description: ========================================= diff --git a/doc/sample/npc_test_npctimer2.txt b/doc/sample/npc_test_npctimer2.txt index bd634b9d2..6c5d139f0 100644 --- a/doc/sample/npc_test_npctimer2.txt +++ b/doc/sample/npc_test_npctimer2.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Attached NPC Timers //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121003 //===== Description: ========================================= diff --git a/doc/sample/npc_test_pcre.txt b/doc/sample/npc_test_pcre.txt index adc96f585..09f65e607 100644 --- a/doc/sample/npc_test_pcre.txt +++ b/doc/sample/npc_test_pcre.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: PCRE //===== By: ================================================== //= rAthena Dev Team diff --git a/doc/sample/npc_test_quest.txt b/doc/sample/npc_test_quest.txt index 15fcdc210..39f838e23 100644 --- a/doc/sample/npc_test_quest.txt +++ b/doc/sample/npc_test_quest.txt @@ -1,7 +1,7 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Quest Test //===== By: ================================================== -//= rAthena Dev Team +//= Hercules Dev Team //===== Current Version: ===================================== //= 20121227 //===== Description: ========================================= diff --git a/doc/sample/npc_test_setitemx.txt b/doc/sample/npc_test_setitemx.txt index eba53e008..10d8daaaa 100644 --- a/doc/sample/npc_test_setitemx.txt +++ b/doc/sample/npc_test_setitemx.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Setiteminfo & Setitemscript //===== By: ================================================== //= Lupus diff --git a/doc/sample/npc_test_setmapflag.txt b/doc/sample/npc_test_setmapflag.txt index 00da0d37d..010a6f85d 100644 --- a/doc/sample/npc_test_setmapflag.txt +++ b/doc/sample/npc_test_setmapflag.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Mapflag Test //===== By: ================================================== //= Jbain diff --git a/doc/sample/npc_test_skill.txt b/doc/sample/npc_test_skill.txt index 99eaa9f37..1168014ea 100644 --- a/doc/sample/npc_test_skill.txt +++ b/doc/sample/npc_test_skill.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Skill //===== By: ================================================== //= rAthena Dev Team diff --git a/doc/sample/npc_test_time.txt b/doc/sample/npc_test_time.txt index 8c5cbdb3e..f9c40b910 100644 --- a/doc/sample/npc_test_time.txt +++ b/doc/sample/npc_test_time.txt @@ -1,4 +1,4 @@ -//===== rAthena Script ======================================= +//===== Hercules Script ======================================= //= Sample: Time Test //===== By: ================================================== //= rAthena Dev Team diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 2b1aa5d59..3c93490bb 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -1,18 +1,14 @@ -//===== rAthena Documentation ================================ -//= rAthena Script Commands +//===== Hercules Documentation ================================ +//= Hercules Script Commands //===== By: ================================================== -//= rAthena Dev Team -//===== Current Version: ===================================== -//= $Revision$ -//===== Last Updated: ======================================== -//= $LastChangedDate$ +//= Hercules Dev Team //===== Description: ========================================= -//= A reference manual for the rAthena scripting language. +//= A reference manual for the Hercules scripting language. //= Commands are sorted depending on their functionality. //============================================================ This document is a reference manual for all the scripting commands and functions -available in current rAthena SVN. It is not a simple tutorial. When people tell +available in current Hercules GIT. It is not a simple tutorial. When people tell you to "Read The F***ing Manual", they mean this. The information was mostly acquired through looking up how things actually work @@ -75,7 +71,7 @@ Wherever you refer to a map name, it's always 'mapname' or 'mapname.gat' Script loading structure ------------------------ -Scripts are loaded by the map server as referenced in the 'conf/map_athena.conf' +Scripts are loaded by the map server as referenced in the 'conf/map-server.conf' configuration file, but in the default configuration, it doesn't load any script files itself. Instead, it loads the file 'npc/scripts_main.conf' which itself contains references to other files. The actual scripts are loaded from txt @@ -83,7 +79,7 @@ files, which are linked up like this: npc: -Any line like this, invoked, ultimately, by 'map_athena.conf' will load up the +Any line like this, invoked, ultimately, by 'map-server.conf' will load up the script contained in this file, which will make the script available. No file will get loaded twice, to prevent possible errors. @@ -101,7 +97,7 @@ place it. // This line will be ignored when processing the script. Block comments can also be used, where you can place /* and */ between any text you -wish rAthena to ignore. +wish Hercules to ignore. Example: /* This text, @@ -154,12 +150,12 @@ Monster name is the name the monsters will have on screen, and has no relation whatsoever to their names anywhere else. It's the mob id that counts, which identifies monster record in 'mob_db.txt' database of monsters. If the mob name is given as "--ja--", the 'japanese name' field from the monster database is -used, (which, in rAthena, actually contains an English name) if it's "--en--", +used, (which, in Hercules, actually contains an English name) if it's "--en--", it's the 'english name' from the monster database (which contains an uppercase name used to summon the monster with a GM command). Amount is the amount of monsters that will be spawned when this command is -executed, it is affected by spawn rates in 'battle_athena.conf'. +executed, it is affected by spawn rates in 'battle.conf'. Delay1 and delay2 control monster respawn delays - the first one is the fixed base respawn time, and the second is random variance on top of the base time. @@ -407,7 +403,7 @@ Variables The meat of every programming language is variables - places where you store data. -In the rAthena scripting language, variable names are not case sensitive. +In the Hercules scripting language, variable names are not case sensitive. Variables are divided into and uniquely identified by the combination of: prefix - determines the scope and extent (or lifetime) of the variable @@ -584,7 +580,7 @@ To include symbol '"' in a string you should use prefix '\"' Arrays ------ -Arrays (in rAthena at least) are essentially a set of variables going under the +Arrays (in Hercules at least) are essentially a set of variables going under the same name. You can tell between the specific variables of an array with an 'array index', a number of a variable in that array: @@ -731,7 +727,7 @@ Logical bitwise operators work only on numbers, and they are the following: | - Or. The bitwise operator AND (&) is used to test two values against each other, and results in setting bits which are active in both arguments. This can - be used for a few things, but in rAthena this operator is usually used to + be used for a few things, but in Hercules this operator is usually used to create bit-masks in scripts. The bitwise operator OR (|)sets to 1 a binary position if the binary position @@ -1429,7 +1425,7 @@ receive free Zeny as a result. Since trunk r12192 the command has two optional arguments and a return value. The default value of 'min' and 'max' can be set with 'input_min_value' and -'input_max_value' in script_athena.conf. +'input_max_value' in script.conf. For numeric inputs the value is capped to the range [min,max]. Returns 1 if the value was higher than 'max', -1 if lower than 'min' and 0 otherwise. For string inputs it returns 1 if the string was longer than 'max', -1 is @@ -1995,7 +1991,7 @@ Example: for ( set .@i,0; .@i<.@bigloop; set .@i, .@i+1 ) { dothis; // will sleep the script for 1ms when detect an infinity loop to - // let rAthena do what it need to do (socket, timer, process, etc.) + // let Hercules do what it need to do (socket, timer, process, etc.) } freeloop(0); // disable @@ -2516,7 +2512,7 @@ See 'getequipid' for a full list of valid equipment slots. *getitemname() Given the database ID number of an item, this function will return the text -stored in the 'japanese name' field (which, in rAthena, stores an English name +stored in the 'japanese name' field (which, in Hercules, stores an English name the players would normally see on screen.) --------------------------------------- @@ -2904,7 +2900,7 @@ http://www.delorie.com/gnu/docs/glibc/libc_437.html All the format characters given in there should properly work. Max length is the maximum length of a time string to generate. -The example given in rAthena sample scripts works like this: +The example given in Hercules sample scripts works like this: mes gettimestr("%Y-%m/%d %H:%M:%S",21); @@ -3375,7 +3371,7 @@ Example 2: *basicskillcheck() This function will return the state of the configuration option -'basic_skill_check' in 'battle_athena.conf'. It returns 1 if the option is +'basic_skill_check' in 'battle.conf'. It returns 1 if the option is enabled and 0 if it isn't. If the 'basic_skill_check' option is enabled, which it is by default, characters must have a certain number of basic skill levels to sit, request a trade, use emotions, etc. Making your script behave differently @@ -3924,7 +3920,7 @@ changing jobs, which can be checked for later in scripts. *jobname () -This command retrieves the name of the given job using the msg_athena entries 550->650. +This command retrieves the name of the given job using the messages.conf entries 550->650. mes "[Kid]"; mes "I never thought I'd met a "+jobname(Class)+" here of all places."; @@ -4094,7 +4090,7 @@ sprites, which is essential for making custom headgear. Since a lot of people have different palettes for hair and clothes, it's impossible to tell you what all the color numbers are. If you want a serious -example, there is a Stylist script inside the default rAthena installation that +example, there is a Stylist script inside the default Hercules installation that you can look at: 'npc/custom/stylist.txt' --------------------------------------- @@ -4121,7 +4117,7 @@ This command will return the SVN revision number that the server is currently running on. if ( get_revision() >= 15000 ) - mes "Welcome rAthena!"; + mes "Welcome Hercules!"; --------------------------------------- \\ @@ -4830,7 +4826,7 @@ Used in reset NPC's (duh!) This command takes off all the skill points on the invoking character, so they only have Basic Skill blanked out (lvl 0) left, and returns the points for them to spend again. Nothing else will change but the skills. Quest skills will also -reset if 'quest_skill_reset' option is set to Yes in 'battle_athena.conf'. If +reset if 'quest_skill_reset' option is set to Yes in 'battle.conf'. If the 'quest_skill_learn' option is set in there, the points in the quest skills will also count towards the total. @@ -5897,7 +5893,7 @@ hold information about the name id (item id) sold and the amount sold of it. Sam goes for the OnSellItem label, only the variables are named different (@sold_nameid, @sold_quantity, @sold_refine, @sold_attribute, @sold_identify, @sold_card1, @sold_card2, @sold_card3, @sold_card4). An example on a shop comes -with rAthena, and can be found in the doc/sample/npc_dynamic_shop.txt file. +with Hercules, and can be found in the doc/sample/npc_dynamic_shop.txt file. This example shows how to use the labels and their set variables to create a dynamic shop. @@ -6032,7 +6028,7 @@ characters are present in the room to mess up the script. The 'enablearena'/'disablearena' commands are just aliases with no parameter. These are supposedly left here for compatibility with official server scripts, -but no rAthena script uses these at the moment. +but no Hercules script uses these at the moment. --------------------------------------- @@ -6350,7 +6346,7 @@ will not be displayed anywhere else. *logmes ""; This command will write the message given to the map server NPC log file, as -specified in 'conf/log_athena.conf'. In the TXT version of the server, the log +specified in 'conf/logs.conf'. In the TXT version of the server, the log file is 'log/npclog.log' by default. In the SQL version, if SQL logging is enabled, the message will go to the 'npclog' table, otherwise, it will go to the same log file. @@ -6937,7 +6933,7 @@ uppercase/lowercase. Otherwise, 0. Characters not of the alphabelt will return 0 Example: - charisupper("rAthena", 1); //returns 1 + charisupper("Hercules", 1); //returns 1 --------------------------------------- @@ -7154,7 +7150,7 @@ at the maximum possible. The behavior modified with the above mentioned commands will only be exhibited if the pet is loyal and appropriate configuration options are set in -'battle_athena.conf'. +'battle.conf'. Pet scripts in the database normally run whenever a pet of that type hatches from the egg. Other commands usable in item scripts (see 'bonus') will also diff --git a/doc/whisper_sys.txt b/doc/whisper_sys.txt index 2e71558c3..c5c042f4d 100644 --- a/doc/whisper_sys.txt +++ b/doc/whisper_sys.txt @@ -1,11 +1,11 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= NPC Whisper System //===== By: ================================================== //= lordalfa //===== Current Version: ===================================== //= 20120904 //===== Description: ========================================= -//= A description of rAthena's NPC whispering system. +//= A description of Hercules' NPC whispering system. //============================================================ This piece of code to allows characters to execute events in NPCs by whispering diff --git a/doc/woe_time_explanation.txt b/doc/woe_time_explanation.txt index 099a5a15e..2b645118e 100644 --- a/doc/woe_time_explanation.txt +++ b/doc/woe_time_explanation.txt @@ -1,4 +1,4 @@ -//===== rAthena Documentation ================================ +//===== Hercules Documentation ================================ //= WoE Time Explanation //===== By: ================================================== //= erKURITA -- cgit v1.2.3-60-g2f50 From a4a549da77879c142ed9fe667ed312dfa6e6b70a Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 3 Feb 2013 12:25:53 -0200 Subject: Introducing MySQL Reconnect * mysql_reconnect_type ** 1: when mysql disconnects during runtime, the server tries to reconnect mysql_reconnect_count times and, if unsuccessful, the server is shut down ** 2: when mysql disconnects during runtime it tries to reconnect indefinitely mysql_reconnect_type:2 * mysql_reconnect_count ** number of reconnect attempts the server should do when the database disconnects during runtime ** only used when mysql_reconnect_type is 1 mysql_reconnect_count:1 ~Ind Signed-off-by: shennetsind --- conf/inter-server.conf | 12 ++++++++ src/common/core.c | 2 ++ src/common/sql.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++- src/common/sql.h | 1 + 4 files changed, 88 insertions(+), 1 deletion(-) (limited to 'conf') diff --git a/conf/inter-server.conf b/conf/inter-server.conf index 70bf80e5c..523437007 100644 --- a/conf/inter-server.conf +++ b/conf/inter-server.conf @@ -56,6 +56,18 @@ log_db_db: ragnarok log_codepage: log_login_db: loginlog +// == MySQL Reconnect Settings +// =========================== +// - mysql_reconnect_type +// - 1: when mysql disconnects during runtime, the server tries to reconnect mysql_reconnect_count times and, +// -- if unsuccessful, the server is shut down +// - 2: when mysql disconnects during runtime it tries to reconnect indefinitely +mysql_reconnect_type:2 +// - mysql_reconnect_count +// - number of reconnect attempts the server should do when the database disconnects during runtime +// - only used when mysql_reconnect_type is 1 +mysql_reconnect_count:1 + // DO NOT CHANGE ANYTHING BEYOND THIS LINE UNLESS YOU KNOW YOUR DATABASE DAMN WELL // this is meant for people who KNOW their stuff, and for some reason want to change their // database layout. [CLOWNISIUS] diff --git a/src/common/core.c b/src/common/core.c index 1e3dbb3d7..bb536a255 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -11,6 +11,7 @@ #include "../common/timer.h" #include "../common/thread.h" #include "../common/mempool.h" +#include "../common/sql.h" #endif #include @@ -319,6 +320,7 @@ int main (int argc, char **argv) display_title(); usercheck(); + Sql_Init(); rathread_init(); mempool_init(); db_init(); diff --git a/src/common/sql.c b/src/common/sql.c index 800aa89b0..96346d68c 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -15,7 +15,10 @@ #include // strlen/strnlen/memcpy/memset #include // strtoul +void hercules_mysql_error_handler(unsigned int ecode); +int mysql_reconnect_type; +int mysql_reconnect_count; /// Sql handle struct Sql @@ -74,7 +77,7 @@ Sql* Sql_Malloc(void) self->lengths = NULL; self->result = NULL; self->keepalive = INVALID_TIMER; - + self->handle.reconnect = 1; return self; } @@ -266,12 +269,14 @@ int Sql_QueryV(Sql* self, const char* query, va_list args) if( mysql_real_query(&self->handle, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } self->result = mysql_store_result(&self->handle); if( mysql_errno(&self->handle) != 0 ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } return SQL_SUCCESS; @@ -291,12 +296,14 @@ int Sql_QueryStr(Sql* self, const char* query) if( mysql_real_query(&self->handle, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } self->result = mysql_store_result(&self->handle); if( mysql_errno(&self->handle) != 0 ) { ShowSQL("DB error - %s\n", mysql_error(&self->handle)); + hercules_mysql_error_handler(mysql_errno(&self->handle)); return SQL_ERROR; } return SQL_SUCCESS; @@ -639,6 +646,7 @@ int SqlStmt_PrepareV(SqlStmt* self, const char* query, va_list args) if( mysql_stmt_prepare(self->stmt, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } self->bind_params = false; @@ -660,6 +668,7 @@ int SqlStmt_PrepareStr(SqlStmt* self, const char* query) if( mysql_stmt_prepare(self->stmt, StringBuf_Value(&self->buf), (unsigned long)StringBuf_Length(&self->buf)) ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } self->bind_params = false; @@ -721,12 +730,14 @@ int SqlStmt_Execute(SqlStmt* self) mysql_stmt_execute(self->stmt) ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } self->bind_columns = false; if( mysql_stmt_store_result(self->stmt) )// store all the data { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } @@ -868,6 +879,7 @@ int SqlStmt_NextRow(SqlStmt* self) if( err ) { ShowSQL("DB error - %s\n", mysql_stmt_error(self->stmt)); + hercules_mysql_error_handler(mysql_stmt_errno(self->stmt)); return SQL_ERROR; } @@ -946,3 +958,63 @@ void SqlStmt_Free(SqlStmt* self) aFree(self); } } +/* receives mysql error codes during runtime (not on first-time-connects) */ +void hercules_mysql_error_handler(unsigned int ecode) { + static unsigned int retry = 1; + switch( ecode ) { + case 2003:/* Can't connect to MySQL (this error only happens here when failing to reconnect) */ + if( mysql_reconnect_type == 1 ) { + if( ++retry > mysql_reconnect_count ) { + ShowFatalError("MySQL has been unreachable for too long, %d reconnects were attempted. Shutting Down\n", retry); + exit(EXIT_FAILURE); + } + } + break; + } +} +void Sql_inter_server_read(const char* cfgName, bool first) { + int i; + char line[1024], w1[1024], w2[1024]; + FILE* fp; + + fp = fopen(cfgName, "r"); + if(fp == NULL) { + if( first ) { + ShowFatalError("File not found: %s\n", cfgName); + exit(EXIT_FAILURE); + } else + ShowError("File not found: %s\n", cfgName); + return; + } + + while(fgets(line, sizeof(line), fp)) { + i = sscanf(line, "%[^:]: %[^\r\n]", w1, w2); + if(i != 2) + continue; + + if(!strcmpi(w1,"mysql_reconnect_type")) { + mysql_reconnect_type = atoi(w2); + switch( mysql_reconnect_type ) { + case 1: + case 2: + break; + default: + ShowError("%s::mysql_reconnect_type is set to %d which is not valid, defaulting to 1...\n", cfgName, mysql_reconnect_type); + mysql_reconnect_type = 1; + break; + } + } else if(!strcmpi(w1,"mysql_reconnect_count")) { + mysql_reconnect_count = atoi(w2); + if( mysql_reconnect_count < 1 ) + mysql_reconnect_count = 1; + } else if(!strcmpi(w1,"import")) + Sql_inter_server_read(w2,false); + } + fclose(fp); + + return; +} + +void Sql_Init(void) { + Sql_inter_server_read("conf/inter-server.conf",true); +} diff --git a/src/common/sql.h b/src/common/sql.h index 898e2c778..a9d8c6136 100644 --- a/src/common/sql.h +++ b/src/common/sql.h @@ -339,6 +339,7 @@ void SqlStmt_ShowDebug_(SqlStmt* self, const char* debug_file, const unsigned lo /// Frees a SqlStmt returned by SqlStmt_Malloc. void SqlStmt_Free(SqlStmt* self); +void Sql_Init(void); #endif /* _COMMON_SQL_H_ */ -- cgit v1.2.3-60-g2f50