Difference between revisions of "BB get number in pack"

From Unofficial QEdit Wiki Guide
Jump to: navigation, search
Line 7: Line 7:
 
  <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:purple'>BB_get_number_in_pack </span> R10 <span style='color:orange'>//Set R10 to number of items in inventory.</span>
 
  <span style='color:blue'>100:    </span><span style='color:purple'>BB_get_number_in_pack </span> R10 <span style='color:orange'>//Set R10 to number of items in inventory.</span>
  <span style='color:green'>        jmpi_= </span> R10, 0000001E, 101<span style='color:orange'>//If R10 equals 30 jump to function 101</span>
+
  <span style='color:green'>        jmpi_= </span> R10, 0000001E, 101 <span style='color:orange'>//If R10 equals 30 jump to function 101</span>
 
  <span style='color:green'>        ret</span>
 
  <span style='color:green'>        ret</span>
  <span style='color:blue'>101:    </span><span style='color:green'>message </span>00000050, 'Your inventory is full.'
+
  <span style='color:blue'>101:    </span><span style='color:green'>message </span>00000050, 'Your inventory is full.' <span style='color:orange'>//Have NPC with ID 80 dec (00000050 hex) display message</span>
 
  <span style='color:green'>        mesend</span>
 
  <span style='color:green'>        mesend</span>
 
  <span style='color:green'>        ret</span>
 
  <span style='color:green'>        ret</span>
 
  </span>
 
  </span>

Revision as of 00:16, 24 March 2011

Syntax: BB_get_number_in_pack WW

Format

  • WW (Reg) = Get number of items in inventory and set register to value

Example


100:     BB_get_number_in_pack  R10 //Set R10 to number of items in inventory.
         jmpi_=  R10, 0000001E, 101 //If R10 equals 30 jump to function 101
         ret
101:     message 00000050, 'Your inventory is full.' //Have NPC with ID 80 dec (00000050 hex) display message
         mesend
         ret