i dont know if some1 posted this before w/e here it is ALL In one mang.
/actions/scripts/all in one.lua add:
xml part:
eace:
/actions/scripts/all in one.lua add:
Lua:
function onUse(cid, item, frompos, item2, topos)
local t = {
[5000] = {itemId = 5000, storage = 5000, msg = "You have found an item!"},
[5001] = {itemId = 5001, storage = 5001, msg = "You have found a weapon!"},
[5002] = {itemId = 5002, storage = 5002, msg = "You have found a shield!"},
[5003] = {itemId = 5003, storage = 5003, msg = "You have found a ring!"},
[5004] = {itemId = 5004, storage = 5004, msg = "You have found a helmet!"},
[5005] = {itemId = 5005, storage = 5005, msg = "You have found a necklace!"},
[5006] = {itemId = 5006, storage = 5006, msg = "You have found a quest!"}
}
local v, storage = t[item.actionid], getPlayerStorageValue(cid, v.storage)
if v and storage == -1 then
doPlayerAddItem(cid, t.itemId, 1)
doPlayerSendTextMessage(cid, 22, v.msg)
setPlayerStorageValue(cid, v.storage, 1)
else
doPlayerSendCancel(cid, "It is empty.")
end
return true
end
Code:
<action actionid="5000-5006" script="all in one.lua"/>
Last edited: