After 10.94:
Place this at the first line of npc/lib/npcsystem/modules.lua:
Use your text editor to replace every occurence of:
To:
Change:
To:
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.
Place this at the first line of npc/lib/npcsystem/modules.lua:
Code:
function Player.removeMoneyNpc(self, amount)
local moneyCount = self:getMoney()
local bankCount = self:getBankBalance()
if amount > moneyCount + bankCount then
return false
end
self:removeMoney(math.min(amount, moneyCount))
if amount > moneyCount then
self:setBankBalance(bankCount - math.max(amount - moneyCount, 0))
if moneyCount == 0 then
self:sendTextMessage(MESSAGE_INFO_DESCR, ("Paid %d gold from bank account. Your account balance is now %d gold."):format(amount, self:getBankBalance()))
else
self:sendTextMessage(MESSAGE_INFO_DESCR, ("Paid %d from inventory and %d gold from bank account. Your account balance is now %d gold."):format(moneyCount, amount - moneyCount, self:getBankBalance()))
end
end
return true
end
local function getPlayerMoney(cid)
local player = Player(cid)
if player then
return player:getMoney() + player:getBankBalance()
end
return 0
end
local function doPlayerRemoveMoney(cid, amount)
local player = Player(cid)
if player then
return player:removeMoneyNpc(amount)
end
return false
end
Use your text editor to replace every occurence of:
Code:
player:removeMoney(
Code:
player:removeMoneyNpc(
Change:
Code:
void ProtocolGame::sendSaleItemList(const std::list<ShopInfo>& shop)
{
NetworkMessage msg;
msg.addByte(0x7B);
msg.add<uint64_t>(player->getMoney());
To:
Code:
void ProtocolGame::sendSaleItemList(const std::list<ShopInfo>& shop)
{
NetworkMessage msg;
msg.addByte(0x7B);
msg.add<uint64_t>(player->getMoney() + player->getBankBalance());