Ir para conteúdo
  • Cadastre-se

Duvida Sistema de Reset e Quest log


Posts Recomendados

Aew alguém me ajuda com 2 duvidas ??? a primeira é que eu adicionei um sistema de reset no meu ot mais quando da look no player não aparece

aeew o script \/ E a Segunda Duvida é como fazer a Quest aparecer no Quest Log POR FAVOR UM TUTORIAL FACIL E QUE FUNCIONE PORQUE EU JÁ TENTEI UNS 7000 E NÃO DEU CERTO !!! OBRIGADO (:

function onSay(cid, words, param, channel)

config = {

RemainingLvl=8,

exper=4200,

pid=getPlayerGUID(cid),

batle="yes"

}

function getPlayerResets(cid)

resets = getPlayerStorageValue(cid,1020)

if resets < 0 then

resets = 0

end

return resets

end

if (config.batle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.")

return TRUE

end

if (getPlayerStorageValue(cid, 11548) >= os.time()) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED,"Por medidas de segurança você só pode utilizar este comando em " .. (getPlayerStorageValue(cid, 11548)-os.time()+(0)) .. " segundos.")

return TRUE

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 85 then

if getPlayerLevel(cid) >= 780 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 780 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 80 then

if getPlayerLevel(cid) >= 730 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 730 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 75 then

if getPlayerLevel(cid) >= 680 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 680 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 70 then

if getPlayerLevel(cid) >= 630 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 630 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 65 then

if getPlayerLevel(cid) >= 590 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 590 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 60 then

if getPlayerLevel(cid) >= 550 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 550 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 55 then

if getPlayerLevel(cid) >= 510 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 510.")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 50 then

if getPlayerLevel(cid) >= 480 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 480 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 45 then

if getPlayerLevel(cid) >= 450 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 450 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 40 then

if getPlayerLevel(cid) >= 430 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 430 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 35 then

if getPlayerLevel(cid) >= 410 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 410 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 30 then

if getPlayerLevel(cid) >= 390 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 390")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 25 then

if getPlayerLevel(cid) >= 380 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 380 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 20 then

if getPlayerLevel(cid) >= 365 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 365 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 15 then

if getPlayerLevel(cid) >= 360 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 360 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 10 then

if getPlayerLevel(cid) >= 355 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 355 .")

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if getPlayerStorageValue(cid,1020) < 5 then

if getPlayerLevel(cid) >= 350 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 350 .")

end

end

-- Resets Vips --

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 85 then

if getPlayerLevel(cid) >= 770 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 770 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 80 then

if getPlayerLevel(cid) >= 720 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 720 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 75 then

if getPlayerLevel(cid) >= 670 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 670 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 70 then

if getPlayerLevel(cid) >= 620 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 620 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 65 then

if getPlayerLevel(cid) >= 580 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 580 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 60 then

if getPlayerLevel(cid) >= 540 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 540 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 55 then

if getPlayerLevel(cid) >= 500 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 500 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 50 then

if getPlayerLevel(cid) >= 470 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 470 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 45 then

if getPlayerLevel(cid) >= 440 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 440 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 40 then

if getPlayerLevel(cid) >= 420 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 420 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 35 then

if getPlayerLevel(cid) >= 400 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 400 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 30 then

if getPlayerLevel(cid) >= 380 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 380 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 25 then

if getPlayerLevel(cid) >= 370 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 370 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 20 then

if getPlayerLevel(cid) >= 360 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 360 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 15 then

if getPlayerLevel(cid) >= 355 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 355 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 10 then

if getPlayerLevel(cid) >= 340 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 340 .")

end

end

end

----------------------------------------------------------------------------------------------------------------------------------------

if isPremium(cid) == TRUE then

if getPlayerStorageValue(cid,1020) < 5 then

if getPlayerLevel(cid) >= 330 then

setPlayerStorageValue(cid,1020,getPlayerResets(cid)+1)

setPlayerStorageValue(cid,11548,os.time()+30)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

db.executeQuery("UPDATE `players` SET `resets` = `resets` + 1 WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid,"Você precisa ter level 330 .")

end

end

end

return true

end

Link para o post
Compartilhar em outros sites

Bom vou te passa um system de reset que funciona certinho

Pasta do ot/data/talckations/scripts

crie um arquivo e ponhe

Isso dentro

--[[ SCRIPTING> MarcelloMkez <scriptING ]]

--[[ [Advanced Reset System]

Autor: MarcelloMkez

Versão: 1.0

TFS: 0.3.6

Testado em: 8.50

Fórum: www.#####.com/forum/topic/138026-talk-action-advanced-reset-system/

[Características]

~ Versão 1.0 ~

- Resets no Look;

- Premium Account ou não;

- Mudar Vocação;

- Limite de Resets;

- Opções para Abilitar e Desabilitar Condições;

[Em Construção]

- Stages Free e Premium;

- 'Talvez' um novo sistema de mudar Vocação;

sem data para postagem. ]]

function onSay(cid, words, param)

--[Configurações de Condição]__

config = { --[[verdadeiro / Falso]]

needPa = false, -- Precisa de Premium Account? [true / false]

needPz = false, -- Precisa estar em Protection Zone? [true / false]

battle = false, -- Precisa estar sem Batlle para Resetar? [true / false]

withe = false, -- Players PK Withe pode Resetar? [true / false]

red = true, -- Players PK Red pode Resetar? [true / false]

tp = true, -- Teleportar para o Templo após o reset? [true / false]

look = true, -- Mostrar Resets no Look do Player? [true / false]

addLimite = false, -- Abilitar Limite de Resets? [true / false]

setClasse = false, -- Mudar Vocação do player quando resetar? [true / false]

storage = 2310, -- Storage [valor]

--[Configurações do Reset]__

resetStatus = {

player = getPlayerGUID(cid), -- Não Mude.

lvl = 250000 , -- Level Necessário para Resetar. [valor]

lvlreset = 5000, -- Level que retornará após o Reset. [valor]

limite = 1, -- Máximo de resets que um player pode chegar. [valor]

newClasse = 5, -- Id da Nova Vocação após o Reset. [valor]

tempo= 1 -- Tempo para o Player deslogar para Resetar. Em segundos. [valor]

},

}

--[Funções]__

function Reseting(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doPlayerSetVocation(cid, config.resetStatus.newClasse)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

return TRUE

end

function noAll(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)

return TRUE

end

function noTeleporting(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doPlayerSetVocation(cid, config.resetStatus.newClasse)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)

return TRUE

end

function noLook(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doPlayerSetVocation(cid, config.resetStatus.newClasse)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)

return TRUE

end

function noClasse(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

return TRUE

end

function setClasse(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doPlayerSetVocation(cid, config.resetStatus.newClasse)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

return TRUE

end

function look(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

return TRUE

end

function teleporting(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,config.storage,resets+1)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)

db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)

return TRUE

end

function getResets(cid)

resets = getPlayerStorageValue(cid,config.storage)

if resets < 0 then

resets = 0

end

return resets

end

local resets = getResets(cid)

local needLvl ="Você precisa de "..config.resetStatus.lvl-getPlayerLevel(cid).." level's para resetar."

local msg =~~[Reset: "..getResets(cid)..]~~ 'Sucesso ao Resetar! Você será deslogado em "..config.resetStatus.tempo.." Segundos."

--[Condiçoes]__

if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then

doPlayerSendTextMessage(cid,22,"Você Precisa estar em Protection Zone Para Resetar.")

return TRUE

elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then

doPlayerSendTextMessage(cid, 22, "Você ja atingiu o Limite de Resets.")

return TRUE

elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then

doPlayerSendTextMessage(cid,22,"Você ta PK White, por isso não pode resetar.")

return TRUE

elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then

doPlayerSendTextMessage(cid,22,"Você ta PK Red, por isso não pode resetar.")

return TRUE

elseif(config.needPa == true) and not isPremium(cid) then

doPlayerSendTextMessage(cid,22,"Você Precisa ser Premium Account para Resetar.")

return TRUE

elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendTextMessage(cid,22,"Você Precisa estar sem Battle para Resetar.")

return TRUE

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then

addEvent(Reseting, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then

addEvent(noAll, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then

addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then

addEvent(noLook, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then

addEvent(noClasse, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then

addEvent(setClasse, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then

addEvent(look, config.resetStatus.tempo* 1000, cid)

elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then

addEvent(teleporting, config.resetStatus.tempo* 1000, cid)

elseif doPlayerSendCancel(cid, needLvl) then

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

return TRUE

end

if doPlayerPopupFYI(cid, msg) then

end

return TRUE

end

--[by: MarcelloMkez]__

Dps talckations.xml

<talkaction words="!reset" event="script" value="reset.lua"/>

Nto Generations

Breve online

Quer participar da equip staff?

Envie um email PARA [email protected]

Explicando PORQUE VC quer ser da staff,e suas abilidades,exemplo mapper....

208249_401162269967740_260154321_n.jpg

Link para o post
Compartilhar em outros sites

Mas o seu só reseta em um determinado level o meu não, e eu só quero que apareça o reset quando alguém lhe der look !!

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo