Difference between revisions of "Item select"
From Unofficial QEdit Wiki Guide
(Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>item_select </span>register</span> ''register1'' = Register obtained from item...") |
(→Example) |
||
Line 24: | Line 24: | ||
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
<span style='color:blue'>200: </span><span style='color:green'>window_msg </span>Canceling your selection I see?<span style='color:orange'>//Cancels their selection.</span> | <span style='color:blue'>200: </span><span style='color:green'>window_msg </span>Canceling your selection I see?<span style='color:orange'>//Cancels their selection.</span> | ||
− | <span style='color:green'> winend </span> | + | <span style='color:green'> winend </span><span style='color:orange'>//Closes the window message.</span> |
<span style='color:green'> ret </span> | <span style='color:green'> ret </span> | ||
</span> | </span> |
Latest revision as of 19:11, 19 September 2021
Contents
Syntax
Syntax: item_select register
register1 = Register obtained from item selected
- Prevents an item from being selected when using open_pack_select
Use
Used with get_item_id to determine the slot value of the item the player selects, often followed by get_item_info to get the item's full information, and open_pack_select to open the menu to select an item. This opcode is primarily used in trading multiple items for another item.
Example
100: open_pack_select //Opens the player's inventory for them to select an item.
get_item_id R100//Stores the player's selection in R100.
jmpi_= R100, FFFFFFFF, 200//If the player cancels the selection.
get_item_info R100, R110//Stores the player's selection from open_pack_select into R110.
window_msg OK, please select the next item. //window message.
winend //Closes the window message.
101: select_item R100//Prevents player from choosing item in slot obtained in R100.
open_pack_select //Opens the player's inventory for them to select an item.
get_item_id R101//Stores the player's selection in R100.
jmpi_= R101, FFFFFFFF, 200//If the player cancels the selection.
ret
200: window_msg Canceling your selection I see?//Cancels their selection.
winend //Closes the window message.
ret
Also see
window_msg, ret, get_item_id, winend, get_item_info, Jmpiue, open_pack_select