T
Tibia Demon
Guest
Can someone with higher Lua level tell me how to write the 3 examples below on a table or best way to beautifying it
I don't have a full script and the 3 examples above are just created randomly now.
Lua:
if (player:getItemCount(2672) >= 1) and (player:getItemCount(2671) >= 1) and (player:getItemCount(2670) >= 1) and (player:getItemCount(2669) >= 1) and (player:getItemCount(2668) >= 1) and (player:getItemCount(2667) >= 1) and (player:getItemCount(2666) >= 1) then
Lua:
if (player:removeItem(2149, 1)) and (player:removeItem(2150, 1)) and (player:removeItem(2151, 1)) and (player:removeItem(2153, 1)) and (player:removeItem(2154, 1)) and (player:removeItem(2155, 1)) and (player:removeItem(2156, 1)) then
Lua:
if player:getSlotItem(CONST_SLOT_HEAD).itemid == X[i][1] and player:getSlotItem(CONST_SLOT_ARMOR).itemid == X[i][2] and player:getSlotItem(CONST_SLOT_LEGS).itemid == X[i][3] and player:getSlotItem(CONST_SLOT_FEET).itemid == X[i][4] and player:getSlotItem(CONST_SLOT_RING).itemid == X[i][5] and player:getSlotItem(CONST_SLOT_BACKPACK).itemid == X[i][6] and player:getSlotItem(CONST_SLOT_LEFT).itemid == X[i][7] then
I don't have a full script and the 3 examples above are just created randomly now.