any port ?? he script, only the vocation of the item, takes the same
local vocQ = {
["1-5"] = {item = {7365, itemid}},
["2-6"] = {item = {7365, itemid}},
["3-7"] = {item = {7365, itemid}},
["4-8"] = {item = {7365, itemid}},
}
function onUse(cid, item, toPosition, itemEx, fromPosition)
if getPlayerStorageValue(cid, 7365) ~= 1 then
for voc, items in pairs(vocQ) do
local v = string.explode(voc, "-")
if getPlayerVocation(cid) == tonumber(v[1]) or getPlayerVocation(cid) == tonumber(v[2]) then
doPlayerAddItem(cid, items.item[1], 1)
doPlayerAddItem(cid, items.item[2], 1)
doPlayerSendTextMessage(cid, 25, "Congratulations!!")
doPlayerSetStorageValue(cid, 7365, 1)
break
end
end
else
doPlayerSendCancel(cid, "It's empty.")
end
return true
end
local vocQ = {
["1-5"] = {item = {7365, itemid}},
["2-6"] = {item = {7365, itemid}},
["3-7"] = {item = {7365, itemid}},
["4-8"] = {item = {7365, itemid}},
}
function onUse(cid, item, toPosition, itemEx, fromPosition)
if getPlayerStorageValue(cid, 7365) ~= 1 then
for voc, items in pairs(vocQ) do
local v = string.explode(voc, "-")
if getPlayerVocation(cid) == tonumber(v[1]) or getPlayerVocation(cid) == tonumber(v[2]) then
doPlayerAddItem(cid, items.item[1], 1)
doPlayerAddItem(cid, items.item[2], 1)
doPlayerSendTextMessage(cid, 25, "Congratulations!!")
doPlayerSetStorageValue(cid, 7365, 1)
break
end
end
else
doPlayerSendCancel(cid, "It's empty.")
end
return true
end