T
Tibia Demon
Guest
i have made this to check if player have set but how i say which item he don't have?
i need this to say what items he is missing
Lua:
local DemonItems = {
[CONST_SLOT_HEAD] = {2493},
[CONST_SLOT_NECKLACE] = {2197},
[CONST_SLOT_BACKPACK] = {10518},
[CONST_SLOT_ARMOR] = {2494},
[CONST_SLOT_RIGHT] = {2520},
[CONST_SLOT_LEFT] = {7420},
[CONST_SLOT_LEGS] = {2495},
[CONST_SLOT_FEET] = {5462},
[CONST_SLOT_RING] = {2214},
}
for slotId = CONST_SLOT_HEAD, CONST_SLOT_RING do
local slotItem = player:getSlotItem(slotId)
if not (slotItem) or not (table.contains(DemonItems[slotId], slotItem:getId())) then
player:sendTextMessage(MESSAGE_INFO_DESCR, "You don't have "..slotItem:getName()..".")
return true
end
end
Lua:
player:sendTextMessage(MESSAGE_INFO_DESCR, "You don't have "..slotItem:getName()..".")