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: implement tournament market custom #1901

Conversation

elsongabriel
Copy link
Contributor

@elsongabriel elsongabriel commented Nov 24, 2023

Description

This is a improvement, that need a little observation in some cases, as:

  • The loot of monsters that have the item you will select to be the tournament coins (now is bar of gold, but you can create a custom item or use it).
  • If you want to continue using bar of gold, you need to check all players, that loot the bar of gold and remove them.

Behaviour

Actual

Bar of gold is a monster lootable item, when you click on it, it doesn't do anything.

Expected

Bar of gold now will be called Tournament Coin, when you click on it, you'll add to your accounts table tournament_coins the tournament coins quantity you have with you.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • When I activate the flag on config ´enabled = true´ in data-otservbr-global\scripts\globalevents\vip\online_tokens.lua file, Players online will win the amount awardOn based on config tokensPerHour (free and vips).
  • When I click on the tournament coin, it'll transfer all the amount to the account.
  • When I go to NPC Jeronimo, I can change my tournament balance with his items.

Test Configuration:

  • Server Version: Canary 3.1.1
  • Client: Client 13.21
  • Operating System: Windows 11, Windows 10, Ubuntu 22.04, Ubuntu.24.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

@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch from a31b7ec to 24a6222 Compare November 24, 2023 18:17
@elsongabriel elsongabriel marked this pull request as draft November 24, 2023 19:40
@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch from 7a89496 to 8c12f8c Compare November 25, 2023 11:57
@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch from 7d2ae8f to f85ec3c Compare November 25, 2023 12:00
@elsongabriel elsongabriel self-assigned this Nov 25, 2023
@elsongabriel elsongabriel marked this pull request as ready for review November 25, 2023 12:03
@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch 3 times, most recently from 211df61 to 916c186 Compare December 4, 2023 13:24
@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch from cda782b to 18c6152 Compare December 11, 2023 13:13
@luan
Copy link
Contributor

luan commented Dec 29, 2023

@elsongabriel eu acho que isso deveria ser mais opcional. Não registrar o evento no item a não ser que a feature esteja ativada, eu não lembro de quando as tournament coins foram adicionadas de novo, mas como que isso funciona sem ter no client?

@elsongabriel
Copy link
Contributor Author

@elsongabriel eu acho que isso deveria ser mais opcional. Não registrar o evento no item a não ser que a feature esteja ativada, eu não lembro de quando as tournament coins foram adicionadas de novo, mas como que isso funciona sem ter no client?

é usado o npc Jeronimo, que ele que faz as "transações" do tournament. seria só uma moeda extra mesmo.
Acredito que precisa criar uma flag no config.lua para ativar ou desativar, consequentemente, iria fazer as demais validações em outros pontos.. como o online_tokens.lua.

@elsongabriel elsongabriel marked this pull request as draft December 31, 2023 20:17
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

Copy link
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale No activity label Feb 24, 2024
@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch from 913b190 to 248cdb1 Compare June 21, 2024 17:51
@elsongabriel elsongabriel force-pushed the feature/tournament-coins-custom branch from 248cdb1 to be4f911 Compare June 21, 2024 17:52
@majestyotbr
Copy link
Contributor

i'm closing this pull request due to inactivity. Feel free to reopen when you decide to finish.

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.

4 participants