summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf23
-rw-r--r--doc/constants.md5
-rw-r--r--doc/script_commands.txt19
-rw-r--r--src/map/script.c77
4 files changed, 80 insertions, 44 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 0015646dd..921acbeaf 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -3610,15 +3610,20 @@ constants_db: {
HUNTING: 2
comment__: "questinfo"
- QTYPE_NONE: 0x270f
- QTYPE_QUEST: 0x00
- QTYPE_QUEST2: 0x01
- QTYPE_JOB: 0x02
- QTYPE_JOB2: 0x03
- QTYPE_EVENT: 0x04
- QTYPE_EVENT2: 0x05
- QTYPE_WARG: 0x06
- QTYPE_WARG2: 0x08
+ QTYPE_NONE: 0x270f
+ QTYPE_QUEST: 0x00
+ QTYPE_QUEST2: 0x01
+ QTYPE_JOB: 0x02
+ QTYPE_JOB2: 0x03
+ QTYPE_EVENT: 0x04
+ QTYPE_EVENT2: 0x05
+ QTYPE_WARG: 0x06
+ QTYPE_CLICKME: 0x06
+ QTYPE_DAILYQUEST: 0x07
+ QTYPE_WARG2: 0x08
+ QTYPE_EVENT3: 0x08
+ QTYPE_JOBQUEST: 0x09
+ QTYPE_JUMPING_PORING: 0xA
comment__: "Font weight"
FW_DONTCARE: 0
diff --git a/doc/constants.md b/doc/constants.md
index 98c22bb3e..828ece36a 100644
--- a/doc/constants.md
+++ b/doc/constants.md
@@ -3543,7 +3543,12 @@
- `QTYPE_EVENT`: 4
- `QTYPE_EVENT2`: 5
- `QTYPE_WARG`: 6
+- `QTYPE_CLICKME`: 6
+- `QTYPE_DAILYQUEST`: 7
- `QTYPE_WARG2`: 8
+- `QTYPE_EVENT3`: 8
+- `QTYPE_JOBQUEST`: 9
+- `QTYPE_JUMPING_PORING`: 10
### Font weight
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 61392b3fc..940302982 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3233,6 +3233,7 @@ Set an equipment's option index or value for the specified option slot.
<equipment_index> For a list of equipment indexes see getequipid().
<option_slot> can range from 1 to MAX_ITEM_OPTIONS
<type> can be IT_OPT_INDEX (the ID of the option bonus, @see "Id" or "Name" in db/item_options.conf)
+ removes the equip option if type is 0.
<value> The value of the type to be set.
returns 0 if value couldn't be set, 1 on success.
@@ -9227,7 +9228,14 @@ No Icon : QTYPE_NONE
! Event Icon : QTYPE_EVENT
? Event Icon : QTYPE_EVENT2
Warg : QTYPE_WARG
-Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410)
+Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315)
+
+- Only for packetver >= 20170315
+Click Me Icon : QTYPE_CLICKME
+! Daily Quest Icon : QTYPE_DAILYQUEST
+! Green Event Icon : QTYPE_EVENT3
+! Job Quest Icon : QTYPE_JOBQUEST
+Jumping Poring : QTYPE_JUMPING_PORING
Map Mark Color, when used, creates a mark in the user's mini map on the position of the NPC,
the available color values are:
@@ -9336,7 +9344,14 @@ Remove Icon : QTYPE_NONE
! Event Icon : QTYPE_EVENT
? Event Icon : QTYPE_EVENT2
Warg : QTYPE_WARG
-Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410)
+Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315)
+
+- Only for packetver >= 20170315
+Click Me Icon : QTYPE_CLICKME
+! Daily Quest Icon : QTYPE_DAILYQUEST
+! Green Event Icon : QTYPE_EVENT3
+! Job Quest Icon : QTYPE_JOBQUEST
+Jumping Poring : QTYPE_JUMPING_PORING
Mark Color:
0 - No Mark
diff --git a/src/map/script.c b/src/map/script.c
index 6b920514c..2d4f60f37 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14270,31 +14270,36 @@ BUILDIN(setequipoption)
if (equip_index > 0 && equip_index <= ARRAYLENGTH(script->equip)) {
if ((i = pc->checkequip(sd, script->equip[equip_index - 1])) == -1) {
- ShowError("buildin_setequipoptioninfo: No equipment is equipped in the given index %d.\n", equip_index);
+ ShowError("buildin_setequipoption: No equipment is equipped in the given index %d.\n", equip_index);
script_pushint(st, 0);
return false;
}
} else {
- ShowError("buildin_setequipoptioninfo: Invalid equipment index %d provided.\n", equip_index);
+ ShowError("buildin_setequipoption: Invalid equipment index %d provided.\n", equip_index);
script_pushint(st, 0);
return false;
}
if (sd->status.inventory[i].nameid != 0) {
-
- if ((ito = itemdb->option_exists(opt_index)) == NULL) {
- script_pushint(st, 0);
- ShowError("buildin_setequipotion: Option index %d does not exist!\n", opt_index);
- return false;
- } else if (value < -INT16_MAX || value > INT16_MAX) {
- script_pushint(st, 0);
- ShowError("buildin_setequipotion: Option value %d exceeds maximum limit (%d to %d) for type!\n", value, -INT16_MAX, INT16_MAX);
- return false;
+ if (opt_index == 0) {
+ // Remove the option
+ sd->status.inventory[i].option[slot-1].index = 0;
+ sd->status.inventory[i].option[slot-1].value = 0;
+ } else {
+ if ((ito = itemdb->option_exists(opt_index)) == NULL) {
+ script_pushint(st, 0);
+ ShowError("buildin_setequipotion: Option index %d does not exist!\n", opt_index);
+ return false;
+ } else if (value < -INT16_MAX || value > INT16_MAX) {
+ script_pushint(st, 0);
+ ShowError("buildin_setequipotion: Option value %d exceeds maximum limit (%d to %d) for type!\n", value, -INT16_MAX, INT16_MAX);
+ return false;
+ }
+ /* Add Option Index */
+ sd->status.inventory[i].option[slot-1].index = ito->index;
+ /* Add Option Value */
+ sd->status.inventory[i].option[slot-1].value = value;
}
- /* Add Option Index */
- sd->status.inventory[i].option[slot-1].index = ito->index;
- /* Add Option Value */
- sd->status.inventory[i].option[slot-1].value = value;
/* Unequip and simulate deletion of the item. */
pc->unequipitem(sd, i, PCUNEQUIPITEM_FORCE); // status calc will happen in pc->equipitem() below
@@ -20447,15 +20452,18 @@ BUILDIN(questinfo)
quest_id = script_getnum(st, 2);
icon = script_getnum(st, 3);
- #if PACKETVER >= 20120410
- if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
- icon = 9999; // Default to nothing if icon id is invalid.
- #else
- if(icon < 0 || icon > 7)
- icon = 0;
- else
- icon = icon + 1;
- #endif
+#if PACKETVER >= 20170315
+ if (icon < 0 || (icon > 10 && icon != 9999))
+ icon = 9999;
+#elif PACKETVER >= 20120410
+ if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
+ icon = 9999; // Default to nothing if icon id is invalid.
+#else
+ if (icon < 0 || icon > 7)
+ icon = 0;
+ else
+ icon = icon + 1;
+#endif
qi.quest_id = quest_id;
qi.icon = (unsigned char)icon;
@@ -20649,15 +20657,18 @@ BUILDIN(showevent)
}
}
- #if PACKETVER >= 20120410
- if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
- icon = 9999; // Default to nothing if icon id is invalid.
- #else
- if(icon < 0 || icon > 7)
- icon = 0;
- else
- icon = icon + 1;
- #endif
+#if PACKETVER >= 20170315
+ if (icon < 0 || (icon > 10 && icon != 9999))
+ icon = 9999;
+#elif PACKETVER >= 20120410
+ if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
+ icon = 9999; // Default to nothing if icon id is invalid.
+#else
+ if (icon < 0 || icon > 7)
+ icon = 0;
+ else
+ icon = icon + 1;
+#endif
clif->quest_show_event(sd, &nd->bl, icon, color);
return true;