Skip to content

Sell To Shop

Sell To Shop

Sells an item from the party's inventory to the currently open shop.

Properties

System

Name Explanation Type
Result The switch to store whether the sale succeeded. Switch or Value
Shop Item The variable referencing the shop item to operate on. Variable or Value
Store Results When enabled, the result of the sale attempt is stored in a switch. Toggle

Examples

Sell an Item to the Shop

This sells the item referenced by Global Variable 0 to the currently open shop.

sell($gv[0]);
{"Data":{"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"ShopItem":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreResults":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Shop.SellToShopCommand"}

Sell an Item and Store Whether the Sale Succeeded

This sells the item referenced by Local Variable 1 to the shop and stores whether the sale succeeded in Global Switch 0.

$gs[0] = sell($lv[1]);
{"Data":{"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"ShopItem":{"IsGlobalVariable":false,"IsLocalVariable":true,"IsValue":false,"Value":"","VariableIndex":1,"Metadata":null},"StoreResults":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Shop.SellToShopCommand"}