アイテム/武器/鎧を選択した後にチェックする余分なもの – Dahlys_SelectItemPlus.js

タイトル
Extra Stuff to Check After Selecting Item/Weapon/Armor
作者名
ヘルプ
==============================================================================
Select Item Plus
==============================================================================

Used the Select Item command and don't know what else to do but check it's id?
Do more with that itemId stored in a variable!
Check if:
- It's name includes Herb, i.e. Power Herb
- It's a regular, key, hidden A or hidden B item
- It's consumable
- If it has an element
- If it's worth more/less/equal to a certain price
- If it belongs to a certain category --> note: <menu category: food>

Select Items not enough? Used some plugin to dump a weapon/armor id into a
variable instead? Here we go...
Check if:
- The weapon type is e.g. Sword
- The weapon is worth more/less/equal to a certain price
- The weapon's parameter (e.g. atk) is more/less/equal to a value
- The weapon's element is e.g. Fire
- The equip type is a shield/head/body/accessory
- The armor type is heavy/light
- The armor is worth more/less/equal to a certain price
- The armor's parameter (e.g. def) is more/less/equal to a value

------------------------------------------------------------------------------
How to Use
------------------------------------------------------------------------------

All scripts should be used in conditional branches.

Select Item:

varItem = variable where selected item id is stored from Select Item

Select.ItemName(varItem, name)
e.g. Select.ItemName(5, 'Herb')
Checks if selected item name contains Herb

Select.ItemType(varItem, type)
e.g. Select.ItemType(5, 'Key')
Checks if selected item is a Key Item
Types are: 'Regular'/'Key'/'HiddenA'/'HiddenB'

Select.ItemConsumable(varItem)
e.g. Select.ItemConsumable(5)
Checks if selected item is consumable

Select.ItemElement(varItem, elem)
e.g. Select.ItemElement(5, 'Fire')
Checks if selected item has the Fire element
Element has to one of those in Database Types Elements

Select.ItemPrice(varItem, price, operator)
e.g. Select.ItemPrice(5, 500, 'moreE')
Checks if selected item is worth more than equal to 500G
Operators: 'more'/'moreE'/'less'/'lessE'/'equal'

Select.ItemCategory(varItem, category)
e.g. Select.ItemCategory(5, 'Potions')
Checks if selected item belongs to item category Potions.
Item category must be defined in item note as either:
<Menu Category: Potions> or <Menu Categories: Potions, Chemicals>
If item has multiple categories, as long as one matches, the condition is true.

Select Weapon:

varW = variable where selected item id is stored from Select Weapon

Select.Wtype(varW, wType)
e.g. Select.Wtype(5, 'Sword')
Checks if selected weapon is a Sword
wType has to one of those in Database Types Weapon Types

Select.WPrice(varW, price, operator)
e.g. Select.WPrice(5, 1000, 'less')
Checks if selected weapon is worth less than 1000G
Operators: 'more'/'moreE'/'less'/'lessE'/'equal'

Select.WParam(varW, param, value, operator)
e.g. Select.WParam(5, 'atk', 100, 'more')
Checks if selected weapon adds more than 100 to Attack
Parameters: 'mhp'/'mmp'/'atk'/'def'/'mat'/'mdf'/'agi'/'luk'
Operators: 'more'/'moreE'/'less'/'lessE'/'equal'

Select.WElement(varW, elem)
e.g. Select.WElement(5, 'Ice')
Checks if selected item has the Ice element
Element has to one of those in Database Types Elements

Select Armor:

varA = variable where selected item id is stored from Select Armor

Select.Etype(varA, eType)
e.g. Select.Etype(5, 'Accessory')
Checks if selected armor is an Accessory
eType has to one of those in Database Types Eqiupment Types

Select.Atype(varA, aType)
e.g. Select.Atype(5, 'Heavy Armor')
Checks if selected armor is a Heavy Armor
eType has to one of those in Database Types Armor Types

Select.APrice(varA, price, operator)
e.g. Select.APrice(5, 200, 'equal')
Checks if selected armor is worth exactly 200G
Operators: 'more'/'moreE'/'less'/'lessE'/'equal'

Select.AParam(varA, param, value, operator)
e.g. Select.AParam(5, 'mdf', 80, 'moreE')
Checks if selected armor adds more than equal to 80 to Magic Defense
Parameters: 'mhp'/'mmp'/'atk'/'def'/'mat'/'mdf'/'agi'/'luk'
Operators: 'more'/'moreE'/'less'/'lessE'/'equal'

==============================================================================
パラメータ
( なし )
ライセンス表記

紹介ページ https://github.com/dahlys/rpgmaker/blob/master/Dahlys_SelectItemPlus.js