summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--conf/char/char-server.conf5
-rw-r--r--conf/clans.conf2
-rw-r--r--conf/common/inter-server.conf2
-rw-r--r--conf/common/socket.conf2
-rw-r--r--conf/global/console.conf44
-rw-r--r--conf/global/sql_connection.conf2
-rw-r--r--conf/import-tmpl/battle.conf2
-rw-r--r--conf/import-tmpl/char-server.conf2
-rw-r--r--conf/import-tmpl/inter-server.conf2
-rw-r--r--conf/import-tmpl/login-server.conf2
-rw-r--r--conf/import-tmpl/logs.conf2
-rw-r--r--conf/import-tmpl/map-server.conf2
-rw-r--r--conf/import-tmpl/script.conf2
-rw-r--r--conf/import-tmpl/socket.conf2
-rw-r--r--conf/login/login-server.conf6
-rw-r--r--conf/map/battle.conf2
-rw-r--r--conf/map/battle/battle.conf2
-rw-r--r--conf/map/battle/battleground.conf2
-rw-r--r--conf/map/battle/client.conf2
-rw-r--r--conf/map/battle/drops.conf2
-rw-r--r--conf/map/battle/exp.conf2
-rw-r--r--conf/map/battle/feature.conf2
-rw-r--r--conf/map/battle/gm.conf2
-rw-r--r--conf/map/battle/guild.conf2
-rw-r--r--conf/map/battle/homunc.conf2
-rw-r--r--conf/map/battle/items.conf2
-rw-r--r--conf/map/battle/misc.conf2
-rw-r--r--conf/map/battle/monster.conf4
-rw-r--r--conf/map/battle/party.conf2
-rw-r--r--conf/map/battle/pet.conf2
-rw-r--r--conf/map/battle/player.conf2
-rw-r--r--conf/map/battle/skill.conf14
-rw-r--r--conf/map/battle/status.conf2
-rw-r--r--conf/map/logs.conf2
-rw-r--r--conf/map/map-server.conf2
-rw-r--r--conf/map/maps.conf2
-rw-r--r--conf/map/script.conf2
-rw-r--r--conf/messages.conf5
-rw-r--r--db/re/item_combo_db.txt1
-rw-r--r--doc/atcommands.txt20
-rw-r--r--doc/constants.md9
-rw-r--r--doc/script_commands.txt27
-rw-r--r--npc/custom/etc/quest_warper.txt6
-rw-r--r--npc/custom/events/mushroom_event.txt9
-rw-r--r--npc/custom/quests/quest_shop.txt4
-rw-r--r--npc/custom/quests/thq/THQS_TTShop.txt4
-rw-r--r--npc/dev/test.txt10
-rw-r--r--npc/woe-fe/agit_main.txt3
-rw-r--r--src/common/sysinfo.c8
-rw-r--r--src/map/atcommand.c35
-rw-r--r--src/map/atcommand.h2
-rw-r--r--src/map/chat.c8
-rw-r--r--src/map/script.c62
54 files changed, 254 insertions, 98 deletions
diff --git a/README.md b/README.md
index 2cc75b250..b17eedbda 100644
--- a/README.md
+++ b/README.md
@@ -149,7 +149,7 @@ Examples:
[Error]: npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file 'npc/custom/jobmaster.txt', line '17'. Skipping line...
* w1=prontera,153,193,6 script
* w2=Job Master
- * w3=123,{
+ * w3=2_F_MAGICMASTER,{
* w4=
```
diff --git a/conf/char/char-server.conf b/conf/char/char-server.conf
index 0f07731fb..e3d0fd8c0 100644
--- a/conf/char/char-server.conf
+++ b/conf/char/char-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -214,8 +214,7 @@ char_configuration: {
pincode: {
// A window is opened before you can select your character and you will have to enter a pincode by using only your mouse
// NOTE: Requires client 2011-03-09aragexeRE or newer.
- // 0: disabled
- // 1: enabled
+ // Default: true
enabled: true
// Request Pincode only on login or on everytime char select is accessed?
diff --git a/conf/clans.conf b/conf/clans.conf
index 85ef280fe..82211fce0 100644
--- a/conf/clans.conf
+++ b/conf/clans.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2017 Hercules Dev Team
+//= Copyright (C) 2017-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/common/inter-server.conf b/conf/common/inter-server.conf
index cbeb6617d..d45657dca 100644
--- a/conf/common/inter-server.conf
+++ b/conf/common/inter-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/common/socket.conf b/conf/common/socket.conf
index 8b8b21865..eb7d494b4 100644
--- a/conf/common/socket.conf
+++ b/conf/common/socket.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/global/console.conf b/conf/global/console.conf
index 84a16a7c8..266b301b2 100644
--- a/conf/global/console.conf
+++ b/conf/global/console.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -32,36 +32,36 @@
//=========================================================================
console: {
- //Time-stamp format which will be printed before all messages.
- //Can at most be 20 characters long.
- //Common formats:
- // %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
- // %H:%M:%S (hour:minute:second, 24 hour format)
- // %d/%b/%Y (day/Month/year)
- //For full format information, consult the strftime() manual.
+ // Time-stamp format which will be printed before all messages.
+ // Can at most be 20 characters long.
+ // Common formats:
+ // %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
+ // %H:%M:%S (hour:minute:second, 24 hour format)
+ // %d/%b/%Y (day/Month/year)
+ // For full format information, consult the strftime() manual.
//timestamp_format: "[%d/%b %H:%M]"
- //If redirected output contains escape sequences (color codes)
+ // If redirected output contains escape sequences (color codes)
stdout_with_ansisequence: false
- //Makes server output more silent by omitting certain types of messages:
- //1: Hide Information messages
- //2: Hide Status messages
- //4: Hide Notice Messages
- //8: Hide Warning Messages
- //16: Hide Error and SQL Error messages.
- //32: Hide Debug Messages
- //Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
+ // Makes server output more silent by omitting certain types of messages:
+ // 1: Hide Information messages
+ // 2: Hide Status messages
+ // 4: Hide Notice Messages
+ // 8: Hide Warning Messages
+ // 16: Hide Error and SQL Error messages.
+ // 32: Hide Debug Messages
+ // Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
console_silent: 0
// [CHAR] Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
save_log: true
// [MAP] Makes server log selected message types to a file in the /log/ folder
- //1: Log Warning Messages
- //2: Log Error and SQL Error messages.
- //4: Log Debug Messages
- //Example: "console_msg_log: 7" logs all 3 kinds
- //Messages logged by this overrides console_silent setting
+ // 1: Log Warning Messages
+ // 2: Log Error and SQL Error messages.
+ // 4: Log Debug Messages
+ // Example: "console_msg_log: 7" logs all 3 kinds
+ // Messages logged by this overrides console_silent setting
console_msg_log: 0
}
diff --git a/conf/global/sql_connection.conf b/conf/global/sql_connection.conf
index 3a465afea..7b1a2b97b 100644
--- a/conf/global/sql_connection.conf
+++ b/conf/global/sql_connection.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/battle.conf b/conf/import-tmpl/battle.conf
index 7d1d03578..ff05022c2 100644
--- a/conf/import-tmpl/battle.conf
+++ b/conf/import-tmpl/battle.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/char-server.conf b/conf/import-tmpl/char-server.conf
index 4c9462bc7..3162a31ad 100644
--- a/conf/import-tmpl/char-server.conf
+++ b/conf/import-tmpl/char-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/inter-server.conf b/conf/import-tmpl/inter-server.conf
index c23143b35..9cd3932f5 100644
--- a/conf/import-tmpl/inter-server.conf
+++ b/conf/import-tmpl/inter-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/login-server.conf b/conf/import-tmpl/login-server.conf
index 1c45f94f9..c8f1f8546 100644
--- a/conf/import-tmpl/login-server.conf
+++ b/conf/import-tmpl/login-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/logs.conf b/conf/import-tmpl/logs.conf
index 8f8c2ea68..47e5a665a 100644
--- a/conf/import-tmpl/logs.conf
+++ b/conf/import-tmpl/logs.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/map-server.conf b/conf/import-tmpl/map-server.conf
index 4d907025e..11e4356ba 100644
--- a/conf/import-tmpl/map-server.conf
+++ b/conf/import-tmpl/map-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/script.conf b/conf/import-tmpl/script.conf
index 040245285..042644ff1 100644
--- a/conf/import-tmpl/script.conf
+++ b/conf/import-tmpl/script.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/import-tmpl/socket.conf b/conf/import-tmpl/socket.conf
index 7ce178140..57806f21e 100644
--- a/conf/import-tmpl/socket.conf
+++ b/conf/import-tmpl/socket.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/login/login-server.conf b/conf/login/login-server.conf
index a3d0b6955..22e927c5e 100644
--- a/conf/login/login-server.conf
+++ b/conf/login/login-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -75,8 +75,8 @@ login_configuration: {
// Can you use _M/_F to make new accounts on the server?
new_account: true
- //If new_account is enabled, minimum length to userid and passwords should be 4?
- //Must be 'true' unless your client uses both 'Disable 4 LetterUserID/Password' Diffs
+ // If new_account is enabled, minimum length to userid and passwords should be 4?
+ // Must be 'true' unless your client uses both 'Disable 4 LetterUserID/Password' Diffs
new_acc_length_limit: true
// Account registration flood protection system
diff --git a/conf/map/battle.conf b/conf/map/battle.conf
index 75cf0fb49..4bb60dab4 100644
--- a/conf/map/battle.conf
+++ b/conf/map/battle.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/battle.conf b/conf/map/battle/battle.conf
index 4b1632e31..eafb5ec9b 100644
--- a/conf/map/battle/battle.conf
+++ b/conf/map/battle/battle.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/battleground.conf b/conf/map/battle/battleground.conf
index b2a482f3d..08c7fcd8a 100644
--- a/conf/map/battle/battleground.conf
+++ b/conf/map/battle/battleground.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/client.conf b/conf/map/battle/client.conf
index 24b1c8157..12661180a 100644
--- a/conf/map/battle/client.conf
+++ b/conf/map/battle/client.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/drops.conf b/conf/map/battle/drops.conf
index 51280702b..cf09d14d9 100644
--- a/conf/map/battle/drops.conf
+++ b/conf/map/battle/drops.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/exp.conf b/conf/map/battle/exp.conf
index 8ca3de933..54b2ec4e0 100644
--- a/conf/map/battle/exp.conf
+++ b/conf/map/battle/exp.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/feature.conf b/conf/map/battle/feature.conf
index c306dd97b..5e40f2898 100644
--- a/conf/map/battle/feature.conf
+++ b/conf/map/battle/feature.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/gm.conf b/conf/map/battle/gm.conf
index 872aaea6d..32e407866 100644
--- a/conf/map/battle/gm.conf
+++ b/conf/map/battle/gm.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/guild.conf b/conf/map/battle/guild.conf
index e92760796..101349a85 100644
--- a/conf/map/battle/guild.conf
+++ b/conf/map/battle/guild.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/homunc.conf b/conf/map/battle/homunc.conf
index 0042df016..7ccaf8f8a 100644
--- a/conf/map/battle/homunc.conf
+++ b/conf/map/battle/homunc.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/items.conf b/conf/map/battle/items.conf
index e834b80f6..0dd990e0a 100644
--- a/conf/map/battle/items.conf
+++ b/conf/map/battle/items.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/misc.conf b/conf/map/battle/misc.conf
index 5a8f916aa..f2bd00429 100644
--- a/conf/map/battle/misc.conf
+++ b/conf/map/battle/misc.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/monster.conf b/conf/map/battle/monster.conf
index 192e54615..8f969dc48 100644
--- a/conf/map/battle/monster.conf
+++ b/conf/map/battle/monster.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -137,7 +137,7 @@ mob_skill_delay: 100
mob_count_rate: 100
// Respawn rate of monsters on a map. 50 would make mobs respawn twice as fast (half delay time) (Note 2)
-//Note: This does not affects mobs with immediate respawn (most normal mobs)
+// Note: This does not affects mobs with immediate respawn (most normal mobs)
mob_spawn_delay: 100
plant_spawn_delay: 100
boss_spawn_delay: 100
diff --git a/conf/map/battle/party.conf b/conf/map/battle/party.conf
index 621ec50f4..79230eac4 100644
--- a/conf/map/battle/party.conf
+++ b/conf/map/battle/party.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/pet.conf b/conf/map/battle/pet.conf
index 02324ac52..f3c6fc12f 100644
--- a/conf/map/battle/pet.conf
+++ b/conf/map/battle/pet.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/player.conf b/conf/map/battle/player.conf
index c7bb13e88..0762b1f54 100644
--- a/conf/map/battle/player.conf
+++ b/conf/map/battle/player.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf
index da8d1906d..3c4b90505 100644
--- a/conf/map/battle/skill.conf
+++ b/conf/map/battle/skill.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
@@ -53,8 +53,8 @@ min_skill_delay_limit: 100
// appear to "teleport" afterwards.
default_walk_delay: 300
-//Completely disable skill delay of the following types (Note 3)
-//NOTE: By default mobs don't have the skill delay as specified in the skill
+// Completely disable skill delay of the following types (Note 3)
+// NOTE: By default mobs don't have the skill delay as specified in the skill
// database, but follow their own 'reuse' skill delay which is specified on
// the mob skill db. When set, the delay for all skills become
// min_skill_delay_limit.
@@ -107,9 +107,9 @@ clear_skills_on_death: 0
// Should ground placed skills be removed when the caster changes maps? (Note 3)
clear_skills_on_warp: 15
-//Setting this to true will override the target mode of ground-based skills with the flag 0x01 to "No Enemies"
-//The two skills affected by default are Pneuma and Safety Wall (if set to true, those two skills will not protect everyone, but only allies)
-//See db/skill_unit_db.txt for more info.
+// Setting this to true will override the target mode of ground-based skills with the flag 0x01 to "No Enemies"
+// The two skills affected by default are Pneuma and Safety Wall (if set to true, those two skills will not protect everyone, but only allies)
+// See db/skill_unit_db.txt for more info.
defunit_not_enemy: false
// Do skills do at least 'hits' damage when they don't miss/are blocked?
@@ -175,7 +175,7 @@ monster_cloak_check_type: 4
// Can't place unlimited land skills at the same time (Note 3)
land_skill_limit: 9
-//Determines which kind of skill-failed messages should be sent:
+// Determines which kind of skill-failed messages should be sent:
// 0 - Enable by default
// 1 - Disable all skill-failed messages.
// 2 - Disable skill-failed messages due to can-act delays.
diff --git a/conf/map/battle/status.conf b/conf/map/battle/status.conf
index 94459e113..8ba761992 100644
--- a/conf/map/battle/status.conf
+++ b/conf/map/battle/status.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/logs.conf b/conf/map/logs.conf
index f56db9eee..db584049a 100644
--- a/conf/map/logs.conf
+++ b/conf/map/logs.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/map-server.conf b/conf/map/map-server.conf
index 943b7b5a6..e1de55edb 100644
--- a/conf/map/map-server.conf
+++ b/conf/map/map-server.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 1634ef3a8..644ced6bb 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/map/script.conf b/conf/map/script.conf
index f18e9d6e2..fc617d858 100644
--- a/conf/map/script.conf
+++ b/conf/map/script.conf
@@ -9,7 +9,7 @@
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
-//= Copyright (C) 2014-2018 Hercules Dev Team
+//= Copyright (C) 2014-2019 Hercules Dev Team
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
diff --git a/conf/messages.conf b/conf/messages.conf
index 2f790b13f..772b882c9 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -1569,5 +1569,10 @@
1498: You can't add a party bound item to a character without party!
1499: You can't add a guild bound item to a character without guild!
+// @dropall
+1500: Usage: @dropall {<type>}
+1501: Type List: (default) all = -1, healing = 0, usable = 2, etc = 3, weapon = 4, armor = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10, delayed-consumable = 11, cash = 18
+1502: %d items are dropped!
+
//Custom translations
import: conf/import/msg_conf.txt
diff --git a/db/re/item_combo_db.txt b/db/re/item_combo_db.txt
index 739be9a65..3cbaef807 100644
--- a/db/re/item_combo_db.txt
+++ b/db/re/item_combo_db.txt
@@ -436,3 +436,4 @@
24238:24239,{ bonus bAtk,5; if(getequiprefinerycnt(EQI_SHADOW_ACC_R) + getequiprefinerycnt(EQI_SHADOW_ACC_L) >=15) { bonus2 bAddSize,Size_Small,1; } }
24240:24241:24242,{ bonus bUseSPrate,-1; .@refine = getequiprefinerycnt(EQI_SHADOW_SHIELD)+getequiprefinerycnt(EQI_SHADOW_ARMOR)+getequiprefinerycnt(EQI_SHADOW_SHOES); bonus bVariableCastrate,(.@refine)/5; if(.@refine)>=25 { bonus bUseSPrate,-1; } }
24243:24244:24245,{ bonus bDelayrate,-1; if (getequiprefinerycnt(EQI_SHADOW_SHIELD)+getequiprefinerycnt(EQI_SHADOW_ARMOR)+getequiprefinerycnt(EQI_SHADOW_SHOES) >= 25) bonus bDelayrate,-5; }
+2161:1646,{ .@r = (getequiprefinerycnt(EQI_HAND_L)*4); bonus2 bVariableCastrate,"WZ_STORMGUST",-.@r; bonus2 bVariableCastrate,"WL_FROSTMISTY",-.@r; bonus2 bVariableCastrate,"WL_JACKFROST",-.@r; }
diff --git a/doc/atcommands.txt b/doc/atcommands.txt
index b455d9151..dd8ad0969 100644
--- a/doc/atcommands.txt
+++ b/doc/atcommands.txt
@@ -692,9 +692,23 @@ Repairs all broken items in your inventory.
---------------------------------------
-@dropall
-
-Drops all inventory and equipped items onto the floor.
+@dropall {<item type>}
+
+Drops all items based on the item type.
+
+Valid item types:
+ -1 = All Items (default)
+ 0 = Healing Items
+ 2 = Useable Items
+ 3 = Etc Items
+ 4 = Weapons
+ 5 = Armors
+ 6 = Cards
+ 7 = Pet Eggs
+ 8 = Pet Armors
+ 10 = Ammunition Items
+ 11 = Delayed-Consumable Items
+ 18 = Cash Items
---------------------------------------
diff --git a/doc/constants.md b/doc/constants.md
index aedb1755e..1fce24643 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -4262,6 +4262,15 @@
- `MAPINFO_SIZE_Y`: 3
- `MAPINFO_ZONE`: 4
+### consolemes options
+
+- `CONSOLEMES_DEBUG`: 0
+- `CONSOLEMES_ERROR`: 1
+- `CONSOLEMES_WARNING`: 2
+- `CONSOLEMES_INFO`: 3
+- `CONSOLEMES_STATUS`: 4
+- `CONSOLEMES_NOTICE`: 5
+
### set/getiteminfo options
- `ITEMINFO_BUYPRICE`: 0
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index b53dda2f6..f767f890d 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7775,6 +7775,10 @@ solution rather than sending the map and the monster_id.
*debugmes("<format string>"{, <param>{, ...}})
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
This command will print a message in the server console (map-server window),
after applying the same format-string replacements as sprintf(). It will not be
displayed anywhere else. Returns true on success.
@@ -7788,6 +7792,29 @@ Example:
---------------------------------------
+*consolemes("<type>", "<format string>"{,<param>{, ...}})
+
+This command will print a message in the server console (map-server window),
+after applying the same format-string replacements as sprintf(). It will not be
+displayed anywhere else. Returns true on success.
+
+List of available <type> are:
+ CONSOLEMES_DEBUG = 0
+ CONSOLEMES_ERROR = 1
+ CONSOLEMES_WARNING = 2
+ CONSOLEMES_INFO = 3
+ CONSOLEMES_STATUS = 4
+ CONSOLEMES_NOTICE = 5
+
+Example:
+
+ // Displays "NAME has clicked me!" in the map-server window.
+ consolemes(CONSOLEMES_DEBUG, "%s has clicked me!", strcharinfo(PC_NAME));
+
+ consolemes(CONSOLEMES_DEBUG, "\033[0;32mHello World"); // supports ANSI escape sequences
+
+---------------------------------------
+
*logmes("<message>"{, <log type>})
This command will write the message given to the map server log files, as
diff --git a/npc/custom/etc/quest_warper.txt b/npc/custom/etc/quest_warper.txt
index 35b863e9d..2ae2e7f7f 100644
--- a/npc/custom/etc/quest_warper.txt
+++ b/npc/custom/etc/quest_warper.txt
@@ -82,7 +82,7 @@ function script Q_Warpra {
case 2:
warp $QW_SP_WarpMap$, $QW_SP_WarpX, $QW_SP_WarpY;
close2;
- debugmes "Please check your special warp menu settings on the Warpra.";
+ consolemes(CONSOLEMES_WARNING, "Please check your special warp menu settings on the Warpra.");
end;
case 3: goto L_town;
case 4: goto L_dungeon;
@@ -1533,7 +1533,7 @@ function script QWS_Dungeon_Warpra {
mes "[Warpra]";
mes "Sorry, I can only unlock this location.";
} else
- debugmes "QWS_Dungeon_Warpra error, improper syntax?";
+ consolemes(CONSOLEMES_ERROR, "QWS_Dungeon_Warpra error, improper syntax?");
return;
function QWS_D_setbin {
@@ -1577,7 +1577,7 @@ function script QWS_Town_Warpra {
} else if (QWS_T_getbin(getarg(0)) == 1) {
callfunc "Q_Warpra",0;
} else
- debugmes "QWS_Town_Warpra error, improper syntax ?";
+ consolemes(CONSOLEMES_ERROR, "QWS_Town_Warpra error, improper syntax ?");
return;
function QWS_T_setbin {
diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt
index b9c54c09e..b04b99fff 100644
--- a/npc/custom/events/mushroom_event.txt
+++ b/npc/custom/events/mushroom_event.txt
@@ -50,9 +50,12 @@ OnMinute10: // Start time (every hour)
OnMobKilled:
set .Spawn, .Spawn - 1;
- getitem .Prize, .Amount;
- if (.Spawn) announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
- else {
+ if (playerattached() != 0) {
+ getitem .Prize, .Amount;
+ if (.Spawn)
+ announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map;
+ }
+ if (!.Spawn) {
announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0;
set .status,0;
}
diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt
index 739b53c02..c2481e991 100644
--- a/npc/custom/quests/quest_shop.txt
+++ b/npc/custom/quests/quest_shop.txt
@@ -170,13 +170,13 @@ OnEnd:
function Add {
if (getitemname(getarg(1)) == "null") {
- debugmes "Quest reward #"+getarg(1)+" invalid (skipped).";
+ consolemes(CONSOLEMES_WARNING, "Quest reward #"+getarg(1)+" invalid (skipped).");
return;
}
setarray .@j[0],getarg(2),getarg(3),getarg(4);
for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) {
if (getitemname(getarg(.@i)) == "null") {
- debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped).";
+ consolemes(CONSOLEMES_WARNING, "Quest requirement #"+getarg(.@i)+" invalid (skipped).");
return;
} else
setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1);
diff --git a/npc/custom/quests/thq/THQS_TTShop.txt b/npc/custom/quests/thq/THQS_TTShop.txt
index 96e7346d3..4c12f9938 100644
--- a/npc/custom/quests/thq/THQS_TTShop.txt
+++ b/npc/custom/quests/thq/THQS_TTShop.txt
@@ -93,7 +93,7 @@ function script thqs_trade_token {
// getarg(1) - .@mp$ -> PRICE
function script thqs_menu_buy {
if( getargcount() != 2 ) {
- debugmes "thqs_menu_buy: Wrong number of arguments!!";
+ consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Wrong number of arguments!!");
close;
}
@@ -101,7 +101,7 @@ function script thqs_menu_buy {
.@mp$ = getarg(1);
if( getarraysize( getd(.@mw$) ) != getarraysize( getd(.@mp$) ) ) {
- debugmes "thqs_menu_buy: Missing entries in data!";
+ consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Missing entries in data!");
close;
}
diff --git a/npc/dev/test.txt b/npc/dev/test.txt
index 2822ee65c..a867a09b2 100644
--- a/npc/dev/test.txt
+++ b/npc/dev/test.txt
@@ -786,10 +786,10 @@ function script HerculesSelfTestHelper {
callsub(OnCheck, "data_to_string (integer variable)", data_to_string(.@x), ".@x");
if (.errors) {
- debugmes "Script engine self-test [ \033[0;31mFAILED\033[0m ]";
- debugmes "**** The test was completed with " + .errors + " errors. ****";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;31mFAILED\033[0m ]");
+ consolemes(CONSOLEMES_DEBUG, "**** The test was completed with " + .errors + " errors. ****");
} else {
- debugmes "Script engine self-test [ \033[0;32mPASSED\033[0m ]";
+ consolemes(CONSOLEMES_DEBUG, "Script engine self-test [ \033[0;32mPASSED\033[0m ]");
}
return .errors;
end;
@@ -840,8 +840,8 @@ OnReportError:
.@val$ = getarg(1,"");
.@ref$ = getarg(2,"");
if (.errors == 1)
- debugmes "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****";
- debugmes "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)";
+ consolemes(CONSOLEMES_DEBUG, "**** WARNING: Any self-test results past this point are unreliable because of previous errors. ****");
+ consolemes(CONSOLEMES_DEBUG, "Error: "+.@msg$+": '"+.@val$+"' (found) != '"+.@ref$+"' (expected)");
++.errors;
//end;
return;
diff --git a/npc/woe-fe/agit_main.txt b/npc/woe-fe/agit_main.txt
index 5ac5b8e9a..a0db6402b 100644
--- a/npc/woe-fe/agit_main.txt
+++ b/npc/woe-fe/agit_main.txt
@@ -105,7 +105,8 @@ OnAgitBreak:
// Show and log error if an unguilded player breaks the Emperium. (Should NEVER happen)
if (.@GID <= 0) {
.@notice$ = "Character "+strcharinfo(PC_NAME)+" ("+getcharid(CHAR_ID_CHAR)+") broke the Emperium in Castle: "+strnpcinfo(NPC_NAME_HIDDEN)+" while guildless. No data will be saved and Emperium respawned.";
- logmes .@notice$; debugmes .@notice$;
+ logmes .@notice$;
+ consolemes(CONSOLEMES_NOTICE, .@notice$);
donpcevent "Agit#"+strnpcinfo(NPC_NAME_HIDDEN)+"::OnStartArena";
end;
}
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index b8cb2a90a..e3977f440 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2013-2015 Hercules Dev Team
+ * Copyright (C) 2013-2019 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -221,8 +221,12 @@ enum windows_ver_suite {
#define SYSINFO_COMPILER "Microsoft Visual C++ 2012 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#elif _MSC_VER >= 1800 && _MSC_VER < 1900
#define SYSINFO_COMPILER "Microsoft Visual C++ 2013 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
-#elif _MSC_VER >= 1900 && _MSC_VER < 2000
+#elif _MSC_VER >= 1900 && _MSC_VER < 1910
#define SYSINFO_COMPILER "Microsoft Visual C++ 2015 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1910 && _MSC_VER < 1920
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2017 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
+#elif _MSC_VER >= 1920 && _MSC_VER < 2000
+#define SYSINFO_COMPILER "Microsoft Visual C++ 2019 (v" EXPAND_AND_QUOTE(_MSC_VER) ")"
#else // < 1300 || >= 2000
#define SYSINFO_COMPILER "Microsoft Visual C++ v" EXPAND_AND_QUOTE(_MSC_VER)
#endif
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index a9bbff7bd..9ed56545c 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -5277,18 +5277,43 @@ ACMD(follow)
}
/*==========================================
- * @dropall by [MouseJstr]
- * Drop all your possession on the ground
+ * @dropall by [MouseJstr] and [Xantara]
+ * Drop all your possession on the ground based on item type
*------------------------------------------*/
ACMD(dropall)
{
+ int type = -1;
+ int count = 0;
+
+ if (message[0] != '\0') {
+ type = atoi(message);
+ if (!((type >= IT_HEALING && type <= IT_DELAYCONSUME) || type == IT_CASH || type == -1)) {
+ clif->message(fd, msg_fd(fd, 1500));
+ clif->message(fd, msg_fd(fd, 1501));
+ return false;
+ }
+ }
+
for (int i = 0; i < sd->status.inventorySize; i++) {
if (sd->status.inventory[i].amount) {
- if(sd->status.inventory[i].equip != 0)
- pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE);
- pc->dropitem(sd, i, sd->status.inventory[i].amount);
+ struct item_data *item_data = itemdb->exists(sd->status.inventory[i].nameid);
+ if (item_data == NULL) {
+ ShowWarning("Non-existant item %d on dropall list (account_id: %d, char_id: %d)\n", sd->status.inventory[i].nameid, sd->status.account_id, sd->status.char_id);
+ continue;
+ }
+ if (!pc->candrop(sd, &sd->status.inventory[i]))
+ continue;
+ if (type == -1 || type == item_data->type) {
+ if (sd->status.inventory[i].equip != 0)
+ pc->unequipitem(sd, i, PCUNEQUIPITEM_RECALC | PCUNEQUIPITEM_FORCE);
+ count += sd->status.inventory[i].amount;
+ pc->dropitem(sd, i, sd->status.inventory[i].amount);
+ }
}
}
+
+ sprintf(atcmd_output, msg_fd(fd, 1502), count); // %d items are dropped!
+ clif->message(fd, atcmd_output);
return true;
}
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 1783e5dc6..4fbf6b93a 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -41,7 +41,7 @@ struct config_setting_t;
* Defines
**/
#define ATCOMMAND_LENGTH 50
-#define MAX_MSG 1500
+#define MAX_MSG 1503
#define msg_txt(idx) atcommand->msg(idx)
#define msg_sd(sd,msg_number) atcommand->msgsd((sd),(msg_number))
#define msg_fd(fd,msg_number) atcommand->msgfd((fd),(msg_number))
diff --git a/src/map/chat.c b/src/map/chat.c
index d9b642219..77a12a560 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -255,6 +255,14 @@ static int chat_leavechat(struct map_session_data *sd, bool kicked)
}
if( leavechar == 0 && cd->owner->type == BL_PC ) {
+
+ // check if new location are CELL_CHKNOCHAT
+ if (map->getcell(cd->usersd[0]->bl.m, NULL, cd->usersd[0]->bl.x, cd->usersd[0]->bl.y, CELL_CHKNOCHAT)) {
+ for (i = (cd->users - 1); i >= 0; i--)
+ chat->leave(cd->usersd[i], false);
+ return 2;
+ }
+
// Set and announce new owner
cd->owner = &cd->usersd[0]->bl;
clif->changechatowner(cd, cd->usersd[0]);
diff --git a/src/map/script.c b/src/map/script.c
index fe8638ac3..a11bc0c75 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -24559,6 +24559,57 @@ static BUILDIN(getcalendartime)
return true;
}
+enum consolemes_type {
+ CONSOLEMES_DEBUG = 0,
+ CONSOLEMES_ERROR = 1,
+ CONSOLEMES_WARNING = 2,
+ CONSOLEMES_INFO = 3,
+ CONSOLEMES_STATUS = 4,
+ CONSOLEMES_NOTICE = 5,
+};
+
+/*==========================================
+* consolemes(<type>, "text")
+*------------------------------------------*/
+static BUILDIN(consolemes)
+{
+ struct StringBuf buf;
+ StrBuf->Init(&buf);
+ int type = script_hasdata(st, 2) ? script_getnum(st, 2) : 0;
+
+ if (!script->sprintf_helper(st, 3, &buf)) {
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 0);
+ return false;
+ }
+
+ switch (type) {
+ default:
+ case CONSOLEMES_DEBUG:
+ ShowDebug("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_ERROR:
+ ShowError("consolemes: (st->rid: %d) (st->oid: %d) %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_WARNING:
+ ShowWarning("consolemes: (st->rid: %d) (st->oid: %d) %s\n", st->rid, st->oid, StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_INFO:
+ ShowInfo("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_STATUS:
+ ShowStatus("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ case CONSOLEMES_NOTICE:
+ ShowNotice("consolemes: %s\n", StrBuf->Value(&buf));
+ break;
+ }
+
+ StrBuf->Destroy(&buf);
+ script_pushint(st, 1);
+ return true;
+}
+
/** place holder for the translation macro **/
static BUILDIN(_)
{
@@ -25478,7 +25529,8 @@ static void script_parse_builtin(void)
BUILDIN_DEF(sc_end,"i?"),
BUILDIN_DEF(getstatus, "i?"),
BUILDIN_DEF(getscrate,"ii?"),
- BUILDIN_DEF(debugmes,"v*"),
+ BUILDIN_DEF_DEPRECATED(debugmes,"v*"),
+ BUILDIN_DEF(consolemes,"iv*"),
BUILDIN_DEF2(catchpet,"pet","i"),
BUILDIN_DEF2(birthpet,"bpet",""),
BUILDIN_DEF(resetlvl,"i"),
@@ -26205,6 +26257,14 @@ static void script_hardcoded_constants(void)
script->set_constant("MAPINFO_SIZE_Y", MAPINFO_SIZE_Y, false, false);
script->set_constant("MAPINFO_ZONE", MAPINFO_ZONE, false, false);
+ script->constdb_comment("consolemes options");
+ script->set_constant("CONSOLEMES_DEBUG", CONSOLEMES_DEBUG, false, false);
+ script->set_constant("CONSOLEMES_ERROR", CONSOLEMES_ERROR, false, false);
+ script->set_constant("CONSOLEMES_WARNING", CONSOLEMES_WARNING, false, false);
+ script->set_constant("CONSOLEMES_INFO", CONSOLEMES_INFO, false, false);
+ script->set_constant("CONSOLEMES_STATUS", CONSOLEMES_STATUS, false, false);
+ script->set_constant("CONSOLEMES_NOTICE", CONSOLEMES_NOTICE, false, false);
+
script->constdb_comment("set/getiteminfo options");
script->set_constant("ITEMINFO_BUYPRICE", ITEMINFO_BUYPRICE, false, false);
script->set_constant("ITEMINFO_SELLPRICE", ITEMINFO_SELLPRICE, false, false);