Ir para conteúdo
  • Cadastre-se

Posts Recomendados

12 horas atrás, Pedro 469 disse:
  Mostrar conteúdo oculto

local function playerAddExp(cid, exp)
    playerAddExp(pk, expTotal / 10)
    doSendAnimatedText(getThingPos(cid), exp, 215)
end

function onDeath(cid, corpse, deathList)
        
    if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8

    -------------Edited Golden Arena-------------------------   --alterado v1.7 \/\/
    if getPlayerStorageValue(cid, 22546) == 1 then
       setGlobalStorageValue(22548, getGlobalStorageValue(22548)-1)
       if corpse.itemid ~= 0 then doItemSetAttribute(corpse.uid, "golden", 1) end  --alterado v1.8    
    end   
    if getPlayerStorageValue(cid, 22546) == 1 and getGlobalStorageValue(22548) == 0 then
       local wave = getGlobalStorageValue(22547)
       for _, sid in ipairs(getPlayersOnline()) do
           if isPlayer(sid) and getPlayerStorageValue(sid, 22545) == 1 then
              if getGlobalStorageValue(22547) < #wavesGolden+1 then
                 doPlayerSendTextMessage(sid, 20, "Wave "..wave.." will begin in "..timeToWaves.."seconds!")   
                 doPlayerSendTextMessage(sid, 28, "Wave "..wave.." will begin in "..timeToWaves.."seconds!") 
                 addEvent(creaturesInGolden, 100, GoldenUpper, GoldenLower, false, true, true)
                 addEvent(doWave, timeToWaves*1000)
              elseif getGlobalStorageValue(22547) == #wavesGolden+1 then
                 doPlayerSendTextMessage(sid, 20, "You have win the golden arena! Take your reward!")
                 doPlayerAddItem(sid, 2152, getPlayerStorageValue(sid, 22551)*2)    --premio
                 setPlayerStorageValue(sid, 22545, -1)
                 doTeleportThing(sid, getClosestFreeTile(sid, posBackGolden), false) 
                 setPlayerRecordWaves(sid)
              end
           end
       end
       if getGlobalStorageValue(22547) == #wavesGolden+1 then
          endGoldenArena()
       end
    end   
    ---------------------------------------------------   /\/\
    local givenexp = getWildPokemonExp(cid)  

if givenexp > 0 then
for a = 1, #deathList do
local pk = deathList[a]
---
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false)
if isCreature(pk) then 
   local expTotal = math.floor(playerExperienceRate * givenexp)
   local party = getPartyMembers(pk)
   if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then
      expTotal = math.floor(expTotal/#party)         --alterado v1.6.1
      for i = 1, #party do
          if isInArray(list, party) then
             playerAddExp(party, expTotal)
          end
      end
   else
      playerAddExp(pk, expTotal / 10) -- Editado 
   end       
end
end
end

    if isNpcSummon(cid) then
        local master = getCreatureMaster(cid)
        doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000))
        doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1)
        doRemoveCreature(cid)
    return false
    end

if corpse.itemid ~= 0 then   --alterado v1.8
   doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid))
   doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))  
end
return true
end

PokeExp.lua

 

provavelmente seu poketibia não ta dando exp pro pokemon apenas pro player nesse caso nóis vamos adicionar essa função:

if not isInParty(pk) and firstball and getItemAttribute(firstball.uid,  expstring) and getItemAttribute(firstball.uid,  expstring) > 0 then
   local percent = getItemAttribute(firstball.uid, expstring) <= 1 and getItemAttribute(firstball.uid, expstring) or 1
   local gainexp = math.ceil(percent * givenexp)
   doItemSetAttribute(firstball.uid, expstring, 0)
   givePokemonExp(pk, firstball, expTotal / 15)  --alterado v2.7
elseif isInParty(pk) and firstball.uid ~= 0 then
   givePokemonExp(pk, firstball, expTotal / 15)    --alterado v2.7
end

acima de:
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false)

Link para o post
Compartilhar em outros sites
  • 10 months later...
  • Respostas 8
  • Created
  • Última resposta

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

É o seguinte galera, vocês vão ter que ir em: /data/creaturescripts/pokeexp.lua   PARA EDITAR O EXP QUE O PLAYER GANHA QUANDO MATA POKEMONS: procurem por: playerAddExp(pk, expTotal)   e depois disso do lado da variavel expTotal vocês botam '/' que significa dividir, no caso vai ser expTotal dividido por o numero que você quiser. Vou botar 10 de exemplo   playerAddExp(pk, expTotal / 10)   e salvem ai no caso se um ratata tiver dando 20k de exp

PokeExp.lua

Em 05/06/2019 em 23:30, Atiralol Korobeiniki disse:

provavelmente seu poketibia não ta dando exp pro pokemon apenas pro player nesse caso nóis vamos adicionar essa função:


if not isInParty(pk) and firstball and getItemAttribute(firstball.uid,  expstring) and getItemAttribute(firstball.uid,  expstring) > 0 then
   local percent = getItemAttribute(firstball.uid, expstring) <= 1 and getItemAttribute(firstball.uid, expstring) or 1
   local gainexp = math.ceil(percent * givenexp)
   doItemSetAttribute(firstball.uid, expstring, 0)
   givePokemonExp(pk, firstball, expTotal / 15)  --alterado v2.7
elseif isInParty(pk) and firstball.uid ~= 0 then
   givePokemonExp(pk, firstball, expTotal / 15)    --alterado v2.7
end

acima de:
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false)

 

Estou com o mesmo problema, ja copiei os codigos aqui porém não funcionou, meu char recebe com a rate normal...Bixo da 100 de xp e a rate está em 20 entao meu char recebe 2000 mas meu poke ainda ganha 100 somente...me ajuda por favor

Link para o post
Compartilhar em outros sites
  • 2 weeks later...
Em 04/06/2019 em 01:11, Atiralol Korobeiniki disse:

É o seguinte galera, vocês vão ter que ir em:

/data/creaturescripts/pokeexp.lua

 

PARA EDITAR O EXP QUE O PLAYER GANHA QUANDO MATA POKEMONS:

procurem por:


playerAddExp(pk, expTotal)

 

e depois disso do lado da variavel expTotal vocês botam '/' que significa dividir, no caso vai ser expTotal dividido por o numero que você quiser. Vou botar 10 de exemplo

 


playerAddExp(pk, expTotal / 10)

 

e salvem

ai no caso se um ratata tiver dando 20k de exp ele agora vai tar dando 2k de exp graças a essa divisão. Mas ai vocês escolhem o numero que vcs querem dividir.

 

PARA EDITAR EXP QUE SEU POKEMON GANHA AO MATAR POKEMONS:

procurem por:

 


givePokemonExp(pk, firstball, expTotal)

 

Vai ter 2 desses o que ta em cima do elseif vai ser o exp que vai ser ganho sem tar em party e o de baixo vai ser o exp q vai ser ganho quando estiver em party

e agora vamos fazer a mesma coisa de antes vamos dividir o expTotal


givePokemonExp(pk, firstball, expTotal / 15)

No caso o exp que o pokemon irá ganhar vai ser dividido por 15.

 

CASO VOCES QUEIRAM QUE APAREÇAM NUMEROS INTEIROS E NÃO NUMEROS COM VIRGULA SEGUE AI O TUTORIAL:

EM CIMA DO local function giveExpToPlayer

COLOQUEM:
 

  Ocultar conteúdo


function toint(n)
    local s = tostring(n)
    local i, j = s:find('%.')
    if i then
        return tonumber(s:sub(1, i-1))
    else
        return n
    end
end

 

 

E AGORA DEPOIS VOCES IRÃO MODIFICAR O expTotal / 15

por:

 


toint(expTotal / 15)

 

e o expTotal / 10 por:

 


toint(expTotal / 10)

 

ESPERO QUE TENHA AJUDADO VOCES! SOU NOVO AINDA NO TIBIAKING GOSTARIA QUE VOCÊS DEIXEM UM FEEDBACK BOM CASO EU AJUDEI VOCÊS <3

 

PRA QUEM NÃO ENTENDEU DEVERÁ FICAR ASSIM:

 


playerAddExp(pk, toint(expTotal / 10))  

givePokemonExp(pk, firstball, toint(expTotal / 15))

 

 

 

n caso d base DXP..

 

local function playerAddExp(cid, exp)
    doPlayerAddExp(cid, exp)
    doSendAnimatedText(getThingPos(cid), exp, 215)
end


function onDeath(cid, corpse, deathList)
        
    --if not isCreature(cid) then return true end
    if isSummon(cid) or not deathList or getCreatureName(cid) == "Evolution" then return true end --alterado v1.8

    local givenexp = getWildPokemonExp(cid)
    ---local killer = getItemAttribute(corpse.uid, "corpseowner") 
if givenexp > 0 then
for a = 1, #deathList do
local pk = deathList[a]
---
local list = getSpectators(getThingPosWithDebug(pk), 30, 30, false)
if isCreature(pk) then 
   local expTotal = math.floor(givenexp * getDamageMapPercent(pk, cid))
   local party = getPartyMembers(pk)
   if isInParty(pk) and getPlayerStorageValue(pk, 4875498) <= -1 then
      expTotal = math.floor(expTotal/#party)         --alterado v1.6.1
      for i = 1, #party do
          if isInArray(list, party[i]) then             
if getPlayerLevel(pk) <= 50 then
             playerAddExp(party[i], expTotal * 200)  
elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then
             playerAddExp(party[i], expTotal * 150)
elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then
             playerAddExp(party[i], expTotal * 100)
elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then
             playerAddExp(party[i], expTotal * 80)
elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then
             playerAddExp(party[i], expTotal * 60)
elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then
             playerAddExp(party[i], expTotal * 40)
elseif getPlayerLevel(pk) >= 351 then
             playerAddExp(party[i], expTotal * 30)
             end
          end
      end
   elseif not isInParty(pk) then
if getPlayerLevel(pk) <= 50 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
elseif getPlayerLevel(pk) >= 51 and getPlayerLevel(pk) <= 75 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
elseif getPlayerLevel(pk) >= 76 and getPlayerLevel(pk) <= 100 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
elseif getPlayerLevel(pk) >= 101 and getPlayerLevel(pk) <= 150 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
elseif getPlayerLevel(pk) >= 151 and getPlayerLevel(pk) <= 250 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
elseif getPlayerLevel(pk) >= 251 and getPlayerLevel(pk) <= 350 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
elseif getPlayerLevel(pk) >= 351 then
playerAddExp(pk, math.floor(5 * (givenexp * getDamageMapPercent(pk, cid))))
return true end      
   end       
end
end
end

    if isNpcSummon(cid) then
        local master = getCreatureMaster(cid)
        doSendMagicEffect(getThingPos(cid), getPlayerStorageValue(cid, 10000))
        doCreatureSay(master, getPlayerStorageValue(cid, 10001), 1)
        doRemoveCreature(cid)
    return false
    end
if corpse.itemid ~= 0 then   --alterado v1.8
   doItemSetAttribute(corpse.uid, "level", getPokemonLevel(cid))
   doItemSetAttribute(corpse.uid, "gender", getPokemonGender(cid))  
end
return true
end

 

onde modifico?

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

Uma ajuda para o tópico...
Ao invés de usar uma nova função (totalmente desnecessária, pesando na memória ram do servidor) para mostrar números inteiros, utilize uma função padrão da linguagem lua..
exemplo:

playerAddExp(pk, math.floor(expTotal / 10))

ou

playerAddExp(pk, math.ceil(expTotal / 10))

 

Explicação:
math.floor vai retornar um número inteiro menor ou igual ao resultado da equação.
math.ceil vai retornar um número inteiro maior ou igual ao resultado da equação.

Te ajudei? Clique em  Gostei ! 

²²²d¬¬b²²²

 

 

"She's got a smile that it seems to me...."  ♪♪

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 dodoby
      - Pokemon Imperium -
      ✺ INFORMAÇÕES
      ✺EDIÇÕES
      ✺PRINT's
      ✺ERROS - BUGS
      ✺CRÉDITOS
      ✺DOWNLOAD's

      Projeto tinha somente minha (LORDBAXX) dedicação, e tenho certeza que servirá para boas bases de projetos futuros.
      Eu trabalhava nele sempre um pouco, tanto na criação de sistemas quanto em codes para as sources (Ainda não muito modificada), o servidor é instituído somente pela primeira geração e todos os shinys (Primeira Versão), um detalhe sobre os shinys é que são de respawn com cores diferentes, pode nascer tanto de uma cor quanto de outra! (EXCRUSIVO)
      Continuo Trabalhando no servidor, então qualquer atualização estarei postando, e quem puder ajudar em melhorias, toda ajuda é bem vinda! 
      Vou listar alguns sistemas novos!
      ¤ Egg System (Único) - 100%
      ¤ TM System
      (Não único porém diferenciado)
      ¤ Age System
      (Sistema de idade nos pokemons, quando seu pokemons alcançar certas idades, vc pode ganhar items e até egg's, "IDADE MÁXIMA 30", Pode ser modificado)
      ¤ Evolution System
      (Modificado, seu pokemon pode ser evoluído pelo level usando um item de evolução que mostrarei logo mais nos prints, ou utilizando stone sem precisar de level)
      ¤ Pokeball's animadas
      ¤ Rare Candy para level e para idade
      ¤ Boost system
      (Temporariamente retirado para testes, talvez volte na v2)
      Bom estes são alguns dos sistemas, agora irei mostrar os sistemas tradicionais de todo servidor!
      ¤ Catch System - 100%
      ¤ Nurse - 100%
      ¤ 6 Balls diferentes - Normal ball, Super ball, Great ball, Ultra ball, Master ball e fresh ball
      ¤ Order system - 100% (Move, rock smash, dig, cut, fly, ride, surf ambos funcionando perfeitamente)
      ¤ Evoluções - 100%
      ¤ Pokemons Passivos e Agressivos - 100% (Demorou mais consegui rs')
      ¤ Mapa incompleto - somento uns 5 ou 10 % do mapa feito por mim ( Estava focado nas script's )
      ¤ Gender system - 100%
      ¤ Pokemons balanceados de acordo com o level e com seus determinados loot's e moves
      Acho que é isso se esqueci algo posto logo mais!
      Print's




      Erros-Bug's



      Créditos
      Lordbaxx - Sistemas, Scripts, codes, mapa - SERVER
      NextBr - Pelo sistema de idade no qual trabalhei
      Qualquer outro envolvido será creditado!
      DOWNLOAD's



      LEMBRANDO QUE AS SPRITES DOS POKEMONS SÃO DAS MAIS ANTIGAS ENTÃO SEM RECLAMAÇÕES POIS É UMA COISA SIMPLES DE SE FAZER!
      OBRIGADO VLW FLW
      att: LORDBAXX
    • Por Gabrieltxu
      Prometi a mim mesmo não ajudar mais a comunidade, porem com os acontecimentos em cima dessa base me deixou com raiva e vim compartilhar a mesma com vocês, o servidor foi feito em cima da base vasada do Psoul, onde Walox e outro que não sei o nick trabalharam, porem como já de costume Walox melhorou a interface assim como a Mytology e a ZRing, e para não perder o costume anunciou a venda do mesmo, onde algumas pessoas chegaram a pagar bem caro pela base, quase 2 mil reais. 
      Até ai tudo bem, porem não contente começou a vender ainda mais copias do servidor, e quem comprava também vendia a copia do servidor, algo que acho totalmente errado.
      Enfim para acabar com essa palhaçada hoje estou postando a base.
       
      Ressalvo que NÃO IREI DAR SUPORTE A ESSA BASE, BASE CONTEM MUITOS BUGS, OQUE TEM DE MELHOR É A INTERFACE MESMO 
       
      Algumas Imagens do servidor:
       
      Scans
       
      Link para Download (Contem tudo, Client, server etc..): https://mega.nz/file/6dIwRaxT#y2nRFVckLLTLFSBRRtEUJVb-KBAwVPfMhqxyTEEv4Cs
      Mediafire: https://www.mediafire.com/file/d89t3ol1beq8129/poke+jornadas+completo+++src.rar/file
      Senha do Winrar: naoetrote1234567890@
       
      Créditos:  - Criadores da base Psoul
                       - Walox (Wave) e equipe
       
       
      É isso, espero que essa pratica de venda de servidores desenfreados acabe, desejo boa sorte a todos com a base e façam bom proveito.      
       
       
    • Por omarwsk
      Hello there, im realeasing my server again, i abandoned this project some time ago and i dont want it to get old without be used. so i will give it to you with some other changes that i do. Sorry if i cant support you, dont speak much Portuguese. 
      I will add some notes PLEASE READ THEM 
       
      Custom level system *REMOVED* Custom Stat System*REMOVED* ZOOM System on client (Ctrl+1 & Ctrl+2) *NEW* Reworked UI on client *NEW* Custom Autoloot system 100% *NEW* Custom Pokemon change bar (Need to add images to client only first 250 pokes with picture) *NEW* Bike & MotorBike System *NEW* Smeargle System Kecleon System Mega Stone system Outland zone lvl +150 Nightmare Zone (open pvp zone, no revives) lvl +300 Held System (elemental added)  Tokens Machine !invite fixed on the source (need to activate on talkactions)

      PLEASE READ THIS NOTES


      New Prints
       
      Old Prints
      Mega stones looted by normal pokes with custom loot system (can check on the dex)
       
      New 3 quests untested and without pokes inside, only bosses  and rewards on chests


       
      Known Bugs
       
       
      Scans

      Download Links
      Use the database included with the page.
       
      Credits
      All mentioned on the original post of DXP Cipsoft Pxg TibiaKing forums for the releases Me (Omarwsk)  
       
      EDIT:
      sorry, i really abandoned this project, if you get this error 
       
      [Error - GlobalEvent Interface] data/globalevents/scripts/broadcast.lua:onThink Description: data/globalevents/scripts/broadcast.lua:19: attempt to index field '?' (a nil value) stack traceback: data/globalevents/scripts/broadcast.lua:19: in function <data/globalevents/scripts/broadcast.lua:17> [Error - GlobalEvents::think] Couldn't execute event: autoBroadcast FIX:
       
       
    • Por ZenohXX
      Olá, contextualizando, para quem não me conhece, por algum tempo trabalhei em um servidor de poketibia chamado Pokelight.
      Utilizamos a base, que compramos, do PokeWish parar criar nosso servidor Pokelight, mas com o tempo a staff acabou optando por tomar outros rumos, tanto profissionais quanto pessoais e acabou que não fazia mais sentido continuarmos com o projeto.
      Sabendo do potencial dessa base e da paixão que ainda tenho por poketibia, na esperança de que surja um servidor bacana com esta base, venho disponibilizar todos os arquivos do servidor.

      Vídeos do projeto
       
       
       
      Em breve farei alguns tutoriais e observações de como fazer o melhor uso possível dos arquivos e disponibilizarei mais recursos usados durante o projeto, além de dar suporte a solução de problemas aqui neste tópico.

      Utilize Ubuntu 20.04 para executar o servidor.


      Servidor:
       
      Link para download (Servidor Wish, cliente Wish, ferramentas e sources): https://drive.google.com/file/d/14Kl7Bw86Y9Cm1GPy-BUuDJSYqHBUCdGV
      Link para download (RME): https://drive.google.com/file/d/1bwAcuhkRxF2RZ_rcpvSOvxExrWE9oMDC
      Link para download (Cliente Pokelight): https://drive.google.com/file/d/1PFUp7grPXcV2enUp3Og7BO9LFnSjs5Il
      Link para download (Servidor Pokelight última versão): https://drive.google.com/file/d/1057SbzLui7uOXcxJMoc5yaa3_9F8O-os/
      Scan: Arquivos passam de 700MB, não é possível fazer o scan.
    • Por Under
      Após anos sem contribuir com um servidor fico feliz em lançar essa versão com muitas correções!

      Está versão é a versão OPEN_BETA.

      Que pode ser testada aqui. (Online até dia 25/05/2023)

      Foram corrigos muitos bugs e existem diversas melhorias em muitos dos sistemas existentes.

      Vocês podem encontrar as Libs que devem estar com uns 30% desses novos sistemas que foram adicionados e podem testar ou usar os códigos.

      O servidor esta online a 120+ dias, foi construído com XP 1 e bateu 66 Players Online.

      O ideal é usar este servidor em low rate.

      Atualizações

      Verifique a pagina do facebook para saber todas as atualizações!
      Se você curtiu acompanhe a pagina para acompanha o lançamento do jogo oficial!
       
      Importante
       

      A cada onda do nosso sistema de incursões, você terá a chance de encontrar um Pokémon Shiny raro e, após a terceira onda, um chefe shiny ainda mais raro aparecerá, oferecendo recompensas valiosas para os treinadores ousados o suficiente para enfrentá-lo.
      Utilize seus tokens de incursão para reiniciar o sistema e tentar novamente.

      Para saber sobre todas as novidades Por favor considere olhar nossa pagina,

      https://www.facebook.com/pokexadventure/photos
       
      Imagens
       
       
      Downloads

      Para configurar basta substituir a pasta data que você pode encontrar fazendo download da source, cole a pasta data baixa do Pokexadventure e divirta-se!

      Sources

      pokexadventure_open_beta_datapack.rar

      DLLS + Executaveis (Windows)

      OTC
       
      (mediafire.com)
       
      Website
       
      https://github.com/otsoft/myaac

      Ferramentas : 
      auto_restarter_windows.bat

      RME 3.5 ou superior.

      Object builder 10.98 Support ou superior.

      Item editor 10.98 Support ou superior.

      Tutoriais para Compilações
       

      Créditos : @Underewar @pota
  • Estatísticas dos Fóruns

    96844
    Tópicos
    519612
    Posts



×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo