(mapping script) Mudlet Mapper script for Achaea/IREs

All and any discussion and development of the Mudlet Mapper.
Delrayne
Posts: 159
Joined: Tue Jun 07, 2011 7:07 pm
Contact:

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Delrayne »

Added in a detection ability for Imperian, and I'm sure the other IRE's have it as well. Alertness.
Code: [show] | [select all] lua
The following code will change this:
Your enhanced senses inform you that Delrayne has entered At the foot of a fungi ladder.

To this:
[Delrayne - East]
Trigger
Code: [show] | [select all] lua
^Your enhanced senses inform you that (\w+) has entered (.+)\.$
Code
Code: [show] | [select all] lua
deleteLine()
for k, v in pairs (gmcp.Room.Info.exits) do
	if matches[3] == getRoomName(v) then
		cecho("\n<red>[<white>" .. matches[2] .. " <red>- <white>" .. mmp.anytolong(k) .. "<red>]")
	end
end
I did have to do a slight edit to mmp.anytolong() those changes are listed here. I hope they don't mess anything up with your mapper Vadi.
Code: [show] | [select all] lua
--capitalized all corresponding exits
function mmp.anytolong(exit)
  local t = {
    n = "North",
    e = "East",
    s = "South",
    w = "West",
    ne = "Northeast",
    se = "Southeast",
    sw = "Southwest",
    nw = "Northwest",
    u = "Up",
    d = "down",
    ["in"] = "In", --changed from i = "in"
    out = "Out"
  }

  for s, l in pairs(t) do t[l] = l end

  return t[exit]
end
Hope this makes it into the next update. Feel free to alter it to preserve the room name in the echo if you like, so long as the direction is posted as well.
Edit- As well as evading :P

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Vadi »

You could've just used mmp.anytolong(input):title() to capitalize the output, without modifying it.

It's in my plans to make a better echo that does things in one line instead umpteen.

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Vadi »

I've added an alertness trigger to the latest mapping script.

Wennef
Posts: 43
Joined: Sun Apr 11, 2010 3:48 am

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Wennef »

Anyone know what I can do about mine? Every time I try to use goto, it crashes my mudlet. I have uninstalled it, reinstalled and still happens. I don't know if it helps but I'm on Ubuntu.

FIXED: deleted .dat map files.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Heiko »

Upgrade to the latest git and you should be alright.

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Vadi »

I'm going to be tackling wilderness, subdividions, sea and etc mapping in the next few coming months. If anyone experienced in Lua wants to join in, get in touch.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Rakon »

*Ignore post. tcpdump proved this was my error and not mudlets*

Parleone
Posts: 3
Joined: Tue May 08, 2012 3:25 am

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Parleone »

I tried updating the mapper to the newer version but I keep getting the same error whenever I try to click on a sensed person's location:

"Lua error:[string "mmp.gotoRoom(Stygian crossroads)"]:1: ')' expected near 'crossroads'"

Anyone know what this could be?

User avatar
Vadi
Posts: 5050
Joined: Sat Mar 14, 2009 3:13 pm

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Vadi »

What is the version of the mapper script as 'rl' says?

Parleone
Posts: 3
Joined: Tue May 08, 2012 3:25 am

Re: (mapping script) Mudlet Mapper script for Achaea/IREs

Post by Parleone »

12.5.1

Post Reply