Ir para conteúdo

Featured Replies

Postado

boa noite galera, como faço isso pra isso requisitar 5 resets pra poder resetar e muda de vocação

 

FUNÇÃO DO MEU RESET

 

function onSay(cid, words, param)

local storagedotekpokk = 9697
function getTime(s)
local n = math.floor(s / 60)
s = s - (60 * n)
return n, s
end

local tempo = 10

if os.time()-getPlayerStorageValue(cid, storagedotekpokk) <= tempo*60 then
minutes,seconds = getTime(tempo*60-(os.time()-getPlayerStorageValue(cid, storagedotekpokk)))
return doPlayerSendTextMessage(cid,4, "Vc precisa espera " .. minutes .. " minutos para usa isso ai denovo manolo kkkkkkkkkkkk.")
end

if words =="!resetar" then

setPlayerStorageValue(cid, storagedotekpokk, os.time())

Spoiler

function onSay(cid, words, param, channel)
local tabble = {
["promo"] = {reqVoc= nil, needLevel=10000},
}
local param,config = string.lower(param),{pid = getPlayerGUID(cid),newlv = 8,life = 185,mana = 35}
if not tabble[param] then
doPlayerPopupFYI(cid, "O comando correto é !mixed promo.") return true
elseif getTilePzInfo(getCreaturePosition(cid)) == false then
doPlayerPopupFYI(cid, "Você precisa estar em pz para resetar.") return true
elseif getPlayerLevel(cid) < tabble[param].needLevel then
doPlayerPopupFYI(cid, "You need be "..tabble[param].needLevel.." level or more.") return true
elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 887978) >= 1 then
doPlayerPopupFYI(cid, "Você já virou mixed.") return true
elseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc then
doPlayerPopupFYI(cid, "You dont have the required vocation.") return true
end
if tabble[param].reqVoc == nil then setPlayerStorageValue(cid, 887978, 1) end
local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5
setPlayerStorageValue(cid, 887979, newvoc)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.newlv..", `experience` = "..getExperienceForLevel(config.newlv)..",`manamax` = "..config.mana..",`health` = "..config.life..", `healthmax` = "..config.life..",`mana` = "..config.mana.." WHERE `id` = "..config.pid)
return true
end

 

OT PURA DIVERSÃO | IP: otfun.servegame.com | 8.60 | Port: 7171

 

1584817_1.png

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo