MSDP Inventory

  • zusuk
  • zusuk's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
5 months 1 week ago #7237 by zusuk
zusuk replied the topic: MSDP Inventory
Wow Ripley! Looks awesome, thanks for the contribution! Can't wait to see how it looks in the GUI!

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100

Please Log in or Create an account to join the conversation.

  • WhiskyTest
  • WhiskyTest's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
More
5 months 1 week ago #7243 by WhiskyTest
WhiskyTest replied the topic: MSDP Inventory
Awesome Ripley thank you :)
Just trying it out now.
Had to remove strip_colours() as tbaMUD doesn't seem to have that any more.

Please Log in or Create an account to join the conversation.

  • Ornir
  • Ornir's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Co-owner of Luminari
More
4 months 2 weeks ago #7292 by Ornir
Ornir replied the topic: MSDP Inventory
Ah, that must be Luminari specific then. If you have colors in item short descriptions MSDP will break without stripping them out.

Is this working out for you?

Luminari - a Pathfinder/D&D inspired adventure!
www.luminarimud.com
luminarimud.com 4100

Please Log in or Create an account to join the conversation.

  • Ornir
  • Ornir's Avatar
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Co-owner of Luminari
More
4 months 2 weeks ago #7293 by Ornir
Ornir replied the topic: MSDP Inventory
Ah, that must be Luminari specific then. If you have colors in item short descriptions MSDP will break without stripping them out.

Is this working out for you?

Luminari - a Pathfinder/D&D inspired adventure!
www.luminarimud.com
luminarimud.com 4100

Please Log in or Create an account to join the conversation.

  • zusuk
  • zusuk's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
4 months 2 weeks ago - 4 months 2 weeks ago #7294 by zusuk
zusuk replied the topic: MSDP Inventory
I -think- you will run into issues if someone uses color in your objects, or whatever is being handled by protocol. If you do run into trouble, we wrote strip_colors() as a simple way to get rid of colors from a string:

/* so it turns out that write_to_descriptor can't handle protocol info
 * so i made this simple function to strip color codes -zusuk
 */
void strip_colors(char *str) {
  char *p = str;
  char *n = str;

  while (p && *p) {

    if (*p == '@') {
      if (*(p + 1) != '@') {
        p += 2;
      } else {
        p++;
        *n++ = *p++;
      }
    } else if (*p == '\t') {
      if (*(p + 1) != '\t') {
        p += 2;
      } else {
        p++;
        *n++ = *p++;
      }
    } else {
      *n++ = *p++;
    }
  }
  *n = '\0';
}

Could be a non-issue for you, since we are a mix of code bases.

Website
www.luminariMUD.com

Main Game Port
luminariMUD.com:4100
Last Edit: 4 months 2 weeks ago by zusuk.

Please Log in or Create an account to join the conversation.

Time to create page: 1.322 seconds