first make a new function, just make a new persistant (under scripter > persistants) and paste this there
function newdepositerbank(supplycategory, extragold, logoutifnocash) extragold = extragold or 0
local npccount = 0
foreach creature m 'ns' do
if m.dist <= 3 then
npccount = npccount + 1
end
end
if npccount == 0 then
printerror('Unable to find a NPC close to you')
return
end
local currentnpcmsg = $lastnpcmsg
local tries = 0
local maxtries = math.random(3, 5)
if not ischannel('NPCs') then
say('hi')
else
npcsay('hi')
end
local t = $timems
while $timems - t <= 2500 and currentnpcmsg == $lastnpcmsg do wait(100) end
-- deposits money
npcsay('deposit all') wait(500,1000)
npcsay('yes') wait(500,1000)
-- check balance
repeat
npcsay('balance')
until waitmessage('', 'Your account balance is %d+', 2000, true, MSG_NPC)
-- withdraw needed money
local towithdraw = moneytowithdraw(supplycategory) + extragold
if towithdraw == 0 then
return
end
local success = false
repeat
if $balance >= towithdraw then
repeat
npcsay('withdraw '..towithdraw) wait(500,1000)
npcsay('yes')
success = waitmessage('', 'You have withdrawn '..towithdraw..'.', 2000, false, MSG_NPC)
until success
else
if (logoutifnocash) then
printerror('Your character has logged out because you don\'t have enough money in bank.')
xlog(true)
setcavebot('off')
return
end
playsoundflash('monster.wav') wait(1000)
end
until success
end
next up, you need to edit the action wpt; the line that calls the bank function looks something like this
depositerbank('ab')
you want to change that so it says
newdepositerbank('ab')