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] !donate command for being charitable #84

Open
matthewbrandt opened this issue Aug 18, 2024 · 2 comments
Open

[feat] !donate command for being charitable #84

matthewbrandt opened this issue Aug 18, 2024 · 2 comments
Labels
feature New feature or request

Comments

@matthewbrandt
Copy link

matthewbrandt commented Aug 18, 2024

Problem

Gifting individual items to other players in p4nth3rworld is tedious and slow using !gift {random/playername} {itemname}. It works well for one-off gifting but not for larger quantities of charity, especially during livestreams when many players are actively playing.

Solution

A new !donate command is introduced to allow players to gift more than one item at once. It comes with both options and limitations (to prevent abuse).

Format

!donate {parameter}

  • parameter: a selection of (optional) parameters are available but only one can be used at a time; if no parameters are specified a single item is chosen at random
    • cooked: by specifying the cooked parameter, the user can donate a cooked item; the item is selected at random, if no item meets the criteria the donation fails
    • quantity {integer}: by specifying a quantity, the user can have a specific number of items to donate (> 0); the items are selected at random, if the user has insufficient number of items the donation fails
    • rarity {operator} {integer}: by specifying a rarity, the user can donate a specific rarity of item to donate (<, >, = are supported operators); the item is selected at random, if no item meets the criteria the donation fails

Examples

  • !donate: a single random item from the user's inventory will be donated to a single random user in the current zone
  • !donate cooked: 1 random cooked item from the user's inventory will be donated to a single random user in the current zone
  • !donate quantity 69: 69 random items from the user's inventory will be donated to a single random user in the current zone
  • !donate rarity > 999: 1 random item of rarity 1000 or higher from the user's inventory will be donated to a single random user in the current zone

Error

When donations fail, an appropriate error message should be shown depending on the root cause.

Not enough items in the users' inventory:

@username: insufficient inventory size

No users in the same zone:

@username: there is no one eligible to receive your donation

No cooked item:

@username: no cooked items in inventory

Success

When donations succeed, an generic message should be shown depending on the amount of items and rarity.

Single item:

@username1 donated carrot to @username2 in the beach zone! (rarity: 1)

Multiple items:

@username1 donated 42 items to @username2 in the beach zone! (total rarity: 69420)

@whitep4nth3r whitep4nth3r added the feature New feature or request label Aug 20, 2024
@whitep4nth3r
Copy link
Owner

The world leader command !freeforall now exists and works correctly when !removeinactive is used. Does this count towards this?

@matthewbrandt
Copy link
Author

It's a step in the right direction for sure :) I like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants