for(%i = 0; %i < %player.getDatablock().maxTools; %i++){ %tool = %player.tool[%i]; if(%tool == 0) { //What to do on an empty slot }}
Code: [Select]for(%i = 0; %i < %player.getDatablock().maxTools; %i++){ %tool = %player.tool[%i]; if(%tool == 0) { //What to do on an empty slot }}This would search for the first empty slot.This is from Destiny's addItem Script.