Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function contains(table, val)
- if val ~= nil then
- for i=1,#table do
- if table[i] == val then
- return true
- end
- end
- return false
- else
- return false
- end
- end
- local shid = {1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261}
- local arid = {1262, 1263, 1264, 1265, 1267, 1268, 1269, 1270}
- local bwid = {1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470}
- local swid = {1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1523}
- if unit.GetEquipItem(3) ~= nil then
- if contains(shid, unit.GetEquipItem(3).dataID) then
- if contains(bwid, unit.GetEquipItem(2).dataID)then
- unit.UnequipItem(unit.GetEquipItem(3).id)
- end
- end
- end
- if unit.GetEquipItem(3) ~= nil then
- if contains(arid, unit.GetEquipItem(3).dataID) then
- if contains(swid, unit.GetEquipItem(2).dataID)then
- unit.UnequipItem(unit.GetEquipItem(3).id)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement