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

Added remove total money function to NPCs #2712

Merged
merged 1 commit into from Nov 10, 2019
Merged

Added remove total money function to NPCs #2712

merged 1 commit into from Nov 10, 2019

Conversation

EPuncker
Copy link
Contributor

@EPuncker EPuncker commented Nov 9, 2019

As of 10.94 update, Premium players no longer need to bring any money to pay for services or wares, as the concerned NPCs now deducts any money missing from their inventory from their Bank Account. And after another update it was made available for free account as well. Code based on the one originally posted by @Mkalo on otland here

As of 10.94 update, Premium players no longer need to bring any money to pay for services or wares, as the concerned NPCs now deducts any money missing from their inventory from their Bank Account. And after another update it was made available for free account as well.
@EPuncker
Copy link
Contributor Author

EPuncker commented Nov 9, 2019

and yes I tested
9Wo0BLn

@@ -968,10 +968,10 @@ if Modules == nil then
else
local msg = self.npcHandler:getMessage(MESSAGE_BOUGHT)
msg = self.npcHandler:parseMessage(msg, parseInfo)
if not player:removeMoney(totalCost) then
player:sendTextMessage(MESSAGE_INFO_DESCR, msg)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was swapped because the MESSAGE_BOUGHT should be sent first

@DSpeichert DSpeichert merged commit 8628da5 into otland:master Nov 10, 2019
@EPuncker EPuncker deleted the remove-money-npc branch November 10, 2019 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants