Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function updatePatente(player)
- local patents = {
- ["24:0:0"] = {life = 1200, speed = 50, mana = 800, pt = "Sargento"},
- ["48:0:0"] = {life = 1850, speed = 125, mana = 1000, pt = "Coronel"}
- }
- local storage = getPlayerStorageValue(player, 35000)
- local value = storage < 0 and 0 or storage
- setPlayerStorageValue(player, 35000, value + 1)
- local t = patents[getTime(getPlayerStorageValue(player, 35000))]
- if (isCreature(player)) then
- if (t) then
- setCreatureMaxHealth(player, t.life)
- setCreatureMaxMana(player, t.mana)
- doPlayerSendTextMessage(player, 27, "Now you is " .. t.pt .. ".")
- doChangeSpeed(player, t.speed)
- setPlayerStorageValue(player, 35001, "" .. t.pt .. ", " .. t.life .. ", " .. t.speed .. ", " .. t.mana .. "")
- end
- end
- return addEvent(updatePatente, 1000, player)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement