MSDP additons

Please post your ideas to improve our mud.

Re: MSDP additons

Postby Akaya » Tue Dec 24, 2013 1:38 am

this is beautiful. Im on my phone right now but ill write a parser for this in the morning. Thanks Splork!
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: MSDP additons

Postby DarkArtist » Mon Dec 30, 2013 2:42 pm

Spell affects output looks good since it can be parsed with the same algorithm as string_exits.

Since you've got string exits in, maybe ROOM_EAST, ..WEST, etc could be repurposed to return the room sector, exit flags, and room flags for the attached room? Sector would be good for knowing if you're about to walk off a cliff or underwater. Some handy room flags would be Dark and Indoors, I wouldn't expect any that couldn't be reasonably determined from an adjacent room, e.g. NoFlee. Some handy exit flags would be NoMount, Locked, NoMob. They could just be a colon separated list without categories that could be split into a simple table. Wouldn't need to specify if it was the sector or room flag or exit flag. Just test ROOM_X for MidAir or wutever and you'd be good to go. It seems this would be pretty handy for automated mapping features, once more people get into that.

Not a priority, just a thought.
DarkArtist
Double 40 Poster
 
Posts: 112
Joined: Tue Dec 10, 2013 6:18 pm
Status: Offline

Re: MSDP additons

Postby Akaya » Fri Jan 24, 2014 5:10 pm

Here's a parser for the new MSDPWEAR_<slot> additions.

Code: Select all
function parseEQ(event,msdp)
  local EQ = {}
  msdp = string.split(msdp,",")
  for k,v in pairs(msdp) do
    msdp[k] = string.split(msdp[k],":")
  end
  for k,v in pairs(msdp) do
    EQ[v[1]] = v[2]
  end
  return EQ
end


It returns a lua table with the relevent info from the eq slot requested
Code: Select all
--Example Usage (sent by an event)
display(parseEQ("MSDPWEAR_HEAD","VNUM:3002,DESC:a lesser helm,AC-apply:-1.0,"))
User avatar
Akaya
40 Prime Poster
 
Posts: 78
Joined: Thu Jan 10, 2013 3:10 am
Status: Offline

Re: MSDP additons

Postby Tuck » Sun Jun 15, 2014 1:35 pm

Tuck
Triple 40 Poster
 
Posts: 323
Joined: Mon Jun 22, 2009 12:06 pm
Location: Planet Earth
Status: Offline

Previous

Return to Mud Suggestions

Who is online

Users browsing this forum: No registered users and 9 guests