Advertisement
alexdubovyck

Продажа\удаление

Apr 24th, 2016
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.54 KB | None | 0 0
  1. ---------------------------------------------
  2. -- Цвета
  3. ---------------------------------------------
  4. -- "ff9d9d9d",  --серое
  5. -- "ffffffff",  --белое
  6. -- "cff1eff00", --зеленое
  7. -- "cff0070dd", -- синька
  8. -- "cffa335ee", --фиолетовое
  9. -- "FF8000",    -- оранжевое
  10. ---------------------------------------------
  11. -- Макросами
  12. ---------------------------------------------
  13. -- Для удаления зелёного шмота:
  14. /run for bag = 0,4,1 do for slot = 1, 32, 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff1eff00") then PickupContainerItem(bag,slot); DeleteCursorItem(); end; end; end
  15.  
  16. -- Для продажи зелёного шмота:
  17. /run for bag = 0,4,1 do for slot = 1, GetContainerNumSlots(bag), 1 do local name = GetContainerItemLink(bag,slot); if name and string.find(name,"ff1eff00") then UseContainerItem(bag,slot) end; end;end
  18. ---------------------------------------------
  19. --Функциями
  20. ---------------------------------------------
  21. --Удалить
  22. for bag = 0, 4, 1 do
  23.     for slot = 1, 32, 1 do
  24.     local name = GetContainerItemLink(bag, slot);
  25.         if name and string.find(name, "цвет или имя") then
  26.             PickupContainerItem(bag, slot);
  27.             DeleteCursorItem();
  28.         end;
  29.     end;
  30. end
  31. --Продать
  32. for bag = 0, 4, 1 do
  33.     for slot = 1, GetContainerNumSlots(bag), 1 do
  34.     local name = GetContainerItemLink(bag, slot);
  35.         if name and string.find(name, "цвет или имя") then
  36.             UseContainerItem(bag, slot)
  37.         end;
  38.     end;
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement