Here is the SysLog:
Code: Select all
[02/19 07:04:27] [scripts/misc/equiptest.ecl]: { { 5061, 5062, 5063, 5064, 5065, 5066, 5067, 5068, 5069, 5070, 5071, 5072, 5073, 5074, 5075, 7168, 7174, 7176, 7178 }, { 5076, 5077, 5078, 5079, 5080, 5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 5089, 5090, 7170, 7180 }, { 5093, 5094, 5095, 5096, 5097, 5098, 5099, 5100, 5101, 5102, 5103, 5104, 5105, 5106 }, { 5051, 5052, 5053, 5054, 5055, 5056, 5057, 5058, 5059, 5060 }, { 5198, 5199, 5200, 5201, 5202, 5203, 5204, 5205, 5206, 5207 }, { 5128, 5129, 5130, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 5138, 5139, 5140, 5141, 5142, 5143, 5144, 5145, 5146, 7172 }, { 7026, 7027, 7028, 7029, 7030, 7031, 7032, 7033, 7034, 7035 } }
This is the array thas is being returned. It looks as though there are arrays in an array. Could this cause issues with "in" ? If it would help, I'll work on it getting it to return a single value for each element in the array.
I'll post a sample of the function so you can see how it's done. I'm completely open to rewriting the function if you can see a better approach.
f
Code: Select all
unction CheckRestrictedArmour(who)
var Class := GetObjProperty(who, "Class");
var RestrictedArmour := array{};
case(Class)
CLASS_MAGE: //other classes removed to reduce size
RestrictedArmour.append(GetArmourGraphics("Leather"));
RestrictedArmour.append(GetArmourGraphics("Studded Leather"));
RestrictedArmour.append(GetArmourGraphics("Ringmail"));
RestrictedArmour.append(GetArmourGraphics("Chainmail"));
RestrictedArmour.append(GetArmourGraphics("Bone"));
RestrictedArmour.append(GetArmourGraphics("Platemail"));
RestrictedArmour.append(GetArmourGraphics("Shields"));
default:
break;
endcase
return RestrictedArmour;
endfunction
Code: Select all
function GetArmourGraphics(armour)
case(armour)
"Leather":
return array{5061, 0x13c5, 0x13c6, 0x13c7, 0x13c8, 0x13c9, 0x13ca, 0x13cb, 0x13cc, 0x13cd, 0x13ce, 0x13cf, 0x13d0, 0x13d1, 0x13d2, 0x13d3, 0x1c00, 0x1c06, 0x1c08, 0x1c0a};
"Studded Leather":
return array{0x13d4, 0x13d5, 0x13d6, 0x13d7, 0x13d8, 0x13d9, 0x13da, 0x13db, 0x13dc, 0x13dd, 0x13de, 0x13df, 0x13e0, 0x13e1, 0x13e2, 0x1c02, 0x1c0c};
"Ringmail":
return array{0x13e5, 0x13e6, 0x13e7, 0x13e8, 0x13e9, 0x13ea, 0x13eb, 0x13ec, 0x13ed, 0x13ee, 0x13ef, 0x13f0, 0x13f1, 0x13f2};
"Chainmail":
return array{0x13bb, 0x13bc, 0x13bd, 0x13be, 0x13bf, 0x13c0, 0x13c1, 0x13c2, 0x13c3, 0x13c4};
"Bone":
return array{0x144e, 0x144f, 0x1450, 0x1451, 0x1452, 0x1453, 0x1454, 0x1455, 0x1456, 0x1457};
"Platemail":
return array{0x1408, 0x1409, 0x140a, 0x140b, 0x140c, 0x140d, 0x140e, 0x140f, 0x1410, 0x1411, 0x1412, 0x1413, 0x1414, 0x1415, 0x1416, 0x1417, 0x1418, 0x1419, 0x141a, 0x1c04};
"Shields":
return array{0x1b72, 0x1b73, 0x1b74, 0x1b75, 0x1b76, 0x1b77, 0x1b78, 0x1b79, 0x1b7a, 0x1b7b};
default:
break;
endcase
endfunction