summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/messages.conf3
-rw-r--r--doc/script_commands.txt40
-rw-r--r--src/common/HPM.c2
-rw-r--r--src/common/HPM.h2
-rw-r--r--src/common/HPMi.h2
-rw-r--r--src/map/chrif.c1
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/pc.c1
-rw-r--r--src/map/script.c14
-rw-r--r--vcproj-12/char-server.vcxproj2
-rw-r--r--vcproj-12/char-server.vcxproj.filters6
-rw-r--r--vcproj-12/login-server.vcxproj2
-rw-r--r--vcproj-12/login-server.vcxproj.filters6
14 files changed, 52 insertions, 32 deletions
diff --git a/conf/messages.conf b/conf/messages.conf
index f3055145f..cc0ecb900 100644
--- a/conf/messages.conf
+++ b/conf/messages.conf
@@ -1496,5 +1496,8 @@
1472: - Available Costumes
1473: Costume '%s' removed.
+//src/map/pc.c::pc_isUseitem
+1474: You cannot use this item while sitting
+
//Custom translations
import: conf/import/msg_conf.txt
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index a109aeb22..bf462c812 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -282,9 +282,9 @@ to -1, the 'buy price' given in the item database will be used. Otherwise, the
price you gave will be used for this item, which is how you create differing
prices for items in different shops.
-Since trunk r12264 you can alternatively use "cashshop" in place of "shop"
-to use the Cash Shop interface, allowing you to buy items with special points
-(Currently stored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS.)
+You can alternatively use "cashshop" in place of "shop" to use the Cash Shop
+interface, allowing you to buy items with special points (Currently stored as
+account vars in global_reg #CASHPOINTS and #KAFRAPOINTS).
This type of shop will not allow you to sell items at it, you may only
purchase items here. The layout used to define sale items still count, and
"<price>" refers to how many points will be spent purchasing the them.
@@ -1139,7 +1139,7 @@ will make @x equal 100.
will compute 1+5/8+9 (which is, surprisingly, 10 - remember, all numbers are
integer in this language) and make @x equal it.
-Returns the variable reference (since trunk r12870).
+Returns the variable reference.
---------------------------------------
@@ -1423,7 +1423,7 @@ This is done to prevent exploits in badly written scripts, which would
let people, for example, put negative amounts of Zeny into a bank script and
receive free Zeny as a result.
-Since trunk r12192 the command has two optional arguments and a return value.
+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.conf.
For numeric inputs the value is capped to the range [min,max]. Returns 1 if
@@ -1599,7 +1599,7 @@ You can pass multiple arguments in a function call:
getarg(0) would be 5, getarg(1) would be 4 and getarg(2) would be 3.
-Getarg has an optional argument since trunk r10773 and stable r10958.
+Getarg has an optional argument:
If the target argument exists, it is returned.
Otherwise, if <default_value> is present it is returned instead,
if not the script terminates immediately.
@@ -4455,13 +4455,14 @@ except for those have been set with 'disable_items'.
---------------------------------------
-*itemskill <skill id>,<skill level>;
-*itemskill "<skill name>",<skill level>;
+*itemskill <skill id>,<skill level>,{flag};
+*itemskill "<skill name>",<skill level>,{flag};
This command meant for item scripts to replicate single-use skills in usable
-items. It will not work properly, if there is a visible dialog window or menu.
-If the skill is self or auto-targeting, it will be used immediately otherwise a
+items. It will not work properly if there is a visible dialog window or menu.
+If the skill is self or auto-targeting it will be used immediately otherwise a
target cursor is shown.
+Flag is a optional param and when present the command will not check for skill requirements
// When Anodyne is used, it will cast Endure (8), Level 1, as if the actual
// skill has been used from skill tree.
@@ -5331,23 +5332,17 @@ command, and all monsters summoned with GM commands, but no other ones - that
is, all non-permanent monsters) on the specified map will be killed regardless
of the event label value.
-As of r12876 killmonster now supports an optional argument type. Using 1 for type
-will make the command fire "OnMyMobDead" events from any monsters that do die
-as a result of this command.
+killmonster supports an optional argument type. Using 1 for type will make the command
+fire "OnMyMobDead" events from any monsters that do die as a result of this command.
---------------------------------------
*killmonsterall "<map name>"{,<type>};
This command will kill all monsters on a specified map name, regardless of how
-they were spawned or what they are. As of r12873, The behavior has changed slightly.
-In light of a label behavior fix for mob spawning commands that will now allow the label to
-trigger when there is no player, killmonsterall has also been modified to support this.
-
-Using this the normal/old way means labels don't trigger when a player didn't
-attack/kill a monster. This is because it breaks compatibility with older scripts if
-forced to use the new method. However, if you wish to use the new label type with this
-command, simply use 1 for type. Any other number won't be recognized.
+they were spawned or what they are without triggering any event label attached to them,
+unless you specify 1 for type parameter. In this case, mob death labels will be allowed to
+trigger when there is no player. Any other number for this parameter won't be recognized.
---------------------------------------
@@ -5591,7 +5586,7 @@ the invoking NPC's actions, such as using an emotion or talking.
Whichever of the both NPCs is talked to, both will show a random emotion at the
same time.
-As of r16564, command now returns 1 or 0 on success and failure.
+Command returns 1 or 0 on success and failure.
A debug message also shows on the console when no events are triggered.
---------------------------------------
@@ -6287,7 +6282,6 @@ castle guardian monsters and will only work with them. It will set the guardian
characteristics up according to the castle's investment values and otherwise
set the things up that only castle guardians need.
-Since trunk r12524:
Returns the id of the mob or 0 if an error occurred.
When 'guardian index' isn't supplied it produces a temporary guardian.
Temporary guardians are not saved with the castle and can't be accessed by guardianinfo.
diff --git a/src/common/HPM.c b/src/common/HPM.c
index ec5ba888e..4802fbc61 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -345,4 +345,4 @@ void hpm_defaults(void) {
HPM->config_read = hplugins_config_read;
HPM->showmsg_pop = hplugin_showmsg_populate;
HPM->symbol_defaults_sub = NULL;
-} \ No newline at end of file
+}
diff --git a/src/common/HPM.h b/src/common/HPM.h
index ac2c4050f..87d7bdac6 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -80,4 +80,4 @@ struct HPM_interface *HPM;
void hpm_defaults(void);
-#endif /* _HPM_H_ */ \ No newline at end of file
+#endif /* _HPM_H_ */
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 517d9125d..f7832d0ec 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -64,4 +64,4 @@ struct HPMi_interface {
struct HPMi_interface *HPMi;
#endif
-#endif /* _HPMi_H_ */ \ No newline at end of file
+#endif /* _HPMi_H_ */
diff --git a/src/map/chrif.c b/src/map/chrif.c
index e2ce37e28..cf7886422 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1648,3 +1648,4 @@ int do_init_chrif(void) {
return 0;
}
+
diff --git a/src/map/clif.c b/src/map/clif.c
index 0c323c6cd..2210c3072 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17000,7 +17000,7 @@ void clif_bc_ready(void) {
*
*------------------------------------------*/
int do_init_clif(void) {
- const char* colors[COLOR_MAX] = { "0xFF0000", "0x00ff00" };
+ const char* colors[COLOR_MAX] = { "0xFF0000", "0x00ff00", "0xffffff" };
int i;
/**
* Setup Color Table (saves unnecessary load of strtoul on every call)
diff --git a/src/map/clif.h b/src/map/clif.h
index 9dfa83e00..b981cc535 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -324,6 +324,7 @@ enum clif_messages {
enum clif_colors {
COLOR_RED,
COLOR_DEFAULT,
+ COLOR_WHITE,
COLOR_MAX
};
diff --git a/src/map/pc.c b/src/map/pc.c
index 892c27e87..59b1c7443 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4087,6 +4087,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
return 0;
if( (item->item_usage.flag&NOUSE_SITTING) && (pc_issit(sd) == 1) && (pc_get_group_level(sd) < item->item_usage.override) ) {
+ clif->colormes(sd->fd,COLOR_WHITE,msg_txt(1474));
return 0; // You cannot use this item while sitting.
}
diff --git a/src/map/script.c b/src/map/script.c
index 3b1533f74..250ffeb93 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8245,10 +8245,9 @@ BUILDIN(guildopenstorage)
/*==========================================
* Make player use a skill trought item usage
*------------------------------------------*/
-/// itemskill <skill id>,<level>
-/// itemskill "<skill name>",<level>
-BUILDIN(itemskill)
-{
+/// itemskill <skill id>,<level>{,flag
+/// itemskill "<skill name>",<level>{,flag
+BUILDIN(itemskill) {
int id;
int lv;
TBL_PC* sd;
@@ -8260,6 +8259,11 @@ BUILDIN(itemskill)
id = ( script_isstring(st,2) ? skill->name2id(script_getstr(st,2)) : script_getnum(st,2) );
lv = script_getnum(st,3);
+ if( !script_hasdata(st, 4) ) {
+ if( !skill->check_condition_castbegin(sd,id,lv) )
+ return true;
+ }
+
sd->skillitem=id;
sd->skillitemlv=lv;
clif->item_skill(sd,id,lv);
@@ -17155,7 +17159,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(gettimestr,"si"),
BUILDIN_DEF(openstorage,""),
BUILDIN_DEF(guildopenstorage,""),
- BUILDIN_DEF(itemskill,"vi"),
+ BUILDIN_DEF(itemskill,"vi?"),
BUILDIN_DEF(produce,"i"),
BUILDIN_DEF(cooking,"i"),
BUILDIN_DEF(monster,"siisii???"),
diff --git a/vcproj-12/char-server.vcxproj b/vcproj-12/char-server.vcxproj
index ab2974805..126f15ea4 100644
--- a/vcproj-12/char-server.vcxproj
+++ b/vcproj-12/char-server.vcxproj
@@ -141,6 +141,7 @@
<ClInclude Include="..\3rdparty\libconfig\wincompat.h" />
<ClInclude Include="..\3rdparty\mt19937ar\mt19937ar.h" />
<ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\conf.h" />
<ClInclude Include="..\src\common\core.h" />
<ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\db.h" />
@@ -184,6 +185,7 @@
<ClCompile Include="..\3rdparty\libconfig\scanner.c" />
<ClCompile Include="..\3rdparty\libconfig\strbuf.c" />
<ClCompile Include="..\3rdparty\mt19937ar\mt19937ar.c" />
+ <ClCompile Include="..\src\common\conf.c" />
<ClCompile Include="..\src\common\core.c" />
<ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\db.c" />
diff --git a/vcproj-12/char-server.vcxproj.filters b/vcproj-12/char-server.vcxproj.filters
index 13788df95..5e536aada 100644
--- a/vcproj-12/char-server.vcxproj.filters
+++ b/vcproj-12/char-server.vcxproj.filters
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
+ <ClCompile Include="..\src\common\conf.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\core.c">
<Filter>common</Filter>
</ClCompile>
@@ -120,6 +123,9 @@
<ClInclude Include="..\src\common\cbasetypes.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\conf.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\core.h">
<Filter>common</Filter>
</ClInclude>
diff --git a/vcproj-12/login-server.vcxproj b/vcproj-12/login-server.vcxproj
index 8500cc376..48c79d285 100644
--- a/vcproj-12/login-server.vcxproj
+++ b/vcproj-12/login-server.vcxproj
@@ -152,6 +152,7 @@
<ClInclude Include="..\src\login\login.h" />
<ClInclude Include="..\src\login\loginlog.h" />
<ClInclude Include="..\src\common\cbasetypes.h" />
+ <ClInclude Include="..\src\common\conf.h" />
<ClInclude Include="..\src\common\core.h" />
<ClInclude Include="..\src\common\console.h" />
<ClInclude Include="..\src\common\db.h" />
@@ -185,6 +186,7 @@
<ClCompile Include="..\src\login\ipban_sql.c" />
<ClCompile Include="..\src\login\login.c" />
<ClCompile Include="..\src\login\loginlog_sql.c" />
+ <ClCompile Include="..\src\common\conf.c" />
<ClCompile Include="..\src\common\core.c" />
<ClCompile Include="..\src\common\console.c" />
<ClCompile Include="..\src\common\db.c" />
diff --git a/vcproj-12/login-server.vcxproj.filters b/vcproj-12/login-server.vcxproj.filters
index 0ce4b8b6e..4574ee7c1 100644
--- a/vcproj-12/login-server.vcxproj.filters
+++ b/vcproj-12/login-server.vcxproj.filters
@@ -13,6 +13,9 @@
<ClCompile Include="..\src\login\loginlog_sql.c">
<Filter>login_sql</Filter>
</ClCompile>
+ <ClCompile Include="..\src\common\conf.c">
+ <Filter>common</Filter>
+ </ClCompile>
<ClCompile Include="..\src\common\core.c">
<Filter>common</Filter>
</ClCompile>
@@ -105,6 +108,9 @@
<ClInclude Include="..\src\common\cbasetypes.h">
<Filter>common</Filter>
</ClInclude>
+ <ClInclude Include="..\src\common\conf.h">
+ <Filter>common</Filter>
+ </ClInclude>
<ClInclude Include="..\src\common\core.h">
<Filter>common</Filter>
</ClInclude>