Ir para conteúdo
  • 0

Aeew pessoal me ajuda com esse script de reset aqui por favor


Claudio14

Pergunta

Desculpeeeeeeeeeeem eu não sei adicionar aquele negócio que fica menor os scripts, enfim, tem esse script aqui ele é de resetar ... Enfim, ele está funcionando bem, só que quando dou look no player não aparece quantos resetes ele possui, por favor ajudem ((; vllw

 

a e tbm eu queria um ranks pros resets (; vllw

 

 

 

 

 

 

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

Editado por Claudio14
Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

cria um script em creaturescript e coloca isso aq

 

function onLook(cid, thing, position, lookDistance) 
   if thing.cid = getPlayerResets(cid) then
       doPlayerSendTextMessage(cid, "o jogador "..thing.." tem "getPlayerResets(cid) then
           return true
       end
   end 

Tenho que sair agora, amanha te falo o resto.

Link para o comentário
Compartilhar em outros sites

  • 0

function onLook(cid, thing, position, lookDistance) 
   if isPlayer(thing.uid) then
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O jogador "..getCreatureName(thing.uid).." tem "..getPlayerResets(thing.uid).." resets.")
       return true
   end
end

Creaturescript.xml

<event type = "look" name = "look_Reset" script = "new 2.lua"/>

Login.lua, antes do ultimo return true.

registerCreatureEvent(cid, "look_Reset")

Link para o comentário
Compartilhar em outros sites

  • 0

gears para de copiar os scripts e começa a prestar atenção no q faz

 

a função "getPlayerResets" não foi declarada

 

function onLook(cid, thing, position, lookDistance)
function getPlayerResets(cid)
return getPlayerStorageValue(cid, 1020) < 0 and 0 or getPlayerStorageValue(cid, 1020)
end
if isPlayer(thing.uid) then
	doPlayerSetSpecialDescription(thing.uid,"\n Resets: ["..getPlayerResets(thing.uid).."].")
end
return true
end

Editado por Vodkart
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...