Jump to content
  • 0

How to change @whosell display message


Chasewalk

Question


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.02
  • Content Count:  94
  • Reputation:   0
  • Joined:  10/17/20
  • Last Seen:  

Hi,

Anyone someone knows where it can or can change its color something like on picture thanks!

    if(s_type & 2 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) ||
                    (pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0] != card_id &&
                    pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[1] != card_id &&
                    pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[2] != card_id &&
                    pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[3] != card_id)))
                continue;
            if(s_type & 4 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) || pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine != refine))
                continue;
            if(item_data->type == IT_ARMOR)
                snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %s[%d] | Price %d | Amount %d | %s (%d,%d) %s",pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine
                    ,item_data->jname
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0]
                    ,pl_sd->vending[j].value
                    ,pl_sd->vending[j].amount
                    ,mapindex_id2name(pl_sd->mapindex)
                    ,pl_sd->bl.x,pl_sd->bl.y
                    ,pl_sd->status.name);
            else if(item_data->type == IT_WEAPON)
                snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %s[%d,%d,%d,%d] | Price %d | Amount %d | %s (%d,%d) %s",pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine
                    ,item_data->jname
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0]
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[1]
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[2]
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[3]
                    ,pl_sd->vending[j].value
                    ,pl_sd->vending[j].amount
                    ,mapindex_id2name(pl_sd->mapindex)
                    ,pl_sd->bl.x,pl_sd->bl.y
                    ,pl_sd->status.name);
            else
                snprintf(atcmd_output, CHAT_SIZE_MAX, "%s | Price %d | Amount %d | %s (%d,%d) %s",item_data->jname
                    ,pl_sd->vending[j].value
                    ,pl_sd->vending[j].amount
                    ,mapindex_id2name(pl_sd->mapindex)
                    ,pl_sd->bl.x, pl_sd->bl.y
                    ,pl_sd->status.name);
            if(pl_sd->vending[j].value < MinPrice) MinPrice = pl_sd->vending[j].value;
            if(pl_sd->vending[j].value > MaxPrice) MaxPrice = pl_sd->vending[j].value;
            clif_displaymessage(fd, atcmd_output);
            count++;
            flag = 1;
        }
            if (flag && pl_sd->mapindex == sd->mapindex) {
                clif_viewpoint(sd, 1, 1, pl_sd->bl.x, pl_sd->bl.y, ++sat_num, 0xFFFFFF);
                flag = 0;
            }
        }
    }
    mapit_free(iter);
    if(count > 0) {
        snprintf(atcmd_output, CHAT_SIZE_MAX, "Found %d ea. Prices from %dz to %dz.", count, MinPrice, MaxPrice);

whosell color.png

Edited by Patskie
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

use clif_colormessage instead of clif_displaymessage

clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], atcmd_output, false, SELF);

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

On 12/13/2020 at 4:16 PM, Chasewalk said:

Hi,

Anyone someone knows where it can or can change its color something like on picture thanks!


    if(s_type & 2 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) ||
                    (pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0] != card_id &&
                    pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[1] != card_id &&
                    pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[2] != card_id &&
                    pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[3] != card_id)))
                continue;
            if(s_type & 4 && ((item_data->type != IT_ARMOR && item_data->type != IT_WEAPON) || pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine != refine))
                continue;
            if(item_data->type == IT_ARMOR)
                snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %s[%d] | Price %d | Amount %d | %s (%d,%d) %s",pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine
                    ,item_data->jname
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0]
                    ,pl_sd->vending[j].value
                    ,pl_sd->vending[j].amount
                    ,mapindex_id2name(pl_sd->mapindex)
                    ,pl_sd->bl.x,pl_sd->bl.y
                    ,pl_sd->status.name);
            else if(item_data->type == IT_WEAPON)
                snprintf(atcmd_output, CHAT_SIZE_MAX, "+%d %s[%d,%d,%d,%d] | Price %d | Amount %d | %s (%d,%d) %s",pl_sd->cart.u.items_cart[pl_sd->vending[j].index].refine
                    ,item_data->jname
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[0]
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[1]
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[2]
                    ,pl_sd->cart.u.items_cart[pl_sd->vending[j].index].card[3]
                    ,pl_sd->vending[j].value
                    ,pl_sd->vending[j].amount
                    ,mapindex_id2name(pl_sd->mapindex)
                    ,pl_sd->bl.x,pl_sd->bl.y
                    ,pl_sd->status.name);
            else
                snprintf(atcmd_output, CHAT_SIZE_MAX, "%s | Price %d | Amount %d | %s (%d,%d) %s",item_data->jname
                    ,pl_sd->vending[j].value
                    ,pl_sd->vending[j].amount
                    ,mapindex_id2name(pl_sd->mapindex)
                    ,pl_sd->bl.x, pl_sd->bl.y
                    ,pl_sd->status.name);
            if(pl_sd->vending[j].value < MinPrice) MinPrice = pl_sd->vending[j].value;
            if(pl_sd->vending[j].value > MaxPrice) MaxPrice = pl_sd->vending[j].value;
            clif_displaymessage(fd, atcmd_output);
            count++;
            flag = 1;
        }
            if (flag && pl_sd->mapindex == sd->mapindex) {
                clif_viewpoint(sd, 1, 1, pl_sd->bl.x, pl_sd->bl.y, ++sat_num, 0xFFFFFF);
                flag = 0;
            }
        }
    }
    mapit_free(iter);
    if(count > 0) {
        snprintf(atcmd_output, CHAT_SIZE_MAX, "Found %d ea. Prices from %dz to %dz.", count, MinPrice, MaxPrice);

whosell color.png

Hi! is it possible for you to share the whole script? the one that I have always says nobody is selling it... please! 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.02
  • Content Count:  94
  • Reputation:   0
  • Joined:  10/17/20
  • Last Seen:  

Find :  clif_displaymessage(fd, atcmd_output);

change to 

clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], atcmd_output, false, SELF);
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

Just now, Chasewalk said:

Find :  clif_displaymessage(fd, atcmd_output);

change to 


clif_messagecolor(&sd->bl, color_table[COLOR_LIGHT_GREEN], atcmd_output, false, SELF);

oh I meant the whole @whosell script? unfortunely the one on the other thread just says nobody is selling..

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  208
  • Reputation:   22
  • Joined:  01/14/13
  • Last Seen:  

3 hours ago, Almond Snicker said:

oh I meant the whole @whosell script? unfortunely the one on the other thread just says nobody is selling..

https://github.com/coookie1010/Server-Patches/blob/main/rA-whosell.diff i ported it for latest rA maybe it helps the nobody is selling.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.06
  • Content Count:  241
  • Reputation:   11
  • Joined:  08/12/20
  • Last Seen:  

20 minutes ago, Cookie-rae said:

https://github.com/coookie1010/Server-Patches/blob/main/rA-whosell.diff i ported it for latest rA maybe it helps the nobody is selling.

Thank you so much @Cookie-rae will check this out tonight! <3

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...