Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
@up
fix script:
* only when advance IN level, not skill/mlvl
* maybe author of first post want bag with items every level not only on XX level
and onAdvance has parameters:
PHP:
function onAdvance(cid, skill, oldLevel, newLevel)
local items = {
[50] = {
{2160, 100},
{2152, 100}
},
[100] = {
{2160, 255},
{2160, 255}
}
}
function onAdvance(cid, skill, oldLevel, newLevel)
local now = items[newLevel]
if (not now) then
return true
end
for i = 1, #now do
doPlayerAddItem(cid, now[i][1], now[i][2])
end
return true
end
@Gesior.pl:
I did not read the first post, just checked 2 post above mine <lol>.
Here's version with container:
Code:
local items = {
[50] = {
{2160, 100},
{2152, 100}
},
[100] = {
{2160, 255},
{2160, 255}
}
}
local containerId = 1988
function onAdvance(cid, skill, oldLevel, newLevel)
local now = items[newLevel]
if (not now) then
return true
end
local container = doPlayerAddItem(cid, containerId)
for i = 1, #now do
doContainerAddItem(container, now[i][1], now[i][2])
end
return true
end
It haven't cap check etc., but i think it's no problem for you ;p
@Gesior.pl:
I did not read the first post, just checked 2 post above mine <lol>.
Here's version with container:
Code:
local items = {
[50] = {
{2160, 100},
{2152, 100}
},
[100] = {
{2160, 255},
{2160, 255}
}
}
local containerId = 1988
function onAdvance(cid, skill, oldLevel, newLevel)
local now = items[newLevel]
if (not now) then
return true
end
local container = doPlayerAddItem(cid, containerId)
for i = 1, #now do
doContainerAddItem(container, now[i][1], now[i][2])
end
return true
end
It haven't cap check etc., but i think it's no problem for you ;p
can you make it so it gives every level? the only reason i need a container is that the item that im using isnt stackable :/ thanks so much in advance if u can