MSDP Inventory

  • zusuk
  • zusuk's Avatar
  • Offline
  • Gold Boarder
  • Gold Boarder
  • LuminariMUD Developer
More
11 months 3 days ago #7237 by zusuk
Replied by zusuk on 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
11 months 2 days ago #7243 by WhiskyTest
Replied by WhiskyTest on 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
10 months 1 week ago #7292 by Ornir
Replied by Ornir on 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
10 months 1 week ago #7293 by Ornir
Replied by Ornir on 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
10 months 1 week ago - 10 months 1 week ago #7294 by zusuk
Replied by zusuk on 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: 10 months 1 week ago by zusuk.

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

Time to create page: 1.369 seconds