The bank npcs have a bug in the withdraw part, missing signs =, fix:
----WITHDRAW-------------------------------------------------------------------------
elseif msgcontains(msg, 'withdraw all') then
WITHDRAWMONEY = getPlayerBalance(cid)
if WITHDRAWMONEY >= 1 then
if getPlayerBalance(cid) >= WITHDRAWMONEY then
npcHandler:say("Would you like to withdraw ".. WITHDRAWMONEY .." gold?", 1)
talk_state = 303
else
npcHandler:say('There is not enough gold on your account.', 1)
talk_state = 0
end
else
npcHandler:say("You don't have money on your bank account!", 1)
talk_state = 0
end
elseif msgcontains(msg, 'withdraw') then
WITHDRAWMONEY = getMoneyCount(msg)
if WITHDRAWMONEY >= 1 then
if getPlayerBalance(cid) >= WITHDRAWMONEY then
npcHandler:say("Would you like to withdraw ".. WITHDRAWMONEY .." gold?", 1)
talk_state = 303
else
npcHandler:say('There is not enough gold on your account.', 1)
talk_state = 0
end
else
npcHandler:say('How much would you like to withdraw?', 1)
talk_state = 301
end
elseif talk_state == 301 then
WITHDRAWMONEY = getMoneyCount(msg)
if WITHDRAWMONEY >= 1 then
if getPlayerBalance(cid) >= WITHDRAWMONEY then
npcHandler:say("Would you like to withdraw ".. WITHDRAWMONEY .." gold?", 1)
talk_state = 303
else
npcHandler:say('There is not enough gold on your account.', 1)
talk_state = 0
end
else
npcHandler:say("I'm sorry, but you must give me a valid amount of how much you would like to withdraw.", 1)
talk_state = 0
end
elseif talk_state == 303 and msgcontains(msg, 'yes') then
if doPlayerWithdrawMoney(cid, WITHDRAWMONEY) == true then
npcHandler:say("Here you are.", 1)
talk_state = 0
else
npcHandler:say("You don't have that money amount on your bank account!", 1)
talk_state = 0
end
elseif talk_state == 303 and msgcontains(msg, 'no') then
npcHandler:say('Ok then.')
talk_state = 0
Easy to fix with notepad++ with replace all in find in files:
The bank npcs have a bug in the withdraw part, missing signs =, fix:
Easy to fix with notepad++ with replace all in find in files: