Rider Ones
New Member
- Joined
- Jan 12, 2009
- Messages
- 104
- Reaction score
- 2
I have this script but not works on my server HELP??
OTX Server 2.51
Tibia 8.60
REP+++
OTX Server 2.51
Tibia 8.60
Code:
local c = {
[{1,5}] = {
[20] = {items = {{itemid = 2188, count = 1}}, storage = 99963},
[30] = {items = {{itemid = 2160, count = 2}}, storage = 99964},
[45] = {items = {{itemid = 2160, count = 2}}, storage = 99965}
},
[{2,6}] = {
[20] = {items = {{itemid = 2185, count = 1}}, storage = 99963},
[30] = {items = {{itemid = 2160, count = 2}}, storage = 99964},
[45] = {items = {{itemid = 2160, count = 2}}, storage = 99965}
},
[{3,7}] = {
[20] = {items = {{itemid = 2160, count = 1}}, storage = 99963},
[30] = {items = {{itemid = 2160, count = 2}}, storage = 99964},
[45] = {items = {{itemid = 2160, count = 2}}, storage = 99965}
},
[{4,8}] = {
[20] = {items = {{itemid = 2160, count = 1}}, storage = 99963},
[30] = {items = {{itemid = 2160, count = 2}}, storage = 99964},
[45] = {items = {{itemid = 2160, count = 2}}, storage = 99965}
}
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill ~= SKILL__LEVEL then
return true
end
for voc, x in pairs(c) do
if isInArray(voc, getPlayerVocation(cid)) then
for level, z in pairs(x) do
if newlevel >= level and getPlayerStorageValue(cid, z.storage) ~= 1 then
local text = ""
for v = 1, #z.items do
count, info = z.items[v].count, getItemDescriptions(z.items[v].itemid)
local ret = ", "
if v == 1 then
ret = ""
elseif v == #z.items then
ret = " and "
end
text = text .. ret
text = text .. (count > 1 and count or info.article).." "..(count > 1 and info.plural or info.name)
doPlayerAddItem(cid, z.items[v].itemid, z.items[v].count)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you reached level "..level.." and received "..text..".")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_YELLOW)
setPlayerStorageValue(cid, z.storage, 1)
end
end
end
end
return true
end
REP+++