Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: vip system #1063

Merged
merged 26 commits into from Jul 29, 2023
Merged

Conversation

elsongabriel
Copy link
Contributor

@elsongabriel elsongabriel commented May 5, 2023

Credits

It's an improvement from an existing script in opentibiabr revscript-vip-system
@carlospess0a helped create a script for tournament coins per hour revscript-globalevent-tournament-coin-per-hour
@luan helped improve the code and structure of VIP using cpp and others small fixes.

Description

Created vip system functionality with some validations and improvements.

  • Adjusted store checking to sell VIP or premium;
  • Created configs and scripts;
  • Fixed and created validation to auto-loot flag enabled by each player.

Features (Vip Accounts)

  • Gain more XP
  • Gain more loot
  • Gain more skill
  • Gain coins to be online
  • Gain tokens (customized) to be online
  • Toggle auto-loot exclusive
  • Reduce familiar cooldown time

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested

Test Configuration:

  • Server Version: Canary
  • Client: 13.20
  • Operating System: Ubuntu 22.04

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@mattyx14
Copy link

mattyx14 commented May 5, 2023

👌🏽

@cojucoti
Copy link

cojucoti commented May 6, 2023

@elsongabriel
E para adicionar um sistema de Loyalty? Que quanto mais dias você e Vip, mais Skills você terá, por exemplo, como no tibia Rl.

Obrigado pelo script

@elsongabriel
Copy link
Contributor Author

@elsongabriel E para adicionar um sistema de Loyalty? Que quanto mais dias você e Vip, mais Skills você terá, por exemplo, como no tibia Rl.

Obrigado pelo script

Obrigado pela ideia.. Acredito que esse sistema já vinha sendo desenvolvido em alguma PR, ainda não está funcional.. mas posso tentar incluir no vip system algo desse tipo.

@travisani
Copy link
Contributor

travisani commented May 7, 2023

Bem legal, só que não seria melhor escrever em cima do sistema de premium?
Teoricamente já abordaria todos os beneficios inclusive Loyalty system.
E configurações em script/npcs existentes.

@enzerah
Copy link
Contributor

enzerah commented May 10, 2023

Maravilhoso

@murilo09 murilo09 changed the title improve: vip system feat: vip system May 10, 2023
@elsongabriel elsongabriel force-pushed the feature/custom-vip-system branch 2 times, most recently from 9595dd8 to e32cdc2 Compare May 23, 2023 13:18
Copy link

@jilikuo jilikuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acho que seria interessante a possibilidade de aumentar ganhos de skills

@elsongabriel elsongabriel force-pushed the feature/custom-vip-system branch 5 times, most recently from c4951b1 to 8fa48dc Compare May 25, 2023 14:50
@mpgmateus
Copy link
Contributor

Parabéns meu irmão! Testei todas features e está 100%. Mandou muito bem!! A comunidade agradece 💯 🥇 @elsongabriel
Que venham muitos novos features, +skills e varinha dando + bônus seria uma boa 👍🏻

@luan
Copy link
Contributor

luan commented May 25, 2023

Bem legal, só que não seria melhor escrever em cima do sistema de premium? Teoricamente já abordaria todos os beneficios inclusive Loyalty system. E configurações em script/npcs existentes.

Eu acho que o cliente da CIP em si reage a conta ser premium ou não (por exemplo mostrando o botão pra você comprar premium, ou na janela de imbuements). Então se usassemos o sistema de premium aqui o jogador ia ter menos opções no client.

@elsongabriel
Copy link
Contributor Author

Bem legal, só que não seria melhor escrever em cima do sistema de premium? Teoricamente já abordaria todos os beneficios inclusive Loyalty system. E configurações em script/npcs existentes.

Eu acho que o cliente da CIP em si reage a conta ser premium ou não (por exemplo mostrando o botão pra você comprar premium, ou na janela de imbuements). Então se usassemos o sistema de premium aqui o jogador ia ter menos opções no client.

exatamente! inclusive eu faço uma validação para identificar quando o usuário está vip, ele ignora as msgs de premium. ou seja. se o usuário for vip! ele tem os bonus de premium + as features do vip.

@hriqueXimenes
Copy link

hriqueXimenes commented May 26, 2023

Muito bom o trabalho @elsongabriel

Nas variaveis gerais do config, se seguisse o padrao que temos hoje, voce poderia so deixar a parte da XP.
Ex:

vipSystemExpEnabled = false
vipSystemExpPercent = 3

Nao precisava de uma variavel bool Enabled. Era so deixar o valor padrao como 0 da vipSystemExpPercent, que nao faria diferenca.

Alem disso seria legal se desse pra aumentar % de rate skill por ser vip

Nada que impacte a feature, so um detalhe.

@elsongabriel
Copy link
Contributor Author

Muito bom o trabalho @elsongabriel

Nas variaveis gerais do config, se seguisse o padrao que temos hoje, voce poderia so deixar a parte da XP. Ex:

vipSystemExpEnabled = false vipSystemExpPercent = 3

Nao precisava de uma variavel bool Enabled. Era so deixar o valor padrao como 0 da vipSystemExpPercent, que nao faria diferenca.

Alem disso seria legal se desse pra aumentar % de rate skill por ser vip

Nada que impacte a feature, so um detalhe.

vlw mano, show de boa..
você se refere a tirar o 'vipSystemExpEnabled' e validar direto no 'vipSystemExpPercent'?

@hriqueXimenes
Copy link

Muito bom o trabalho @elsongabriel
Nas variaveis gerais do config, se seguisse o padrao que temos hoje, voce poderia so deixar a parte da XP. Ex:
vipSystemExpEnabled = false vipSystemExpPercent = 3
Nao precisava de uma variavel bool Enabled. Era so deixar o valor padrao como 0 da vipSystemExpPercent, que nao faria diferenca.
Alem disso seria legal se desse pra aumentar % de rate skill por ser vip
Nada que impacte a feature, so um detalhe.

vlw mano, show de boa.. você se refere a tirar o 'vipSystemExpEnabled' e validar direto no 'vipSystemExpPercent'?

exato! Caso a pessoa nao queira que tenha diferenca de xp, e so ela deixar a percentage em 0. Nao acredito ser necessario outra variavel para validar isso

data/events/scripts/monster.lua Outdated Show resolved Hide resolved
data/events/scripts/monster.lua Outdated Show resolved Hide resolved
data/events/scripts/player.lua Outdated Show resolved Hide resolved
@elsongabriel
Copy link
Contributor Author

Muito bom o trabalho @elsongabriel
Nas variaveis gerais do config, se seguisse o padrao que temos hoje, voce poderia so deixar a parte da XP. Ex:
vipSystemExpEnabled = false vipSystemExpPercent = 3
Nao precisava de uma variavel bool Enabled. Era so deixar o valor padrao como 0 da vipSystemExpPercent, que nao faria diferenca.
Alem disso seria legal se desse pra aumentar % de rate skill por ser vip
Nada que impacte a feature, so um detalhe.

vlw mano, show de boa.. você se refere a tirar o 'vipSystemExpEnabled' e validar direto no 'vipSystemExpPercent'?

exato! Caso a pessoa nao queira que tenha diferenca de xp, e so ela deixar a percentage em 0. Nao acredito ser necessario outra variavel para validar isso

fiz essa sua sugestão já mano.. tks

data-canary/scripts/talkactions/player/auto_loot.lua Outdated Show resolved Hide resolved
data-otservbr-global/migrations/33.lua Outdated Show resolved Hide resolved
data-otservbr-global/migrations/34.lua Outdated Show resolved Hide resolved
src/config/configmanager.cpp Outdated Show resolved Hide resolved
src/creatures/players/account/account.cpp Outdated Show resolved Hide resolved
src/creatures/players/account/account.cpp Outdated Show resolved Hide resolved
src/game/game.cpp Show resolved Hide resolved
src/lua/functions/core/game/config_functions.cpp Outdated Show resolved Hide resolved
@elsongabriel elsongabriel marked this pull request as ready for review July 28, 2023 02:03
@sonarcloud
Copy link

sonarcloud bot commented Jul 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@dudantas dudantas merged commit 88b08ad into opentibiabr:main Jul 29, 2023
20 checks passed
@elsongabriel elsongabriel deleted the feature/custom-vip-system branch August 10, 2023 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet