local maleOutfits = {128, 129, 130, 131, 132, 133, 134, 147, 148, 149, 150, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512, 516, 541, 574, 577, 610, 619, 633, 634, 637, 664, 667, 684, 695, 697, 699}
local femaleOutfits = {136, 137, 141, 139, 140, 138, 142, 143, 144, 145, 146, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 431, 433, 464, 466, 471, 513, 514, 542, 575, 578, 618, 620, 632, 578, 636, 665, 578, 683, 694, 696, 698}
function onModalWindow(player, modalWindowId, buttonId, choiceId)
player:unregisterEvent("modalad")
if modalWindowId == 1000 then
if buttonId == 100 then
if player:hasOutfit(femaleOutfits[choiceId], 3) or player:hasOutfit(maleOutfits[choiceId], 3) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You already have these addons.')
return false
end
if(not player:removeItem(8982, 1)) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Your doll appears to be missing, please try again!')
return false
end
player:addOutfitAddon(maleOutfits[choiceId], 3)
player:addOutfitAddon(femaleOutfits[choiceId], 3)
player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
end
end
end