Crie um arquivo em data\creaturescripts\scripts chamado de premios.lua
local t = {39001, {
[20] = {2160, 2, "Congratulations, you have achieved one of eleven goals! You have been awarded with 2 crystal coins!", 1},
[60] = {2160, 4, "Congratulations, you have achieved two of eleven goals! You have been awarded with 4 crystal coins!", 2},
[100] = {2160, 5, "Congratulations, you have achieved three of eleven goals! You have been awarded with 5 crystal coins!", 3},
[140] = {2160, 7, "Congratulations, you have achieved four of eleven goals! You have been awarded with 7 crystal coins!", 4},
[180] = {2160, 8, "Congratulations, you have achieved five of eleven goals! You have been awarded with 8 crystal coins!", 5},
[220] = {2160, 9, "Congratulations, you have achieved six of eleven goals! You have been awarded with 9 crystal coins!", 6},
[260] = {2160, 10, "Congratulations, you have achieved seven of eleven goals! You have been awarded with 10 crystal coins!", 7},
[300] = {2160, 11, "Congratulations, you have achieved eight of eleven goals! You have been awarded with 11 crystal coins!", 8},
[340] = {2160, 12, "Congratulations, you have achieved ten of eleven goals! You have been awarded with 12 crystal coins!", 9},
[380] = {2160, 13, "Congratulations, you have achieved all eleven goals! You have been awarded with 13 crystal coins!", 10}
}
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill == SKILL__LEVEL then
for level, v in pairs(t[2]) do
if oldlevel < level and getPlayerLevel(cid) >= level and getPlayerStorageValue(cid, t[1]) < v[4] then
doPlayerAddItem(cid, v[1], v[2])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, v[3])
setPlayerStorageValue(cid, t[1], v[4])
end
end
end
doPlayerSave(cid, true)
return true
end
e em login.lua você coloca.
registerCreatureEvent(cid, "PREMIOS")
Logo após você entra em creaturescript.xml
E coloca isso:
<event type="advance" name="PREMIOS" event="script" value="premios.lua"/>








info
Grupo: Campones
Registrado: 01/03/13
Posts: 93
Reputação: +1
Char no Tibia: Frenetico Housedown
Tipo, pego lv 80, ganho 30k, pego lv 130 ganho 50k, pego lv 200 ganho 100k + mount doll + addon doll!
E como fazer para que meus player até lv 100 não percam bp quando morrem!
Obrigado a todos!
Estão me ajudando mto!
Sou mto grato a vocês!