Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Wed Dec 10, 2003 11:49 pm   

Medievia Trade Valuer Newer Version
 
This version includes all the corrected bugs from the last one
Also changed the way prices were stored to be able show how many of
an item fit into a covered on the display. This has its own column now
next to the good's name, in bold blue. Also fixed cpms and values, previous
version didn't subtract the initial cost to compute your profit.

Credit for CPM data: Straight from carabas script(cpm work by Ichelo) I wrote a little
script to count the moves between interesections/tradeposts to see if maybe the values
have changed since that script was written, did like 4 major intersections to and from a few tps and they came up dead on to the values in caraba's script, so i didnt see the
need to continue :) (It's very very boring :P)

I'd suggest just deleting the ztrader class before installing this one
Code:
#CLASS {ZTrader}
#CLASS 0

#CLASS {ZTrader|Commands|User}
    #ALIAS ztval  {#IF (%1) {#SHOW ZTRADER SELECTIVE VALUING NOT YET IMPLEMENTED} {ztvalall}}
    #ALIAS ztshow {#IF (%1) {#IF (%isnumber(%1)) {ztdShowVal %1} {ztdShowPost %1}} {ztdShowAll}}
    #ALIAS ztchat {#IF (%1) {#IF (%isnumber(%1)) {ztdChatVal %1} {ztdChatPost %1}} {ztdChatAll}}
#CLASS 0

#CLASS {ZTrader|Commands|Display}

    #ALIAS ztdShowAll  {ztdCreateAll;#SHOW @ztdChatLine}
    #ALIAS ztdShowVal  {ztdCheckVal %1}
    #ALIAS ztdShowPost {ztdFindPost %1}
    #ALIAS ztdChatAll  {ztdCreateAll;#EMOTEALL @ztdChatLine}
    #ALIAS ztdChatVal  {ztdChatCheckVal %1}
    #ALIAS ztdChatPost {ztdChatFindPost %1}

    #ALIAS ztdCreateAll  {ztvposts      = @ztposts
                          ztdTitle      = @ztdAllTitle
                          ztdChatLine   = %concat(%char(10),@ztdTitle)
                          ztdChatLine   = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine   = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {ztdCreateLine %i %j}}}
   
    #ALIAS ztdCreatePost {ztdTitle      = @ztdPostTitle
                          ztdChatLine   = %concat(%char(10),@ztdTitle)
                          ztdChatLine   = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine   = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {ztdCreateLine %i %j}}}
   
    #ALIAS ztdCreateVal  {ztvposts     = @ztposts
                          ztdValDisplay = %format("&0.0n",%1.3)
                          ztdTitle      = @ztdValTitle
                          ztdChatLine   = %concat(%char(10),@ztdTitle)
                          ztdChatLine   = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine   = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {#IF (@%j.3>%1) {ztdCreateLine %i %j}}}}
                         
                         
    #VARIABLE ztdLine       {""} {""}
    #VARIABLE ztdChatLine   {""} {""}
    #VARIABLE ztdValDisplay {""} {""}
   
    #ALIAS ztdFindPost {ztvposts = %null;#FORALL @ztposts {#IF (%pos(%lower(%1),%i)) {ztvposts = %i}};#IF (@ztvposts) {ztdCreatePost;#SHOW @ztdChatLine} {ztdErrorPostFind %1}}
    #ALIAS ztdChatFindPost {ztvposts = %null;#FORALL @ztposts {#IF (%pos(%lower(%1),%i)) {ztvposts = %i}};#IF (@ztvposts) {ztdCreatePost;#EMOTEALL @ztdChatLine} {ztdErrorPostFind %1}}
    #ALIAS ztdCheckVal {#IF (%1 < 100000) {ztdErrorSmallVal} {ztdCreateVal %1;#SHOW @ztdChatLine}}
    #ALIAS ztdChatCheckVal {#IF (%1 < 100000) {ztdErrorSmallVal} {ztdCreateVal %1;#EMOTEALL @ztdChatLine}}
   
   
    #ALIAS ztdCreateLine {ztdLine = %concat(@CaebColor(bold,black),~()
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,cyan),@ztdCreateTp(%1))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,magenta),@ztdCreateGood(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(blue),@ztdCreateHold(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,white),@ztdCreateValue(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,red),@ztdCreateCpm(%2,%1))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,black)))
                          ztdChatLine = %concat(@ztdChatLine,@ztdLine,%char(10))}
   
    #FUNCTION ztdCreateHold  {@ztdCreateSpaces(%format("&0.0n",@%1.2), 4)}
    #FUNCTION ztdCreateGood  {@ztdCreateSpaces(%1,12,1)}
    #FUNCTION ztdCreateValue {@ztdCreateSpaces(%literal(%format("&0.0n",@%1.3)),11)}
    #FUNCTION ztdCreateCpm   {@ztdCreateSpaces(%eval(@%1.3/%item(@ztvcpmpost,%ismember(%2,@ztposts))),%eval(%len(%stripansi(@ztdTitle)) - 44))}
    #FUNCTION ztdCreateTp    {@ztdCreateSpaces(%item(@ztfancypost, %ismember(%1,@ztposts)),15,1)}
   
    #FUNCTION ztdCreateSpaces {%if(%3,%1%repeat(" ",%2-%len(%1)),%repeat(" ",%2-%len(%1))%1)}
   
    #VARIABLE ztdTitle     {""} {""}
    #FUNCTION ztdAllTitle  {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.2@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) Showing all valued items to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
    #FUNCTION ztdPostTitle {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.2@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values from @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvposts,@ztposts)) @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
    #FUNCTION ztdValTitle  {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.2@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values over @CaebColor(bold,white)@ztdValDisplay @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}

    #ALIAS ztdErrorPostFind {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.2@CaebColor(bold,blue))@CaebColor(bold,cyan): @CaebColor(bold,red)Error @CaebColor(bold,green)could not find any posts containing substring @CaebColor(bold,white)%1@CaebColor(bold,green).}
    #ALIAS ztdErrorSmallVal {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.2@CaebColor(bold,blue))@CaebColor(bold,cyan): @CaebColor(bold,red)Error @CaebColor(bold,green)searching for values less then 100,000 is not supported.}
#CLASS 0

#CLASS {ZTrader|Commands|Valuing}
    #ALIAS ztvalue    {ztvcurgood = %-1;value %-1}
    #ALIAS ztvalall {ztvreset;ztvposts = @ztposts;ztvcurpost = 1;ztvcuritem = 0;ztvfindpost}
    #ALIAS ztvreset     {#FORALL @ztposts {#FORALL @%i {#CLASS {ZTrader|Data|GoodsValue};@%j = %replaceitem("DID NOT VALUE",3,@%j);#CLASS 0}}}
    #ALIAS ztvfindpost  {#T+ {ZTrader|Triggers|Valuing|Tradeposts};look}
    #ALIAS ztvpostfound {#T- {ZTrader|Triggers|Valuing|Tradeposts};ztvgettime}
    #ALIAS ztvgettime   {#T+ {ZTrader|Triggers|Valuing|Time};ztvtimefound}
    #ALIAS ztvtimefound {#T- {ZTrader|Triggers|Valuing|Time};#T+ {ZTrader|Triggers|Valuing|Value};ztvdovaluing}
    #ALIAS ztvdovaluing {ztvcuritem = %eval(@ztvcuritem + 1);#IF (@ztvcuritem > %numitems(%eval(@%item(@ztvposts,@ztvcurpost)))) {ztvnextpost} {ztvalue %item(%eval(@%item(@ztvposts, @ztvcurpost)),@ztvcuritem)}}
    #ALIAS ztvnextpost  {ztvcuritem = 0;ztvcurpost = %eval(@ztvcurpost + 1);#IF (@ztvcurpost > %numitems(@ztvposts)) {ztvvaldone} {ztvdovaluing}}
    #ALIAS ztvvaldone   {#SHOW Done Valuing;#T- {ZTrader|Triggers|Valuing|Value}}
    #VARIABLE ztvposts       {""}
    #VARIABLE ztvcurpost     {""}
    #VARIABLE ztvcuritem     {""}
    #VARIABLE ztvvalpost     {""}
    #VARIABLE ztvtime        {""}
    #VARIABLE ztvcpmpost     {""}
    #VARIABLE ztvcurgood     {""}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Value} {disable}
#VARIABLE tmphold {0}
#VARIABLE tmpprice {0}
#TRIGGER {We will pay you (%d) gold for each %w} {tmphold = %eval(@%eval(@ztvcurgood).2);tmpprice = %eval(@%eval(@ztvcurgood).1);#CLASS {ZTrader|Data|GoodsValue};#VARIABLE {@ztvcurgood} {%replaceitem(%eval((%1 * @tmphold) - (@tmpprice * @tmphold)),3,%eval(@%eval(@ztvcurgood))};#CLASS 0;ztvdovaluing}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Time} {disable}
    #TRIGGER {The current system time is %w %w %d (*) %d} {ztvtime = %1;ztvtimefound}
#CLASS 0

#CLASS {Ztrader|Triggers|Valuing|Tradeposts} {disable}
    #TRIGGER {Hidden City}                          {ztvcpmpost = @mvsena;ztvvalpost = "enatdae";ztvpostfound}
    #TRIGGER {A Minotaur Trading Outpost}           {ztvcpmpost = @mvsnae;ztvvalpost = "naeramae";ztvpostfound}
    #TRIGGER {A Quiet Temple Shop}                  {ztvcpmpost = @mvselw;ztvvalpost = "elwyn";ztvpostfound}
    #TRIGGER {A Ranger's Cabin}                     {ztvcpmpost = @mvsran;ztvvalpost = "rangerscabin";ztvpostfound}
    #TRIGGER {An Elven Marketplace}                 {ztvcpmpost = @mvsath;ztvvalpost = "athelasea";ztvpostfound}
    #TRIGGER {DeRah Villadom's Small Trading Post}  {ztvcpmpost = @mvsder;ztvvalpost = "derahvilladom";ztvpostfound}
    #TRIGGER {Hidden Valley Traders, Inc.}          {ztvcpmpost = @mvsrue;ztvvalpost = "ruellia";ztvpostfound}
    #TRIGGER {Medievia Trading Shop}                {ztvcpmpost = @mvsmed;ztvvalpost = "medievia";ztvpostfound}
    #TRIGGER {New Ashton Trading Post}              {ztvcpmpost = @mvsash;ztvvalpost = "newashton";ztvpostfound}
    #TRIGGER {Riverton Trading Partners}            {ztvcpmpost = @mvsriv;ztvvalpost = "riverton";ztvpostfound}
    #TRIGGER {Sea's End Direct Merchants}           {ztvcpmpost = @mvssea;ztvvalpost = "seasend";ztvpostfound}
    #TRIGGER {Tanivsport Traders}                   {ztvcpmpost = @mvsmys;ztvvalpost = "mystara";ztvpostfound}
    #TRIGGER {The Lizard Boulangere}                {ztvcpmpost = @mvslyr;ztvvalpost = "lyryanoth";ztvpostfound}
    #TRIGGER {The Trading Post of G'dangus}         {ztvcpmpost = @mvsgda;ztvvalpost = "gdangus";ztvpostfound}
    #TRIGGER {Trading Post of the City of Karlisna} {ztvcpmpost = @mvsgda;ztvvalpost = "karlisna";ztvpostfound}
    #TRIGGER {Trading Post of the Dark Army}        {ztvcpmpost = @mvsgen;ztvvalpost = "newgenesia";ztvpostfound}
    #TRIGGER {Trading Shop of Trellor City}         {ztvcpmpost = @mvstre;ztvvalpost = "trellor";ztvpostfound}
    #TRIGGER {Ur-vile Feeding Hall}                 {ztvcpmpost = @mvsurv;ztvvalpost = "urvile";ztvpostfound}
    #TRIGGER {Vanlarra Imports and Exports}         {ztvcpmpost = @mvsvan;ztvvalpost = "vanlarra";ztvpostfound}
#CLASS 0

#CLASS {ZTrader|Data|UserOptions}
    #VARIABLE ztvalgag {0}
#CLASS 0

#CLASS {ZTrader|Data|TradePosts} {enable}
    #VARIABLE ztposts     {medievia|trellor|enatdae|naeramae|elwyn|rangerscabin|athelasea|derahvilladom|ruellia|newashton|riverton|seasend|mystara|lyryanoth|gdangus|karlisna|newgenesia|vanlarra|urvile}
    #VARIABLE ztfancypost {Medievia|Trellor|E'nat'dae|NaeraMae|Elwyn|Ranger's Cabin|Athelasea|DeRah Villadom|Ruellia|NewAshton|Riverton|Sea's End|Mystara|Lyryanoth|Gdangus|Karlisna|NewGenesia|Vanlarra|Ur-Vile}
#CLASS 0

#CLASS {ZTrader|Data|TpGoods} {enable}
    #VARIABLE urvile        {""}
    #VARIABLE derahvilladom {artifacts|candles|herbs|nuts|hemp}
    #VARIABLE gdangus       {bananas|seed|beans|rice|tobacco}
    #VARIABLE enatdae       {quilts|silk|fans|silkworms|illutian}
    #VARIABLE karlisna      {books|cloth|spices|beer|dates}
    #VARIABLE lyryanoth     {venom|eggs|hides|glowworms|mushrooms}
    #VARIABLE mystara       {pearls|teak|carpet|maps|fish}
    #VARIABLE newashton     {silver|jewels|silicate|nails|copper}
    #VARIABLE newgenesia    {tools|adamantite|coal|opium|iron}
    #VARIABLE riverton      {brandy|metals|honey|grapes|fertilizer}
    #VARIABLE ruellia       {emeralds|willowbark|cloaks|rope|waybread}
    #VARIABLE seasend       {opals|ambergris|shells|nets|kelp}
    #VARIABLE vanlarra      {wands|crystal|rum|figs|molasses}
    #VARIABLE athelasea     {flowers|arrows|bows|art|parchment}
    #VARIABLE naeramae      {armor|chains|mead|pelts|weapons}
    #VARIABLE elwyn         {aloe|quills|balm}
    #VARIABLE rangerscabin  {sap|furs|timber|rations|ivory}
    #VARIABLE medievia      {ale|tar|salt|sugar|raisins}
    #VARIABLE trellor       {perfume|wine|oils|incense|ink}
#CLASS 0                     
                             
#CLASS {ZTrader|Data|TpMoves}

#VARIABLE {mvsmed} {1|1269|308|NA|594|302|221|1072|998|781|572|1616|575|1179|1330|1246|657|786|NA}
#VARIABLE {mvsder} {1072|2264|862|NA|1295|1348|1225|1|1912|1785|1624|2662|1627|1880|2376|2292|1571|1838|NA}
#VARIABLE {mvselw} {594|1786|418|NA|1|870|747|1295|1434|1307|1146|2184|1149|655|1898|1814|1093|1336|NA}
#VARIABLE {mvsgda} {1330|1562|1612|NA|1898|1061|1262|2376|2308|1666|1197|672|1380|2483|1|863|1967|1423|NA}
#VARIABLE {mvslyr} {1179|2371|1003|NA|655|1455|1332|1880|2019|1892|1731|2768|1734|1|2183|2399|1678|1921|NA}
#VARIABLE {mvsnae} {NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA}                       
#VARIABLE {mvsmys} {575|1824|863|NA|1149|743|776|1627|1553|1336|307|1666|1|1734|1380|1256|1212|281|NA}
#VARIABLE {mvsash} {781|494|1021|NA|1307|1063|668|1785|1537|1|1333|1952|1336|1892|1666|752|1196|1547|NA}
#VARIABLE {mvsran} {302|1551|584|NA|870|1|503|1348|1280|1063|740|1347|743|1455|1061|976|939|958|NA}
#VARIABLE {mvsriv} {572|1821|860|NA|1146|740|773|1624|1550|1333|1|1483|307|1731|1197|1112|1209|518|NA}
#VARIABLE {mvsrue} {998|2169|1148|NA|1434|1280|1111|1912|1|1537|1550|2594|1553|2019|2308|2136|399|1764|NA}
#VARIABLE {mvssea} {1616|1774|1898|NA|2184|1347|1548|2662|2594|1952|1483|1|1666|2768|672|1149|2253|1709|NA}
#VARIABLE {mvsvan} {786|2035|1059|NA|1336|958|987|1838|1764|1547|518|1709|281|1921|1423|1338|1423|1|NA}
#VARIABLE {mvskar} {1246|1349|1528|NA|1814|976|1176|2292|2136|752|1112|1149|1256|2399|863|1|1795|1338|NA}
#VARIABLE {mvstre} {1269|1|1500|NA|1786|1551|1160|2264|2169|494|1821|1774|1824|2371|1562|1349|1500|2035|NA}
#VARIABLE {mvsath} {221|1160|461|NA|747|503|1|1225|1111|668|773|1548|776|1332|1262|1176|770|987|NA}
#VARIABLE {mvsena} {308|1500|1|NA|418|584|461|862|1148|1021|860|1898|863|1003|1612|1528|807|1059|NA}
#VARIABLE {mvsgen} {657|1500|807|NA|1093|939|770|1571|399|1196|1209|2253|1212|1678|1967|1795|1|1423|NA}
#VARIABLE {mvsurv} {NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA}
   
#CLASS 0

#CLASS {ZTrader|Data|GoodsValue}
;;New Storage format for each item is a list
;;item.1 = cost to buy 1
;;item.2 = amount a covered holds
;;item.3 = value for a covered full
;;item.4 = cpms
;;little script to get this data
;;#TRIGGER {Price%s(%d)%sSize%s%d%sWeight%s%d%sfor one %w of (%w)} {#CLASS {test};%2 = %additem(%1,@%2);#CLASS 0;value %2 covered}
;;#TRIGGER {A covered wagon horse can carry (%d) %w of (%w). We'll pay you %n gold for that.} {#CLASS {test};%2 = %additem(%1,@%2);%2 = %additem(0,@%2);#CLASS 0}

#VAR tools {80|24|0|0}
#VAR adamantite {300|11|0|0}
#VAR coal {90|21|0|0}
#VAR opium {260|48|0|0}
#VAR iron {60|7|0|0}
#VAR emeralds {165|85|0|0}
#VAR willowbark {55|280|0|0}
#VAR cloaks {150|42|0|0}
#VAR rope {140|42|0|0}
#VAR waybread {130|85|0|0}
#VAR artifacts {280|11|0|0}
#VAR candles {145|85|0|0}
#VAR herbs {130|68|0|0}
#VAR nuts {120|28|0|0}
#VAR hemp {140|34|0|0}
#VAR quilts {650|17|0|0}
#VAR silk {625|17|0|0}
#VAR fans {150|112|0|0}
#VAR silkworms {225|34|0|0}
#VAR Illutian {90|85|0|0}
#VAR aloe {4|280|0|0}
#VAR quills {20|170|0|0}
#VAR balm {50|112|0|0}
#VAR venom {150|85|0|0}
#VAR hides {200|48|0|0}
#VAR eggs {350|34|0|0}
#VAR glowworms {100|113|0|0}
#VAR mushrooms {50|113|0|0}
#VAR wands {140|28|0|0}
#VAR crystal {170|68|0|0}
#VAR rum {130|11|0|0}
#VAR figs {100|42|0|0}
#VAR molasses {105|11|0|0}
#VAR pearls {120|85|0|0}
#VAR teak {800|17|0|0}
#VAR carpet {1100|14|0|0}
#VAR maps {300|42|0|0}
#VAR fish {100|42|0|0}
#VAR brandy {400|42|0|0}
#VAR metals {850|28|0|0}
#VAR honey {500|42|0|0}
#VAR grapes {400|56|0|0}
#VAR fertilizer {200|43|0|0}
#VAR sap {205|11|0|0}
#VAR furs {75|68|0|0}
#VAR timber {2050|1|0|0}
#VAR rations {65|34|0|0}
#VAR ivory {300|37|0|0}
#VAR flowers {285|56|0|0}
#VAR arrows {30|47|0|0}
#VAR bows {105|56|0|0}
#VAR art {385|42|0|0}
#VAR parchment {15|170|0|0}
#VAR silver {180|10|0|0}
#VAR jewels {300|20|0|0}
#VAR silicate {190|21|0|0}
#VAR nails {110|34|0|0}
#VAR copper {120|6|0|0}
#VAR wine {120|11|0|0}
#VAR perfume {100|140|0|0}
#VAR oils {80|56|0|0}
#VAR incense {90|56|0|0}
#VAR ink {80|85|0|0}
#VAR weapons {180|13|0|0}
#VAR chains {170|7|0|0}
#VAR pelts {130|46|0|0}
#VAR armor {250|18|0|0}
#VAR mead {130|11|0|0}
#VAR books {160|28|0|0}
#VAR cloth {140|24|0|0}
#VAR spices {100|68|0|0}
#VAR beer {180|11|0|0}
#VAR dates {140|42|0|0}
#VAR bananas {150|34|0|0}
#VAR seed {120|42|0|0}
#VAR beans {95|48|0|0}
#VAR rice {100|42|0|0}
#VAR tobacco {130|56|0|0}
#VAR opals {200|68|0|0}
#VAR ambergris {180|56|0|0}
#VAR shells {150|56|0|0}
#VAR nets {100|28|0|0}
#VAR kelp {80|42|0|0}
#VAR ale {80|11|0|0}
#VAR tar {120|8|0|0}
#VAR salt {80|85|0|0}
#VAR sugar {110|34|0|0}
#VAR raisins {60|42|0|0}
#CLASS 0



Cheers, Caebryn
Reply with quote
meps
Newbie


Joined: 10 Dec 2003
Posts: 2
Location: USA

PostPosted: Thu Dec 11, 2003 12:41 am   
 
Hello, I have been searching high and low for a updated trade script. Now I found one. :) My only problem is the ztshow command, dont' display anything, all it does it give me:
(ZTrader V2.2): Showing all valued items to Trellor
---------------------------------------------------
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)
( /)

Any ideas? Please help me get this to work.
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Thu Dec 11, 2003 1:44 am   
 
Myself and 3 other people I know of have tried it and so far no ones having this
problem, we're all using the newest beta version of zmud. What version are you
currently using?

Caebryn
Reply with quote
meps
Newbie


Joined: 10 Dec 2003
Posts: 2
Location: USA

PostPosted: Fri Dec 12, 2003 12:28 am   
 
Well, I found out that this script won't run on zmud 6.15, but will on the lastest version. Sorry for the confusion. I upgraded and everything is working. Thanks. Oh, btw it is a excelent script.
Reply with quote
Electron
Wanderer


Joined: 20 Nov 2001
Posts: 72

PostPosted: Fri Dec 12, 2003 12:39 am   
 
just in case you didn't see the other thread... here is the CaebColor script

#CLASS {CaebColor}

#FUNCTION CaebColor {%if((%2) || (%1 != "reset"),@CCBolds(%2), @CCResets(%1)}
#FUNCTION CCBolds {%item(@CCBoldEsc,%ismember(%1,@CCBoldList))}
#FUNCTION CCResets {%item(@CCResetEsc,%ismember(%1, @CCResetList))}

#VARIABLE CCBoldList {black|blue|green|cyan|red|magenta|yellow|white}
#VARIABLE CCResetList {bold|reset|black|blue|green|cyan|red|magenta|yellow|white}

#VARIABLE CCBoldEsc {%e[1;30m|%e[1;34m|%e[1;32m|%e[1;36m|%e[1;31m|%e[1;35m|%e[1;33m|%e[1;37m}
#VARIABLE CCResetEsc {%e[0m|%e[1m|%e[0;30m|%e[0;34m|%e[0;32m|%e[0;36m|%e[0;31m|%e[0;35m|%e[0;33m|%e[0;37m}

#ALIAS cctest {#FORALL @CCBoldList {#SHOW @CaebColor(bold,%i) %i};#FORALL @CCResetList {#SHOW @CaebColor(%i)%i}}

#CLASS 0

Also, I made some slight modifications to the ztdCreateLine alias that you may find useful... they help to highlight better trade routes...

ztdLine = %concat( @CaebColor(bold,black), ~()
ztdLine = %concat( @ztdLine, @CaebColor(bold,cyan), @ztdCreateTp(%1))
ztdLine = %concat( @ztdLine, @CaebColor(bold,magenta), @ztdCreateGood(%2))
ztdLine = %concat( @ztdLine, @CaebColor(blue), @ztdCreateHold(%2))
ztdLine = %concat( @ztdLine, @CaebColor(bold,white), @ztdCreateValue(%2))
#VAR ztdTemporary {@ztdCreateCpm(%2,%1)}
#VAR ztdTemporary2 {%int( %trim( @ztdTemporary))}
ztdLine = %concat( @ztdLine, @CaebColor(bold,%if(@ztdTemporary2<500,"red",%if(@ztdTemporary2<750,"yellow",%if(@ztdTemporary2<1000,"green","white")))), @ztdTemporary)
ztdLine = %concat( @ztdLine, @CaebColor(bold,black)))
ztdChatLine = %concat( @ztdChatLine, @ztdLine, %char( 10))

This way the color of the value in front of cpms shows how good the TR is... less than 500 is red, 1000 or above is white, above 500 but less than 750 is yellow, and 750 or above is green...
Reply with quote
Tlaca
Beginner


Joined: 11 May 2003
Posts: 23
Location: Canada

PostPosted: Fri Dec 12, 2003 9:30 pm   
 
Excellent

It's all working perfectly as best I can tell. And with new computer, it all displays uber fast. I can't wait to get a new pair of ruby boots and start trading like mad again :)

Thanks for your work.

Tlaca

ps see ya on the road Smile
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Fri Dec 12, 2003 10:49 pm   
 
Update:
When installing this using the import script giving me problems
I usually use the #READ command anyway, if you do too dont worry
about this, but if you do import you must type ztconfig before
using the script, it will update the variables to the new way of
storing cpms

Changes:
-You can now display by Cpms
In order to get this to work I had to change the goods variables
again, and compute cpms at value time instead of display time.
Displaying by cpms is the same as by value , if the number you
put in after ztval is greater then 100,000 you get by value and
if its less you get by cpm.
-Made it so Naeramae and urvile said NA next to cpms instead of
just leaving it blank
-Thanks to Electron I added Color Coding Cpms To Script had to
change it a little so it would work with the way cpms are stored
now.

Code:

#CLASS {ZTrader}
#CLASS 0

#CLASS {ZTrader|Commands|User}
    #ALIAS ztval  {#IF (%1) {#SHOW ZTRADER SELECTIVE VALUING NOT YET IMPLEMENTED} {ztvalall}}
    #ALIAS ztshow {#IF (%1) {#IF (%isnumber(%1)) {ztdShowVal %1} {ztdShowPost %1}} {ztdShowAll}}
    #ALIAS ztchat {#IF (%1) {#IF (%isnumber(%1)) {ztdChatVal %1} {ztdChatPost %1}} {ztdChatAll}}
#CLASS 0

#CLASS {ZTrader|Commands|Display}

    #ALIAS ztdShowAll  {ztdCreateAll;#SHOW @ztdChatLine}
    #ALIAS ztdShowVal  {ztdCheckVal %1}
    #ALIAS ztdShowPost {ztdFindPost %1}
    #ALIAS ztdChatAll  {ztdCreateAll;#EMOTEALL @ztdChatLine}
    #ALIAS ztdChatVal  {ztdChatCheckVal %1}
    #ALIAS ztdChatPost {ztdChatFindPost %1}

    #ALIAS ztdCreateAll  {ztvposts      = @ztposts
                          ztdTitle      = @ztdAllTitle
                          ztdChatLine   = %concat(%char(10),@ztdTitle)
                          ztdChatLine   = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine   = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {ztdCreateLine %i %j}}}
   
    #ALIAS ztdCreatePost {ztdTitle      = @ztdPostTitle
                          ztdChatLine   = %concat(%char(10),@ztdTitle)
                          ztdChatLine   = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine   = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {ztdCreateLine %i %j}}}
   
    #ALIAS ztdCreateVal  {ztvposts     = @ztposts
                          ztdValDisplay = %format("&0.0n",%1.3)
                          ztdTitle      = @ztdValTitle
                          ztdChatLine   = %concat(%char(10),@ztdTitle)
                          ztdChatLine   = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine   = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {#IF (@%j.3>%1) {ztdCreateLine %i %j}}}}
   
    #ALIAS ztdCreateCpms {ztvposts        = @ztposts
                          ztdValDisplay   = %format("&0.0n",%1.3)
                          ztdTitle        = @ztdCpmTitle
                          ztdChatLine     = %concat(%char(10),@ztdTitle)
                          ztdChatLine     = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))))
                          ztdChatLine     = %concat(@ztdChatLine,%char(10))
                          #FORALL @ztvposts {#FORALL @%i {#IF ((@%j.5 > %1) && %isnumber(@%j.5)) {ztdCreateLine %i %j}}}}
                         
                         
    #VARIABLE ztdLine       {""} {""}
    #VARIABLE ztdChatLine   {""} {""}
    #VARIABLE ztdValDisplay {""} {""}
   
    #ALIAS ztdFindPost {ztvposts = %null;#FORALL @ztposts {#IF (%pos(%lower(%1),%i)) {ztvposts = %i}};#IF (@ztvposts) {ztdCreatePost;#SHOW @ztdChatLine} {ztdErrorPostFind %1}}
    #ALIAS ztdChatFindPost {ztvposts = %null;#FORALL @ztposts {#IF (%pos(%lower(%1),%i)) {ztvposts = %i}};#IF (@ztvposts) {ztdCreatePost;#EMOTEALL @ztdChatLine} {ztdErrorPostFind %1}}
    #ALIAS ztdCheckVal {#IF (%1 < 100000) {ztdCreateCpms %1;#SHOW @ztdChatLine} {ztdCreateVal %1;#SHOW @ztdChatLine}}
    #ALIAS ztdChatCheckVal {#IF (%1 < 100000) {ztdCreateCpms %1;#EMOTEALL @ztdChatLine} {ztdCreateVal %1;#EMOTEALL @ztdChatLine}}
   
   
    #ALIAS ztdCreateLine {ztdLine = %concat(@CaebColor(bold,black),~()
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,cyan),@ztdCreateTp(%1))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,magenta),@ztdCreateGood(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(blue),@ztdCreateHold(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,white),@ztdCreateValue(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,%if(%eval(@%2.5/250) > 4,white,%case(%eval((@%2.5/250)+1),red,red,yellow,green,white))),@ztdCreateCpm(%2))
                          ztdLine = %concat(@ztdLine,@CaebColor(bold,black)))
                          ztdChatLine = %concat(@ztdChatLine,@ztdLine,%char(10))}
   
    #FUNCTION ztdCreateHold  {@ztdCreateSpaces(%format("&0.0n",@%1.2), 4)}
    #FUNCTION ztdCreateGood  {@ztdCreateSpaces(%1,12,1)}
    #FUNCTION ztdCreateValue {@ztdCreateSpaces(%literal(%format("&0.0n",@%1.3)),11)}
    #FUNCTION ztdCreateCpm   {@ztdCreateSpaces(@%1.5,%eval(%len(%stripansi(@ztdTitle)) - 44))}
    #FUNCTION ztdCreateTp    {@ztdCreateSpaces(%item(@ztfancypost, %ismember(%1,@ztposts)),15,1)}
   
    #FUNCTION ztdCreateSpaces {%if(%3,%1%repeat(" ",%2-%len(%1)),%repeat(" ",%2-%len(%1))%1)}
   
    #VARIABLE ztdTitle     {""} {""}
    #FUNCTION ztdAllTitle  {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) Showing all valued items to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
    #FUNCTION ztdPostTitle {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values from @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvposts,@ztposts)) @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
    #FUNCTION ztdValTitle  {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values over @CaebColor(bold,white)@ztdValDisplay @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
    #FUNCTION ztdCpmTitle  {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values over @CaebColor(bold,white)@ztdValDisplay CPMs @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}

    #ALIAS ztdErrorPostFind {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan): @CaebColor(bold,red)Error @CaebColor(bold,green)could not find any posts containing substring @CaebColor(bold,white)%1@CaebColor(bold,green).}
    #ALIAS ztdErrorSmallVal {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan): @CaebColor(bold,red)Error @CaebColor(bold,green)searching for values less then 100,000 is not supported.}
#CLASS 0

#CLASS {ZTrader|Commands|Valuing}
    #ALIAS ztvalue    {ztvcurgood = %-1;value %-1}
    #ALIAS ztvalall {ztvreset;ztvposts = @ztposts;ztvcurpost = 1;ztvcuritem = 0;ztvfindpost}
    #ALIAS ztvreset     {#FORALL @ztposts {#FORALL @%i {#CLASS {ZTrader|Data|GoodsValue};@%j = %replaceitem("DID NOT VALUE",3,@%j);#CLASS 0}}}
    #ALIAS ztvfindpost  {#T+ {ZTrader|Triggers|Valuing|Tradeposts};look}
    #ALIAS ztvpostfound {#T- {ZTrader|Triggers|Valuing|Tradeposts};ztvgettime}
    #ALIAS ztvgettime   {#T+ {ZTrader|Triggers|Valuing|Time};ztvtimefound}
    #ALIAS ztvtimefound {#T- {ZTrader|Triggers|Valuing|Time};#T+ {ZTrader|Triggers|Valuing|Value};ztvdovaluing}
    #ALIAS ztvdovaluing {ztvcuritem = %eval(@ztvcuritem + 1);#IF (@ztvcuritem > %numitems(%eval(@%item(@ztvposts,@ztvcurpost)))) {ztvnextpost} {ztvalue %item(%eval(@%item(@ztvposts, @ztvcurpost)),@ztvcuritem)}}
    #ALIAS ztvnextpost  {ztvcuritem = 0;ztvcurpost = %eval(@ztvcurpost + 1);#IF (@ztvcurpost > %numitems(@ztvposts)) {ztvvaldone} {ztvdovaluing}}
    #ALIAS ztvvaldone   {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue)) @CaebColor(bold,green)Valuing Complete.;#T- {ZTrader|Triggers|Valuing|Value}}
    #VARIABLE ztvposts       {""}
    #VARIABLE ztvcurpost     {""}
    #VARIABLE ztvcuritem     {""}
    #VARIABLE ztvvalpost     {""}
    #VARIABLE ztvtime        {""}
    #VARIABLE ztvcpmpost     {""}
    #VARIABLE ztvcurgood     {""}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Value} {disable}
#FUNCTION ztvCalcProfit {%replaceitem(%eval((%1 * @%2.2) - (@%2.1 * @%2.2)),3,@%2)}
#FUNCTION ztvCalcCpms   {%replaceitem(%eval(@%1.3 / %item(@ztvcpmpost,%eval(@%1.4))),5,@%1)}
#FUNCTION ztvCheckNA    {%if(@%1.5 = "",%replaceitem(NA,5,@%1),@%1)}
#TRIGGER {We will pay you (%d) gold for each %w} {#CLASS {ZTrader|Data|GoodsValue}
                                                      #VARIABLE {@ztvcurgood} {@ztvCalcProfit(%1, @ztvcurgood)}
                                                      #VARIABLE {@ztvcurgood} {@ztvCalcCpms(@ztvcurgood)}
                                                      #VARIABLE {@ztvcurgood} {@ztvCheckNA(@ztvcurgood)}
                                                  #CLASS 0
                                                  ztvdovaluing}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Time} {disable}
    #TRIGGER {The current system time is %w %w %d (*) %d} {ztvtime = %1;ztvtimefound}
#CLASS 0

#CLASS {Ztrader|Triggers|Valuing|Tradeposts} {disable}
    #TRIGGER {Hidden City}                          {ztvcpmpost = @mvsena;ztvvalpost = "enatdae";ztvpostfound}
    #TRIGGER {A Minotaur Trading Outpost}           {ztvcpmpost = @mvsnae;ztvvalpost = "naeramae";ztvpostfound}
    #TRIGGER {A Quiet Temple Shop}                  {ztvcpmpost = @mvselw;ztvvalpost = "elwyn";ztvpostfound}
    #TRIGGER {A Ranger's Cabin}                     {ztvcpmpost = @mvsran;ztvvalpost = "rangerscabin";ztvpostfound}
    #TRIGGER {An Elven Marketplace}                 {ztvcpmpost = @mvsath;ztvvalpost = "athelasea";ztvpostfound}
    #TRIGGER {DeRah Villadom's Small Trading Post}  {ztvcpmpost = @mvsder;ztvvalpost = "derahvilladom";ztvpostfound}
    #TRIGGER {Hidden Valley Traders, Inc.}          {ztvcpmpost = @mvsrue;ztvvalpost = "ruellia";ztvpostfound}
    #TRIGGER {Medievia Trading Shop}                {ztvcpmpost = @mvsmed;ztvvalpost = "medievia";ztvpostfound}
    #TRIGGER {New Ashton Trading Post}              {ztvcpmpost = @mvsash;ztvvalpost = "newashton";ztvpostfound}
    #TRIGGER {Riverton Trading Partners}            {ztvcpmpost = @mvsriv;ztvvalpost = "riverton";ztvpostfound}
    #TRIGGER {Sea's End Direct Merchants}           {ztvcpmpost = @mvssea;ztvvalpost = "seasend";ztvpostfound}
    #TRIGGER {Tanivsport Traders}                   {ztvcpmpost = @mvsmys;ztvvalpost = "mystara";ztvpostfound}
    #TRIGGER {The Lizard Boulangere}                {ztvcpmpost = @mvslyr;ztvvalpost = "lyryanoth";ztvpostfound}
    #TRIGGER {The Trading Post of G'dangus}         {ztvcpmpost = @mvsgda;ztvvalpost = "gdangus";ztvpostfound}
    #TRIGGER {Trading Post of the City of Karlisna} {ztvcpmpost = @mvsgda;ztvvalpost = "karlisna";ztvpostfound}
    #TRIGGER {Trading Post of the Dark Army}        {ztvcpmpost = @mvsgen;ztvvalpost = "newgenesia";ztvpostfound}
    #TRIGGER {Trading Shop of Trellor City}         {ztvcpmpost = @mvstre;ztvvalpost = "trellor";ztvpostfound}
    #TRIGGER {Ur-vile Feeding Hall}                 {ztvcpmpost = @mvsurv;ztvvalpost = "urvile";ztvpostfound}
    #TRIGGER {Vanlarra Imports and Exports}         {ztvcpmpost = @mvsvan;ztvvalpost = "vanlarra";ztvpostfound}
#CLASS 0

#CLASS {ZTrader|Data|UserOptions}
    #VARIABLE ztvalgag {0}
#CLASS 0

#CLASS {ZTrader|Data|TradePosts} {enable}
    #VARIABLE ztposts     {medievia|trellor|enatdae|naeramae|elwyn|rangerscabin|athelasea|derahvilladom|ruellia|newashton|riverton|seasend|mystara|lyryanoth|gdangus|karlisna|newgenesia|vanlarra|urvile}
    #VARIABLE ztfancypost {Medievia|Trellor|E'nat'dae|NaeraMae|Elwyn|Ranger's Cabin|Athelasea|DeRah Villadom|Ruellia|NewAshton|Riverton|Sea's End|Mystara|Lyryanoth|Gdangus|Karlisna|NewGenesia|Vanlarra|Ur-Vile}
#CLASS 0

#CLASS {ZTrader|Data|TpGoods} {enable}
    #VARIABLE urvile        {""}
    #VARIABLE derahvilladom {artifacts|candles|herbs|nuts|hemp}
    #VARIABLE gdangus       {bananas|seed|beans|rice|tobacco}
    #VARIABLE enatdae       {quilts|silk|fans|silkworms|illutian}
    #VARIABLE karlisna      {books|cloth|spices|beer|dates}
    #VARIABLE lyryanoth     {venom|eggs|hides|glowworms|mushrooms}
    #VARIABLE mystara       {pearls|teak|carpet|maps|fish}
    #VARIABLE newashton     {silver|jewels|silicate|nails|copper}
    #VARIABLE newgenesia    {tools|adamantite|coal|opium|iron}
    #VARIABLE riverton      {brandy|metals|honey|grapes|fertilizer}
    #VARIABLE ruellia       {emeralds|willowbark|cloaks|rope|waybread}
    #VARIABLE seasend       {opals|ambergris|shells|nets|kelp}
    #VARIABLE vanlarra      {wands|crystal|rum|figs|molasses}
    #VARIABLE athelasea     {flowers|arrows|bows|art|parchment}
    #VARIABLE naeramae      {armor|chains|mead|pelts|weapons}
    #VARIABLE elwyn         {aloe|quills|balm}
    #VARIABLE rangerscabin  {sap|furs|timber|rations|ivory}
    #VARIABLE medievia      {ale|tar|salt|sugar|raisins}
    #VARIABLE trellor       {perfume|wine|oils|incense|ink}
#CLASS 0                     
                             
#CLASS {ZTrader|Data|TpMoves}

#VARIABLE {mvsmed} {1|1269|308|NA|594|302|221|1072|998|781|572|1616|575|1179|1330|1246|657|786|NA}
#VARIABLE {mvsder} {1072|2264|862|NA|1295|1348|1225|1|1912|1785|1624|2662|1627|1880|2376|2292|1571|1838|NA}
#VARIABLE {mvselw} {594|1786|418|NA|1|870|747|1295|1434|1307|1146|2184|1149|655|1898|1814|1093|1336|NA}
#VARIABLE {mvsgda} {1330|1562|1612|NA|1898|1061|1262|2376|2308|1666|1197|672|1380|2483|1|863|1967|1423|NA}
#VARIABLE {mvslyr} {1179|2371|1003|NA|655|1455|1332|1880|2019|1892|1731|2768|1734|1|2183|2399|1678|1921|NA}
#VARIABLE {mvsnae} {NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA}                       
#VARIABLE {mvsmys} {575|1824|863|NA|1149|743|776|1627|1553|1336|307|1666|1|1734|1380|1256|1212|281|NA}
#VARIABLE {mvsash} {781|494|1021|NA|1307|1063|668|1785|1537|1|1333|1952|1336|1892|1666|752|1196|1547|NA}
#VARIABLE {mvsran} {302|1551|584|NA|870|1|503|1348|1280|1063|740|1347|743|1455|1061|976|939|958|NA}
#VARIABLE {mvsriv} {572|1821|860|NA|1146|740|773|1624|1550|1333|1|1483|307|1731|1197|1112|1209|518|NA}
#VARIABLE {mvsrue} {998|2169|1148|NA|1434|1280|1111|1912|1|1537|1550|2594|1553|2019|2308|2136|399|1764|NA}
#VARIABLE {mvssea} {1616|1774|1898|NA|2184|1347|1548|2662|2594|1952|1483|1|1666|2768|672|1149|2253|1709|NA}
#VARIABLE {mvsvan} {786|2035|1059|NA|1336|958|987|1838|1764|1547|518|1709|281|1921|1423|1338|1423|1|NA}
#VARIABLE {mvskar} {1246|1349|1528|NA|1814|976|1176|2292|2136|752|1112|1149|1256|2399|863|1|1795|1338|NA}
#VARIABLE {mvstre} {1269|1|1500|NA|1786|1551|1160|2264|2169|494|1821|1774|1824|2371|1562|1349|1500|2035|NA}
#VARIABLE {mvsath} {221|1160|461|NA|747|503|1|1225|1111|668|773|1548|776|1332|1262|1176|770|987|NA}
#VARIABLE {mvsena} {308|1500|1|NA|418|584|461|862|1148|1021|860|1898|863|1003|1612|1528|807|1059|NA}
#VARIABLE {mvsgen} {657|1500|807|NA|1093|939|770|1571|399|1196|1209|2253|1212|1678|1967|1795|1|1423|NA}
#VARIABLE {mvsurv} {NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA}
   
#CLASS 0

#CLASS {ZTrader|Config}
;;Need to run ztconfig if the goods ever change at a post
;;It sets the 4th item in the goods list to the item number
;;of
#VARIABLE ztCCount {0}
#ALIAS ztconfig {ztCCount = 0;#FORALL @ztposts {#ADD ztCCount {1}
                              #FORALL @%i {#CLASS {ZTrader|Data|GoodsValue};@%j = %replaceitem(@ztCCount,4,@%j);#CLASS 0}}}
                             
#CLASS 0


#CLASS {ZTrader|Data|GoodsValue}
;;New Storage format for each item is a list
;;item.1 = cost to buy 1
;;item.2 = amount a covered holds
;;item.3 = value for a covered full
;;item.4 = cpm item number (what item holds the moves to calculate cpms from the mvslist)
;;item.5 = cpms
;;little script to get this data
;;#TRIGGER {Price%s(%d)%sSize%s%d%sWeight%s%d%sfor one %w of (%w)} {#CLASS {test};%2 = %additem(%1,@%2);#CLASS 0;value %2 covered}
;;#TRIGGER {A covered wagon horse can carry (%d) %w of (%w). We'll pay you %n gold for that.} {#CLASS {test};%2 = %additem(%1,@%2);%2 = %additem(0,@%2);#CLASS 0}

#VAR tools         {80|24|0|0|0}
#VAR adamantite    {300|11|0|0|0}
#VAR coal          {90|21|0|0|0}
#VAR opium         {260|48|0|0|0}
#VAR iron          {60|7|0|0|0}
#VAR emeralds      {165|85|0|0|0}
#VAR willowbark    {55|280|0|0|0}
#VAR cloaks        {150|42|0|0|0}
#VAR rope          {140|42|0|0|0}
#VAR waybread      {130|85|0|0|0}
#VAR artifacts     {280|11|0|0|0}
#VAR candles       {145|85|0|0|0}
#VAR herbs         {130|68|0|0|0}
#VAR nuts          {120|28|0|0|0}
#VAR hemp          {140|34|0|0|0}
#VAR quilts        {650|17|0|0|0}
#VAR silk          {625|17|0|0|0}
#VAR fans          {150|112|0|0|0}
#VAR silkworms     {225|34|0|0|0}
#VAR Illutian      {90|85|0|0|0}
#VAR aloe          {4|280|0|0|0}
#VAR quills        {20|170|0|0|0}
#VAR balm          {50|112|0|0|0}
#VAR venom         {150|85|0|0|0}
#VAR hides         {200|48|0|0|0}
#VAR eggs          {350|34|0|0|0}
#VAR glowworms     {100|113|0|0|0}
#VAR mushrooms     {50|113|0|0|0}
#VAR wands         {140|28|0|0|0}
#VAR crystal       {170|68|0|0|0}
#VAR rum           {130|11|0|0|0}
#VAR figs          {100|42|0|0|0}
#VAR molasses      {105|11|0|0|0}
#VAR pearls        {120|85|0|0|0}
#VAR teak          {800|17|0|0|0}
#VAR carpet        {1100|14|0|0|0}
#VAR maps          {300|42|0|0|0}
#VAR fish          {100|42|0|0|0}
#VAR brandy        {400|42|0|0|0}
#VAR metals        {850|28|0|0|0}
#VAR honey         {500|42|0|0|0}
#VAR grapes        {400|56|0|0|0}
#VAR fertilizer    {200|43|0|0|0}
#VAR sap           {205|11|0|0|0}
#VAR furs          {75|68|0|0|0}
#VAR timber        {2050|1|0|0|0}
#VAR rations       {65|34|0|0|0}
#VAR ivory         {300|37|0|0|0}
#VAR flowers       {285|56|0|0|0}
#VAR arrows        {30|47|0|0|0}
#VAR bows          {105|56|0|0|0}
#VAR art           {385|42|0|0|0}
#VAR parchment     {15|170|0|0|0}
#VAR silver        {180|10|0|0|0}
#VAR jewels        {300|20|0|0|0}
#VAR silicate      {190|21|0|0|0}
#VAR nails         {110|34|0|0|0}
#VAR copper        {120|6|0|0|0}
#VAR wine          {120|11|0|0|0}
#VAR perfume       {100|140|0|0|0}
#VAR oils          {80|56|0|0|0}
#VAR incense       {90|56|0|0|0}
#VAR ink           {80|85|0|0|0}
#VAR weapons       {180|13|0|0|0}
#VAR chains        {170|7|0|0|0}
#VAR pelts         {130|46|0|0|0}
#VAR armor         {250|18|0|0|0}
#VAR mead          {130|11|0|0|0}
#VAR books         {160|28|0|0|0}
#VAR cloth         {140|24|0|0|0}
#VAR spices        {100|68|0|0|0}
#VAR beer          {180|11|0|0|0}
#VAR dates         {140|42|0|0|0}
#VAR bananas       {150|34|0|0|0}
#VAR seed          {120|42|0|0|0}
#VAR beans         {95|48|0|0|0}
#VAR rice          {100|42|0|0|0}
#VAR tobacco       {130|56|0|0|0}
#VAR opals         {200|68|0|0|0}
#VAR ambergris     {180|56|0|0|0}
#VAR shells        {150|56|0|0|0}
#VAR nets          {100|28|0|0|0}
#VAR kelp          {80|42|0|0|0}
#VAR ale           {80|11|0|0|0}
#VAR tar           {120|8|0|0|0}
#VAR salt          {80|85|0|0|0}
#VAR sugar         {110|34|0|0|0}
#VAR raisins       {60|42|0|0|0}
#CLASS 0
;; ToDo
;; 1. Selective valuing - ztval med, gda ..just to value medievia gdangus and not everything.
;; 4. ADD Resume valuing, for asteroid valuing
;; 6. ADD time passed since valuing
;; 7. ADD option to GAG valuing
ztConfig
Reply with quote
Electron
Wanderer


Joined: 20 Nov 2001
Posts: 72

PostPosted: Sat Dec 13, 2003 2:44 am   
 
awesome script! :)
Reply with quote
Electron
Wanderer


Joined: 20 Nov 2001
Posts: 72

PostPosted: Sat Dec 13, 2003 7:57 am   
 
--- Added option to gag valuing...

ztvaluegag on
---or---
ztvaluegag off

after importing the script it defaults to off

--- Fixed a bug where karlisna was using the number of moves for Gdangus

This version of the script is kinda beta... if you like it... help contribute to the the script... :)
Let's make it the ultimate medievia trade value script ever.. bwahaha ;)

Code:

#CLASS {CaebColor}
#ALIAS cctest {#FORALL @CCBoldList {#SHOW @CaebColor(bold,%i) %i};#FORALL @CCResetList {#SHOW @CaebColor(%i)%i}}
#VAR CaebColor {%if((%2) || (%1 != "reset"),@CCBolds(%2), @CCResets(%1)}
#VAR CCBolds {%item(@CCBoldEsc,%ismember(%1,@CCBoldList))}
#VAR CCResets {%item(@CCResetEsc,%ismember(%1, @CCResetList))}
#VAR CCBoldList {black|blue|green|cyan|red|magenta|yellow|white}
#VAR CCResetList {bold|reset|black|blue|green|cyan|red|magenta|yellow|white}
#VAR CCBoldEsc {%e[1;30m|%e[1;34m|%e[1;32m|%e[1;36m|%e[1;31m|%e[1;35m|%e[1;33m|%e[1;37m}
#VAR CCResetEsc {%e[0m|%e[1m|%e[0;30m|%e[0;34m|%e[0;32m|%e[0;36m|%e[0;31m|%e[0;35m|%e[0;33m|%e[0;37m}
#CLASS 0

#CLASS {ZTrader}
#CLASS 0

#CLASS {ZTrader|Commands}
#CLASS 0

#CLASS {ZTrader|Commands|User}
#ALIAS ztval {#IF (%1) {#SHOW ZTRADER SELECTIVE VALUING NOT YET IMPLEMENTED} {ztvalall}}
#ALIAS ztshow {#IF (%1) {#IF (%isnumber(%1)) {ztdShowVal %1} {ztdShowPost %1}} {ztdShowAll}}
#ALIAS ztchat {#IF (%1) {#IF (%isnumber(%1)) {ztdChatVal %1} {ztdChatPost %1}} {ztdChatAll}}
#CLASS 0

#CLASS {ZTrader|Commands|Display}
#ALIAS ztdShowAll {ztdCreateAll;#SHOW @ztdChatLine}
#ALIAS ztdShowVal {ztdCheckVal %1}
#ALIAS ztdShowPost {ztdFindPost %1}
#ALIAS ztdChatAll {ztdCreateAll;#EMOTEALL @ztdChatLine}
#ALIAS ztdChatVal {ztdChatCheckVal %1}
#ALIAS ztdChatPost {ztdChatFindPost %1}
#ALIAS ztdCreateAll {ztvposts = @ztposts;ztdTitle = @ztdAllTitle;ztdChatLine = %concat( %char( 10), @ztdTitle);ztdChatLine = %concat( @ztdChatLine, %char( 10), @CaebColor(bold,blue), %repeat( "-", %len( %stripansi( @ztdTitle))));ztdChatLine = %concat( @ztdChatLine, %char( 10));#FORALL @ztvposts { #IF (@ztvvalpost != %i) { #FORALL @%i {ztdCreateLine %i %j}}}}
#ALIAS ztdCreatePost {ztdTitle = @ztdPostTitle;ztdChatLine = %concat(%char(10),@ztdTitle);ztdChatLine = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))));ztdChatLine = %concat(@ztdChatLine,%char(10));#FORALL @ztvposts {#FORALL @%i {ztdCreateLine %i %j}}}
#ALIAS ztdCreateVal {ztvposts = @ztposts;ztdValDisplay = %format("&0.0n",%1.3);ztdTitle = @ztdValTitle;ztdChatLine = %concat(%char(10),@ztdTitle);ztdChatLine = %concat(@ztdChatLine,%char(10),@CaebColor(bold,blue),%repeat("-",%len(%stripansi(@ztdTitle))));ztdChatLine = %concat(@ztdChatLine,%char(10));#FORALL @ztvposts {#FORALL @%i {#IF (@%j.3>%1) {ztdCreateLine %i %j}}}}
#ALIAS ztdCreateCpms {ztvposts = @ztposts;ztdValDisplay = %format( "&0.0n", %1.3);ztdTitle = @ztdCpmTitle;ztdChatLine = %concat( %char( 10), @ztdTitle);ztdChatLine = %concat( @ztdChatLine, %char( 10), @CaebColor(bold,blue), %repeat( "-", %len( %stripansi( @ztdTitle))));ztdChatLine = %concat( @ztdChatLine, %char( 10));#FORALL @ztvposts {#FORALL @%i {#IF ((@%j.5 > %1) & %isnumber( @%j.5)) {ztdCreateLine %i %j}}}}
#ALIAS ztdFindPost {ztvposts = %null;#FORALL @ztposts {#IF (%pos(%lower(%1),%i)) {ztvposts = %i}};#IF (@ztvposts) {ztdCreatePost;#SHOW @ztdChatLine} {ztdErrorPostFind %1}}
#ALIAS ztdChatFindPost {ztvposts = %null;#FORALL @ztposts {#IF (%pos(%lower(%1),%i)) {ztvposts = %i}};#IF (@ztvposts) {ztdCreatePost;#EMOTEALL @ztdChatLine} {ztdErrorPostFind %1}}
#ALIAS ztdCheckVal {#IF (%1 < 100000) {ztdCreateCpms %1;#SHOW @ztdChatLine} {ztdCreateVal %1;#SHOW @ztdChatLine}}
#ALIAS ztdChatCheckVal {#IF (%1 < 100000) {ztdCreateCpms %1;#EMOTEALL @ztdChatLine} {ztdCreateVal %1;#EMOTEALL @ztdChatLine}}
#ALIAS ztdCreateLine {ztdLine = %concat( @CaebColor(bold,black), ~();ztdLine = %concat( @ztdLine, @CaebColor(bold,cyan), @ztdCreateTp(%1));ztdLine = %concat( @ztdLine, @CaebColor(bold,magenta), @ztdCreateGood(%2));ztdLine = %concat( @ztdLine, @CaebColor(bold,blue), @ztdCreateHold(%2));ztdLine = %concat( @ztdLine, @CaebColor(bold,white), @ztdCreateValue(%2));ztdLine = %concat( @ztdLine, @CaebColor(bold,%if(%eval(@%2.5/250) > 4,white,%case(%eval((@%2.5/250)+1),red,red,yellow,green,white))), @ztdCreateCpm(%2));ztdLine = %concat( @ztdLine, @CaebColor(bold,black)));ztdChatLine = %concat( @ztdChatLine, @ztdLine, %char( 10))}
#ALIAS ztdErrorPostFind {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan): @CaebColor(bold,red)Error @CaebColor(bold,green)could not find any posts containing substring @CaebColor(bold,white)%1@CaebColor(bold,green).}
#ALIAS ztdErrorSmallVal {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan): @CaebColor(bold,red)Error @CaebColor(bold,green)searching for values less then 100,000 is not supported.}
#VAR ztdLine {""} {""}
#VAR ztdChatLine {""} {""}
#VAR ztdValDisplay {""} {""}
#VAR ztdCreateHold {@ztdCreateSpaces(%format("&0.0n",@%1.2), 4)}
#VAR ztdCreateGood {@ztdCreateSpaces(%1,12,1)}
#VAR ztdCreateValue {@ztdCreateSpaces(%literal(%format("&0.0n",@%1.3)),11)}
#VAR ztdCreateCpm {@ztdCreateSpaces(@%1.5,%eval(%len(%stripansi(@ztdTitle)) - 44))}
#VAR ztdCreateTp {@ztdCreateSpaces(%item(@ztfancypost, %ismember(%1,@ztposts)),15,1)}
#VAR ztdCreateSpaces {%if(%3,%1%repeat(" ",%2-%len(%1)),%repeat(" ",%2-%len(%1))%1)}
#VAR ztdTitle {""} {""}
#VAR ztdAllTitle {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) Showing all valued items to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
#VAR ztdPostTitle {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values from @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvposts,@ztposts)) @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
#VAR ztdValTitle {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values over @CaebColor(bold,white)@ztdValDisplay @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
#VAR ztdCpmTitle {@CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue))@CaebColor(bold,cyan):@CaebColor(bold,green) All values over @CaebColor(bold,white)@ztdValDisplay CPMs @CaebColor(bold,green)to @CaebColor(bold,white)%item(@ztfancypost, %ismember(@ztvvalpost,@ztposts))}
#CLASS 0

#CLASS {ZTrader|Commands|Valuing}
#ALIAS ztvalue {ztvcurgood = %-1;value %-1}
#ALIAS ztvalall {ztvreset;ztvposts = @ztposts;ztvcurpost = 1;ztvcuritem = 0;ztvfindpost}
#ALIAS ztvreset {#FORALL @ztposts {#FORALL @%i {#CLASS {ZTrader|Data|GoodsValue};#VAR %j %replaceitem( "DID NOT VALUE", 3, @%j);#CLASS 0}}}
#ALIAS ztvfindpost {#T+ {ZTrader|Triggers|Valuing|Tradeposts};look}
#ALIAS ztvpostfound {#T- {ZTrader|Triggers|Valuing|Tradeposts};ztvgettime}
#ALIAS ztvgettime {#T+ {ZTrader|Triggers|Valuing|Time};ztvtimefound}
#ALIAS ztvtimefound {#T- {ZTrader|Triggers|Valuing|Time};#T+ {ZTrader|Triggers|Valuing|Value};ztvdovaluing}
#ALIAS ztvdovaluing {ztvcuritem = %eval(@ztvcuritem + 1);#IF (@ztvcuritem > %numitems(%eval(@%item(@ztvposts,@ztvcurpost)))) {ztvnextpost} {ztvalue %item(%eval(@%item(@ztvposts, @ztvcurpost)),@ztvcuritem)}}
#ALIAS ztvnextpost {ztvcuritem = 0;ztvcurpost = %eval(@ztvcurpost + 1);#IF (@ztvcurpost > %numitems(@ztvposts)) {ztvvaldone} {ztvdovaluing}}
#ALIAS ztvvaldone {#SHOW @CaebColor(bold,blue)(@CaebColor(bold,white)ZTrader V2.3@CaebColor(bold,blue)) @CaebColor(bold,green)Valuing Complete.;#T- {ZTrader|Triggers|Valuing|Value}}
#VAR ztvcurpost {20}
#VAR ztvcuritem {0}
#VAR ztvvalpost {karlisna}
#VAR ztvtime {""}
#VAR ztvcpmpost {1246|1349|1528|NA|1814|976|1176|2292|2136|752|1112|1149|1256|2399|863|1|1795|1338|NA}
#VAR ztvcurgood {molasses}
#VAR ztvposts {medievia|trellor|enatdae|naeramae|elwyn|rangerscabin|athelasea|derahvilladom|ruellia|newashton|riverton|seasend|mystara|lyryanoth|gdangus|karlisna|newgenesia|vanlarra|urvile}
#CLASS 0

#CLASS {ZTrader|Triggers}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Value} {disable}
#VAR ztvCalcProfit {%replaceitem(%eval((%1 * @%2.2) - (@%2.1 * @%2.2)),3,@%2)}
#VAR ztvCalcCpms {%replaceitem(%eval(@%1.3 / %item(@ztvcpmpost,%eval(@%1.4))),5,@%1)}
#VAR ztvCheckNA {%if(@%1.5 = "",%replaceitem(NA,5,@%1),@%1)}
#TRIGGER {We will pay you (%d) gold for each %w} {#CLASS {ZTrader|Data|GoodsValue};#VARIABLE @ztvcurgood {@ztvCalcProfit(%1, @ztvcurgood)};#VARIABLE @ztvcurgood {@ztvCalcCpms(@ztvcurgood)};#VARIABLE @ztvcurgood {@ztvCheckNA(@ztvcurgood)};#CLASS {ZTRader|Data|UserOptions};#IF (@ztvalgag) {#GAG -1;#GAG};#CLASS 0;ztvdovaluing}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Time} {disable}
#TRIGGER {The current system time is %w %w %d (*) %d} {ztvtime = %1;ztvtimefound}
#CLASS 0

#CLASS {ZTrader|Triggers|Valuing|Tradeposts} {disable}
#TRIGGER {Hidden City} {ztvcpmpost = @mvsena;ztvvalpost = "enatdae";ztvpostfound}
#TRIGGER {A Minotaur Trading Outpost} {ztvcpmpost = @mvsnae;ztvvalpost = "naeramae";ztvpostfound}
#TRIGGER {A Quiet Temple Shop} {ztvcpmpost = @mvselw;ztvvalpost = "elwyn";ztvpostfound}
#TRIGGER {A Ranger's Cabin} {ztvcpmpost = @mvsran;ztvvalpost = "rangerscabin";ztvpostfound}
#TRIGGER {An Elven Marketplace} {ztvcpmpost = @mvsath;ztvvalpost = "athelasea";ztvpostfound}
#TRIGGER {DeRah Villadom's Small Trading Post} {ztvcpmpost = @mvsder;ztvvalpost = "derahvilladom";ztvpostfound}
#TRIGGER {Hidden Valley Traders, Inc.} {ztvcpmpost = @mvsrue;ztvvalpost = "ruellia";ztvpostfound}
#TRIGGER {Medievia Trading Shop} {ztvcpmpost = @mvsmed;ztvvalpost = "medievia";ztvpostfound}
#TRIGGER {New Ashton Trading Post} {ztvcpmpost = @mvsash;ztvvalpost = "newashton";ztvpostfound}
#TRIGGER {Riverton Trading Partners} {ztvcpmpost = @mvsriv;ztvvalpost = "riverton";ztvpostfound}
#TRIGGER {Sea's End Direct Merchants} {ztvcpmpost = @mvssea;ztvvalpost = "seasend";ztvpostfound}
#TRIGGER {Tanivsport Traders} {ztvcpmpost = @mvsmys;ztvvalpost = "mystara";ztvpostfound}
#TRIGGER {The Lizard Boulangere} {ztvcpmpost = @mvslyr;ztvvalpost = "lyryanoth";ztvpostfound}
#TRIGGER {The Trading Post of G'dangus} {ztvcpmpost = @mvsgda;ztvvalpost = "gdangus";ztvpostfound}
#TRIGGER {Trading Post of the City of Karlisna} {ztvcpmpost = @mvskar;ztvvalpost = "karlisna";ztvpostfound}
#TRIGGER {Trading Post of the Dark Army} {ztvcpmpost = @mvsgen;ztvvalpost = "newgenesia";ztvpostfound}
#TRIGGER {Trading Shop of Trellor City} {ztvcpmpost = @mvstre;ztvvalpost = "trellor";ztvpostfound}
#TRIGGER {Ur-vile Feeding Hall} {ztvcpmpost = @mvsurv;ztvvalpost = "urvile";ztvpostfound}
#TRIGGER {Vanlarra Imports and Exports} {ztvcpmpost = @mvsvan;ztvvalpost = "vanlarra";ztvpostfound}
#CLASS 0

#CLASS {ZTrader|Data}
#CLASS 0

#CLASS {ZTrader|Data|UserOptions}
#VAR ztvalgag {0}
#CLASS 0

#CLASS {ZTrader|Data|TradePosts} {enable}
#VAR ztposts {medievia|trellor|enatdae|naeramae|elwyn|rangerscabin|athelasea|derahvilladom|ruellia|newashton|riverton|seasend|mystara|lyryanoth|gdangus|karlisna|newgenesia|vanlarra|urvile}
#VAR ztfancypost {Medievia|Trellor|E'nat'dae|NaeraMae|Elwyn|Ranger's Cabin|Athelasea|DeRah Villadom|Ruellia|NewAshton|Riverton|Sea's End|Mystara|Lyryanoth|Gdangus|Karlisna|NewGenesia|Vanlarra|Ur-Vile}
#CLASS 0

#CLASS {ZTrader|Data|TpGoods} {enable}
#VAR urvile {""}
#VAR derahvilladom {artifacts|candles|herbs|nuts|hemp}
#VAR gdangus {bananas|seed|beans|rice|tobacco}
#VAR enatdae {quilts|silk|fans|silkworms|illutian}
#VAR karlisna {books|cloth|spices|beer|dates}
#VAR lyryanoth {venom|eggs|hides|glowworms|mushrooms}
#VAR mystara {pearls|teak|carpet|maps|fish}
#VAR newashton {silver|jewels|silicate|nails|copper}
#VAR newgenesia {tools|adamantite|coal|opium|iron}
#VAR riverton {brandy|metals|honey|grapes|fertilizer}
#VAR ruellia {emeralds|willowbark|cloaks|rope|waybread}
#VAR seasend {opals|ambergris|shells|nets|kelp}
#VAR vanlarra {wands|crystal|rum|figs|molasses}
#VAR athelasea {flowers|arrows|bows|art|parchment}
#VAR naeramae {armor|chains|mead|pelts|weapons}
#VAR elwyn {aloe|quills|balm}
#VAR rangerscabin {sap|furs|timber|rations|ivory}
#VAR medievia {ale|tar|salt|sugar|raisins}
#VAR trellor {perfume|wine|oils|incense|ink}
#CLASS 0

#CLASS {ZTrader|Data|TpMoves}
#VAR mvsmed {1|1269|308|NA|594|302|221|1072|998|781|572|1616|575|1179|1330|1246|657|786|NA}
#VAR mvsder {1072|2264|862|NA|1295|1348|1225|1|1912|1785|1624|2662|1627|1880|2376|2292|1571|1838|NA}
#VAR mvselw {594|1786|418|NA|1|870|747|1295|1434|1307|1146|2184|1149|655|1898|1814|1093|1336|NA}
#VAR mvsgda {1330|1562|1612|NA|1898|1061|1262|2376|2308|1666|1197|672|1380|2483|1|863|1967|1423|NA}
#VAR mvslyr {1179|2371|1003|NA|655|1455|1332|1880|2019|1892|1731|2768|1734|1|2183|2399|1678|1921|NA}
#VAR mvsnae {NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA}
#VAR mvsmys {575|1824|863|NA|1149|743|776|1627|1553|1336|307|1666|1|1734|1380|1256|1212|281|NA}
#VAR mvsash {781|494|1021|NA|1307|1063|668|1785|1537|1|1333|1952|1336|1892|1666|752|1196|1547|NA}
#VAR mvsran {302|1551|584|NA|870|1|503|1348|1280|1063|740|1347|743|1455|1061|976|939|958|NA}
#VAR mvsriv {572|1821|860|NA|1146|740|773|1624|1550|1333|1|1483|307|1731|1197|1112|1209|518|NA}
#VAR mvsrue {998|2169|1148|NA|1434|1280|1111|1912|1|1537|1550|2594|1553|2019|2308|2136|399|1764|NA}
#VAR mvssea {1616|1774|1898|NA|2184|1347|1548|2662|2594|1952|1483|1|1666|2768|672|1149|2253|1709|NA}
#VAR mvsvan {786|2035|1059|NA|1336|958|987|1838|1764|1547|518|1709|281|1921|1423|1338|1423|1|NA}
#VAR mvskar {1246|1349|1528|NA|1814|976|1176|2292|2136|752|1112|1149|1256|2399|863|1|1795|1338|NA}
#VAR mvstre {1269|1|1500|NA|1786|1551|1160|2264|2169|494|1821|1774|1824|2371|1562|1349|1500|2035|NA}
#VAR mvsath {221|1160|461|NA|747|503|1|1225|1111|668|773|1548|776|1332|1262|1176|770|987|NA}
#VAR mvsena {308|1500|1|NA|418|584|461|862|1148|1021|860|1898|863|1003|1612|1528|807|1059|NA}
#VAR mvsgen {657|1500|807|NA|1093|939|770|1571|399|1196|1209|2253|1212|1678|1967|1795|1|1423|NA}
#VAR mvsurv {NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA|NA}
#CLASS 0

#CLASS {ZTrader|Config}
#ALIAS ztconfig {ztCCount = 0;#FORALL @ztposts {#ADD ztCCount {1};#FORALL @%i {#CLASS {ZTrader|Data|GoodsValue};#VAR %j {%replaceitem( @ztCCount, 4, @%j)};#CLASS 0}}}
#ALIAS ztvaluegag {#IF (%null( %1)) {#ECHO "Usage: ztvaluegag (on|off)"} {#IF (%1 = on) {#CLASS {ZTrader|Data|UserOptions};#VAR ztvalgag 1;#ECHO "ZTrader Valuing will now be gagged.";#CLASS 0} {#IF (%1 = off) {#CLASS {ZTrader|Data|UserOptions};#VAR ztvalgag 0;#ECHO "ZTrader Valuing will now not be gagged.";#CLASS 0} {#ECHO "Usage: ztvaluegag (on|off)"}}}}
#VAR ztCCount {19}
#CLASS 0

#CLASS {ZTrader|Data|GoodsValue}
#VAR item {cost to buy 1|amount a covered holds|value for a covered full |cpm item number (what item holds the moves to calculate cpms from the mvslist)|cpms}
#VAR tools {80|24|644352|17|358}
#VAR adamantite {300|11|922680|17|514}
#VAR coal {90|21|634158|17|353}
#VAR opium {260|48|1038144|17|578}
#VAR iron {60|7|140868|17|78}
#VAR emeralds {165|85|14025|9|6}
#VAR willowbark {55|280|15400|9|7}
#VAR cloaks {150|42|1029840|9|482}
#VAR rope {140|42|960960|9|449}
#VAR waybread {130|85|11050|9|5}
#VAR artifacts {280|11|1060400|8|462}
#VAR candles {145|85|838695|8|365}
#VAR herbs {130|68|906712|8|395}
#VAR nuts {120|28|1040928|8|454}
#VAR hemp {140|34|981376|8|428}
#VAR quilts {650|17|975222|3|638}
#VAR silk {625|17|700621|3|458}
#VAR fans {150|112|357952|3|234}
#VAR silkworms {225|34|675070|3|441}
#VAR Illutian {90|85|504390|3|330}
#VAR aloe {4|280|235760|5|129}
#VAR quills {20|170|718760|5|396}
#VAR balm {50|112|1053472|5|580}
#VAR venom {150|85|1195440|14|498}
#VAR hides {200|48|899904|14|375}
#VAR eggs {350|34|739772|14|308}
#VAR glowworms {100|113|11300|14|4}
#VAR mushrooms {50|113|529292|14|220}
#VAR wands {140|28|818104|18|611}
#VAR crystal {170|68|257856|18|192}
#VAR rum {130|11|265210|18|198}
#VAR figs {100|42|778680|18|581}
#VAR molasses {105|11|214093|18|160}
#VAR pearls {120|85|658410|13|524}
#VAR teak {800|17|580720|13|462}
#VAR carpet {1100|14|657552|13|523}
#VAR maps {300|42|537936|13|428}
#VAR fish {100|42|729624|13|580}
#VAR brandy {400|42|603624|11|542}
#VAR metals {850|28|415688|11|373}
#VAR honey {500|42|366744|11|329}
#VAR grapes {400|56|391216|11|351}
#VAR fertilizer {200|43|626424|11|563}
#VAR sap {205|11|288145|6|295}
#VAR furs {75|68|568956|6|582}
#VAR timber {2050|1|262046|6|268}
#VAR rations {65|34|246738|6|252}
#VAR ivory {300|37|525030|6|537}
#VAR flowers {285|56|541800|7|460}
#VAR arrows {30|47|220242|7|187}
#VAR bows {105|56|713048|7|606}
#VAR art {385|42|549150|7|466}
#VAR parchment {15|170|398310|7|338}
#VAR silver {180|10|207360|10|275}
#VAR jewels {300|20|691480|10|919}
#VAR silicate {190|21|459648|10|611}
#VAR nails {110|34|430848|10|572}
#VAR copper {120|6|82944|10|110}
#VAR wine {120|11|134376|2|99}
#VAR perfume {100|140|465920|2|345}
#VAR oils {80|56|302400|2|224}
#VAR incense {90|56|340368|2|252}
#VAR ink {80|85|109650|2|81}
#VAR weapons {180|13|260052|4|NA}
#VAR chains {170|7|132286|4|NA}
#VAR pelts {130|46|664700|4|NA}
#VAR armor {250|18|500076|4|NA}
#VAR mead {130|11|158950|4|NA}
#VAR books {160|28|0|16|0}
#VAR cloth {140|24|0|16|0}
#VAR spices {100|68|0|16|0}
#VAR beer {180|11|0|16|0}
#VAR dates {140|42|0|16|0}
#VAR bananas {150|34|73916|15|85}
#VAR seed {120|42|73080|15|84}
#VAR beans {95|48|66096|15|76}
#VAR rice {100|42|60816|15|70}
#VAR tobacco {130|56|105392|15|122}
#VAR opals {200|68|632672|12|550}
#VAR ambergris {180|56|788480|12|686}
#VAR shells {150|56|656880|12|571}
#VAR nets {100|28|263312|12|229}
#VAR kelp {80|42|315672|12|274}
#VAR ale {80|11|151184|1|121}
#VAR tar {120|8|164928|1|132}
#VAR salt {80|85|515440|1|413}
#VAR sugar {110|34|642532|1|515}
#VAR raisins {60|42|432936|1|347}
#TRIGGER {Price%s(%d)%sSize%s%d%sWeight%s%d%sfor one %w of (%w)} {#CLASS {test};%2 = %additem(%1,@%2);#CLASS 0;value %2 covered}
#TRIGGER {A covered wagon horse can carry (%d) %w of (%w). We'll pay you %n gold for that.} {#CLASS {test};%2 = %additem(%1,@%2);%2 = %additem(0,@%2);#CLASS 0}
#CLASS 0
;; ToDo
;; 1. Selective Valuing
;; 4. ADD Resume valuing
;; 5. ADD time passed since valuing


P.S. If anyone knows how to gag the local command echos, I'd be very grateful, I couldn't figure that out...
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Sat Dec 13, 2003 3:09 pm   
 
Nice Job :)

As long as you have trigger on commands set in preferences
you can trigger on local echo just as you would text from
the mud. I was fooling around with it some, but the best way
to do gag the value %w might be this,

Code:

#TRIGGER {value %w} {#SUBSTITUTE ""}


Cheers Caebryn
Reply with quote
Carabas
GURU


Joined: 28 Sep 2000
Posts: 434
Location: USA

PostPosted: Sun Dec 14, 2003 5:54 am   
 
Use the #SEND command. Smile

It will not produce a local echo of its argument.
Reply with quote
Tlaca
Beginner


Joined: 11 May 2003
Posts: 23
Location: Canada

PostPosted: Wed Dec 17, 2003 11:24 pm   
 
I don know what I did, but my trade script has lost its colour.
I don't usually bother with the zmud parser cause it always shows errors
even if the script works fine. Any ideas on why I don't display colours
anymore?

Tlaca
Reply with quote
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Thu Dec 18, 2003 1:09 am   
 
quote:
Originally posted by Tlaca

I don know what I did, but my trade script has lost its colour.
I don't usually bother with the zmud parser cause it always shows errors
even if the script works fine. Any ideas on why I don't display colours
anymore?

Tlaca



Whats it doing just not showing color, or actually showing the @CaebColor(x,x)?
Reply with quote
Tlaca
Beginner


Joined: 11 May 2003
Posts: 23
Location: Canada

PostPosted: Thu Dec 18, 2003 11:05 am   
 
It's just coming up with the medievia green. All one colour, no @caebcolor(x,x) or anything.

Tlaca
Reply with quote
Electron
Wanderer


Joined: 20 Nov 2001
Posts: 72

PostPosted: Thu Dec 18, 2003 4:09 pm   
 
That is very strange. Seems to work for me. What version of zMUD are you using? Also, by comes up with no colors, you are refering to the ztshow output correct?
Reply with quote
Tlaca
Beginner


Joined: 11 May 2003
Posts: 23
Location: Canada

PostPosted: Fri Dec 19, 2003 8:40 am   
 
I'm using 6.66, having not received upgrade notification, I presume this to be the latest.
It was the ztshow that was just green, however, I deleted and reloaded the caebcolor script.
Now it all seems to work fine.
The bs reporter had not color either, but now it does.
Evidently as I was fiddling around with the spellup script and trying to get
Carabas's seconds counter going, I deleted something or changed something
that caused a problem. Looks good so far though.

Tlaca
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net