|
Noodles Beginner
Joined: 03 Mar 2004 Posts: 12 Location: USA
|
Posted: Wed Mar 17, 2004 2:19 pm
Confused again :) |
Been a few days since my last question, but thats because of the great help I got. Many many thanks. However I am stumped again.
I am looking to pickup a list of items on the ground. The list can vary from 1-6 items, out of possibly thousands. Anyways, no big deal you think, here is where I am stuck.
On the ground before you lies: <---- first line / items on 2nd line
a stick, a book, trash, etc, etc, lalala. <-- keep in mind it is not always 6 items.
Now the only thing I can think of, is using maybe the fact that the line with the items, is colored [1,36m I believe thats light blue whatever you want to call it. I tried the method a few threads down, to specify 2 lines, but its not working:
#TR {On the ground before you lies:$[1,36m(*),(*),(*),(*),(*),(*)} {pickup %1, pickup %2...... so on
I also toyed with capturing/gag'n the on the ground line, sending the next line to a diff window, and tryin to snag it from there. Or maybe gag'n/substituting perhaps and FORCING the 1st line to appear infront of the 2nd line. Of course they failed, and I am frustrated.
Any help would be appreciated as always :) Hopefully something to this nature can be accomplished. Noodles =) |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Wed Mar 17, 2004 3:23 pm |
#trigger {On the ground before you lies:} {}
#COND {(*)} {#loop %numwords("%1",",") {pickup %word("%1",%i,",")}} {within|param=1} |
|
|
|
Noodles Beginner
Joined: 03 Mar 2004 Posts: 12 Location: USA
|
Posted: Thu Mar 18, 2004 1:19 am |
Thanks for the response Danlo, but it didn't work =( I tinkered with it a bit and still no go. Below is an exact capture I recieve when I look at the area I am in...
You're on the steps of a police station.
Compass: (-2E : 6N)
north - Open street.
south - Police Station.
east - Sidewalk continues.
west - Sidewalk continues.
On the ground before you lies:
[1;36mA gum-wrapper, A gum-wrapper, An old-newspaper, A broken bottle, A bottle cap, An orange-peel. [0m
I'd like to #TR On the ground before you lies: and pickup each of the items on the next line. Sometimes, that list of items itself falls onto a 2nd line like I tried to show above.
The item lines appear in this format if it is possible to just manage a way to trigger off of the color; this is the only type of line in the entire game that begins and ends with that color.
[1;36mA bottle-cap. [0m
I had managed to get it to actually trigger on the items line earlier today, but when it ran the pickup %1 line, even using the exact name, it could not find the item. Being the noob I am I didn't save that line to post here, maybe it just needed a tweak. In anycase, I hope this post explains moreso then my first post, it was early and I was full of energy ready to attack this problem.
Once again thanks for looking,helping,offering suggestions :)
Noodles
PS! Something just hit me as I re-read this. The items all list as "an orange-peel" or "a newspaper" prefix'n the item name with A and AN. The actual pickup command doesn't work if you type pickup a newpaper etc. So those have to be chopped off... lol.. This all sounds complicated to me but I keep hammering away at it. I'm sure one of you is laughin at the simplicity :) Ill keep reading help files/ and searching for forums for similiar ideas as I wait eagerly :D |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Mar 18, 2004 3:33 am |
Try it the easy way first.
#TR {On the ground before you lies} {get all}
Otherwise, use linecolor.
#TR {(*)} {#VAR pickup {%replace( %replace( "%1", ",", ""), " ", "|")};#FORALL @pickup {pickup %i}} {} {line=11}
You might want to include an apology. Sooner, not later, you're bound to grab somebody else's stuff right out from under them. Don't be surprised when it turns out they don't like it. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Thu Mar 18, 2004 10:31 am |
Hm, I don't understand. The items come on the line straight after you receive, On the ground before you lies:. You don't need to activate off color, just use a multiline trigger to capture the following line after the pattern.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Mar 18, 2004 7:14 pm |
A line-color trigger seems likely to actually be easier in this one instance than a multi-line trigger would be. Noodles has stated that the list of items may exceed a single line and hasn't given any indication of what would follow the list. He also seems determined to have a trigger that uses color.
It's not worth arguing over. Either method should work. |
|
|
|
Noodles Beginner
Joined: 03 Mar 2004 Posts: 12 Location: USA
|
Posted: Thu Mar 18, 2004 8:16 pm |
Many thanks for the help guys. It is almost working perfectly now :)
I am still playing with removing the prefixed "A" or "An" from each item, but all in all it's working great :)
As to what comes after the list, it ends in a period and the next line would be either a list of npc's there with you, or a prompt if there is no one with you. But that is no biggie, color trigger works perfect.
My fingers write a Thankyou in the air, it is much easier on me to hit 1 key to clean up the ground then to hit 1-6 different macro keys in each room that try to pickup 6-10 different named items; half of which aren't on the ground :)
Noodles
/salute! |
|
|
|
|
|
|
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
|
|