diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b0e20c81d5..a18847a59f 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -6392,9 +6392,22 @@ This command works almost like sleep2, but displays a progress bar above the head of the currently attached character (like cast bar). Once the given amount of seconds passes, the script resumes. If the character moves while the progress bar progresses, it is aborted and -the script ends. The color format is in RGB (0xRRGGBB). The color is +the script ends. The color format is in RGB (RRGGBB). The color is currently ignored by the client and appears always green. +--------------------------------------- + +*progressbar_npc "",{,<"NPC Name">}; + +This command works like progressbar, but displays a progress bar +above the head of the currently attached (or given) NPC. Once the +given amount of seconds passes, the script resumes. The color format +is in RGB (RRGGBB). The color is currently ignored by the client and +appears always green. + +Note: If a player is attached to the NPC, they are detached from the NPC +as soon as the progress bar activates. + --------------------------------------- // 5,1.- End of time-related commands diff --git a/src/map/clif.c b/src/map/clif.c index 338ee87914..7f0c1f1d64 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1466,6 +1466,7 @@ int clif_spawn(struct block_list *bl) else if( nd->size == SZ_MEDIUM ) clif_specialeffect(&nd->bl,421,AREA); clif_efst_status_change_sub(bl, bl, AREA); + clif_progressbar_npc_area(nd); } break; case BL_PET: @@ -4640,6 +4641,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) else if( nd->size == SZ_MEDIUM ) clif_specialeffect_single(bl,421,sd->fd); clif_efst_status_change_sub(&sd->bl, bl, SELF); + clif_progressbar_npc(nd, sd); } break; case BL_MOB: @@ -10628,6 +10630,26 @@ void clif_parse_progressbar(int fd, struct map_session_data * sd) npc_scriptcont(sd, npc_id, false); } +/// Displays cast-like progress bar on a NPC +/// 09d1 .L .L