Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.
--- Created for otsmateria.com (c)----
function onAdvance(cid, type, oldlevel, newlevel)
if (oldlevel ~= newlevel and type == SKILL__LEVEL) then
if (newlevel >= 50 and getPlayerStorageValue(cid, 44562) == -1) then
doPlayerAddItem(cid, 2160, 5)
doPlayerSendTextMessage(cid,21,'Congratulations! You have reached level 50! As a special bonus Materia administrators, you have received 5 Cristal Coins.')
setPlayerStorageValue(cid, 44562, 1)
end
end
return true
end
--- Created for otsmateria.com (c)----
local config = {
levelReach = 500,
points = 100
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
setPlayerStorageValue(cid, 58558, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
doPlayerSendTextMessage(cid,21,'Congratulations! You have reached level 500! As a special bonus Materia administrators, you have received 100 premium points.')
end
return TRUE
end
--- Created for otsmateria.com (c)----
function onAdvance(cid, type, oldlevel, newlevel)
if (oldlevel ~= newlevel and type == SKILL__LEVEL) then
if (newlevel >= 50 and getPlayerStorageValue(cid, 44562) == -1) then -- 50 zmieniamy na level, przy kt?rym ma da? cc
doPlayerAddItem(cid, 2160, 5) -- tutaj mo?emy zmieni? cc na dowolny przedmiot podaj?c zamiast 2160 jego id, a 5 to ilo??
doPlayerSendTextMessage(cid,21,'Congratulations! You have reached level 50! As a special bonus Materia administrators, you have received 5 Cristal Coins.')
setPlayerStorageValue(cid, 44562, 1)
end
end
return true
end
--- Created for otsmateria.com (c)----
local config = {
levelReach = 500, -- level, za kt?ry dostajemy pkt
points = 100 -- ilo?? otrzymanych pkt
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
setPlayerStorageValue(cid, 58558, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
doPlayerSendTextMessage(cid,21,'Congratulations! You have reached level 500! As a special bonus Materia administrators, you have received 100 premium points.')
end
return TRUE
end
<event type="advance" name="skrypt" script="skrypt.lua"/>
)Dzi?ki za skrypt bo si? przyda.<event type="advance" name="skrypt" script="skrypt.lua"/>
function onAdvance(cid, type, oldlevel, newlevel)
registerCreatureEvent(cid, "nazwa_skryptu")
| Notka moderatorska: |
| +1 OT Expert [Request] |
--- Created for otsmateria.com (c)----
local config = {
levelReach = 500, -- level, za kt?ry dostajemy pkt
points = 100 -- ilo?? otrzymanych pkt
}
function onAdvance(cid, skill, oldLevel, newLevel)
if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
setPlayerStorageValue(cid, 58558, 1)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
doPlayerAddItem(cid, 2160, 5) -- tutaj mo?emy zmieni? cc na dowolny przedmiot podaj?c zamiast 2160 jego id, a 5 to ilo??
doPlayerSendTextMessage(cid,21,'Congratulations! You have reached level 500! As a special bonus Materia administrators, you have received 100 premium points.')
end
return TRUE
end
Mam ma?e pytanko. Dawno w to nei bawi??m si? ale
je?li chce np ?eby da?o te cc i pkt co 10lvl to tylko moge dodac w tym 1 skrypcie
if (newlevel >= 50 and getPlayerStorageValue(cid, 44562) == -1) then
if (newlevel >= 70 and getPlayerStorageValue(cid, 44562) == -1) then etc?
czy jak to tam idzie
function onAdvance(cid, type, oldlevel, newlevel)
local config = {
storage = 98960,
levels = {
[100] = {itemId = 2160, itemCount = 5, storageValue = 1, pp = 10},
[120] = {itemId = 2160, itemCount = 5, storageValue = 2, pp = 10},
[140] = {itemId = 2160, itemCount = 5, storageValue = 3, pp = 10},
[160] = {itemId = 2160, itemCount = 5, storageValue = 4, pp = 10},
[180] = {itemId = 2160, itemCount = 5, storageValue = 5, pp = 10},
[200] = {itemId = 2160, itemCount = 5, storageValue = 6, pp = 10}}}
local param = string.lower(param)
if isPlayer(cid)
if (oldlevel ~= newlevel and type == SKILL__LEVEL) then
if (newlevel == config.levels[param] and getPlayerStorageValue(cid, config.storage) < config.level[param].storageValue) then
doPlayerAddItem(cid, config.levels[param].itemId, config.levels[param].itemCount)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.levels[param].pp.." WHERE `id` = "..getPlayerAccountId(cid)..";")
doPlayerSendTextMessage(cid, 21 ,'Congratulations! You have reached level ' ..newLevel.. '! You have received 5 Cristal Coins.')
setPlayerStorageValue(cid, config.storage, config.levels[param].storageValue)
end
end
end
return true
end
registerCreatureEvent(cid, "nazwa_skryptu")
<event type="advance" name="skrypt" script="skrypt.lua"/>