Postado Outubro 16, 2016 9 anos 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] thendoPlayerPopupFYI(cid, "O comando correto é !mixed promo.") return trueelseif getTilePzInfo(getCreaturePosition(cid)) == false thendoPlayerPopupFYI(cid, "Você precisa estar em pz para resetar.") return trueelseif getPlayerLevel(cid) < tabble[param].needLevel thendoPlayerPopupFYI(cid, "You need be "..tabble[param].needLevel.." level or more.") return trueelseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 887978) >= 1 thendoPlayerPopupFYI(cid, "Você já virou mixed.") return trueelseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc thendoPlayerPopupFYI(cid, "You dont have the required vocation.") return trueendif tabble[param].reqVoc == nil then setPlayerStorageValue(cid, 887978, 1) endlocal newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5setPlayerStorageValue(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 trueend OT PURA DIVERSÃO | IP: otfun.servegame.com | 8.60 | Port: 7171
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.