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

Uncharge glory #5732

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

TastyPumPum
Copy link
Contributor

@TastyPumPum TastyPumPum commented Feb 27, 2024

Adds the ability to uncharge amulet of glory (6)'s. This will be useful for players chasing the eternal glory at the fountain of rune.

Closes #3825

  • I have tested all my changes thoroughly.

Adds the ability to uncharge amulet of glory (6)'s. This will be useful for players chasing the eternal glory at the fountain of ruins.

Closes oldschoolgg#3825
Copy link
Collaborator

@gc gc left a comment

Choose a reason for hiding this comment

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

I think id be okay with a way to instantly convert them to uncharged with some small fee, assuming in real osrs youd just sell the charged ones and buy uncharged ones. I guess irons still need a way to do it though. Also just make sure its not possible to charge a negative amount.

const user = await mUserFetch(userID);
let loot = new Bank().add('Amulet of glory', quantity);

const amnt = loot.amount('Amulet of glory');
Copy link
Collaborator

Choose a reason for hiding this comment

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

This variable looks pointless, just use quantity?

type: 'GloryUncharging'
});

await user.removeItemsFromBank(new Bank().add('Amulet of glory (6)', quantity));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove before creating the activity. Also the cleaner way to do it is: const cost = ... if (!user.owns(cost))

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.

Add a method of uncharging glories for amulet of eternal glory
2 participants