Postado Setembro 4, 2017 7 anos Bom Dia , Boa Tarde e Boa Noite. Queria que alguém pudesse ajeitar essa SCRIPT para mim. Basicamente é uma Script de Reset ( o titulo ja diz '-' ), mas eu queria que alguém pudesse ""arrumar"" esse Script para que a cada Reset a pessoa ganhasse 20 POINT'S. Exemplo:.Estou level 1500+ ai eu reseto ( volto para o level 8 ) e recebo 20 POINT'S como premio por resetar , depois eu upo até 1500+ de novo e reseto mais uma vez e recebo mais 20 POINT'S. [ID do POINT:9970] Segue abaixo o Script Spoiler function onSay(cid, words, param) local level = 1500 --level pra ser resetado local RemainingLvl = 8 --lvl que ele ficara depois do reset local pid = getPlayerGUID(cid) function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return TRUE end Editado Setembro 4, 2017 7 anos por zLockey9 (veja o histórico de edições)
Postado Setembro 7, 2017 7 anos local point_id = 9970 local point_count = 20 function onSay(cid, words, param) local level = 1500 --level pra ser resetado local RemainingLvl = 8 --lvl que ele ficara depois do reset local pid = getPlayerGUID(cid) function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doPlayerAddItem(cid, point_id, point_count) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Setembro 7, 2017 7 anos Autor 10 horas atrás, Dwarfer disse: local point_id = 9970 local point_count = 20 function onSay(cid, words, param) local level = 1500 --level pra ser resetado local RemainingLvl = 8 --lvl que ele ficara depois do reset local pid = getPlayerGUID(cid) function addReset(cid) resets = getResets(cid) setPlayerStorageValue(cid,1020,resets+1) return true end function getResets(cid) resets = getPlayerStorageValue(cid,1020) if resets < 0 then resets = 0 end return resets end if getPlayerLevel(cid) >= level then addReset(cid) doPlayerAddItem(cid, point_id, point_count) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid).." reset.") doRemoveCreature(cid) db.executeQuery("UPDATE `players` SET `level` = "..RemainingLvl..", `experience` = 0 WHERE `id` = "..pid) else doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end Ficou ótimo,só uma coisinha que está dando errado... A Mana e a Life não estão resetando , por exemplo: estou lvl 1500 e tenho 200K de life ai qnd eu reseto volto para o lvl 8 e continuo com os 200K de life , se eu ir upando vai adicionando cada vez mais Life. Se puder consertar agradeço muito. REP+
Postado Setembro 8, 2017 7 anos Está dando errado porque esse script de reset não tem isso, procure um mais completo. Existem vários aqui no fórumEnviado de meu GT-S7582L usando Tapatalk Contato: Email: [email protected] Discord: Dwarfer#2715
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.