po wbiciu lvli np. 100, 200, 300 itp wystweitla sie na "/B" gracz x wbil 100 lvl gz
witam potrzebuje tego skryptu ze np. wbijam sobie 100lvl i na srodku na czerwo sie wyswietla ze np.
Gracz Maniek Franiek wbil 100 poziom. gratulacje!
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.
po wbiciu lvli np. 100, 200, 300 itp wystweitla sie na "/B" gracz x wbil 100 lvl gz
local newlevel = {100, 200, 300, 400, 500}
function onAdvance(cid, skill, oldlevel, newlevel)
if getPlayerLevel(cid) >= .. newlevel ..
doBroadcastMessage("Gracz " ..getCreatureName(cid) .. " awansowal na " ..newlevel.." level.",21)
end
end
<event type="advance" name="PlayerAdvance" script="advance.lua"/>
registerCreatureEvent(cid, "PlayerAdvance")
function onAdvance(cid, oldlevel, newlevel)
local config = {
[50] = {storage = 3100, jaki_poziom = 50},
[100] = {storage = 3101, jaki_poziom = 100},
[150] = {storage = 3100, jaki_poziom = 150},
[200] = {storage = 3101, jaki_poziom = 200},
[250] = {storage = 3100, jaki_poziom = 250},
[300] = {storage = 3101, jaki_poziom = 300},
[350] = {storage = 3100, jaki_poziom = 350},
[400] = {storage = 3101, jaki_poziom = 400}
}
local pozycja = getCreaturePosition(cid)
local tabela = config[getPlayerLevel(cid)]
local name = getPlayerName(cid)
local tekst = name.." zdobyl "..tabela.jaki_poziom.." poziom doswiadczenia. Gratulujemy!"
if getPlayerStorageValue(cid, tabela.storage) == -1 then
doBroadcastMessage(tekst, MESSAGE_STATUS_WARNING)
setPlayerStorageValue(cid, tabela.storage, 1)
doSendMagicEffect(pozycja, CONST_ME_MORTAREA)
end
end