|
Balin Newbie
Joined: 07 Jun 2002 Posts: 5 Location: USA
|
Posted: Fri Jun 07, 2002 4:49 am
Complex Capturing Triggers |
Before I begin, I know quite a bit about zmud coding, but can't seem to come up with a solution to this problem. My mud (astaria) has a scrying ability to locate another player. My clans mages and psions can use scry, but myself as a thief cannot. So to overcome this problem, we've decided to try and write a remote scrying script. This is hard to me because it involves one party scrying and capturing all the lines of the room description and converting it to a tell to me or another clan member.
Basically I send them a tell saying "Scry (%w)", I can take care of the checks to make sure it is one of our clannies and not someone else. That triggers them to scry the person. How can I make it so they capture the text after the scry, then send it in a tell to me?
Any help on the matter would be greatly appreciated. |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Fri Jun 07, 2002 5:04 am |
weeeelll, we are gonna need some sample output from the scry command. Also we need to know how many characters a tell can hold.
|
|
|
|
Balin Newbie
Joined: 07 Jun 2002 Posts: 5 Location: USA
|
Posted: Fri Jun 07, 2002 5:50 am |
You focus upon Balin, and are able to view his surroundings: <-start capture
room text here
for a few
more lines
> <-end capture
I need everything from teh start to end stored as variables somehow so I can send them as tells, unless there is some other way. |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Fri Jun 07, 2002 6:55 am |
#TR {(%w) tells you, 'Scry (%w)'} {#IF (%1=@clannie) {#T+ scrycap;scry %2;#TEMP {$} {#T- scrycap;tell %1 @scryvar}}}
#TR {*} {#ADD scryvar %line} scrycap
This will capture everything into a variable(@scryvar) until it hits a blank line. So if you are wanting exits, and there is a blank line between the exits and the room desc, then its not going to capture the variable. You will also need the person scrying to set up a @clannies string variable with everyone he wants to allow to use it.You can thank Kjata for revealing the neat trick with #TEMP
Hope that helps ya :) |
|
|
|
Balin Newbie
Joined: 07 Jun 2002 Posts: 5 Location: USA
|
Posted: Fri Jun 07, 2002 7:37 am |
Ok, with a little tinkering I got that working right for my scrier. Now is there a way to capture up until the next ">"?
It would make it MUCH more effective.
Thanks again.
-Balin |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Fri Jun 07, 2002 8:58 am |
#TR {(%w) tells you, 'Scry (%w)'} {#IF (%1=@clannie) {#T+ scrycap;scry %2;#TEMP {~>} {#T- scrycap;tell %1 @scryvar}}}
|
|
|
|
|
|