Passe o script inteiro
info
Grupo: Conde
Registrado: 09/09/09
Posts: 528
Reputação: +424
Char no Tibia: Emekalo Makalo

ok
ta ai
-- script by Marcryzius D'evil. --function onSay(cid, words, param)
config = {
level=100, -- level necessario pra reseta.
RemainingLvl=8, -- level que ficará depois de ser resetado.
exper=4200, -- experiencia que ficará depois de ser resetado.
pid=getPlayerGUID(cid), -- não mecha
skull="yes", -- players com white skull podem resetar? ("yes" or "no").
redskull="yes", -- players com red skull podem resetar? ("yes" or "no").
prot="yes", -- players precisam estar em protection zone pra resetar? ("yes" or "no").
bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no").
local voc = getPlayerVocation(cid)
local mana = 35
local health = 185
}
function getResets(cid)
reset = getPlayerStorageValue(cid,1020)
if reset < 0 then
reset = 0
end
return reset
end
if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then
doPlayerSendTextMessage(cid,22,"apenas players sem white skull podem resetar.")
return TRUE
end
if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then
doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.")
return TRUE
end
if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra poder resetar.")
return TRUE
end
if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"você precisa estar sem battler pra poder resetar.")
return TRUE
end
if getPlayerLevel(cid) >= config.level then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
if RemainingLvl and voc == 5 then
doPlayerSetVocation(cid, 9)
elseif RemainingLvl and voc == 6 then
doPlayerSetVocation(cid, 10)
elseif RemainingLvl and voc == 7 then
doPlayerSetVocation(cid, 11)
elseif RemainingLvl and voc == 8 then
doPlayerSetVocation(cid, 12)
setCreatureMaxMana(cid, mana)
setCreatureMaxHealth(cid, health)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "You need to have level "..config.level.." or more you may be reset.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end
info
Grupo: Conde
Registrado: 09/09/09
Posts: 528
Reputação: +424
Char no Tibia: Emekalo Makalo

Esse seu script tava cheio de erro, concertei ele mais nao sei se pega pois nao to podendo testar ele.
Testa ai e ve se pega:
-- script by Marcryzius D'evil. --function onSay(cid, words, param)
config = {
level=100, -- level necessario pra reseta.
RemainingLvl=8, -- level que ficará depois de ser resetado.
exper=4200, -- experiencia que ficará depois de ser resetado.
pid=getPlayerGUID(cid), -- não mecha
skull="yes", -- players com white skull podem resetar? ("yes" or "no").
redskull="yes", -- players com red skull podem resetar? ("yes" or "no").
prot="yes", -- players precisam estar em protection zone pra resetar? ("yes" or "no").
bat="yes", --players precisam estar sem fight pra resetarem? ("yes" or "no").
voc = getPlayerVocation(cid),
mana = 35,
health = 185
}
function getResets(cid)
reset = getPlayerStorageValue(cid,1020)
if reset < 0 then
reset = 0
end
return reset
end
if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then
doPlayerSendTextMessage(cid,22,"apenas players sem white skull podem resetar.")
return TRUE
end
if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then
doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.")
return TRUE
end
if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra poder resetar.")
return TRUE
end
if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"você precisa estar sem battler pra poder resetar.")
return TRUE
end
if getPlayerLevel(cid) >= config.level then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
if RemainingLvl and voc == 5 then
doPlayerSetVocation(cid, 9)
elseif RemainingLvl and voc == 6 then
doPlayerSetVocation(cid, 10)
elseif RemainingLvl and voc == 7 then
doPlayerSetVocation(cid, 11)
elseif RemainingLvl and voc == 8 then
doPlayerSetVocation(cid, 12)
setCreatureMaxMana(cid, mana)
setCreatureMaxHealth(cid, health)
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "You need to have level "..config.level.." or more you may be reset.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
return TRUE
end
lol
totalmente disnecessaria esse linha:
if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.") return TRUE end
pois já tinha esssa:
if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then doPlayerSendTextMessage(cid,22,"apenas players sem white skull podem resetar.") return TRUE end
era só colocar isso:
if(config.skull == "no") and (getPlayerSkullType(cid) <= 3 then doPlayerSendTextMessage(cid,22,"apenas players sem skull podem resetar.") return TRUE end
Editado Maio 18 por Swishy
Esse seu script tava cheio de erro, concertei ele mais nao sei se pega pois nao to podendo testar ele.
Testa ai e ve se pega:
Tipo, funfo normal.. Mais não ta resetando o level..
fmz manos ??? num teria como um npc mudasse a vocacao mais pra isso o char tinha q ter 20 reset virava vocacao Super, 40 resets outra vocacao assim por diante ou restringir spells por reset alguem ajuda ?? flws fmz






info
Grupo: Campones
Registrado: 26/04/10
Posts: 57
Reputação: +18
Olá.. Estou aqui novamente.
Eu quero um sistema reset que quando reseta, muda De vocação..
Então Eu mesmo tentei.. Eu peguei o sistema reset Normal (feito por Marcryzius), e adicionei Isso :
Mais Não funfo.. Tem como dar uma ajuda ae?
Obrigado Em antecipação.
-Davi