• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Requested] /changeoutfit command

DreadShi

Member
Joined
May 18, 2019
Messages
180
Reaction score
7
i have more than 1300 outfits in server and want to able to change myoutfit through this number
tfs `1.3
 
Solution
E
LUA:
-- keep it ordered
local invalidTypes = {
    1, 135, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
    174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
    189, 190, 191, 411, 415, 424, 439, 440, 468, 469, 474, 475, 476, 477, 478,
    479, 480, 481, 482, 483, 484, 485, 501, 518, 519, 520, 524, 525, 536, 543,
    549, 576, 581, 582, 597, 616, 623, 625, 638, 639, 640, 641, 642, 643, 645,
    646, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 678, 700,
    701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 713, 715, 718, 719,
    722, 723, 737, 741, 742, 743, 744, 748, 751, 752, 753, 754, 755, 756, 757,
    758, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775...
try this
LUA:
function onSay(cid, words, param)
     local player = Player(cid)
     if not player:getGroup():getAccess() then
         return true
     end

     local t = param:split(",")
     local lookType = tonumber(t[1])
     if not lookType then
         lookType = MonsterType(t[1]) and MonsterType(t[1]):getOutfit().lookType
         if not lookType then
             player:sendCancelMessage("A monster with that name does not exist.")
             return false
         end
     end
     if t[2] then
         playerx, player = player, Player(t[2]:gsub("^%s*(.-)%s*$", "%1"))
         if not player then
             playerx:sendCancelMessage("A player with that name does not exist or is not online.")
             return false
         end
     end
     if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType <= 595 then
         local playerOutfit = player:getOutfit()
         playerOutfit.lookType = lookType
         player:setOutfit(playerOutfit)
     else
         player = playerx or player
         player:sendCancelMessage("A look type with that id does not exist.")
     end
     return false
end

but this command is for GM. Should work like /looktype 530 or /looktype Adorius Black, but I am not sure. I found it somewhere on OTLand time ago.
 
Last edited:
try this
LUA:
function onSay(cid, words, param)
     local player = Player(cid)
     if not player:getGroup():getAccess() then
         return true
     end

     local t = param:split(",")
     local lookType = tonumber(t[1])
     if not lookType then
         lookType = MonsterType(t[1]) and MonsterType(t[1]):getOutfit().lookType
         if not lookType then
             player:sendCancelMessage("A monster with that name does not exist.")
             return false
         end
     end
     if t[2] then
         playerx, player = player, Player(t[2]:gsub("^%s*(.-)%s*$", "%1"))
         if not player then
             playerx:sendCancelMessage("A player with that name does not exist or is not online.")
             return false
         end
     end
     if lookType >= 0 and lookType ~= 1 and lookType ~= 135 and lookType ~= 411 and lookType ~= 415 and lookType ~= 424 and (lookType <= 160 or lookType >= 192) and lookType ~= 439 and lookType ~= 440 and lookType ~= 468 and lookType ~= 469 and (lookType < 474 or lookType > 485) and lookType ~= 501 and lookType ~= 518 and lookType ~= 519 and lookType ~= 520 and lookType ~= 524 and lookType ~= 525 and lookType ~= 536 and lookType ~= 543 and lookType ~= 549 and lookType ~= 576 and lookType ~= 581 and lookType ~= 582 and lookType <= 595 then
         local playerOutfit = player:getOutfit()
         playerOutfit.lookType = lookType
         player:setOutfit(playerOutfit)
     else
         player = playerx or player
         player:sendCancelMessage("A look type with that id does not exist.")
     end
     return false
end

but this command is for GM. Should work like /looktype 530 or /looktype Adorius Black, but I am not sure. I found it somewhere on OTLand time ago.
that mean it's limited to 580 looktype only , after typing /looktype 1360 i get error saying there is no outfit with this id because it's not in the list of the script
 
LUA:
-- keep it ordered
local invalidTypes = {
    1, 135, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
    174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
    189, 190, 191, 411, 415, 424, 439, 440, 468, 469, 474, 475, 476, 477, 478,
    479, 480, 481, 482, 483, 484, 485, 501, 518, 519, 520, 524, 525, 536, 543,
    549, 576, 581, 582, 597, 616, 623, 625, 638, 639, 640, 641, 642, 643, 645,
    646, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 678, 700,
    701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 713, 715, 718, 719,
    722, 723, 737, 741, 742, 743, 744, 748, 751, 752, 753, 754, 755, 756, 757,
    758, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777,
    778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792,
    793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807,
    808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822,
    823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837,
    838, 839, 840, 841, 847, 864, 865, 866, 867, 871, 872, 880, 891, 892, 893,
    894, 895, 896, 897, 898, 911, 912, 917, 930, 941, 942, 946, 953, 954, 983,
    995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
    1009, 1010, 1012, 1014, 1015, 1022, 1028, 1074, 1075, 1080, 1081, 1082, 1083, 1084, 1085,
    1086, 1087, 1089, 1090, 1096, 1097, 1098, 1099, 1100, 1141, 1145, 1153, 1154, 1155, 1156,
    1160, 1170, 1171, 1172, 1176, 1177, 1178, 1182, 1192, 1193, 1194, 1198, 1215, 1216, 1225,
    1226, 1227, 1228, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1250, 1254, 1263, 1267,
    1273, 1274
}

function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    local lookType = tonumber(param)
    if lookType >= 0 and lookType < 1350 and not table.contains(invalidTypes, lookType) then
        local playerOutfit = player:getOutfit()
        playerOutfit.lookType = lookType
        player:setOutfit(playerOutfit)
    else
        player:sendCancelMessage("A look type with that id does not exist.")
    end
    return false
end

change 1350 to your desired number
 
Solution
LUA:
-- keep it ordered
local invalidTypes = {
    1, 135, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
    174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
    189, 190, 191, 411, 415, 424, 439, 440, 468, 469, 474, 475, 476, 477, 478,
    479, 480, 481, 482, 483, 484, 485, 501, 518, 519, 520, 524, 525, 536, 543,
    549, 576, 581, 582, 597, 616, 623, 625, 638, 639, 640, 641, 642, 643, 645,
    646, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 678, 700,
    701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 713, 715, 718, 719,
    722, 723, 737, 741, 742, 743, 744, 748, 751, 752, 753, 754, 755, 756, 757,
    758, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777,
    778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792,
    793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807,
    808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822,
    823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837,
    838, 839, 840, 841, 847, 864, 865, 866, 867, 871, 872, 880, 891, 892, 893,
    894, 895, 896, 897, 898, 911, 912, 917, 930, 941, 942, 946, 953, 954, 983,
    995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008,
    1009, 1010, 1012, 1014, 1015, 1022, 1028, 1074, 1075, 1080, 1081, 1082, 1083, 1084, 1085,
    1086, 1087, 1089, 1090, 1096, 1097, 1098, 1099, 1100, 1141, 1145, 1153, 1154, 1155, 1156,
    1160, 1170, 1171, 1172, 1176, 1177, 1178, 1182, 1192, 1193, 1194, 1198, 1215, 1216, 1225,
    1226, 1227, 1228, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1250, 1254, 1263, 1267,
    1273, 1274
}

function onSay(player, words, param)
    if not player:getGroup():getAccess() then
        return true
    end

    local lookType = tonumber(param)
    if lookType >= 0 and lookType < 1350 and not table.contains(invalidTypes, lookType) then
        local playerOutfit = player:getOutfit()
        playerOutfit.lookType = lookType
        player:setOutfit(playerOutfit)
    else
        player:sendCancelMessage("A look type with that id does not exist.")
    end
    return false
end

change 1350 to your desired number

Quick question, do you know why there's invalid lookTypes?
 
Back
Top