User Tools

Site Tools


tnhscript:shoppingcart

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tnhscript:shoppingcart [2009/02/05 23:28]
127.0.0.1 external edit
tnhscript:shoppingcart [2010/11/23 00:11] (current)
Line 1: Line 1:
 ====== ShoppingCart ====== ====== ShoppingCart ======
  
-Ignores ​the cart if the link doesn't exist(Useful when using the script as lock.)+The main part of an in-game store. Purchased tems are added to the object's inventory before being paid forIf there is a $$Cart$$ link, then that object is the container for the items. While unpaid items are in the inventory, the object will be locked. When using a different object for the cart, you should create ​``[[dromed:​link:​Lock]]`` link from the container to this object.
  
-When turned off, the script will send ``Reset`` to all objects that link to this one with $$Store$$. ​It will also clear the contents ​of the cart or, if no cart is specified, it sends ``Reset`` to all object that link to this one with $$Cart$$.+Items are paid for by sending ``TurnOn``. If there isn't enough money, a ``[[dromed:​link:​ScriptParams]]`` link with the data set to $$ErrorOutput$$ will be triggered.  ​When turned off, the script will clear the inventory and send ``Reset`` to all objects that link to this one with $$Store$$. ​The cost of the items is read from the quest variable named in ``[[dromed:​property:​TrapQVar|Trap\Quest Var]]``.
  
 ^Inherits | [[GenericTrap]] ​ | ^Inherits | [[GenericTrap]] ​ |
Line 10: Line 10:
 ^Parameters | $$vendor$$ //​(string)// ​ | ''​gold_only'',​ ''​gems_only'',​ ''​goods_only'',​ ''​gold_first'',​ ''​even'' ​ | ^Parameters | $$vendor$$ //​(string)// ​ | ''​gold_only'',​ ''​gems_only'',​ ''​goods_only'',​ ''​gold_first'',​ ''​even'' ​ |
  
----- +==== See Also ==== 
-[[index|Back to index]]+  ​* ​[[PurchaseItem]] 
  
tnhscript/shoppingcart.1233876485.txt.gz · Last modified: 2009/02/26 01:40 (external edit)