Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. [Error - TalkAction Interface]
  2. local cid = 268447265
  3. local words = "/autoloot"
  4. local param = "band of loss"
  5. local channel = 65534
  6. domodlib('Loot_func')
  7. local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free
  8. if not param or param == "" then
  9. ShowItemsTabble(cid) return true
  10. elseif tonumber(param) then
  11. doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true
  12. elseif isInArray({"clean","limpar", "clear"}, param) then
  13. setPlayerStorageValue(cid, info.Storages[1], -1)
  14. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true
  15. elseif isInArray({"start","stop","on","off"}, param) then
  16. setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0)
  17. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true
  18. elseif isInArray({"money","gold","gps","dinheiro"}, param) then
  19. setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0)
  20. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true
  21. end
  22. local item = getItemIdByName(param, false)
  23. if not item then
  24. doPlayerSendCancel(cid, "This item does not exist.") return true
  25. end
  26. local var = isInTable(cid, item)
  27. if isInArray({2148,2152,2160},item) then
  28. doPlayerSendCancel(cid, "Enter !autoloot money to add money in your list!") return true
  29. elseif isInArray(info.BlockItemsList, item) then
  30. doPlayerSendCancel(cid, "You can not add this item in the list!") return true
  31. elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then
  32. doPlayerSendCancel(cid, "max "..slots.." from auto loot") return true
  33. end
  34. if not var then
  35. addItemTable(cid, item)
  36. else
  37. removeItemTable(cid, item)
  38. end
  39. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list")
  40. return true
  41. Description:
  42. (luaGetItemIdByName) Item not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement