|
yull26m Beginner
Joined: 05 Jan 2010 Posts: 26
|
Posted: Tue Oct 25, 2011 9:35 pm
need help with multiple numbers pattern trigger |
You look at a cargo information board...
Cured Meats 21.00 53.34 39.90 44.94 47.25 65.31 44.31 52.29 57.12
All prices in platinum per crate, and are current within the last hour.
ok, this is somewhat I see when I look board in my guildhall, figured only need for one line since the other 8 lines look the same only with different name at beginning. and I only want a trigger for each line that checks to see if it has changed,
example: Cured Meats 21.00 53.34 39.90 44.94 47.25 65.31 44.31 52.29 57.12
I only need to see if 00 has changed in 21.00. basically the one that end in .00 are the prices of those docks and I need to see if they change. I have wrote the following trigger to see if it works and for some reason it does not:
#TRIGGER {Cured Meats (%a).(%b) (%c).(%d) (%f).(%g) (%h).(%i) (%j).(%k) (%l).(%m) (%N).(%o) (%p).(%q) (%rN).(%s)} {@FLANN = %2;#IF {@FLANN = 00} {} {#SA FLANN PRICES HAVE CHANGED}}
have also tried:
#TRIGGER {Cured Meats (%a).(%b) (%c).(%d) (%f).(%g) (%h).(%i) (%j).(%k) (%l).(%m) (%N).(%o) (%p).(%q) (%rN).(%s)} {@FLANN = %2;#IF {@FLANN = 0} {} {#SA FLANN PRICES HAVE CHANGED}}
and still does not work. I want it where when the price changes from 21.00 to 21.01 I will get a #sa on screen telling me. I know this should be a simple trigger and I am prolly trying to hard and over doing it abit, but if someone could pls help me I would much appreciate it. I have a trigger set to turn the folder on when (You look at a cargo information board) appears on screen and a trigger to turn folder off when (All prices in platinum per crate, and are current within the last hour) comes on screen and an alias #alias cargo {#timer 3 {l board} 3 3;#ts} just need help on rest of it. am using zmud 7.21
if anyone can help me out with this line, I can pretty much look at what I did wrong and figure the other 8 lines out. |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Wed Oct 26, 2011 4:09 pm |
#TRIGGER {Cured Meats %d.(%d)} {#IF (%1 != 0) {#SA FLANN PRICES HAVE CHANGED}}
|
|
_________________ Taz :) |
|
|
|
hogarius Adept
Joined: 29 Jan 2003 Posts: 221 Location: islands.genesismuds.org
|
|
|
|
yull26m Beginner
Joined: 05 Jan 2010 Posts: 26
|
Posted: Fri Oct 28, 2011 9:49 pm |
thank you for the replies but there is a problem, when I type look board I get this on my screen:
Cured Meats 21.00 53.34 39.90 44.94 47.25 65.31 44.31 52.29 57.12
Exotic Foods 58.42 23.00 65.78 40.94 54.05 59.11 63.25 68.08 46.23
Pine Pitch 38.00 57.20 20.00 49.20 54.20 58.00 35.80 37.00 59.40
Elven Wines 59.92 49.84 68.88 28.00 76.44 80.36 81.20 69.16 66.92
Bulk Lumber 40.50 42.30 48.78 49.14 18.00 55.44 40.32 45.72 36.54
BlackSteel Ingots 68.42 56.54 63.80 63.14 67.76 21.00 53.46 60.72 69.08
Bulk Coal 40.09 52.25 34.01 55.10 42.56 46.17 19.00 43.89 51.49
Silk Cloth 64.74 76.96 48.10 64.06 66.04 71.76 60.06 26.00 65.52
Copper Ingots 65.28 48.24 71.28 57.36 48.72 75.36 65.04 60.48 24.00
and I have to take into account every number listed on each line but only 2 sets of numbers per line are of interest to me. cured meats I need the number after the decimal in 21.00 only the 00 matters. for exotic foods only the 23.00 and again only the 00 matters. in the next line, pine pitch only the 20.00 with only the 00 matters. elven wines, only the 28.00 and again only the 00. for bulk lumber only the 18.00, for blacksteel ingots only the 21.00 for bulk coal only the 19.00 for silk cloth only the 26.00 and for copper ingots only the 24.00. so as you see it is a different set of numbers going downwards in a diagonal direction from top left to bottom right that I need the script to pay attention to. if bulk coal changes from 19.00 to 19.38 I want a trigger that tells me the price for bulk coal has changed. |
|
|
|
yull26m Beginner
Joined: 05 Jan 2010 Posts: 26
|
Posted: Fri Oct 28, 2011 9:49 pm sorry, could not erase this accidental post |
sorry, could not erase this accidental post
|
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sat Oct 29, 2011 2:36 am |
Code: |
#VAR StoreList "Cured Meats|Exotic Foods|Pine Pitch|Elven Wines|Bulk Lumber|BlackSteel Ingots|Bulk Coal|Silk Cloth|Copper Ingots"
#TRIGGER {({@StoreList}) %d.(%d) %d.(%d) %d.(%d) %d.(%d) %d.(%d) %d.(%d) %d.(%d) %d.(%d) %d.(%d)} {#IF (%1="Cured Meats" AND %2!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Exotic Foods" AND %3!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Pine Pitch" AND %4!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Elven Wines" AND %5!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Bulk Lumber" AND %6!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="BlackSteel Ingots" AND %7!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Bulk Coal" AND %8!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Silk Cloth" AND %9!=00) {#SAY FLANN PRICES HAVE CHANGED!};#IF (%1="Copper Ingots" AND %10!=00) {#SAY FLANN PRICES HAVE CHANGED!}} |
Since it's not CMUD, it looks a bit messy, and someone might be able to tidy it up a bit, but there you go. |
|
|
|
|
|