Ir para conteúdo
  • Cadastre-se

Posts Recomendados

tenho um mod de reset system aqui, que ao chegar a 5 resets ele tem direito a uma área nova, só que ele apenas reseta o level do personagem ao atingir o level 700, e também nao aparece no look a quantidade de resets, eu queria que alguém modificasse para que a cada reset, o player volte ao level 8, e zere o hp/mana, e ganhe 1000 hp/ 300 mana se for knight, 300 hp/ 1000 mana  de for druid ou sorc, e 800hp/500 mana se for paladin, e que aparecesse no look a quantidade de resets, ex (1 reset), eu tenho um sistema de frags no look também, nao sei se causaria algum problema. meu reset mod é esse : 

 

Citar

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid))
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 
                function getResets(cid)
                        return (isPlayer(cid) and getCreatureStorage(cid, config.storage) + 1)
                end
        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

quem puder ajudar por favor.

Link para o post
Compartilhar em outros sites
29 minutos atrás, luannhrj disse:

tenho um mod de reset system aqui, que ao chegar a 5 resets ele tem direito a uma área nova, só que ele apenas reseta o level do personagem ao atingir o level 700, e também nao aparece no look a quantidade de resets, eu queria que alguém modificasse para que a cada reset, o player volte ao level 8, e zere o hp/mana, e ganhe 1000 hp/ 300 mana se for knight, 300 hp/ 1000 mana  de for druid ou sorc, e 800hp/500 mana se for paladin, e que aparecesse no look a quantidade de resets, ex (1 reset), eu tenho um sistema de frags no look também, nao sei se causaria algum problema. meu reset mod é esse : 

 

quem puder ajudar por favor.

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)+185
						   local mana = (getResets(cid)*1000)+35
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)+185
						   local mana = (getResets(cid)*500)+35
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)+185
						   local mana = (getResets(cid)*300)+35
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 
				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Pode testar? Fiz a parte da HP/MANA, vamos ver se funcionou e depois partimos pro look.

Estou saindo do trabalho e indo pra casa, lá fica melhor para te ajudar.

Vai testando e me fala o que aconteceu. Abraço.

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
6 horas atrás, DukeeH disse:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)+185
						   local mana = (getResets(cid)*1000)+35
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)+185
						   local mana = (getResets(cid)*500)+35
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)+185
						   local mana = (getResets(cid)*300)+35
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 
				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Pode testar? Fiz a parte da HP/MANA, vamos ver se funcionou e depois partimos pro look.

Estou saindo do trabalho e indo pra casa, lá fica melhor para te ajudar.

Vai testando e me fala o que aconteceu. Abraço.

muito obrigado, então vou esperar vc chegar em casa, pq pra testar eu tenho que reiniciar o servidor ne? ou não precisa, pq tem gente ai vou testar daqui a pouco e te falo, se puder ja adiantar o esquema com o look

(edit)

nao funcionou, quando eu digito !reset, aparece isso ai no console https://uploaddeimagens.com.br/imagens/erroreset-png

 

e nao sei se consegui te explicar direito, mas eu quero que a cada reset, dê esse bonus a mais de hp/mana, entao no caso do segundo reset, seria 2x o valor que ta ai, no 3 reset, 3x o valor, e etc, tem como fazer assim?

Editado por luannhrj (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
13 horas atrás, luannhrj disse:

muito obrigado, então vou esperar vc chegar em casa, pq pra testar eu tenho que reiniciar o servidor ne? ou não precisa, pq tem gente ai vou testar daqui a pouco e te falo, se puder ja adiantar o esquema com o look

(edit)

nao funcionou, quando eu digito !reset, aparece isso ai no console https://uploaddeimagens.com.br/imagens/erroreset-png

 

e nao sei se consegui te explicar direito, mas eu quero que a cada reset, dê esse bonus a mais de hp/mana, entao no caso do segundo reset, seria 2x o valor que ta ai, no 3 reset, 3x o valor, e etc, tem como fazer assim?

Não consegui entrar ontem, favor testar assim:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)
						   local mana = (getResets(cid)*1000)
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)
						   local mana = (getResets(cid)*500)
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)
						   local mana = (getResets(cid)*300)
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Favor testar e falar o que acontece, já está multiplicando aqueles valores pelo reset. (Vida e mana)

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
6 horas atrás, DukeeH disse:

Não consegui entrar ontem, favor testar assim:


<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)
						   local mana = (getResets(cid)*1000)
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)
						   local mana = (getResets(cid)*500)
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)
						   local mana = (getResets(cid)*300)
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Favor testar e falar o que acontece, já está multiplicando aqueles valores pelo reset. (Vida e mana)

nao deu, ta dando esse erro aqui na hora de da !reset    https://uploaddeimagens.com.br/imagens/erro2-png--54

Link para o post
Compartilhar em outros sites
4 minutos atrás, luannhrj disse:

nao deu, ta dando esse erro aqui na hora de da !reset    https://uploaddeimagens.com.br/imagens/erro2-png--54

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)
						   local mana = (getResets(cid)*1000)
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)
						   local mana = (getResets(cid)*500)
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)
						   local mana = (getResets(cid)*300)
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
				print (getResets(cid))
				print (getCreatureStorage(cid, 54676))
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Usa esse aqui, da /reload mods e !myresets, ai tira uma foto do console que é para ele aparecer uns valores lá.

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
56 minutos atrás, DukeeH disse:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)
						   local mana = (getResets(cid)*1000)
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)
						   local mana = (getResets(cid)*500)
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)
						   local mana = (getResets(cid)*300)
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
				print (getResets(cid))
				print (getCreatureStorage(cid, 54676))
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Usa esse aqui, da /reload mods e !myresets, ai tira uma foto do console que é para ele aparecer uns valores lá.

esses dois ultimos erros foi quando de i!myresets > https://uploaddeimagens.com.br/imagens/erro3-png--18 , e o char q eu to tentando resetar ainda nao tem nenhum reset, só coloquei ele no level 700

Link para o post
Compartilhar em outros sites
1 hora atrás, luannhrj disse:

esses dois ultimos erros foi quando de i!myresets > https://uploaddeimagens.com.br/imagens/erro3-png--18 , e o char q eu to tentando resetar ainda nao tem nenhum reset, só coloquei ele no level 700

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)
						   local mana = (getResets(cid)*1000)
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)
						   local mana = (getResets(cid)*500)
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)
						   local mana = (getResets(cid)*300)
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
				print (getResets(cid))
				print (getCreatureStorage(cid, 54676))
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Ele ta com problema pra ver quantos resets o char tem, mas vamos resolver.

Usa o !myresets de novo e manda foto do console.

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
1 hora atrás, DukeeH disse:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = (getResets(cid)*300)
						   local mana = (getResets(cid)*1000)
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = (getResets(cid)*800)
						   local mana = (getResets(cid)*500)
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = (getResets(cid)*1000)
						   local mana = (getResets(cid)*300)
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
				print (getResets(cid))
				print (getCreatureStorage(cid, 54676))
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
</mod>

Ele ta com problema pra ver quantos resets o char tem, mas vamos resolver.

Usa o !myresets de novo e manda foto do console.

https://uploaddeimagens.com.br/imagens/erro4-png--7  no jogo, aparece a mensagem 18:45 Voce Tem 0 Resets. , mas no console aparece esses erros ai 0 , -1

Link para o post
Compartilhar em outros sites

@luannhrj

Era pra aparecer isso mesmo.

Desculpa a demora e erros, não uso o 0.4 e não tenho como testar, ai eu vou fazendo e você tem que testar.

Pode testar esse, achei um problema, eu estava contando os resets que o cara tinha antes para calcular a vida, como você tinha 0 ele fazia 0*300 (hp) 0*1000 (mana) o que da pau, porque 0 multiplicando qualquer coisa é 0.

Segue corrigido: (Já coloquei também o look, favor testar.)

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = resetando*300
						   local mana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = resetando*800
						   local mana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = resetando*1000
						   local mana = resetando*300
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

Editado por DukeeH (veja o histórico de edições)

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
1 hora atrás, DukeeH disse:

@luannhrj

Era pra aparecer isso mesmo.

Desculpa a demora e erros, não uso o 0.4 e não tenho como testar, ai eu vou fazendo e você tem que testar.

Pode testar esse, achei um problema, eu estava contando os resets que o cara tinha antes para calcular a vida, como você tinha 0 ele fazia 0*300 (hp) 0*1000 (mana) o que da pau, porque 0 multiplicando qualquer coisa é 0.

Segue corrigido: (Já coloquei também o look, favor testar.)


<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = resetando*300
						   local mana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = resetando*800
						   local mana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = resetando*1000
						   local mana = resetando*300
					   end
						local difhp = hp-getCreatureMaxHealth(cid)
						local difmana = mana-getCreatureMaxMana(cid)
					   	setCreatureMaxHealth(cid, hp)
						doCreatureAddHealth(cid, difhp)
						setCreatureMaxMana(cid, mana)
						doCreatureAddMana(cid, difmana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

ta dando esse erro ainda :s https://uploaddeimagens.com.br/imagens/erro5-png--4 na hora de dar !reset

Link para o post
Compartilhar em outros sites
6 minutos atrás, luannhrj disse:

ta dando esse erro ainda :s https://uploaddeimagens.com.br/imagens/erro5-png--4 na hora de dar !reset

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = resetando*300
						   local mana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = resetando*800
						   local mana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = resetando*1000
						   local mana = resetando*300
					   end

					   	setCreatureMaxHealth(cid, hp)
						setCreatureMaxMana(cid, mana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
29 minutos atrás, DukeeH disse:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then
						   local hp = resetando*300
						   local mana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local hp = resetando*800
						   local mana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local hp = resetando*1000
						   local mana = resetando*300
					   end

					   	setCreatureMaxHealth(cid, hp)
						setCreatureMaxMana(cid, mana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

consegui resetar 10:51 Parabens, Voce Foi Resetado. Voce Agora Tem 1 Resets. , só que o char volta pro level 8 sem deslogar, ai continua aparecendo a mesma quantidade de hp e mana, reloguei e continuou do mesmo jeito, fui matar um bixo pra ver oq acontecia e acabei morrendo, ai meu char bugou, quando eu tento logar ele ja aparece morto, eu nao reiniciei o server apenas dei reload, será q o erro foi esse ou tem q mecher no script ainda? (edit) usei um master sorcerer pra testar, dei o reset, o char voltou no level 8, com 300 de vida e 740 de mana, olhei no sqlite e consta la essa quantia em hp e em mana, mas não em healthmax e manamax, por isso quando eu morro o char nasce sem vida, e também nao tá contando os resets no look, e teria como colocar pro char deslogar ao resetar? (o char ja ta com 2 resets, vou tentar achar na database pra zerar esse reset e testar de novo)

Editado por luannhrj (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

@luannhrj

Era pra acontecer aquilo mesmo, achei o erro e agora acho que corrigi.

Favor testar, testa também o look.

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then					   
						   local resethp = resetando*300
						   local resetmana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local resethp = resetando*800
						   local resetmana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local resethp = resetando*1000
						   local resetmana = resetando*300
					   end
					   
					   local hp = getCreatureMaxHealth(cid)
					   local mana = getCreatureMaxMana(cid)
					   local differencehp = (hp - resethp)
					   local differencemana = (mana - resetmana)
					  				  
					   	setCreatureMaxHealth(cid, resethp)
						setCreatureMaxMana(cid, resetmana)
						doCreatureAddHealth(cid, -differencehp)
						doCreatureAddMana(cid, -differencemana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

Editado por DukeeH (veja o histórico de edições)

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
9 minutos atrás, DukeeH disse:

@luannhrj

Era pra acontecer aquilo mesmo, achei o erro e agora acho que corrigi.

Favor testar, testa também o look.

 


<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then					   
						   local resethp = resetando*300
						   local resetmana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local resethp = resetando*800
						   local resetmana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local resethp = resetando*1000
						   local resetmana = resetando*300
					   end
					   
					   local hp = getCreatureMaxHealth(cid)
					   local mana = getCreatureMaxMana(cid)
					   local differencehp = (hp - resethp)
					   local differencemana = (mana - resetmana)
					  				  
					   	setCreatureMaxHealth(cid, resethp)
						setCreatureMaxMana(cid, resetmana)
						doCreatureAddHealth(cid, -differencehp)
						doCreatureAddMana(cid, -differencemana)
                        doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

ta dando esse erro agora : https://uploaddeimagens.com.br/imagens/erro6-png--3

 

Link para o post
Compartilhar em outros sites
17 minutos atrás, luannhrj disse:

 

Cara, desculpa todo esse transtorno, é foda escrever sem testar.

Fiz de outro jeito, que o char é relogado, não tava conseguindo editar a vida dele com o char on, favor testar.

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then					   
						   local resethp = resetando*300
						   local resetmana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local resethp = resetando*800
						   local resetmana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local resethp = resetando*1000
						   local resetmana = resetando*300
					   end
					    doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
					    doRemoveCreature(cid)
						db.executeQuery("UPDATE `players` SET `health`= "..resethp..",`healthmax`= "..resethp.." WHERE `players`.`id`= ".. playerid .."")
						db.executeQuery("UPDATE `players` SET `mana`= "..resetmana..",`manamax`= "..resetmana.." WHERE `players`.`id`= ".. playerid .."")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
				playerid = getPlayerGUID(cid)
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
19 minutos atrás, DukeeH disse:

Cara, desculpa todo esse transtorno, é foda escrever sem testar.

Fiz de outro jeito, que o char é relogado, não tava conseguindo editar a vida dele com o char on, favor testar.

 


<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end
                       resetando = getResets(cid)+1
					   if isInArray({1,2}, getPlayerVocation(cid)) then					   
						   local resethp = resetando*300
						   local resetmana = resetando*1000
					   elseif getPlayerVocation(cid) == 3 then
						   local resethp = resetando*800
						   local resetmana = resetando*500
					   elseif getPlayerVocation(cid) == 4 then
						   local resethp = resetando*1000
						   local resetmana = resetando*300
					   end
					    doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_GREEN)
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
                        return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Parabens, Voce Foi Resetado. Voce Agora Tem "..getResets(cid).." Resets.")
					    doRemoveCreature(cid)
						db.executeQuery("UPDATE `players` SET `health`= "..resethp..",`healthmax`= "..resethp.." WHERE `players`.`id`= ".. playerid .."")
						db.executeQuery("UPDATE `players` SET `mana`= "..resetmana..",`manamax`= "..resetmana.." WHERE `players`.`id`= ".. playerid .."")
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
				playerid = getPlayerGUID(cid)
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

que isso cara, eu agradeço só pela sua boa vontade de ajudar, aos pouquinhos ta dando certo, ta dando esse erro agora : https://uploaddeimagens.com.br/imagens/erro1-png--39

Link para o post
Compartilhar em outros sites
1 hora atrás, luannhrj disse:

que isso cara, eu agradeço só pela sua boa vontade de ajudar, aos pouquinhos ta dando certo, ta dando esse erro agora : https://uploaddeimagens.com.br/imagens/erro1-png--39

 

Favor testar, se resolver podemos voltar a parte de não precisar relogar o char, caso queira.

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end											  
						
					    doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
					    doRemoveCreature(cid)
						db.executeQuery("UPDATE `players` SET `health`= "..resethp..",`healthmax`= "..resethp.." WHERE `players`.`id`= ".. playerid .."")
						db.executeQuery("UPDATE `players` SET `mana`= "..resetmana..",`manamax`= "..resetmana.." WHERE `players`.`id`= ".. playerid .."")
						return true
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
			   if isInArray({1,2}, getPlayerVocation(cid)) then					   
				   resethp = (getResets(cid)+1)*300
				   resetmana = (getResets(cid)+1)*1000
			   elseif getPlayerVocation(cid) == 3 then
				   resethp = (getResets(cid)+1)*800
				   resetmana = (getResets(cid)+1)*500
			   elseif getPlayerVocation(cid) == 4 then
				   resethp = (getResets(cid)+1)*1000
				   resetmana = (getResets(cid)+1)*300
				end
				playerid = getPlayerGUID(cid)
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

asdukeeh.jpg

Link para o post
Compartilhar em outros sites
19 minutos atrás, DukeeH disse:

 

Favor testar, se resolver podemos voltar a parte de não precisar relogar o char, caso queira.


<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end											  
						
					    doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
					    doRemoveCreature(cid)
						db.executeQuery("UPDATE `players` SET `health`= "..resethp..",`healthmax`= "..resethp.." WHERE `players`.`id`= ".. playerid .."")
						db.executeQuery("UPDATE `players` SET `mana`= "..resetmana..",`manamax`= "..resetmana.." WHERE `players`.`id`= ".. playerid .."")
						return true
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
			   if isInArray({1,2}, getPlayerVocation(cid)) then					   
				   resethp = (getResets(cid)+1)*300
				   resetmana = (getResets(cid)+1)*1000
			   elseif getPlayerVocation(cid) == 3 then
				   resethp = (getResets(cid)+1)*800
				   resetmana = (getResets(cid)+1)*500
			   elseif getPlayerVocation(cid) == 4 then
				   resethp = (getResets(cid)+1)*1000
				   resetmana = (getResets(cid)+1)*300
				end
				playerid = getPlayerGUID(cid)
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
		<event type="login" name="lookResetLogin" event="script"><![CDATA[
			domodlib('teamFunctions')
			 
			function onLogin(cid)       
				registerCreatureEvent(cid, "lookReset")
				return true
			end
		]]></event>
		
		<event type="look" name="lookReset" event="script"><![CDATA[
			domodlib('reset_config')
			function onLook(cid, thing, position, lookDistance)
			
			if isPlayer(thing.uid) then
				doPlayerSetSpecialDescription(thing.uid, "\nResets: [" .. getResets(thing.uid) .."]")
			end
				
				return true
			end
		]]></event>
</mod>

 

deu esse erro no console quando eu resetei https://uploaddeimagens.com.br/imagens/erro1-png--40 , parece que a vida e a mana nao foram adicionadas, e o reset no look, parece que nao funcionou direito, ele ou aparece os frags , ou os resets, olha 14:12 You see yourself. You are Master Sorcerer.[Frags: 0]
14:12 You see Shadye (Level 404). He is an vip baiak knight
Resets: [0]. , da pra aparecer os dois juntos? frags e resets (edit) e a questao de relogar, eu prefiro assim mesmo, que relogue ao resetar

Editado por luannhrj (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
27 minutos atrás, luannhrj disse:

deu esse erro no console quando eu resetei https://uploaddeimagens.com.br/imagens/erro1-png--40 , parece que a vida e a mana nao foram adicionadas, e o reset no look, parece que nao funcionou direito, ele ou aparece os frags , ou os resets, olha 14:12 You see yourself. You are Master Sorcerer.[Frags: 0]
14:12 You see Shadye (Level 404). He is an vip baiak knight
Resets: [0]. , da pra aparecer os dois juntos? frags e resets (edit) e a questao de relogar, eu prefiro assim mesmo, que relogue ao resetar

 

Retirei o reset no look, me manda o script que mostra o frags no look, vou colocar os dois juntos, se não ele vai mostrar ou um ou outro.

 

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Reset System" version="1.0" author="Kimoszin" contact="tibiaking.com" enabled="yes">
 
    <!-- Configuracao -->
        <config name="reset_config"><![CDATA[
                config = {
                        level = 700,                      
                        premium = false,        
                        storage = 54676,
                }
 
 				function getResets(cid)
					resets = getCreatureStorage(cid, config.storage)
					if resets < 0 then
						resets = 0
					end
					return resets
				end
				
 
                function reset(cid)
                        if (config.premium and not(isPremium(cid)) ) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need have a premium account.")
                        end
 
                        if (getPlayerLevel(cid) < config.level) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisar Ser Lv "..config.level..".")
                        end
 
                        if not(getTilePzInfo(getCreaturePosition(cid))) then
                                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Presisa Tar em Area Pz Para Resetar.")
                        end											  
						
					    doPlayerAddLevel(cid, - (getPlayerLevel(cid) - 8))
                        doCreatureSetStorage(cid, config.storage, getResets(cid)+1)
					    doRemoveCreature(cid)
						db.query("UPDATE `players` SET `health`= "..resethp..",`healthmax`= "..resethp.." WHERE `players`.`id`= ".. playerid .."")
						db.query("UPDATE `players` SET `mana`= "..resetmana..",`manamax`= "..resetmana.." WHERE `players`.`id`= ".. playerid .."")
						return true
                end
 

        ]]></config>
 
        <!-- Talkaction para resetar -->
        <talkaction words="!reset" event="buffer"><![CDATA[
                domodlib('reset_config')
			   if isInArray({1,2}, getPlayerVocation(cid)) then					   
				   resethp = (getResets(cid)+1)*300
				   resetmana = (getResets(cid)+1)*1000
			   elseif getPlayerVocation(cid) == 3 then
				   resethp = (getResets(cid)+1)*800
				   resetmana = (getResets(cid)+1)*500
			   elseif getPlayerVocation(cid) == 4 then
				   resethp = (getResets(cid)+1)*1000
				   resetmana = (getResets(cid)+1)*300
				end
				playerid = getPlayerGUID(cid)
                reset(cid)
        ]]></talkaction>
 
        <!-- Talkaction para ver quantos resets tem -->
        <talkaction words="!myresets" event="buffer"><![CDATA[
                domodlib('reset_config')
                return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce Tem "..getResets(cid).." Resets.")
        ]]></talkaction>
 
        <!-- Tile -->
        <movevent type="StepIn" actionid="9911" event="script"><![CDATA[
                domodlib('reset_config')
                function onStepIn(cid, item, position, fromPosition)
                        local minResets = 1
 
                        if (not(getResets(cid) >= minResets)) then
                                doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                                return doTeleportThing(cid, fromPosition)
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></movevent>
 
        <!-- Porta -->
        <action actionid="9910" event="script"><![CDATA[
                domodlib('reset_config')
                function onUse(cid, item, position, fromPosition)
                        local minResets = 5
 
                        if not(getResets(cid) >= minResets) then
                                return doPlayerSendCancel(cid, "Desculpa, Voce presisa ter "..minResets.." Resets Para Passar Aqui")
                        end
 
                        doPlayerSendCancel(cid, "Bem Vindo")
                end
        ]]></action>
		
</mod>

 

asdukeeh.jpg

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.


  • Conteúdo Similar

    • Por LeoTK
      Salve galera neste tópico irei postar algumas prints do mapa do servidor para quem queira acompanhar e quem sabe até utilizar de inspiração para mapear o seu NTO.
       
      #Att 11/08/2022

       
       
       
       
      Konoha (Em Desenvolvimento)
       
       
       
       
    • Por DiigooMix
      Como o título já diz, será que alguém possui sprite do hitto e se possível as transformações dele?
    • Por OmegaZero
      Olá gostaria que alguém me ajudasse com uma "scripting" não sei se é pela mesma, seria o seguinte uma determinada arma teria a chance de dar double hit e não sei oque fazer alguem poderia ajudar?

      OBS:não sei se é o local correto se não for mova, desculpe
    • Por Madarasenju
      Olá galera do Tibia King, queria por uns npc's no meu server que não tem função de trade nem nada do tipo, queria que eles só andassem como enfeite, Rep+ Pra quem me ajudar... grato desde já.
    • Por SilenceRoot
      A magia é assim o você usa a a magia e ela ficará ativado por 10 segundos, até que o inimigo lance a primeira magia ou todos de uma vez, quando ele lançar a primeira magia, ele não lhe acertará ou seja esquivando dela, e logo em seguida será teletransportado aleatoriamente ao redor do inimigo que usou.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo