zMUD mapquery

by Ardmore

Back to Mechanic's Corner.

Ardmore2008-07-29 22:47:43
So, I'm trying to make my deathsight message print out the zone it happened in...
I don't understand what's happening, I have the trigger:
^You see the death occur at (.*)$
but that isn't the problem, I can't figure out mapquery.

#show %mapquery(" LIKE '%Necropolis ritual chamber.%'")

shows the correct room: 5379

So #show %zonename(%mapquery(" LIKE '%Necropolis ritual chamber.%'")) should work, right? Since you only pass %zonename the room number you're looking up, but it doesn't. It gives me Nosfydra. I don't understand, can someone explain this to me please.
Unknown2008-07-29 22:52:46
No. You pass a ZONE number to %zonename, so you need to get the zone number for that room number. smile.gif
Ardmore2008-08-04 18:48:19
QUOTE(Zarquan @ Jul 29 2008, 06:52 PM) 538489
No. You pass a ZONE number to %zonename, so you need to get the zone number for that room number. smile.gif

Okayokay, I must be missing something. I got it working, but if a deathsight happens in a place I don't have mapped it locks my zMUD up so I deleted the trigger. Bleh.

Larkypooh, help!
Unknown2008-08-04 22:06:13
Sorry, Ardiekins, but I don't script zMUD mapper things like that. I primarily rely on MudBot for this stuff.
Ardmore2008-08-04 22:10:55
I'll have to give that a shot I suppose. Thanks.
Gwylifar2008-08-05 14:56:11
Maybe try some safety coding:

CODE
s = %mapquery(" LIKE '%Necropolis ritual chamber.%'")
#if (@s = "") {#show Don't know where that is!} {#if (%numitems(@s) > 1) {#show There are several zones that could be in!} {#show That's in the %zonename(%roomzone(@s)) zone.}}