[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Bargain Deals!

Bargain Deals!

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zendu   (66 posts)  [Biography] bio
Date Wed 11 Feb 2004 10:53 AM (UTC)
Message
First off i like to shop and all, but i hate reading EVERY line of text, therefore im looking into making something like this.



example!

365) A prickly pear "pear199233" : 30gp
(166) A sileris berry "sileris199851" : 20gp
(311) A skullcap flower "skullcap200111" : 35gp

trigger

a (prickly pear|sileris berry|skullcap flower) "*" :*gp


then it runs through the list and sees that sileris is usually 25 so it does a Worldnote sileris is cheap @ 20gp.



Okay so this is overly complicated(VERY) but you have to admit it whould be cool. The largest problem i can see is it will have more than 10 wildcards at most stores

God im helpless
Currently using MushClient 3.46 on Win Xp pro on [url=www.aetolia.com]Aetolia[/url]
[Go to top] top

Posted by Gore   (207 posts)  [Biography] bio
Date Reply #1 on Wed 11 Feb 2004 05:33 PM (UTC)
Message
Well, I think you said you played Aetolia, (which isn't updated too much at all) but in Achaea you can simply do WARES PLANT, or wares (whatever) to see what all of a certain type of thing in a shop is.

I can help you with this type of script I think, but you'll have to explain what you need a bit more in detail.
[Go to top] top

Posted by Zendu   (66 posts)  [Biography] bio
Date Reply #2 on Wed 11 Feb 2004 10:41 PM (UTC)
Message
Ok here is a extened shop:

(301) A bloodroot leaf "bloodroot72851" : 55gp
(379) Some prickly ash bark "ash119397" : 25gp
(320) Some bayberry bark "bayberry176315" : 15gp
(370) A bellwort flower "bellwort183680" : 20gp
(379) A black cohosh root "cohosh190813" : 35gp
(390) Slippery elm "elm192047" : 15gp
(347) An echinacea root "echinacea192050" : 10gp
(325) A ginseng root "ginseng194807" : 10gp
(288) A goldenseal root "goldenseal195813" : 20gp
(350) A hawthorn berry "hawthorn196178" : 15gp
(320) A piece of kelp "kelp196622" : 15gp
(327) A kola nut "kola197227" : 50gp
(350) A lobelia seed "lobelia197694" : 15gp
(365) A prickly pear "pear199233" : 30gp
(166) A sileris berry "sileris199851" : 20gp
(311) A skullcap flower "skullcap200111" : 35gp



And here is my rough estimates of the prices:

Lobelia 15 bloodroot 50-55
cohosh 35 ginsing 10
ash 25 ench 10
elm 15 hawthorn 12
bellwort 20 bayberry 15
hawthorn 15 kelp 15
sileris 15-20 valerian 90
goldenseal 15 skullcap 30
cohosh 30-35 pear 30
kola 50
moss 65-80



So the goal is for it to see, the first one on the list, and see that its 55, and the price could be 50, so it doesnt say anything.

It then runs down the line, to see that Enchinacea and Ginsing are at the low cost. So it sends me a world.note saying ginsing,enchiacea, etc etc, are cheap.


What else do you need? I looked and could find no command like wares plant

God im helpless
Currently using MushClient 3.46 on Win Xp pro on [url=www.aetolia.com]Aetolia[/url]
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 12 Feb 2004 01:11 AM (UTC)
Message
Quote:

a (prickly pear|sileris berry|skullcap flower) "*" :*gp
...

Okay so this is overly complicated(VERY) but you have to admit it whould be cool. The largest problem i can see is it will have more than 10 wildcards at most stores


First, your example only uses 3 wildcards - although you are mixing regular expressions and not here. Assuming you want to "or" things together the trigger should be something like ...


^\(\d+\)(?:A|Some| )?(prickly pear|sileris berry|skullcap flower) (".*") : (\d+)gp$


My example only has 4 wildcards:


  1. The initial number in brackets
  2. The type of thing (eg. prickly pear)
  3. Its actual name (eg. pear199233)
  4. Its price (eg. 30 gp)


Even if you have dozens of things with "|" between them in the list, it still only counts as 4 wildcards.

In any case, the simpler thing would be to not bother enumerating them, so do this instead:


^\(\d+\)(?:A|Some| )?(.*) (".*") : (\d+)gp$



Then in your script you do a "select case" matching on the names you know of, and comparing the name to the price you thing is reasonable.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #4 on Mon 16 Feb 2004 11:38 PM (UTC)
Message
Or you could make a loop and have a two-dimensional array containing name and suggested price, so you could check each name and the price, and buy whatever you like. That is easily extensible and easier to code... I could elaborate on this if you decide to do it this way.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,786 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]