Ir para conteúdo

Frenesy

Membro
  • Registro em

  • Última visita

  1. Frenesy reagiu a uma resposta no tópico: Auto-Backup Database
  2. Frenesy reagiu a uma resposta no tópico: Árvores do Tibia - Variações By Nolis
  3. Se é isso que você quer, então está usando o sistema errado. Isso aqui é EXP POR HIT. Então a cada hit você ganha exp.
  4. Pois na linha 113 onde está ocorrendo o erro, troque o: doSendAnimatedText(member, expmember, 215) por: doSendAnimatedText(getCreaturePosition(member), expmember, 215) E veja se resolve.
  5. Você pode tentar assim. -- CONFIGURAÇÕES DE EXPERIENCIA -- useStages = false -- Usar sistema de Stages , true/false premiumMultipliqueExp = 2 -- Players Premiums terão exp multiplicada, caso não querer deixe 1. rateExp = 300 -- Exp caso não for usar stages. local stages = { -- ["DELEVEL-ATELEVEL"] = EXP, (OBS: NUNCA REPETIR O MSM NUMERO, SEMPRE COLOCAR UM A MAIS.) ["1-50"] = 300, ["51-100"] = 250, ["101-150"] = 200, ["151-200"] = 150, ["201-250"] = 100, ["251-300"] = 50, ["351-400"] = 25, } ultimateExp = 15 -- exp que vai usar caso o level do player não tiver mais na tabela . -- CONFIGURAÇÕES DA PARTY partyPorcent = 40 -- Quantos Porcento da exp vai para os membros da party levelBlockParty = 1000 -- Diferença Maxima de Level permitida para membro da party ganhar exp. expShareRadiusX = 30 -- Distancia maxima permitida no eixo X para membro da party ganhar exp. expShareRadiusY = 30 -- Distancia maxima permitida no eixo Y para membro da party ganhar exp. expShareRadiusZ = 1 -- Distancia maxima permitida no eixo Z para membro da party ganhar exp. -- CONFIGURAÇÕES DE RINGS -- local rings = { -- [ID DO ANEL] = EXP MULTIPLICADA POR X EXP. [3048] = 2, [3049] = 4, [3050] = 6, } -- FIM DAS CONFIGURAÇÕES -- function CalculeExp(monsterhp, exptotal, hit) hit = hit <= monsterhp and math.ceil(exptotal * hit / monsterhp) or 0 return hit < 0 and 0 or hit end function isSummon(cid) return getCreatureMaster(cid) end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and isMonster(cid) then if getCreatureStorage(cid, 50001) ~= 1 then doCreatureSetStorage(cid, 50002, getMonsterInfo(getCreatureName(cid)).experience * rateExp) doCreatureSetStorage(cid, 50001, 1) end end if type == STATSCHANGE_HEALTHLOSS then if isMonster(cid) then if isCreature(attacker) then local _cid = isSummon(attacker) and getCreatureMaster(attacker) or attacker if isPlayer(_cid) then if useStages then for strstage, experience in pairs(stages) do tabstage = string.explode(strstage, "-") if getPlayerLevel(_cid) >= tonumber(tabstage[1]) and getPlayerLevel(_cid) <= tonumber(tabstage[2]) then ultimateExp = experience end end experienceRate = ultimateExp else experienceRate = rateExp end local expgain = CalculeExp(getCreatureMaxHealth(cid), getMonsterInfo(getCreatureName(cid)).experience * experienceRate, value) if getCreatureStorage(cid, 50002) > 0 then if getCreatureStorage(cid, 50002) - expgain < 0 then expgain = getCreatureStorage(cid, 50002) end doCreatureSetStorage(cid, 50002, getCreatureStorage(cid, 50002) - expgain) local ringexp = 1 for idring, expring in pairs(rings) do if getPlayerSlotItem(_cid, 9).itemid == idring then ringexp = expring break end end local premiumMultipliqueExp = isPremium(_cid) and premiumMultipliqueExp or 1 expgain = expgain * ringexp * premiumMultipliqueExp local party = false if isInParty(_cid) then local partyMembers, expParty = getPartyMembers(getPartyLeader(_cid)), expgain / 100 * partyPorcent for indice, partyMember in pairs(partyMembers) do attackerLevel, partyLevel = getPlayerLevel(_cid), getPlayerLevel(partyMember) attackerPos, partyPos = getThingPos(_cid), getThingPos(partyMember) x = false if math.abs(attackerLevel - partyLevel) > levelBlockParty then x = true elseif math.abs(attackerPos.x - partyPos.x) > expShareRadiusX then x = true elseif math.abs(attackerPos.y - partyPos.y) > expShareRadiusY then x = true elseif attackerPos.z ~= partyPos.z then x = true elseif _cid == partyMember then x = true end if x then partyMembers[indice] = nil end end if #partyMembers ~= 0 then expParty = math.ceil(expgain / 100 * partyPorcent) expmember = math.ceil(expParty / #partyMembers) for _, member in pairs(partyMembers) do if member ~= _cid then doPlayerSendTextMessage(member, 12, "You received "..expmember.." party exp.") doSendAnimatedText(member, expmember, 215) doPlayerAddExp(member, expmember) end end doPlayerSendTextMessage(_cid, 12, "You gain "..expgain.." exp. (" ..partyPorcent.."% send to party)") doSendAnimatedText(_cid, expgain - expParty, 215) doPlayerAddExp(_cid, expgain - expParty) party = true else party = false end end if not party then doPlayerAddExp(_cid, expgain) doSendAnimatedText(getThingPos(_cid), expgain, 215) end end end end end end return true end function onCombat(cid, target) if isMonster(target) and not isSummon(target) and not isPlayer(target) then registerCreatureEvent(target, "ExpGain") end return true end
  6. Estou desenvolvendo um servidor que trabalha com bastantes storages. Se o servidor chegar a, digamos, 150 jogadores simultâneos, o banco de dados ficará com mais ou menos 4 milhões de linha de storages armazenadas. Como eu gostaria de ficar checando storages o tempo todo durante o jogo, fico me perguntando se isso pesaria no servidor. Durante o server-save eu limpo o banco de dados, retirando as storages não usadas. Isso diminui drasticamente a quantidade de linhas, mas logo elas enchem novamente. Então é isso, minha dúvida é bem simples - eu acho. Desde já, eu agradeço a atenção.
  7. Frenesy reagiu a uma resposta no tópico: TFS 1.3 8.60 by Nekiro (Tela Extendida)
  8. Frenesy reagiu a uma resposta no tópico: OTCv8-Mobile
  9. Para saber se o problema é no OTClient ou nas modificações na sourcer do servidor, você pode verificar o Terminal do OTClient (Acho que é Ctrl + T) e ver se possui alguma mensagem de erro - em vermelho - por lá.
  10. premii reagiu a uma resposta no tópico: [TFS 0.4] EXP por HIT
  11. Frenesy reagiu a uma resposta no tópico: OTCv8-Mobile
  12. Gostei muito desse sistema. Graficamente falando, está linda essas sprites também.
  13. Aquele tutorial agora cairia bem.
  14. Cat reagiu a uma resposta no tópico: Cargos, Ranks e a volta do sistema de Medalhas!
  15. Gostei muito do novo estilo. Acho que ficou mais "clean", sabe? Eu curti. Minha sugestão seria mudar um pouco as cores do TK. Assim, na hora da mudança, a sensação de novidade fica maior. Mas é só uma sugestão boba. Estão fazendo um ótimo trabalho. Parabéns a toda a equipe.
  16. Que show! Aguardo ansioso por eventos e coisas que tornam o fórum mais animado. Ansioso pra vê o novo layout do site.
  17. Frenesy postou uma resposta no tópico em Outros Clients
    Como eu conseguiria esse excelente trabalho em 8.60 (TFS 0.4)? Parabéns pela contribuição. Ficou bem maneiro.
  18. Eu faço de tudo. Mapa, Script, Sistemas e até Modificações no OTClient - embora pareça não ser o seu caso. Manda mensagem inBox por aqui caso ainda precise de ajuda.
  19. Spooky Ghost reagiu a uma resposta no tópico: (Resolvido)[Ajuda] Recompensas
  20. As vezes as configurações de pisos especiais está desabilitada. Pressionando a tecla E elas são acionadas novamente. Fica a dica pra quem tiver um problema parecido.
  21. Já tentou por lua? local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local shopModule = ShopModule:new() npcHandler:addModule(shopModule) shopModule:addBuyableItem({'scarf'}, 2661, 250, 'scarf') shopModule:addBuyableItem({'bronze amulet'}, 2172, 250, 200, 'bronze amulet') shopModule:addBuyableItem({'silver amulet'}, 2170, 250, 200, 'silver amulet') shopModule:addBuyableItem({'garlic necklace'}, 2199, 250, 150, 'garlic necklace') shopModule:addBuyableItem({'protection amulet'}, 2200, 250, 250, 'protection amulet') shopModule:addBuyableItem({'dragon necklace'}, 2201, 250,200, 'dragon necklace') shopModule:addBuyableItem({'strange talisman'}, 2161, 250,200, 'strange talisman') shopModule:addBuyableItem({'crystal necklace'}, 2125, 250, 'crystal necklace') shopModule:addBuyableItem({'amulet of loss'}, 2173, 10000, 'amulet of loss') shopModule:addBuyableItem({'wedding ring'}, 2121, 990,'wedding ring') shopModule:addBuyableItem({'time ring'}, 2169, 2000,'time ring') shopModule:addBuyableItem({'sword ring'}, 2207, 500,'sword ring') shopModule:addBuyableItem({'stealth ring'}, 2165, 5000,'stealth ring') shopModule:addBuyableItem({'signet ring'}, 7697, 15000,'signet ring') shopModule:addBuyableItem({'ring of the sky'}, 2123, 48000,'ring of the sky') shopModule:addBuyableItem({'ring of healing'}, 2214, 2000,'ring of healing') shopModule:addBuyableItem({'power ring'}, 2166, 100,'power ring') shopModule:addBuyableItem({'might ring'}, 2164, 5000,'might ring') shopModule:addBuyableItem({'life ring'}, 2168, 900,'life ring') shopModule:addBuyableItem({'gold ring'}, 2179, 32000,'gold ring') shopModule:addBuyableItem({'energy ring'}, 2167, 2000,'energy ring') shopModule:addBuyableItem({'dwarven ring'}, 2213, 2000,'dwarven ring') shopModule:addBuyableItem({'death ring'}, 6300, 4000,'death ring') shopModule:addBuyableItem({'crystal ring'}, 2124, 1000,'crystal ring') shopModule:addBuyableItem({'club ring'}, 2209, 500,'club ring') shopModule:addBuyableItem({'axe ring'}, 2208, 500,'axe ring') shopModule:addBuyableItem({'wolf tooth chain'}, 2129, 400,'wolf tooth chain') shopModule:addBuyableItem({'beetle necklace'}, 11374, 6000,'beetle necklace') shopModule:addBuyableItem({'ancient amulet'}, 2142, 800,'ancient amulet') shopModule:addBuyableItem({'demonbone amulet'}, 2136, 128000,'demonbone amulet') shopModule:addBuyableItem({'golden amulet'}, 2130, 6600,'golden amulet') shopModule:addBuyableItem({'scarab amulet'}, 2135, 800,'scarab amulet') shopModule:addBuyableItem({'star amulet'}, 2131, 2000,'star amulet') shopModule:addBuyableItem({'platinum amulet'}, 2171, 10000,'platinum amulet') shopModule:addBuyableItem({'elven amulet'}, 2198, 500, 50,'elven amulet') shopModule:addBuyableItem({'glacier amulet'}, 7888, 6000,'glacier amulet') shopModule:addBuyableItem({'leviathan/s amulet'}, 10220, 12000, 5,'leviathan/s amulet') shopModule:addBuyableItem({'lightning pendant'}, 7889, 6000,'lightning pendant') shopModule:addBuyableItem({'magma amulet'}, 7890, 6000, 200,'magma amulet') shopModule:addBuyableItem({'sacred tree amulet'}, 10219, 12000, 5,'sacred tree amulet') shopModule:addBuyableItem({'bonfire amulet'}, 10218, 12000, 5,'bonfire amulet') shopModule:addBuyableItem({'shockwave amulet'}, 10221, 12000, 5,'shockwave amulet') shopModule:addBuyableItem({'stone skin amulet'}, 2197, 5000, 5,'stone skin amulet') shopModule:addBuyableItem({'terra amulet'}, 7887, 6000, 200, 'terra amulet') npcHandler:addModule(FocusModule:new())
  22. Vocês por acaso já tentaram usar a função: function onSpawn(cid) Quem sabe também até possa atrasar o spawn do monstro em 100 milisegundos, tipo: addEvent (setCreatureName, 100, cid, NEWNAME, NEWDESC)
  23. Ah... se fosse pra qualquer um ver, até daria pra fazer. Mas um efeito visível apenas para quem tem a storage? Essa é complicado. Vou comentar aqui pra acompanhar, porque se alguém conseguir, eu também quero. Creio eu que envolva o Client, já que é um recurso visual apenas pra você. Mas, posso estar falando bobagens. Espero que consiga.

Informação Importante

Confirmação de Termo