|
Radicand Newbie
Joined: 10 Jan 2003 Posts: 5
|
Posted: Fri Jan 10, 2003 7:23 am
Automapper and VNUM detection |
I feel bad posting two questions in such short succession, but now that I realize you can script the mapper, I need help writing a line to detect the vnum of the room. Normally this would be easy and I could copy and paste one of the examples from the help files, but I can not find explanation of how scripting works besides the examples it gives. Here is how this looks:
City Square
You are find yourself in the bustling City Square of Cyrus. People are
running past you in every direction on their way about the city. Shop Road
runs south of here toward the most famous shops of the city. Main Street
with many public institutions runs to both the east and west from here. A
small path leads through the woods towards the Great Mountain of Cyrus to the
north.
[Exits: n e s w ]
An ornate fountain lies here bubbling softly.
A citizen of Cyrus walks by you here.
[1125] 4242hp 4242mn 4242mv (GGOD)>
The vNum is the [1125] before my prompt. Because Exits: also begins with a bracket, this poses a bit of a problem.
Could someone help me write a line? Apparently the line I guessed at:
#TRIGGER {^[*~] 4242~} {#TAG vnum {%1}}
dosn't work =(
Thanks appriciated!
--Radicand |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Fri Jan 10, 2003 12:30 pm |
You can use this trigger:
#TRIGGER {~[(%d)~] %dhp} {#TAG vnum {%1}} "" {prompt|nocr}
Be sure to reconfigure the mapper after creating this trigger. However, I've never been able to get the mapper to automatically set the vnum by using #TAG. What I used, instead, was a macro like this one:
#KEY KEY0 {#NOOP %roomnum(, @vnum)}
And the above trigger did:
#VAR vnum {%1}
instead of:
#TAG vnum {%1}
Whenever I created a new room, I just hit 0 on the keypad and the vnum was changed. The reason I did it this way is because you can't change the vnum of a room by code until the mapper is finished creating the room. Finding out when this moment happens is not eays, so it is best left to the user to decide.
Kjata |
|
|
|
Radicand Newbie
Joined: 10 Jan 2003 Posts: 5
|
Posted: Fri Jan 10, 2003 11:49 pm |
Problem fixed!
#VAR vnum %1
#NOOP %roomnum( , @vnum)
The var part is probably unncessary, but it all works fantastically now, and I don't have to hit 0 all the time =p
Thans for the assistance!
--Radicand |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|