Merchandise:Buy

Sethric

Active Member
I'm having trouble with the merchandise command, maybe someone can point out where the error in the syntax is.

If I have some ethereal filament on me, I can walk over to the broker, type into the ~ box:
Me.Merchandise[ethereal filament]:Sell[1]
and it'll sell one of them to her no problem.
If i open the fuel merchant and type:
Me.Merchandise[ethereal filament]:Buy[1]
it gives me a message in the main chat that says:
You do not meet all the requirements to buy this item.
I do have plenty of inventory space and $. This is in my GH.
Can anyone mention the way i SHOULD be doing this?
Thanks very much.
 

Amadeus

The Maestro
Staff member
Everything you need to know is in the patch notes....from 2005!

Some things may have changed over the years, so if something below doesn't work or falters, just search the patch notes for more information. However, I believe that most of what is written below still applies to ISXEQ2 today.


Code:
27 December 2005 -- By Amadeus
[ISXEQ2-20051220d.zip]
* Added a new member to the Vendor datatype "Item".  This new member will now
  allow you to access merchandise and consignment datatypes without having to
  know if your target is a merchant or a broker.  For example, previously you
  would have used "echo ${Vendor.Merchant[candle].Price}"  ...now, you can 
  simply use "echo ${Vendor.Item[candle].Price}" ..and isxeq2 will automatically
  decide if what you have targetted is a merchant or a broker and act accordingly.
  (I have left the old members in, so your old scripts should still work as they
  always have.)



18 August 2005 -- By Amadeus
* Added a new TLO called "Vendor".  It returns a 'vendor' object type.  Please note that
  the Vendor TLO will not work unless you have the vendor actor targeted.  This TLO will
  work for any NPC merchants, in-room PC merchants, and Brokers!

* Added a new Datatype called "vendor".
  ~ Added the following new MEMBERS to the "vendor" datatype:
     - NumItemsForSale    (int type)  [Brokers will always return the number of items on the page (ie, 8)]
     - Commission         (float type, in percent)  [Non-Brokers will be zero.]
     - CurrentSearchPage  (int type)  [Only works for brokers]
     - TotalSearchPages   (int type)  [Only works for brokers]
     - IsBroker              (bool type)
     - IsMerchant          (bool type)
     
  ~ Added the following new METHODS to the "vendor" datatype:
     - GotoSearchPage[#]             [Only works for brokers]       


* Added a new Datatype called "merchandise". 
  ~ Added the following new MEMBERS to the "merchandise" datatype:
     - Name         (string type)
     - Price        (float type) (in silver pieces)
     - PriceString  (string type) (format: %dp,%dg,%ds,%dc...if StatusCost>0 then %dSP,%dp,%dg,%ds,%dc)   
     - StatusCost   (int type) 
     - Quantity     (int type)    (Note: merchandise on NPC vendors will always have MaxQuantity
                                         on them since their stock is unlimited.)
     - MaxQuantity  (int type)    [returns 1 for items that are non stackable]
     - IsForSale    (bool type)   [returns FALSE if the "not for sale" checkbox/flag is selected]
     
  ~ Added the following new METHODS to the "merchandise" datatype:
     - Buy[<quantity>]  (If no quantity is given, then buys 1. 
                         Quantity only works for items that are stackable.
                         If you try to buy more than MaxQuantity, Quantity will default to MaxQuantity.) 
     - Sell[<quantity>] (If no quantity is given, then it sells the Quantity of that stack (or 1 if nonstackable.
                         This method is typically used via Me.Merchandise[]
                         If you try sell more than the current quantity of that stack, "Quantity" will default
                         to the current quantity of the stack.)       
     - Examine            (This brings up the examine window)
                                  
                                                  
* Added a new Datatype called "consignment". 
  ~ Added the following new MEMBERS to the "consignment" datatype:
     - Name               (string type)
     - Quantity              (int type)
     - Price              (float type)  (in silver pieces) -- with commission
     - BasePrice          (float type)  (in silver pieces) -- without commission
     - PriceString        (string type) (format: %dp,%dg,%ds,%dc) -- with commission
     - BasePriceString    (string type) (format: %dp,%dg,%ds,%dc) -- without commission  
     - SkillType          (string type) (skill needed to use the item, blank on many items)

     
  ~ Added the following new METHODS to the "consignment" datatype:
     - Buy
     - Examine            (This brings up the examine window)
     
     
* Added the following new MEMBERS to the 'character' datatype:
  ~ Merchandise[#]           (merchandise type)
  ~ Merchandise[<string>]    (merchandise type)
  ~ NumItemsForSale          (int type)
 

Sethric

Active Member
It was from the fuel vendor, not the broker.
You got it exactly Primalz, thank you!
I realize the problem was that when i had the item, it was mine, Me.Merchandise.
When the vendor had it, it wasnt mine, it was his, hence, vendor.item.

Thanks very much for the learning opportunity!
 
Top Bottom