Difference between revisions of "Item create2"
From Unofficial QEdit Wiki Guide
LunarFuror (Talk | contribs) (→Syntax) |
LunarFuror (Talk | contribs) (→Example) |
||
Line 13: | Line 13: | ||
<span style='color:blue'> </span><span style='color:green'>leti </span>R201, 00000045 | <span style='color:blue'> </span><span style='color:green'>leti </span>R201, 00000045 | ||
<span style='color:blue'> </span><span style='color:green'>leti </span>R202, 00000001 | <span style='color:blue'> </span><span style='color:green'>leti </span>R202, 00000001 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R203, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R204, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R205, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R206, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R207, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R208, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R209, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R210, 00000000 | ||
+ | <span style='color:blue'> </span><span style='color:green'>leti </span>R211, 00000000 | ||
<span style='color:blue'> </span><span style='color:green'>item_create2 </span>R200, R220 <span style='color:orange'>//Tries to give the Snow Queen as denoted by register R200 (through 202) and store the result in R220</span> | <span style='color:blue'> </span><span style='color:green'>item_create2 </span>R200, R220 <span style='color:orange'>//Tries to give the Snow Queen as denoted by register R200 (through 202) and store the result in R220</span> | ||
<span style='color:blue'> </span><span style='color:green'>jmpi_! </span>R220, FFFFFFFF, 450 <span style='color:orange'>//If R200 is NOT equal to -1 go to function 450</span> | <span style='color:blue'> </span><span style='color:green'>jmpi_! </span>R220, FFFFFFFF, 450 <span style='color:orange'>//If R200 is NOT equal to -1 go to function 450</span> |
Revision as of 17:35, 28 April 2022
Contents
Syntax
Syntax: item_create2 register output
- register = Starting register in a set of 12 (many items need only 3), this denotes the weapon you are checking for.
- output = The register the output of the check is stored in. Returns FFFFFFFF if no item was found (IE: the inventory was full, see getting the Soul Eater in From the Depths). Otherwise returns the slot number.
Use
Tries to add an item to the inventory of the player.
Example
100: leti R200, 00000000 //Sets these registers to 3 bytes of 00 45 01 this denotes the Snow Queen
leti R201, 00000045
leti R202, 00000001
leti R203, 00000000
leti R204, 00000000
leti R205, 00000000
leti R206, 00000000
leti R207, 00000000
leti R208, 00000000
leti R209, 00000000
leti R210, 00000000
leti R211, 00000000
item_create2 R200, R220 //Tries to give the Snow Queen as denoted by register R200 (through 202) and store the result in R220
jmpi_! R220, FFFFFFFF, 450 //If R200 is NOT equal to -1 go to function 450
ret