viewing paste topic/3899- dispbottom color | Diff

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
 src/map/script.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
 
diff --git a/src/map/script.c b/src/map/script.c
index 4fb4e72..b186020 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12682,13 +12682,16 @@ int soundeffect_sub(struct block_list* bl,va_list ap)
 /*==========================================
  * Displays a message for the player only (like system messages like "you got an apple" )
  *------------------------------------------*/
-BUILDIN(dispbottom)
-{
+BUILDIN(dispbottom) {
        TBL_PC *sd=script->rid2sd(st);
        const char *message;
        message=script_getstr(st,2);
-       if(sd)
-               clif->disp_onlyself(sd,message,(int)strlen(message));
+       if ( sd ) {
+               if ( script_hasdata(st,3) )
+                       clif->colormes( sd->fd,  script_getnum(st,3) & BC_COLOR_MASK, message );
+               else
+                       clif->disp_onlyself(sd,message,(int)strlen(message));
+       }
        return true;
 }
 
@@ -18773,7 +18776,7 @@ void script_parse_builtin(void) {
                BUILDIN_DEF(deactivatepset,"i"), // Deactive a pattern set [MouseJstr]
                BUILDIN_DEF(deletepset,"i"), // Delete a pattern set [MouseJstr]
 #endif
-               BUILDIN_DEF(dispbottom,"s"), //added from jA [Lupus]
+               BUILDIN_DEF(dispbottom,"s?"), //added from jA [Lupus]
                BUILDIN_DEF(getusersname,""),
                BUILDIN_DEF(recovery,""),
                BUILDIN_DEF(getpetinfo,"i"),
 
Viewed 678 times, submitted by AnnieRuru.