queria ajudar que esse script aumente a força do pokemon a cada reset que o player der
function onSay(cid, words, param)
local maxlvl = getConfigValue("lvlmaximo")
local quantiaganha = getConfigValue("LermePointPorReset")
local hp = getCreatureMaxHealth(cid)
local hp2 = hp * 1000
config = { --[[verdadeiro / Falso]]
needPa = false, -- Precisa de Premium Account? [true / false]
needPz = true, -- 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 = false, -- Mostrar Resets no Look do Player? [true / false]
addLimite = true, -- Abilitar Limite de Resets? [true / false]
setClasse = false, -- Mudar Vocação do player quando resetar? [true / false]
storage = 8445605, -- Storage [valor]
--[Configurações do Reset]__
resetStatus = {
player = getPlayerGUID(cid), -- Não Mude.
lvl = 30000 , -- Level Necessário para Resetar. [valor]
lvlreset = 5000, -- Level que retornará após o Reset. [valor]
limite = 500, -- Máximo de resets que um player pode chegar. [valor]
newClasse = 1, -- 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+3)
doPlayerSetMaxCapacity(cid, 10000)
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` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function noAll(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerSetMaxCapacity(cid, 10000)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `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)
doPlayerSetMaxCapacity(cid, 10000)
doPlayerSetVocation(cid, config.resetStatus.newClasse)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `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)
doPlayerSetMaxCapacity(cid, 10000)
doPlayerSetVocation(cid, config.resetStatus.newClasse)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `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)
doPlayerSetMaxCapacity(cid, 10000)
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` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function setClasse(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerSetMaxCapacity(cid, 10000)
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` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function look(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerSetMaxCapacity(cid, 10000)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function teleporting(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerAddItem(cid, 2159, quantiaganha)
setCreatureMaxHealth(cid, hp2)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
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 mostra = getResets(cid)+1
local needLvl ="Voce precisa de mais "..maxlvl-getPlayerLevel(cid).." leveis para resetar."
local msg ="~~[Reset: "..mostra.."]~~ 'Sucesso ao Resetar! Você sera 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, "Voce 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,"Voce Precisa ser Premium Account para Resetar.")
return true
elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"Voce Precisa estar sem Battle para Resetar.")
return true
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then
addEvent(Reseting, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then
addEvent(noAll, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then
addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then
addEvent(noLook, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then
addEvent(noClasse, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then
addEvent(setClasse, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then
addEvent(look, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl 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
Pergunta
MaRcOsViNiCiUs1 0
queria ajudar que esse script aumente a força do pokemon a cada reset que o player der
function onSay(cid, words, param)
local maxlvl = getConfigValue("lvlmaximo")
local quantiaganha = getConfigValue("LermePointPorReset")
local hp = getCreatureMaxHealth(cid)
local hp2 = hp * 1000
config = { --[[verdadeiro / Falso]]
needPa = false, -- Precisa de Premium Account? [true / false]
needPz = true, -- 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 = false, -- Mostrar Resets no Look do Player? [true / false]
addLimite = true, -- Abilitar Limite de Resets? [true / false]
setClasse = false, -- Mudar Vocação do player quando resetar? [true / false]
storage = 8445605, -- Storage [valor]
--[Configurações do Reset]__
resetStatus = {
player = getPlayerGUID(cid), -- Não Mude.
lvl = 30000 , -- Level Necessário para Resetar. [valor]
lvlreset = 5000, -- Level que retornará após o Reset. [valor]
limite = 500, -- Máximo de resets que um player pode chegar. [valor]
newClasse = 1, -- 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+3)
doPlayerSetMaxCapacity(cid, 10000)
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` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function noAll(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerSetMaxCapacity(cid, 10000)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `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)
doPlayerSetMaxCapacity(cid, 10000)
doPlayerSetVocation(cid, config.resetStatus.newClasse)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `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)
doPlayerSetMaxCapacity(cid, 10000)
doPlayerSetVocation(cid, config.resetStatus.newClasse)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `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)
doPlayerSetMaxCapacity(cid, 10000)
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` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function setClasse(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerSetMaxCapacity(cid, 10000)
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` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function look(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerSetMaxCapacity(cid, 10000)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
db.executeQuery("UPDATE `players` SET `level` = "..maxlvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
return TRUE
end
function teleporting(cid)
resets = getResets(cid)
setPlayerStorageValue(cid,config.storage,resets+1)
doPlayerAddItem(cid, 2159, quantiaganha)
setCreatureMaxHealth(cid, hp2)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
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 mostra = getResets(cid)+1
local needLvl ="Voce precisa de mais "..maxlvl-getPlayerLevel(cid).." leveis para resetar."
local msg ="~~[Reset: "..mostra.."]~~ 'Sucesso ao Resetar! Você sera 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, "Voce 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,"Voce Precisa ser Premium Account para Resetar.")
return true
elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"Voce Precisa estar sem Battle para Resetar.")
return true
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then
addEvent(Reseting, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then
addEvent(noAll, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then
addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then
addEvent(noLook, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then
addEvent(noClasse, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then
addEvent(setClasse, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then
addEvent(look, config.resetStatus.tempo* 1000, cid)
elseif getPlayerLevel(cid) >= maxlvl 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
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados