Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. local function contains(table, val)
  2. if val ~= nil then
  3. for i=1,#table do
  4. if table[i] == val then
  5. return true
  6. end
  7. end
  8. return false
  9. else
  10. return false
  11. end
  12. end
  13. local shid = {1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 1260, 1261}
  14. local arid = {1262, 1263, 1264, 1265, 1267, 1268, 1269, 1270}
  15. local bwid = {1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470}
  16. 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}
  17.  
  18. if unit.GetEquipItem(3) ~= nil then
  19. if contains(shid, unit.GetEquipItem(3).dataID) then
  20. if contains(bwid, unit.GetEquipItem(2).dataID)then
  21.  
  22. unit.UnequipItem(unit.GetEquipItem(3).id)
  23. end
  24. end
  25. end
  26. if unit.GetEquipItem(3) ~= nil then
  27. if contains(arid, unit.GetEquipItem(3).dataID) then
  28. if contains(swid, unit.GetEquipItem(2).dataID)then
  29.  
  30. unit.UnequipItem(unit.GetEquipItem(3).id)
  31. end
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement