Difference between revisions of "Get item id"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
(Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>get_item_id </span>register1</span> * ''register1'' = Puts the item's slot val...")
 
(Use)
 
(One intermediate revision by one other user not shown)
Line 7: Line 7:
 
Used with [[open_pack_select]] to determine the slot value of the item the player selects, often followed by [[get_item_info]] to get the item's full information.
 
Used with [[open_pack_select]] to determine the slot value of the item the player selects, often followed by [[get_item_info]] to get the item's full information.
  
 
+
Full hex lists and info [[item_hex_codes|here]].
  
 
==Example==
 
==Example==
 
  <span style='font-size:12px;font-family:courier'>
 
  <span style='font-size:12px;font-family:courier'>
  <span style='color:blue'>100:    </span><span style='color:green'>open_pack_select </span> R100<span style='color:orange'>//Opens the player's inventory for them to select an item.</span>
+
  <span style='color:blue'>100:    </span><span style='color:green'>open_pack_select </span><span style='color:orange'>//Opens the player's inventory for them to select an item.</span>
 +
<span style='color:green'>        get_item_id</span> R100<span style='color:orange'>//Stores the player's selection in R100.</span>
 
  <span style='color:green'>        jmpi_=</span> R100, FFFFFFFF, 200<span style='color:orange'>//If the player cancels the selection.</span>
 
  <span style='color:green'>        jmpi_=</span> R100, FFFFFFFF, 200<span style='color:orange'>//If the player cancels the selection.</span>
 
  <span style='color:green'>        get_item_info</span> R100, R110<span style='color:orange'>//Stores the player's selection from open_pack_select into R110.</span>
 
  <span style='color:green'>        get_item_info</span> R100, R110<span style='color:orange'>//Stores the player's selection from open_pack_select into R110.</span>
Line 19: Line 20:
 
  <span style='color:green'>        ret </span>
 
  <span style='color:green'>        ret </span>
 
  </span>
 
  </span>
 +
 
==Also see==
 
==Also see==
 
[[window_msg]], [[ret]], [[open_pack_select]], [[winend]], [[get_item_info]], [[Jmpiue]]
 
[[window_msg]], [[ret]], [[open_pack_select]], [[winend]], [[get_item_info]], [[Jmpiue]]

Latest revision as of 19:11, 28 April 2022

Syntax

Syntax: get_item_id register1

  • register1 = Puts the item's slot value into a register.

Use

Used with open_pack_select to determine the slot value of the item the player selects, often followed by get_item_info to get the item's full information.

Full hex lists and info here.

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.
         ret 
200:     window_msg Canceling your selection I see?//Cancels their selection.
        winend R100//Closes the window message.
         ret 

Also see

window_msg, ret, open_pack_select, winend, get_item_info, Jmpiue