Ir para conteúdo

rogeriots

Membro
  • Registro em

  • Última visita

  1. rogeriots alterou sua foto pessoal
  2. rogeriots reagiu a uma resposta no tópico: (Resolvido)Nao sei aonde ta erro
  3. @Vodkart function getPlayerReset(cid) local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end isso eu coloco na lib correto caso for eu vou lá testa já digo se deu certo foi só isso que não fiz né ?? @Vodkart Obrigado mesmo aonde que do rep+ so tive que altera o min e max para: min = -(level*2.6)*(getPlayerReset(cid)+ 5 ) max = -(level*2.6)*(getPlayerReset(cid)+ 5 ) Muito obrigado salvo minha pele kkkk tava quebrando a cuca Moderados pode fecha como resolvido min = -(level*2.6)*(getResets(cid)+ 5 ) max = -(level*2.6)*(getResets(cid)+ 5 )
  4. .Bom sistema de reset funciona a spell tbm porem nao sei aonde eu errei na spell pq se eu mudo de local resetmin = 1 se eu por local resetmin = 2 os players ja nao consegue mais usa e todos players ja tem 10reset pra cima se tiver que adiciona algum script na lib poderia me disponibilizar porque nao sei por onde começa obrigado OBS: caso tenha colocado no lugar errado queira me desculpar Você tem o código disponível? Se tiver publique-o aqui: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) function onGetFormulaValues(cid, level, maglevel) min = -(level*2.6)*(getResets(cid)+ 5 ) max = -(level*2.6)*(getResets(cid)+ 5 ) return min, max end local arr = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local area = createCombatArea(arr) setCombatArea(combat, area) setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local resetmin = 1 function onCastSpell(cid, var) if getResets(cid) >= resetmin then doCombat(cid, combat, var) else doPlayerSendCancel(cid, "DESCULPA, VOCE NAO TEM ".. resetmin .." RESET PARA USAR ESSA SPELL.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end Criador do sistema de reset foi o @MarcelloMkez
  5. @Wakon sim, já consegui o rank reset por tabela agora to com problema nas spells elas esta por storage poderia me da uma ideia de como edita elas pra ser por reset porem por db e nao por storage local combat1 = createCombatObject() setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatParam(combat1, COMBAT_PARAM_EFFECT, 29) setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -50, -50, -60, -50) arr1 = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} local area1 = createCombatArea(arr1) setCombatArea(combat1, area1) local function onCastSpell1(parameters) doCombat(parameters.cid, combat1, parameters.var) end function onCastSpell(cid, var) local parameters = { cid = cid, var = var} addEvent(onCastSpell1, 100, parameters) local reset_storage = 2310 -- coloque o storage do seu sistema de reset local quant_reset = 3 -- quantidade de resets para poder passar if (getPlayerStorageValue(cid, reset_storage) < quant_reset) then return true end return TRUE end Moderadores pode fecha ja resolvi problema de coloca spell por reset consegui criar spell usando table
  6. rogeriots reagiu a uma resposta no tópico: duvida sobre uma script de reset
  7. Teria que cria um table no sql ? deixo pergunta teria como adicionar linha de comando com storage ou isso poderia fazer da erro no código porque vou monta spells por reset só sei fazer spells por reset se tiver storage
  8. Bom tenho um script que peguei aqui no tk ela funciona perfeita mente so queria sabe se existe alguma maneira de fazer um rank reset com ela porque ela nao tem storage e tudo por database criado e @MarcelloMkez so queria essa luz por favor caso tenha colocado no lugar errado me desculpe obrigado des de já Você tem o código disponível? Se tiver publique-o aqui: --[[ <(Advanced Reset System 2.0)> Autor: MarcelloMkez. Contato: ([email protected]) Versão: 2.0 Testado em: 8.50 e 8.60 TFS: 0.3.6 and 0.4.0 Fórum: http://www.xtibia.com/forum/topic/142463-advanced-reset-system-20/ -=[Características]=- ~( Versão 2.0 )~ - Resets agora Armazenados na DataBase; (Sem Valor de Storage) - Instala o System e cria a Tabela de Resets com o comando "/installreset"; - Resets no Look do jogador ex: 22:10 You see Marcello [Reset 2] (Level 8). He is an elder druid.; - [sTAGES] para "Premium Account" e "Free Account"; ]] --=[Functions]=-- -- installReset()' [instala o Sistema.] -- tableResetInstall()' [Verifica Se o Sistema ja foi instaladao.] -- nowReseting()' [Verifica, retorna o erro ou reseta.] -- getPlayerReset(cid)' [Pega numero de resets do player.] -- checLevelStageReset(cid)' [Verifica o Level para Resetar.] -- newReset(cid)' [Verifica todas as Condições de Reset.] -- addValue(value)' [Adiciona numero de resets.] --=[Comandos de Jogadores]=-- -- "/installreset" -- Só será usado uma vez, para instalar o sistema. -- "!resetar" -- Para Resetar. function onSay(cid, words, param) if words =="!resetar" then --[ Condições de Reset ] -- local coNdConf = { needPz = true, -- Precisa estar em Pz pra resetar? [true, false] needPa = false, -- Precisa ser Premium Account Pra resetar? [true, false] withe = false, -- Players com Pk Withe podem resetar? [true, false] red = false, -- Players com Pk Red pode resetar? [true, false] battle = false, -- Players precisão estar sem battle pra resetar? [true, false] teleport = true, -- Teleportar Player para o templo após resetar? [true, false] look = true, -- Aparecer Resets no Look do Player? [true, false] pid = getPlayerGUID(cid), -- Não Mexer. --[ Configurações do Reset ] -- resetConf = { Level = 350, -- Level Necessário para Resetar. [Valor] backLvl = 8, -- Level que voltará após o Reset. [Valor] time = 5, -- Tempo para o Player deslogar ao resetar, em segundos. [Valor] }, } --[[>> STAGES <<]]-- x=true;X=true -- Não Mexer. local stage = {Abilitar = {x}, Desabilitar = {}, --<< Abilitar Stages?? >>-- [{x};{}] -- [RESETS] | [PREMMY] | [FREE] stage1= {resets= 4, free= 100001}, stage2= {resets= 9, free= 110001}, -- EXPLICANDO e Configurando stages. (Se estiver Abilitado [Abilitar = {x}]) stage3= {resets= 14, free= 120001}, -- resets = Número de resets para o Stage; stage4= {resets= 19, free= 130001}, -- premmy = Level necessário para Premium Accounts; stage5= {resets= 24, free= 140001}, -- free = Level necessário para Free Accounts; stage6= {resets= 29, free= 150001}, -- Coloque em Ordem... stage7= {resets= 35, free= 160001}, -- [OBS: MARQUE UM "X" PARA ABILITAR OU DESABILITAR OS STAGES] stage8= {resets= 40, free= 170001}, -- EX: para desabilitar mude: Abilitar = {}, Desabilitar = {x} stage9= {resets= 45, free= 180001}, stage10={resets= 150, free= 190001}, } --[[>> FIM STAGES <<]]-- --=[Pega Valor de Resets]=-- function getPlayerReset(cid) local qr = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";") rss = qr:getDataInt("reset", coNdConf.pid) if rss < 0 then rss = 0 end return rss end local success = " ~~ Sucesso! ~~ \nVocê tem agora "..(getPlayerReset(cid)+1).." resets. \nVocê será deslogado em "..coNdConf.resetConf.time.." segundos." ;err = doPlayerSendTextMessage local qrt = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..coNdConf.pid..";");rss_db = qrt:getDataInt("reset", coNdConf.pid) local lvl_query = "UPDATE `players` SET `level` = "..(coNdConf.resetConf.backLvl)..", `experience` = 0 WHERE `id`= " .. coNdConf.pid .. ";" local reset_query = "UPDATE `players` SET `reset` = "..(getPlayerReset(cid)+(1)).." WHERE `id`= " .. coNdConf.pid .. ";" local nolook_query = "UPDATE `players` SET `description` = '' WHERE `players`.`id`= " .. coNdConf.pid .. ";" local look_query = "UPDATE `players` SET `description` = ' [Reset "..(getPlayerReset(cid)+(1)).."]' WHERE `players`.`id`= " .. coNdConf.pid .. ";" --=[Reseta]=-- function addValue(value) if coNdConf.look == false then doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(nolook_query) else doRemoveCreature(cid) db.executeQuery(lvl_query);db.executeQuery(reset_query);db.executeQuery(look_query) return LUA_NO_ERROR end end function nowReseting() if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return true end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) addEvent(addValue, coNdConf.resetConf.time*1000, value) return true end end --[sTAGES Nao mexer em nada.]-- function checkLevelStageReset(cid) local stages = { {resets= stage.stage1.resets, free= stage.stage1.free}, {resets= stage.stage2.resets, free= stage.stage2.free}, {resets= stage.stage3.resets, free= stage.stage3.free}, {resets= stage.stage4.resets, free= stage.stage4.free}, {resets= stage.stage5.resets, free= stage.stage5.free}, {resets= stage.stage6.resets, free= stage.stage6.free}, {resets= stage.stage7.resets, free= stage.stage7.free}, {resets= stage.stage8.resets, free= stage.stage8.free}, {resets= stage.stage9.resets, free= stage.stage9.free}, {resets=stage.stage10.resets, free=stage.stage10.free}, } local resets = getPlayerReset(cid) for i, tab in ipairs(stages) do if resets <= tab.resets then coNdConf.resetConf.Level = isPremium(cid) and tab.premmy or tab.free break end end if (getPlayerLevel(cid) < coNdConf.resetConf.Level) then err(cid, MESSAGE_STATUS_CONSOLE_BLUE, "- Level Necessário Para o Reset ["..coNdConf.resetConf.Level.."]. Faltam "..coNdConf.resetConf.Level-getPlayerLevel(cid).." level's para você Resetar. -") return TRUE end if getPlayerLevel(cid) >= coNdConf.resetConf.Level and (coNdConf.teleport == false) then doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) else doPlayerPopupFYI(cid, success) addEvent(addValue, coNdConf.resetConf.time*1000, value) addEvent(doTeleportThing, coNdConf.resetConf.time*900, cid, getTownTemplePosition(getPlayerTown(cid))) return true end end function newReset(cid) if(coNdConf.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == LUA_ERROR) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar em Protection Zone Para Resetar. -") return TRUE end if(coNdConf.needPa == true) and not isPremium(cid) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa ser Premium Account para Resetar. -") return TRUE end if(coNdConf.withe == false) and (getCreatureSkullType(cid) == 3) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Withe. -") return TRUE end if(coNdConf.red == false) and (getCreatureSkullType(cid) == 4) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você não pode resetar em condições de PK Red. -") return TRUE end if(coNdConf.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then err(cid,MESSAGE_STATUS_CONSOLE_BLUE,"- Você Precisa estar sem Battle para Resetar. -") return TRUE end local xy = {true,false} table.insert(stage.Abilitar, false) table.insert(stage.Desabilitar, false) if stage.Abilitar[1] == xy[1] and stage.Desabilitar[1] == xy[2] then checkLevelStageReset(cid) elseif stage.Abilitar[1] == xy[2] and stage.Desabilitar[1] == xy[1] then nowReseting() else doPlayerPopupFYI(cid, "LUA_ERROR; Configure corretamente o Sistema de STAGES!") end return true end function tableResetInstall() print(not rss_db and LUA_ERROR or "Tabela de Resets: Instalada ... [success] ") addEvent(newReset, 1000, cid) return false end if tableResetInstall() then end end --=[install System]=-- function installReset() if db.executeQuery("ALTER TABLE `players` ADD reset INT(11) NOT NULL DEFAULT 0;") then print("[MarcelloMkez] -= Advanced Reset System 2.0 por DataBase =- Instalado com sucesso!") return TRUE end print('[Advanced Reset System/MarcelloMkez] Não foi possível instalar o Sistema.') return FALSE end local tt = { "Preparando Instalação...", "Instalando: TableReset Db...", "Instalando: getPlayerReset()...", "Instalando: addValue()...", "Instalando: checkLevelStageReset()...", "Instalando: newReset() and nowReseting()...", "Finalizando Instalação...", "...", success = { "Iniciando...", "function: TableReset Db... [success]", "function: getPlayerReset()... [success]", "function: addValue(value)... [success]", "function: checkLevelStageReset()... [success]", "function: newReset() and nowReseting()... [success]", "Fim da Instalação. ", "by: ~~ MarcelloMkez ~~ \nContato: [email protected]", inst = {"MarcelloMkez","Advanced Reset System 2.0 por DataBase" }, }, } if words == "/installreset" and getPlayerAccess(cid) >= 3 then function install() if installReset() then print(""..tt.success[7].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,""..tt.success[8].."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] -="..tt.success.inst[2].."=- Instalado com sucesso!") else print("["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "["..tt.success.inst[1].."] FALHA NA INSTALAÇÃO! [O sistema ja foi instalado].") end return 1 end function concl(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[7].."") print(""..tt[8].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[7].."") doPlayerSendTextMessage(cid, typetx,""..tt[8].."") addEvent(install, 1000,cid) end function finall(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[6].."") print(""..tt[7].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[6].."") doPlayerSendTextMessage(cid, typetx,""..tt[7].."") addEvent(concl, 3000,cid) end function installDd(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[5].."") print(""..tt[6].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[5].."") doPlayerSendTextMessage(cid, typetx,""..tt[6].."") addEvent(finall, 1000,cid) end function installCc(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[4].."") print(""..tt[5].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[4].."") doPlayerSendTextMessage(cid, typetx,""..tt[5].."") addEvent(installDd, 1000,cid) end function installBb(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[3].."") print(""..tt[4].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[3].."") doPlayerSendTextMessage(cid, typetx,""..tt[4].."") addEvent(installCc, 1000,cid) end function installAa(cid) local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[2].."") print(""..tt[3].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[2].."") doPlayerSendTextMessage(cid, typetx,""..tt[3].."") addEvent(installBb, 1000,cid) end function toInstall() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt.success[1].."") print(""..tt[2].."") doPlayerSendTextMessage(cid, typetx,""..tt.success[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[2].."") addEvent(installAa, 1000,cid) end function preparation() local typetx = MESSAGE_STATUS_CONSOLE_BLUE print(""..tt[1].."") doPlayerSendTextMessage(cid, typetx,""..tt[1].."") addEvent(toInstall, 3000,cid) end if preparation() then end end return 1 end --=[by: MarcelloMkez]=-- Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  9. rogeriots reagiu a uma resposta no tópico: (Resolvido)erro em creaturescript
  10. esse erro ta me causando muitos problema porque quando mata qualquer protect do castle ele ta esse erro antes tava no ot todo agora foi so pro castle alguem sabe oque pode ser se poder me ajuda agradeço des de ja Você tem o código disponível? Se tiver publique-o aqui: [14/08/2018 22:59:10] [Error - CreatureScript Interface] [14/08/2018 22:59:10] In a timer event called from: [14/08/2018 22:59:10] buffer:onKill [14/08/2018 22:59:11] Description: [14/08/2018 22:59:11] [string "function setPlayerStorageTable(cid, storage..."]:105: bad argument #1 to 'pairs' (table expected, got boolean) [14/08/2018 22:59:11] stack traceback: Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
  11. boa tarde preciso de um NPC que compre as smalls e troque por scarab por exemplo o cara tem 10 smalls diamond ele vai no npc e troca por 1 scarab se ele tem 10 small ruby troca por 1 scarab tbm nao sei se da pra fazer isso mais agradeço des de ja porfavor mods se eu tiver feito topico no lugar errado me desculpe e me mova por lugar certo obrigado xD
  12. Ola preciso de ajuda pois contratei um internet de 60 MB live veio modem sagemcom f@st 5317 já fiz de tudo pra abri a porta 7171 e 7172 e não vai nem que se deus vim para terra se alguém poder me ajuda agradeço dês já Peço desculpa aos adm se criei tópico no lugar errado e por favor me mover se tiver errado
  13. bom preciso de ajuda pra cria um site se alguem poder me ensina ou me passa uma video aula que ensine passo a passo sei abri ele ta funcionando so que falta muito coisa pra arruma se alguem quiser ver ele so entra warrio.ddns.net caso tiver no lugar errado por favor quera me desculpa
  14. rogeriots postou uma resposta no tópico em Formação de Equipe
    Salve Galera Do TK E o Seguinde abri meu ot ontem ele ta meio parado e eu estou com pouco tempo Preciso de Comander master Para Anunciar e para me ajuda com umas outras coisas E preciso tbm De tutor Para Os player que Entra Por mim vocês podem joga Cria Char diferente E nao Dando guela kkkkkk Quem Quiser So me chama no inbox ou fala pelo Topico mesmo obrigadao
  15. mano alguem me ajuda por favor meu serve tava rodando normal deu pique de luz aqui em casa quando liguei pc que fui abre o map deu esse erro FATAL : OTBM Loader - could not open the file e tbm nao abre mais no rmers alguem pode me ajuda ?
  16. Eu Fui No Executar Coloquei %appdata% Procurei pela pasta Tibia La vai ta Umas Coisas E so paga Tudo Unica Coisa que Nao Pode Paga e O Automap O resto pode paga tudo
  17. ja arrumei rodo perfeito podem fecha topic 100% resolvido
  18. deu um erro Cannot find file tibia.dat tentei coloca um dat do outro cliente aqui mesmo assim do erro ainda Deu Certo So que eu Abro O cliente normal ele coloco a senha abre pra mim escolhe os chars escolho quando loga no ot ele cai aonde que mecho pra arruma no dat no spr ou no pic ?

Informação Importante

Confirmação de Termo