|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Mon Jul 21, 2003 1:36 am
Im stuck... |
I want to make a script that will automatically capture everything I am wearing so I can cycle through them and appraise them all.
When I type INV I get this
You are holding a tuft of grass in your right hand and a tuft of grass in your left hand.
You are wearing a spear, a leather sheath, an ornate scabbard, a waermodi gwethdesuan, a dagger sheath, an herb pouch, a hip pouch, a shoulder sack shabbily embroidered with a donkey pattern in brass-colored thread, a sturdy black backpack, a scuffed hide coat, some brown goatskin pants, a dented iron ring, a lasmodi gwethdesuan, a fine silver chain, some mail gloves, a tiny wooden tree pin, a crocodile-skin belt, a snarled golden gremlin mask, and a heavy crossbow.
INVENTORY HELP for more options
I want to capture from you are wearing.....up to the period before inventory help....
That part I can do but I want to capture each one individually and I only need the word that comes before the comma....
So I want to capture for example, belt, mask, crossbow. etc
My inv is changing as I play so the script will have to capture the word before the , then move to the next one. And keep going until it hits a period. Maybe saving these in a database or word list. When they are all captured I can then start an alias called app to go through the list and appraise them all.
So here it is....
When I type INV (anytime) it will save my inventory.
Then I can start a script with APP that will appraise it all
When it appraises something I get roundtime that I must wait for and this is what I usually do for waiting roundtime
Roundtime: %1
#VAR RT %1
#MATH RT @RT*1000
#WA @RT
Any help would be great |
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Mon Jul 21, 2003 2:08 am |
Ok, I made a "basic" version. It does what I want but it doesn't get the list for me or calculate Roundtime
#VAR temp 1
#VAR max %numitems( @appitems)
#While (@temp <> @max) {
remove my %item( @appitems, @temp)
Appraise my %item( @appitems, @temp) quick
#WA 6000
Wear my %item( @appitems, @temp)
#MATH temp @temp+1
#WA 2000
}
app
This is an alias. I stored everything I am wearing into a variable, @appitems.
Now what I want to be able todo is type INV, have it make the list in the variable for me. The calculating of the roundtimes isn't TOO important but it would be nice. I can do that by myself. I guess the big thing is just getting the list from what I am wearing |
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Mon Jul 21, 2003 3:54 pm |
*RobMacAF walks over and hits this post with his elbow*
.....shameless bump |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jul 21, 2003 5:20 pm |
#TR {You are wearing (*).} {#VAR inventory %replace( "%1", ", ", "|");ShortenInventory}
#AL ShortenInventory {#LOOP 1,%numitems( @inventory) {#VAR inventory %replaceitem( %word( %item( @inventory, %i), %numwords( %item( @inventory, %i))), %i, @inventory)}} |
|
|
|
Anabasis Wanderer
Joined: 26 Jan 2001 Posts: 74
|
Posted: Mon Jul 21, 2003 7:33 pm |
Just tested it in game, and that works fine for what was requested.
Unfortunately, it does have limitations in DR, as some items don't have their noun as the last word before the comma (i.e. a simple deep black robe belted with a length of knotted leather). I'd estimate that this will still work about 75% of the time though.
Ana |
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Mon Jul 21, 2003 8:38 pm |
quote: Originally posted by Anabasis
(i.e. a simple deep black robe belted with a length of knotted leather).
I WANT ONE! Heck! I want anything with a description like that! |
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Sun Sep 26, 2004 9:08 pm Revisiting |
Ok, I wanted to update this a bit.
Its been a while since I have tried to update this and now its about time. The script still works a great percentage of the time but I want to see if it can be adapted to use the stuff in my backpack as well....
In the normal view, this is what is inside my backpack....
In the grey backpack you see some waermodi stones, a set of colorful balls, a ruined goblin skin with a few fleas on it, a master's iron lockpick, a bastard sword, a medium rose quartz, a medium aquamarine gem, a hog hoof, a yelith root, some georin grass, a cracked bottle, some reinforced gloves, some bundling rope, a grimy marble pestle, a jadice flower, some barbed arrows, a leather bank book, a hide scraper and a mud-stained brass chest.
When I try to use the list script above I get this....
waermodi stones|a set of colorful balls|a ruined goblin skin with a few fleas on it|a master's iron lockpick|a bastard sword|a medium rose quartz|a medium aquamarine gem|a hog hoof|a yelith root|some georin grass|a cracked bottle|some reinforced gloves|some bundling rope|a grimy marble pestle|a jadice flower|some barbed arrows|a leather bank book|a hide scraper and a mud-stained brass chest
The problem with this is I pretty much need to shorten it so it is only the first word before the |
stones|balls|lockpick|sword|quartz|gem|hoof|root|grass|bottle|gloves|rope|pestle|flower|arrows|book|scraper|chest
If you also look I need it to add a | where and is. So it would be hide scraper|a mud-stained brass chest, etc. So then that can be shortened even more to the above thing.
ANy help on this would be greatly appreciated |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 27, 2004 4:26 am |
A minor change to the trigger phrase, change the variable and alias names if desired, and add another replace function.
%replace( @pack, " and ", "|")
#TR {In the grey backpack you see (*).} {#VAR pack %replace( "%1", ", ", "|");#VAR pack %replace( @pack, " and ", "|");ShortenPack}
#AL ShortenPack {#LOOP 1,%numitems( @pack) {#VAR pack %replaceitem( %word( %item( @pack, %i), %numwords( %item( @pack, %i))), %i, @pack)}} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
|
|
|
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
|
|