Equip item v3

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: equip_item_v3 register1

register1 = Start of 4 continuous registers.

  • register 1 = Player slot (0-3)
  • register 2 = Item byte 1 (Type)
  • register 3 = Item byte 2
  • register 4 = Item byte 3


Use

Used to equip any item to the character, even if they cannot normally. The item be will put in their inventory and put in the appropriate equipment slot. Consumables will just be put in the inventory as they cannot be equipped.

Best suited for NPCs due to the items being created.

Example


100:     get_slotnumber  R250  //Puts the player's slot number in R250
         let R1, R250 //Puts the player slot into the start of continuous registers
         leti R2, 00000002
         leti R3, 00000030
         leti R4, 00000000 //Sets the three bytes for the item to be made
         equip_item_v3  R1 //Creates an Elenor Mag (023000), puts it in the inventory, and equips it.
         ret

Also see

get_slotnumber, Unequip_item_V3, Item_create2