|
fisher1231 Beginner
Joined: 27 Sep 2004 Posts: 18
|
Posted: Mon Sep 27, 2004 11:27 am
Room Description is output from mud,how do I speedwalk to it |
Ok, I'm playing Federation2, and I just need to be pointed in the right direction of how to do this. I'm having to goto a local courier office, get a job, it tells me where to pickup the package, it displays the exact room name and description as I have them in my mapper, I want to pull that info and auto speedwalk there. I get a display like this
Code: |
>ak
Your task is to pick up a package on Venus. The package can be picked up from:
-----
Venus Freedom Party HQ
The Venus Freedom Party campaigns for Venusian Independence. The walls are covered with proclamations exhorting you to vote for the party's candidates in various elections, and leaflets are scattered about urging you to join up.
However, there are persistent rumors that certain elements are willing to do anything to advance their cause!
The exit is north, and there is a small door leading south.
-----
Delivery details will be provided when you collect the package. |
so i know logically what I want to do is make a trigger to go
#TRIGGER {Your task is to pick up a package on &{zone}.} {-skip a line,find the room with that name (and also how would i do the description if i find that i need it), get the vnum of it and then #walk @vnumvar @zone}
there are many things in the game in this format that I'd like to know how to capture, Thanks in advance for the help |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Sep 27, 2004 8:20 pm |
Well it looks like your already on the right track *UNTESTED*
#CLASS courier
#TR {^Your task is to pick up a package on (%x).} {zone="%1"}
#COND {^(*)} {
pickup="%1"
pickupfrom=%mapquery( {([ZoneID] = %zonenum( "%t1")) AND ([NAME] = '<%replace( "%1", "'", "''")>')})
#IF (%numitems( @pickupfrom)<=0) {#SAY No Room Not Found!!!}
#IF (%numitems( @pickupfrom)=1) {#WALK @pickupfrom}
#IF (%numitems( @pickupfrom)>=2) {#SAY %numitems( @pickupfrom) Rooms Found!!!}
} {skip|param=1}
#CLASS 0
Used Pretty Print
Syntax Colourizer
Edit: added missing quotes |
|
Last edited by nexela on Mon Sep 27, 2004 11:09 pm; edited 1 time in total |
|
|
|
fisher1231 Beginner
Joined: 27 Sep 2004 Posts: 18
|
Posted: Mon Sep 27, 2004 10:04 pm |
Woohoo, it worked, at least the first time I ran it, I'm gonna have to work at it to break it down and see how to change it up for other things, but thanks so much!
|
|
|
|
fisher1231 Beginner
Joined: 27 Sep 2004 Posts: 18
|
Posted: Mon Sep 27, 2004 10:12 pm |
Oops, one problem, i found one room to have a comma in the name so far and it doesnt pick it up, how could I account for this?
Galactic Trading Guild, Inc |
|
_________________ Johnny C Fisher |
|
|
|
fisher1231 Beginner
Joined: 27 Sep 2004 Posts: 18
|
Posted: Mon Sep 27, 2004 10:18 pm |
And also what if a zone has a 2 word name
The Lattice |
|
_________________ Johnny C Fisher |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Sep 27, 2004 11:05 pm |
My fault I forgot to quote properly
pickupfrom=%mapquery( {([ZoneID] = %zonenum( "%t1")) AND ([NAME] = '<%replace( "%1", "'", "''")>')})
Also this is how it works for use in other applications
#TR {starting text} {}
#COND {^(*)$} {} {skip|param=1} //This tells the Conditional trigger to SKIP param=line(s) lines before matching. |
|
|
|
fisher1231 Beginner
Joined: 27 Sep 2004 Posts: 18
|
Posted: Tue Sep 28, 2004 12:47 pm |
hmmm, still dont work, Is that line any diff than the one before, cuz im not seeing any difference at all...and thanks, again
|
|
_________________ Johnny C Fisher |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Tue Sep 28, 2004 1:51 pm |
See what happens before I rush to work "P
The differance is the "quouted values"
also you need this change for it to pick up zone names of more then one word in the first trigger
^Your task is to pick up a package on (*). |
|
|
|
|
|