local level = 717171 -- the min level
local cost = 1000000 -- the needed money
function onSay(cid, words, param, channel)
if(getPlayerLevel(cid) >= level) and (doPlayerRemoveMoney(cid, cost) == TRUE) and (isInArray({9, 10, 11, 12, 22}, getPlayerVocation(cid))) then
doCreatureSetStorage(cid, 85987, getCreatureStorage(cid, 85987) == -1 and 1 or getCreatureStorage(cid, 85987) + 1)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = 8, `experience` = 4200, `healthmax` = 2000, `manamax` = 2000, `promotion` = 0 WHERE `id` ='"..id.."';")
db.executeQuery("UPDATE `players` SET `name` = '"..getCreatureName(cid).."' WHERE `id` ='"..getPlayerGUID(cid).."';")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need level " .. level .. " and " .. cost .. " gold.")
end
end
end
return true
end