Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Error - TalkAction Interface]
- local cid = 268447265
- local words = "/autoloot"
- local param = "band of loss"
- local channel = 65534
- domodlib('Loot_func')
- local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free
- if not param or param == "" then
- ShowItemsTabble(cid) return true
- elseif tonumber(param) then
- doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true
- elseif isInArray({"clean","limpar", "clear"}, param) then
- setPlayerStorageValue(cid, info.Storages[1], -1)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true
- elseif isInArray({"start","stop","on","off"}, param) then
- setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true
- elseif isInArray({"money","gold","gps","dinheiro"}, param) then
- setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0)
- doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true
- end
- local item = getItemIdByName(param, false)
- if not item then
- doPlayerSendCancel(cid, "This item does not exist.") return true
- end
- local var = isInTable(cid, item)
- if isInArray({2148,2152,2160},item) then
- doPlayerSendCancel(cid, "Enter !autoloot money to add money in your list!") return true
- elseif isInArray(info.BlockItemsList, item) then
- doPlayerSendCancel(cid, "You can not add this item in the list!") return true
- elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then
- doPlayerSendCancel(cid, "max "..slots.." from auto loot") return true
- end
- if not var then
- addItemTable(cid, item)
- else
- removeItemTable(cid, item)
- end
- 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")
- return true
- Description:
- (luaGetItemIdByName) Item not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement