Skyforever
Member
- Joined
- Aug 5, 2012
- Messages
- 4
- Reaction score
- 6
Haha, Very Nice script Critico
[16:1:05.474] [Error - TalkAction Interface]
[16:1:05.474] local cid = 268663762
[16:1:05.474] local words = "/autoloot"
[16:1:05.474] local param = "add,meat"
[16:1:05.474] local channel = 65534
[16:1:05.474] domodlib('Loot_func')
[16:1:05.474] local t = string.explode(string.lower(param), ",")
[16:1:05.474] if info.OnlyPremium == true and not isPremium(cid) then
[16:1:05.474] doPlayerSendCancel(cid, "you must be a premium account.") return true
[16:1:05.474] elseif not t[1] then
[16:1:05.474] ShowItemsTabble(cid) return true
[16:1:05.474] elseif tonumber(t[1]) or tonumber(t[2]) then
[16:1:05.474] doPlayerSendCancel(cid, "enter!autoloot add,name or !autoloot remove,name") return true
[16:1:05.474] elseif isInArray({"add","remove"}, tostring(t[1])) then
[16:1:05.474] local func,check = tostring(t[1]) == "add" and addItemTable or removeItemTable, tostring(t[1]) == "add" and true or false
[16:1:05.474] local item = getItemIdByName(tostring(t[2]), false)
[16:1:05.474] if not item then
[16:1:05.475] doPlayerSendCancel(cid, "This item does not exist.") return true
[16:1:05.475] elseif check == true and isInArray(info.BlockItemsList, item) then
[16:1:05.475] doPlayerSendCancel(cid, "You can not add this item in the list!") return true
[16:1:05.475] elseif isInTable(cid, item) == check then
[16:1:05.475] doPlayerSendCancel(cid, "This Item "..(check == true and "already" or "is not").." in your list.") return true
[16:1:05.475] end
[16:1:05.475] func(cid, item)
[16:1:05.475] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "you added the item "..t[2].." in the list" or "you removed the item "..t[2].." from the list") return true
[16:1:05.475] end
[16:1:05.475] return true
[16:1:05.475] Description:
[16:1:05.475] (luaGetItemIdByName) Item not found
Very nice, but i don't like mods, not me only...
[22/9/2012 23:3:2] [Error - TalkAction Interface]
[22/9/2012 23:3:2] local cid = 268440919
[22/9/2012 23:3:2] local words = "/autoloot"
[22/9/2012 23:3:2] local param = "add,gold coin"
[22/9/2012 23:3:2] local channel = 65534
[22/9/2012 23:3:2] domodlib('Loot_func')
[22/9/2012 23:3:2] local t = string.explode(string.lower(param), ",")
[22/9/2012 23:3:2] if info.OnlyPremium == true and not isPremium(cid) then
[22/9/2012 23:3:2] doPlayerSendCancel(cid, "you must be a premium account.") return true
[22/9/2012 23:3:2] elseif not t[1] then
[22/9/2012 23:3:2] ShowItemsTabble(cid) return true
[22/9/2012 23:3:2] elseif tonumber(t[1]) or tonumber(t[2]) then
[22/9/2012 23:3:2] doPlayerSendCancel(cid, "enter!autoloot add,name or !autoloot remove,name") return true
[22/9/2012 23:3:2] elseif isInArray({"add","remove"}, tostring(t[1])) then
[22/9/2012 23:3:2] local func,check = tostring(t[1]) == "add" and addItemTable or removeItemTable, tostring(t[1]) == "add" and true or false
[22/9/2012 23:3:2] local item = getItemIdByName(tostring(t[2]), false)
[22/9/2012 23:3:2] if not item then
[22/9/2012 23:3:2] doPlayerSendCancel(cid, "This item does not exist.") return true
[22/9/2012 23:3:2] elseif check == true and isInArray(info.BlockItemsList, item) then
[22/9/2012 23:3:2] doPlayerSendCancel(cid, "You can not add this item in the list!") return true
[22/9/2012 23:3:2] elseif isInTable(cid, item) == check then
[22/9/2012 23:3:2] doPlayerSendCancel(cid, "This Item "..(check == true and "already" or "is not").." in your list.") return true
[22/9/2012 23:3:2] end
[22/9/2012 23:3:2] func(cid, item)
[22/9/2012 23:3:2] doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,check == true and "you added the item "..t[2].." in the list" or "you removed the item "..t[2].." from the list") return true
[22/9/2012 23:3:2] end
[22/9/2012 23:3:2] return true
[22/9/2012 23:3:2] Description:
[22/9/2012 23:3:2] (LuaInterface::luaGetItemIdByName) Item not found