Postado Março 4, 2017 8 anos Em 04/03/2017 em 14:15, 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>
Postado Março 4, 2017 8 anos Autor Em 04/03/2017 em 14:33, 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
Postado Março 4, 2017 8 anos Em 04/03/2017 em 14:55, 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>
Postado Março 4, 2017 8 anos Autor Em 04/03/2017 em 16:54, 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 Março 4, 2017 8 anos por luannhrj (veja o histórico de edições)
Postado Março 4, 2017 8 anos Em 04/03/2017 em 17:14, 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>
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.