• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved transfer bank npc

janes123

Member
Joined
Jun 21, 2012
Messages
114
Reaction score
8
hello, my banker does not want to transfer gold
Scripts:
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local count = {}
local transfer = {}
function onCreatureAppear(cid)          npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)       npcHandler:onCreatureDisappear(cid)         end
function onCreatureSay(cid, type, msg)      npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()      npcHandler:onThink()        end
local voices = { {text = 'Don\'t forget to deposit your money here in the Tibian Bank before you head out for adventure.'} }
if VoiceModule then
    npcHandler:addModule(VoiceModule:new(voices))
end

local function getMoneyCount(string)
    local b, e = string:find("%d+")
    local money = b and e and tonumber(string:sub(b, e)) or -1
    if tonumber(money) ~= nil and money > 0 and money < 4294967296 then
        return money
    end
    return -1
end

local function getMoneyWeight(money)
    local gold = money
    local crystal = math.floor(gold / 10000)
    gold = gold - crystal * 10000
    local platinum = math.floor(gold / 100)
    gold = gold - platinum * 100
    return (ItemType(2160):getWeight() * crystal) + (ItemType(2152):getWeight() * platinum) + (ItemType(2148):getWeight() * gold)
end

local function greetCallback(cid)
    count[cid], transfer[cid] = nil, nil
    return true
end

local function creatureSayCallback(cid, type, msg)
    msg = msg:match("^%s*(.-)%s*$")
    if not npcHandler:isFocused(cid) then
        return false
    end
    local player = Player(cid)
---------------------------- help ------------------------
    if msgcontains(msg, 'bank account') then
        npcHandler:say({
            'Every Tibian has one. The big advantage is that you can access your money in every branch of the Tibian Bank! ...',
            'Would you like to know more about the {basic} functions of your bank account, the {advanced} functions, or are you already bored, perhaps?'
        }, cid)
        npcHandler.topic[cid] = 0
        return true
---------------------------- balance ---------------------
    elseif msgcontains(msg, 'balance') then
        npcHandler.topic[cid] = 0
        if player:getBankBalance() >= 100000000 then
            npcHandler:say('I think you must be one of the richest inhabitants in the world! Your account balance is ' .. player:getBankBalance() .. ' gold.', cid)
            return true
        elseif player:getBankBalance() >= 10000000 then
            npcHandler:say('You have made ten millions and it still grows! Your account balance is ' .. player:getBankBalance() .. ' gold.', cid)
            return true
        elseif player:getBankBalance() >= 1000000 then
            npcHandler:say('Wow, you have reached the magic number of a million gp!!! Your account balance is ' .. player:getBankBalance() .. ' gold!', cid)
            return true
        elseif player:getBankBalance() >= 100000 then
            npcHandler:say('You certainly have made a pretty penny. Your account balance is ' .. player:getBankBalance() .. ' gold.', cid)
            return true
        else
            npcHandler:say('Your account balance is ' .. player:getBankBalance() .. ' gold.', cid)
            return true
        end
---------------------------- deposit ---------------------
    elseif msgcontains(msg, 'deposit') then
        count[cid] = player:getMoney()
        if count[cid] < 1 then
            npcHandler:say('You do not have enough gold.', cid)
            npcHandler.topic[cid] = 0
            return false
        end
        if msgcontains(msg, 'all') then
            count[cid] = player:getMoney()
            npcHandler:say('Would you really like to deposit ' .. count[cid] .. ' gold?', cid)
            npcHandler.topic[cid] = 2
            return true
        else
            if string.match(msg,'%d+') then
                count[cid] = getMoneyCount(msg)
                if count[cid] < 0 then
                    npcHandler:say('You do not have enough gold.', cid)
                    npcHandler.topic[cid] = 0
                    return false
                end
                npcHandler:say('Would you really like to deposit ' .. count[cid] .. ' gold?', cid)
                npcHandler.topic[cid] = 2
                return true
            else
                npcHandler:say('Please tell me how much gold it is you would like to deposit.', cid)
                npcHandler.topic[cid] = 1
                return true
            end
        end
    elseif npcHandler.topic[cid] == 1 then
        count[cid] = getMoneyCount(msg)
        if count[cid] > 0 then
            npcHandler:say('Would you really like to deposit ' .. count[cid] .. ' gold?', cid)
            npcHandler.topic[cid] = 2
            return true
        else
            npcHandler:say('You do not have enough gold.', cid)
            npcHandler.topic[cid] = 0
            return true
        end
    elseif npcHandler.topic[cid] == 2 then
        if msgcontains(msg, 'yes') then
            if player:getMoney() >= tonumber(count[cid]) then
                player:depositMoney(count[cid])
                npcHandler:say('Alright, we have added the amount of ' .. count[cid] .. ' gold to your {balance}. You can {withdraw} your money anytime you want to.', cid)
            else
                npcHandler:say('You do not have enough gold.', cid)
            end
        elseif msgcontains(msg, 'no') then
            npcHandler:say('As you wish. Is there something else I can do for you?', cid)
        end
        npcHandler.topic[cid] = 0
        return true
---------------------------- withdraw --------------------
    elseif msgcontains(msg, 'withdraw') then
        if string.match(msg,'%d+') then
            count[cid] = getMoneyCount(msg)
            if count[cid] > 0 then
                npcHandler:say('Are you sure you wish to withdraw ' .. count[cid] .. ' gold from your bank account?', cid)
                npcHandler.topic[cid] = 7
            else
                npcHandler:say('There is not enough gold on your account.', cid)
                npcHandler.topic[cid] = 0
            end
            return true
        else
            npcHandler:say('Please tell me how much gold you would like to withdraw.', cid)
            npcHandler.topic[cid] = 6
            return true
        end
    elseif npcHandler.topic[cid] == 6 then
        count[cid] = getMoneyCount(msg)
        if count[cid] > 1 then
            npcHandler:say('Are you sure you wish to withdraw ' .. count[cid] .. ' gold from your bank account?', cid)
            npcHandler.topic[cid] = 7
        else
            npcHandler:say('There is not enough gold on your account.', cid)
            npcHandler.topic[cid] = 0
        end
        return true
    elseif npcHandler.topic[cid] == 7 then
        if msgcontains(msg, 'yes') then
            if player:getFreeCapacity() >= getMoneyWeight(count[cid]) then
                if not player:withdrawMoney(count[cid]) then
                    npcHandler:say('There is not enough gold on your account.', cid)
                else
                    npcHandler:say('Here you are, ' .. count[cid] .. ' gold. Please let me know if there is something else I can do for you.', cid)
                end
            else
                npcHandler:say('Whoah, hold on, you have no room in your inventory to carry all those coins. I don\'t want you to drop it on the floor, maybe come back with a cart!', cid)
            end
            npcHandler.topic[cid] = 0
        elseif msgcontains(msg, 'no') then
            npcHandler:say('The customer is king! Come back anytime you want to if you wish to {withdraw} your money.', cid)
            npcHandler.topic[cid] = 0
        end
        return true
---------------------------- transfer --------------------
    elseif msgcontains(msg, 'transfer') then
        npcHandler:say('Please tell me the amount of gold you would like to transfer.', cid)
        npcHandler.topic[cid] = 11
    elseif npcHandler.topic[cid] == 11 then
        count[cid] = getMoneyCount(msg)
        if player:getBankBalance() < count[cid] then
            npcHandler:say('There is not enough gold on your account.', cid)
            npcHandler.topic[cid] = 0
            return true
        end
        if count[cid] > 1 then
            npcHandler:say('Who would you like transfer ' .. count[cid] .. ' gold to?', cid)
            npcHandler.topic[cid] = 12
        else
            npcHandler:say('There is not enough gold on your account.', cid)
            npcHandler.topic[cid] = 0
        end
    elseif npcHandler.topic[cid] == 12 then
        transfer[cid] = msg
        if player:getName() == transfer[cid] then
            npcHandler:say('Fill in this field with person who receives your gold!', cid)
            npcHandler.topic[cid] = 0
            return true
        end
        if playerExists(transfer[cid]) then
         local arrayDenied = {"accountmanager", "rooksample", "druidsample", "sorcerersample", "knightsample", "paladinsample"}
            if table.contains(arrayDenied, string.gsub(transfer[cid]:lower(), " ", "")) then
                npcHandler:say('This player does not exist.', cid)
                npcHandler.topic[cid] = 0
                return true
            end
            npcHandler:say('So you would like to transfer ' .. count[cid] .. ' gold to ' .. transfer[cid] .. '?', cid)
            npcHandler.topic[cid] = 13
        else
            npcHandler:say('This player does not exist.', cid)
            npcHandler.topic[cid] = 0
        end
    elseif npcHandler.topic[cid] == 13 then
        if msgcontains(msg, 'yes') then
            if not player:transferMoneyTo(transfer[cid], count[cid]) then
                npcHandler:say('You cannot transfer money to this account.', cid)
            else
                npcHandler:say('Very well. You have transferred ' .. count[cid] .. ' gold to ' .. transfer[cid] ..'.', cid)
                transfer[cid] = nil
            end
        elseif msgcontains(msg, 'no') then
            npcHandler:say('Alright, is there something else I can do for you?', cid)
        end
        npcHandler.topic[cid] = 0
    end
    return true
end
keywordHandler:addKeyword({'money'}, StdModule.say, {npcHandler = npcHandler, text = 'We can {change} money for you. You can also access your {bank account}.'})
keywordHandler:addKeyword({'change'}, StdModule.say, {npcHandler = npcHandler, text = 'There are three different coin types in Tibia: 100 gold coins equal 1 platinum coin, 100 platinum coins equal 1 crystal coin. So if you\'d like to change 100 gold into 1 platinum, simply say \'{change gold}\' and then \'1 platinum\'.'})
keywordHandler:addKeyword({'bank'}, StdModule.say, {npcHandler = npcHandler, text = 'We can {change} money for you. You can also access your {bank account}.'})
keywordHandler:addKeyword({'advanced'}, StdModule.say, {npcHandler = npcHandler, text = 'Your bank account will be used automatically when you want to {rent} a house or place an offer on an item on the {market}. Let me know if you want to know about how either one works.'})
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, text = 'You can check the {balance} of your bank account, {deposit} money or {withdraw} it. You can also {transfer} money to other characters, provided that they have a vocation.'})
keywordHandler:addKeyword({'functions'}, StdModule.say, {npcHandler = npcHandler, text = 'You can check the {balance} of your bank account, {deposit} money or {withdraw} it. You can also {transfer} money to other characters, provided that they have a vocation.'})
keywordHandler:addKeyword({'basic'}, StdModule.say, {npcHandler = npcHandler, text = 'You can check the {balance} of your bank account, {deposit} money or {withdraw} it. You can also {transfer} money to other characters, provided that they have a vocation.'})
keywordHandler:addKeyword({'job'}, StdModule.say, {npcHandler = npcHandler, text = 'I work in this bank. I can change money for you and help you with your bank account.'})
npcHandler:setMessage(MESSAGE_GREET, "Yes? What may I do for you, |PLAYERNAME|? Bank business, perhaps?")
npcHandler:setMessage(MESSAGE_FAREWELL, "Have a nice day.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Have a nice day.")
npcHandler:setMessage(MESSAGE_SENDTRADE, "Here. Don't forget that you need to buy a label too if you want to send a parcel. Always write the name of the {receiver} in the first line.")
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
npc say
This player does not exist.
 
hello, my banker does not want to transfer gold
Scripts:
*your script*
npc say
This player does not exist.

This one was made/generated for 0.3.6

LUA:
-- File generated by Npc Converter v0.5
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic = {}
local Price = {}
local Transfer = {}
local Price = {}
local Amount = {}

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)


function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                npcHandler:onThink()                    end

function creatureSayCallback(cid, type, msg)

    if (not npcHandler:isFocused(cid) and (msgcontains(msg, "hello$") or msgcontains(msg, "hi$"))) then
        npcHandler:addFocus(cid)
        npcHandler:say("Welcome " .. getCreatureName(cid) .. "! What can I do for you?", cid)
        npcHandler:say("Welcome " .. getCreatureName(cid) .. "! What can I do for you?")
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 95 and (msgcontains(msg, "gold"))) then
        npcHandler:say("How many platinum coins do you want to change to gold?", cid)
        Topic[cid] = 93
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 95 and (msgcontains(msg, "crystal"))) then
        npcHandler:say("How many crystal coins do you want to get?", cid)
        Topic[cid] = 94
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 95 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 91 and (msgcontains(msg, msg))) then
    if (isNumber(msg)) then
        Price[cid] = tonumber(msg)
        if (Price[cid] > 0) then
        Amount[cid] = Price[cid] * 100
        npcHandler:say("So I should change " .. Amount[cid] .. " of your gold coins to " .. Price[cid] .. " platinum coins for you?", cid)
        Topic[cid] = 96
        end
    end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 91 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Hmm, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 92 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = 97
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 93 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = 98
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 94 and (msgcontains(msg, msg))) then
    if (isNumber(msg)) then
        Price[cid] = tonumber(msg)
        if (Price[cid] > 0) then
        Amount[cid] = Price[cid] * 100
        npcHandler:say("So I should change " .. Amount[cid] .. " of your platinum coins to " .. Price[cid] .. " crystal coins for you?", cid)
        Topic[cid] = 99
        end
    end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 94 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 96 and (msgcontains(msg, "yes"))) then
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        doPlayerAddItem(cid, 2152, Amount[cid], true)
        Amount[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 96 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have enough gold coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 96 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 97 and (msgcontains(msg, "yes"))) then
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        doPlayerAddItem(cid, 2152, Amount[cid], true)
        Amount[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 97 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have so many crystal coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 97 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 98 and getPlayerItemCount(cid, 2152) >= Amount and (msgcontains(msg, "yes"))) then
        doPlayerRemoveItem(cid, Type[cid], Amount[cid])
        Amount[cid] = nil
        Type[cid] = nil
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 98 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have so many platinum coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 98 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 99 and getPlayerItemCount(cid, 2152) >= Amount and (msgcontains(msg, "yes"))) then
        doPlayerRemoveItem(cid, Type[cid], Amount[cid])
        Amount[cid] = nil
        Type[cid] = nil
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 99 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have so many platinum coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 99 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
-- Banking system start
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "balance"))) then
        Price[cid] = getPlayerBalance(cid)
        if (Price[cid] >= 100000) then
            npcHandler:say("You certainly have made a pretty penny. Your account balance is "..Price[cid].." gold.", cid)
        else
            npcHandler:say("Your account balance is "..Price[cid].." gold.", cid)
        end
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "deposit all"))) then
        Price[cid] = getPlayerMoney(cid)
        if (Price[cid] < 1) then
            npcHandler:say("You don't have any gold with you.", cid)
            Price[cid] = nil
            Topic[cid] = nil
        else
            npcHandler:say("Would you really like to deposit "..Price[cid].." gold?", cid)
            Topic[cid] = 101
        end
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "deposit"))) then
            npcHandler:say("Please tell me how much gold it is you would like to deposit.", cid)
            Topic[cid] = 100
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 100 and (msgcontains(msg, msg))) then
        if (isNumber(msg)) then
            Price[cid] = tonumber(msg)
                if (Price[cid] > 0) then
                    if (getPlayerMoney(cid) >= Price[cid]) then
                        npcHandler:say("Would you really like to deposit "..Price[cid].." gold?", cid)
                        Topic[cid] = 101
                    else
                        npcHandler:say("You do not have enough gold.", cid)
                        Price[cid] = nil
                    end
                else
                    npcHandler:say("Please tell me how much gold it is you would like to deposit.", cid)
                    Price[cid] = nil
                end
        else
            npcHandler:say("Please tell me how much gold it is you would like to deposit.", cid)
            Price[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 101 and (msgcontains(msg, "yes$"))) then
        if (getPlayerMoney(cid) >= Price[cid]) then
            npcHandler:say("Alright, we have added the amount of "..Price[cid].." gold to your {balance}. You can {withdraw} your money anytime you want to.", cid)
            doPlayerDepositMoney(cid, Price[cid])
            Price[cid] = nil
            Topic[cid] = nil
        else
            npcHandler:say("I am inconsolable, but it seems you have lost your gold. I hope you get it back.", cid)
            Price[cid] = nil
            Topic[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 101 and (msgcontains(msg, "no$"))) then
        npcHandler:say("As you wish. Is there something else I can do for you?", cid)
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "withdraw"))) then
        if (getPlayerBalance(cid) > 0) then
            npcHandler:say("Please tell me how much gold you would like to withdraw.", cid)
            Topic[cid] = 102
        else
            npcHandler:say("You don't have any money on your bank account.", cid)
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 102 and (msgcontains(msg, msg))) then
        if (isNumber(msg)) then
            Price[cid] = tonumber(msg)
                if (Price[cid] > 0) then
                    if (getPlayerBalance(cid) >= Price[cid]) then
                        npcHandler:say("Are you sure you wish to withdraw "..Price[cid].." gold from your bank account?", cid)
                        Topic[cid] = 103
                    else
                        npcHandler:say("There is not enough gold on your account.", cid)
                        Price[cid] = nil
                    end
                else
                    npcHandler:say("Please tell me how much gold you would like to withdraw.", cid)
                    Price[cid] = nil
                end
        else
            npcHandler:say("Please tell me how much gold you would like to withdraw.", cid)
            Price[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 103 and (msgcontains(msg, "yes$"))) then
        npcHandler:say("Here you are, "..Price[cid].." gold. Please let me know if there is something else I can do for you.", cid)
        doPlayerWithdrawMoney(cid, Price[cid])
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 103 and (msgcontains(msg, "no$"))) then
        npcHandler:say("As you wish. Is there something else I can do for you?", cid)
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "transfer"))) then
            if (getPlayerVocation(cid) >= 1) then
                npcHandler:say("Please tell me the amount of gold you would like to transfer.", cid)
                Topic[cid] = 104
            else
                npcHandler:say("You cannot transfer money.", cid)
            end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 104 and (msgcontains(msg, msg))) then
        if (isNumber(msg)) then
            Price[cid] = tonumber(msg)
                if (Price[cid] > 0) then
                    if (getPlayerBalance(cid) >= Price[cid]) then
                        npcHandler:say("Who would you like transfer "..Price[cid].." gold to?", cid)
                        Topic[cid] = 105
                    else
                        npcHandler:say("There is not enough gold on your account.", cid)
                        Price[cid] = nil
                    end
                else
                    npcHandler:say("Please tell me the amount of gold you would like to transfer.", cid)
                    Price[cid] = nil
                end
        else
            npcHandler:say("Please tell me the amount of gold you would like to transfer.", cid)
            Price[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 105 and (msgcontains(msg, msg))) then
        Transfer[cid] = msg
-- Note: playerExists() on 0.3.6 needs to be fixed inside lib/050-function.lua (Change: return getPlayerGUIDByName(name) ~= 0 to: return getPlayerGUIDByName(name) ~= nil)
        if (playerExists(Transfer[cid])) then
            Transfer[cid] = getPlayerGUIDByName(Transfer[cid])
            Transfer[cid] = getPlayerNameByGUID(Transfer[cid])
            if (Transfer[cid] == "Account Manager" or Transfer[cid] == "Rook Sample" or Transfer[cid] == "Sorcerer Sample" or Transfer[cid] == "Druid Sample" or Transfer[cid] == "Paladin Sample" or Transfer[cid] == "Knight Sample") then
                npcHandler:say("This player does not exist.", cid)
                Price[cid] = nil
                Topic[cid] = nil
                Transfer[cid] = nil
            else
                npcHandler:say("So you would like to transfer "..Price[cid].." gold to "..Transfer[cid].."?", cid)
                Topic[cid] = 106
            end
        else
            npcHandler:say("This player does not exist.", cid)
            Price[cid] = nil
            Topic[cid] = nil
            Transfer[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 106 and (msgcontains(msg, "yes$"))) then
        npcHandler:say("You have transferred "..Price[cid].." gold to "..Transfer[cid]..".", cid)
        doPlayerTransferMoneyTo(cid, Transfer[cid], Price[cid])
        Price[cid] = nil
        Topic[cid] = nil
        Transfer[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 106 and (msgcontains(msg, "no$"))) then
        npcHandler:say("Ok. What is next?", cid)
        Price[cid] = nil
        Topic[cid] = nil
        Transfer[cid] = nil
-- Banking system end
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "bank"))) then
        npcHandler:say("We can change money for you.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "offer") or msgcontains(msg, "sell") or msgcontains(msg, "do you have") or msgcontains(msg, "buy") or msgcontains(msg, "money") or msgcontains(msg, "change") or msgcontains(msg, "exchange"))) then
        npcHandler:say("We exchange gold, platinum and crystal coins.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change gold") or msgcontains(msg, "exchange gold"))) then
        npcHandler:say("How many platinum coins do you want to get?", cid)
        Topic[cid] = 91
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change platinum") or msgcontains(msg, "exchange platinum"))) then
        npcHandler:say("Do you want to change your platinum coins to gold or crystal?", cid)
        Topic[cid] = 95
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change crystal") or msgcontains(msg, "exchange crystal"))) then
        npcHandler:say("How many crystal coins do you want to change to platinum?", cid)
        Topic[cid] = 92
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change"))) then
        npcHandler:say("Do you want to exchange gold, platinum or crystal coins?", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "bye") or msgcontains(msg, "farewell"))) then
        npcHandler:say("Good bye.", cid)
        Topic[cid] = nil
        npcHandler:releaseFocus(cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "job"))) then
        npcHandler:say("I work in this bank. I can change money for you.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "name"))) then
        npcHandler:say("I am Eva.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "time"))) then
        local _time = ""
        if getTibiaTime().hours < 10 then
            if getTibiaTime().minutes < 10 then
                _time = "0"..getTibiaTime().hours..":0"..getTibiaTime().minutes..""
            else
                _time = "0"..getTibiaTime().hours..":"..getTibiaTime().minutes..""
            end
        else
            if getTibiaTime().minutes < 10 then
                _time = ""..getTibiaTime().hours..":0"..getTibiaTime().minutes..""
            else
                _time = ""..getTibiaTime().hours..":"..getTibiaTime().minutes..""
            end
        end
        npcHandler:say("It is exactly " .. _time .. ".", cid)
    end

    return true
end

npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye.")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

Edit:
Bank system start at line 117 and ends at line 267
and you need to add the table's Transfer[cid], Price[cid] and Topic[cid] if you cut/copy the bank system part

Edit2:
It seems like you use tfs 1.x
I will take a look at your script instead and see if i can find the reason why it wont transfer money

on line 194 you find this
LUA:
        if playerExists(transfer[cid]) then
         local arrayDenied = {"accountmanager", "rooksample", "druidsample", "sorcerersample", "knightsample", "paladinsample"}
            if table.contains(arrayDenied, string.gsub(transfer[cid]:lower(), " ", "")) then
                npcHandler:say('This player does not exist.', cid)
                npcHandler.topic[cid] = 0
                return true
            end
            npcHandler:say('So you would like to transfer ' .. count[cid] .. ' gold to ' .. transfer[cid] .. '?', cid)
            npcHandler.topic[cid] = 13
        else
            npcHandler:say('This player does not exist.', cid)
            npcHandler.topic[cid] = 0
        end

can you change it to this
LUA:
        if playerExists(transfer[cid]) then
         local arrayDenied = {"accountmanager", "rooksample", "druidsample", "sorcerersample", "knightsample", "paladinsample"}
            if table.contains(arrayDenied, string.gsub(transfer[cid]:lower(), " ", "")) then
                npcHandler:say('This player does not exist. test1', cid)
                npcHandler.topic[cid] = 0
                return true
            end
            npcHandler:say('So you would like to transfer ' .. count[cid] .. ' gold to ' .. transfer[cid] .. '?', cid)
            npcHandler.topic[cid] = 13
        else
            npcHandler:say('This player does not exist. test2', cid)
            npcHandler.topic[cid] = 0
        end
and tell me what the npc say
 
Last edited:
This one was made/generated for 0.3.6

LUA:
-- File generated by Npc Converter v0.5
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic = {}
local Price = {}
local Transfer = {}
local Price = {}
local Amount = {}

local shopModule = ShopModule:new()
npcHandler:addModule(shopModule)


function onCreatureAppear(cid)            npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)        npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                npcHandler:onThink()                    end

function creatureSayCallback(cid, type, msg)

    if (not npcHandler:isFocused(cid) and (msgcontains(msg, "hello$") or msgcontains(msg, "hi$"))) then
        npcHandler:addFocus(cid)
        npcHandler:say("Welcome " .. getCreatureName(cid) .. "! What can I do for you?", cid)
        npcHandler:say("Welcome " .. getCreatureName(cid) .. "! What can I do for you?")
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 95 and (msgcontains(msg, "gold"))) then
        npcHandler:say("How many platinum coins do you want to change to gold?", cid)
        Topic[cid] = 93
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 95 and (msgcontains(msg, "crystal"))) then
        npcHandler:say("How many crystal coins do you want to get?", cid)
        Topic[cid] = 94
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 95 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 91 and (msgcontains(msg, msg))) then
    if (isNumber(msg)) then
        Price[cid] = tonumber(msg)
        if (Price[cid] > 0) then
        Amount[cid] = Price[cid] * 100
        npcHandler:say("So I should change " .. Amount[cid] .. " of your gold coins to " .. Price[cid] .. " platinum coins for you?", cid)
        Topic[cid] = 96
        end
    end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 91 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Hmm, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 92 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = 97
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 93 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = 98
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 94 and (msgcontains(msg, msg))) then
    if (isNumber(msg)) then
        Price[cid] = tonumber(msg)
        if (Price[cid] > 0) then
        Amount[cid] = Price[cid] * 100
        npcHandler:say("So I should change " .. Amount[cid] .. " of your platinum coins to " .. Price[cid] .. " crystal coins for you?", cid)
        Topic[cid] = 99
        end
    end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 94 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 96 and (msgcontains(msg, "yes"))) then
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        doPlayerAddItem(cid, 2152, Amount[cid], true)
        Amount[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 96 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have enough gold coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 96 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 97 and (msgcontains(msg, "yes"))) then
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        doPlayerAddItem(cid, 2152, Amount[cid], true)
        Amount[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 97 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have so many crystal coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 97 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 98 and getPlayerItemCount(cid, 2152) >= Amount and (msgcontains(msg, "yes"))) then
        doPlayerRemoveItem(cid, Type[cid], Amount[cid])
        Amount[cid] = nil
        Type[cid] = nil
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 98 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have so many platinum coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 98 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 99 and getPlayerItemCount(cid, 2152) >= Amount and (msgcontains(msg, "yes"))) then
        doPlayerRemoveItem(cid, Type[cid], Amount[cid])
        Amount[cid] = nil
        Type[cid] = nil
        Amount[cid] = Price
        npcHandler:say("Here you are.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 99 and (msgcontains(msg, "yes"))) then
        npcHandler:say("Sorry, you don't have so many platinum coins.", cid)
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 99 and (not msgcontains(msg, "yes$"))) then   -- This is when player dont say yes
        npcHandler:say("Well, can I help you with something else?", cid)
        Topic[cid] = nil
-- Banking system start
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "balance"))) then
        Price[cid] = getPlayerBalance(cid)
        if (Price[cid] >= 100000) then
            npcHandler:say("You certainly have made a pretty penny. Your account balance is "..Price[cid].." gold.", cid)
        else
            npcHandler:say("Your account balance is "..Price[cid].." gold.", cid)
        end
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "deposit all"))) then
        Price[cid] = getPlayerMoney(cid)
        if (Price[cid] < 1) then
            npcHandler:say("You don't have any gold with you.", cid)
            Price[cid] = nil
            Topic[cid] = nil
        else
            npcHandler:say("Would you really like to deposit "..Price[cid].." gold?", cid)
            Topic[cid] = 101
        end
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "deposit"))) then
            npcHandler:say("Please tell me how much gold it is you would like to deposit.", cid)
            Topic[cid] = 100
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 100 and (msgcontains(msg, msg))) then
        if (isNumber(msg)) then
            Price[cid] = tonumber(msg)
                if (Price[cid] > 0) then
                    if (getPlayerMoney(cid) >= Price[cid]) then
                        npcHandler:say("Would you really like to deposit "..Price[cid].." gold?", cid)
                        Topic[cid] = 101
                    else
                        npcHandler:say("You do not have enough gold.", cid)
                        Price[cid] = nil
                    end
                else
                    npcHandler:say("Please tell me how much gold it is you would like to deposit.", cid)
                    Price[cid] = nil
                end
        else
            npcHandler:say("Please tell me how much gold it is you would like to deposit.", cid)
            Price[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 101 and (msgcontains(msg, "yes$"))) then
        if (getPlayerMoney(cid) >= Price[cid]) then
            npcHandler:say("Alright, we have added the amount of "..Price[cid].." gold to your {balance}. You can {withdraw} your money anytime you want to.", cid)
            doPlayerDepositMoney(cid, Price[cid])
            Price[cid] = nil
            Topic[cid] = nil
        else
            npcHandler:say("I am inconsolable, but it seems you have lost your gold. I hope you get it back.", cid)
            Price[cid] = nil
            Topic[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 101 and (msgcontains(msg, "no$"))) then
        npcHandler:say("As you wish. Is there something else I can do for you?", cid)
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "withdraw"))) then
        if (getPlayerBalance(cid) > 0) then
            npcHandler:say("Please tell me how much gold you would like to withdraw.", cid)
            Topic[cid] = 102
        else
            npcHandler:say("You don't have any money on your bank account.", cid)
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 102 and (msgcontains(msg, msg))) then
        if (isNumber(msg)) then
            Price[cid] = tonumber(msg)
                if (Price[cid] > 0) then
                    if (getPlayerBalance(cid) >= Price[cid]) then
                        npcHandler:say("Are you sure you wish to withdraw "..Price[cid].." gold from your bank account?", cid)
                        Topic[cid] = 103
                    else
                        npcHandler:say("There is not enough gold on your account.", cid)
                        Price[cid] = nil
                    end
                else
                    npcHandler:say("Please tell me how much gold you would like to withdraw.", cid)
                    Price[cid] = nil
                end
        else
            npcHandler:say("Please tell me how much gold you would like to withdraw.", cid)
            Price[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 103 and (msgcontains(msg, "yes$"))) then
        npcHandler:say("Here you are, "..Price[cid].." gold. Please let me know if there is something else I can do for you.", cid)
        doPlayerWithdrawMoney(cid, Price[cid])
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 103 and (msgcontains(msg, "no$"))) then
        npcHandler:say("As you wish. Is there something else I can do for you?", cid)
        Price[cid] = nil
        Topic[cid] = nil
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "transfer"))) then
            if (getPlayerVocation(cid) >= 1) then
                npcHandler:say("Please tell me the amount of gold you would like to transfer.", cid)
                Topic[cid] = 104
            else
                npcHandler:say("You cannot transfer money.", cid)
            end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 104 and (msgcontains(msg, msg))) then
        if (isNumber(msg)) then
            Price[cid] = tonumber(msg)
                if (Price[cid] > 0) then
                    if (getPlayerBalance(cid) >= Price[cid]) then
                        npcHandler:say("Who would you like transfer "..Price[cid].." gold to?", cid)
                        Topic[cid] = 105
                    else
                        npcHandler:say("There is not enough gold on your account.", cid)
                        Price[cid] = nil
                    end
                else
                    npcHandler:say("Please tell me the amount of gold you would like to transfer.", cid)
                    Price[cid] = nil
                end
        else
            npcHandler:say("Please tell me the amount of gold you would like to transfer.", cid)
            Price[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 105 and (msgcontains(msg, msg))) then
        Transfer[cid] = msg
-- Note: playerExists() on 0.3.6 needs to be fixed inside lib/050-function.lua (Change: return getPlayerGUIDByName(name) ~= 0 to: return getPlayerGUIDByName(name) ~= nil)
        if (playerExists(Transfer[cid])) then
            Transfer[cid] = getPlayerGUIDByName(Transfer[cid])
            Transfer[cid] = getPlayerNameByGUID(Transfer[cid])
            if (Transfer[cid] == "Account Manager" or Transfer[cid] == "Rook Sample" or Transfer[cid] == "Sorcerer Sample" or Transfer[cid] == "Druid Sample" or Transfer[cid] == "Paladin Sample" or Transfer[cid] == "Knight Sample") then
                npcHandler:say("This player does not exist.", cid)
                Price[cid] = nil
                Topic[cid] = nil
                Transfer[cid] = nil
            else
                npcHandler:say("So you would like to transfer "..Price[cid].." gold to "..Transfer[cid].."?", cid)
                Topic[cid] = 106
            end
        else
            npcHandler:say("This player does not exist.", cid)
            Price[cid] = nil
            Topic[cid] = nil
            Transfer[cid] = nil
        end
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 106 and (msgcontains(msg, "yes$"))) then
        npcHandler:say("You have transferred "..Price[cid].." gold to "..Transfer[cid]..".", cid)
        doPlayerTransferMoneyTo(cid, Transfer[cid], Price[cid])
        Price[cid] = nil
        Topic[cid] = nil
        Transfer[cid] = nil
    elseif (npcHandler:isFocused(cid) and Topic[cid] == 106 and (msgcontains(msg, "no$"))) then
        npcHandler:say("Ok. What is next?", cid)
        Price[cid] = nil
        Topic[cid] = nil
        Transfer[cid] = nil
-- Banking system end
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "bank"))) then
        npcHandler:say("We can change money for you.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "offer") or msgcontains(msg, "sell") or msgcontains(msg, "do you have") or msgcontains(msg, "buy") or msgcontains(msg, "money") or msgcontains(msg, "change") or msgcontains(msg, "exchange"))) then
        npcHandler:say("We exchange gold, platinum and crystal coins.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change gold") or msgcontains(msg, "exchange gold"))) then
        npcHandler:say("How many platinum coins do you want to get?", cid)
        Topic[cid] = 91
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change platinum") or msgcontains(msg, "exchange platinum"))) then
        npcHandler:say("Do you want to change your platinum coins to gold or crystal?", cid)
        Topic[cid] = 95
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change crystal") or msgcontains(msg, "exchange crystal"))) then
        npcHandler:say("How many crystal coins do you want to change to platinum?", cid)
        Topic[cid] = 92
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "change"))) then
        npcHandler:say("Do you want to exchange gold, platinum or crystal coins?", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "bye") or msgcontains(msg, "farewell"))) then
        npcHandler:say("Good bye.", cid)
        Topic[cid] = nil
        npcHandler:releaseFocus(cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "job"))) then
        npcHandler:say("I work in this bank. I can change money for you.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "name"))) then
        npcHandler:say("I am Eva.", cid)
    elseif (npcHandler:isFocused(cid) and (msgcontains(msg, "time"))) then
        local _time = ""
        if getTibiaTime().hours < 10 then
            if getTibiaTime().minutes < 10 then
                _time = "0"..getTibiaTime().hours..":0"..getTibiaTime().minutes..""
            else
                _time = "0"..getTibiaTime().hours..":"..getTibiaTime().minutes..""
            end
        else
            if getTibiaTime().minutes < 10 then
                _time = ""..getTibiaTime().hours..":0"..getTibiaTime().minutes..""
            else
                _time = ""..getTibiaTime().hours..":"..getTibiaTime().minutes..""
            end
        end
        npcHandler:say("It is exactly " .. _time .. ".", cid)
    end

    return true
end

npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye.")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

Edit:
Bank system start at line 117 and ends at line 267
and you need to add the table's Transfer[cid], Price[cid] and Topic[cid] if you cut/copy the bank system part

Edit2:
It seems like you use tfs 1.x
I will take a look at your script instead and see if i can find the reason why it wont transfer money

on line 194 you find this
LUA:
        if playerExists(transfer[cid]) then
         local arrayDenied = {"accountmanager", "rooksample", "druidsample", "sorcerersample", "knightsample", "paladinsample"}
            if table.contains(arrayDenied, string.gsub(transfer[cid]:lower(), " ", "")) then
                npcHandler:say('This player does not exist.', cid)
                npcHandler.topic[cid] = 0
                return true
            end
            npcHandler:say('So you would like to transfer ' .. count[cid] .. ' gold to ' .. transfer[cid] .. '?', cid)
            npcHandler.topic[cid] = 13
        else
            npcHandler:say('This player does not exist.', cid)
            npcHandler.topic[cid] = 0
        end

can you change it to this
LUA:
        if playerExists(transfer[cid]) then
         local arrayDenied = {"accountmanager", "rooksample", "druidsample", "sorcerersample", "knightsample", "paladinsample"}
            if table.contains(arrayDenied, string.gsub(transfer[cid]:lower(), " ", "")) then
                npcHandler:say('This player does not exist. test1', cid)
                npcHandler.topic[cid] = 0
                return true
            end
            npcHandler:say('So you would like to transfer ' .. count[cid] .. ' gold to ' .. transfer[cid] .. '?', cid)
            npcHandler.topic[cid] = 13
        else
            npcHandler:say('This player does not exist. test2', cid)
            npcHandler.topic[cid] = 0
        end
and tell me what the npc say
Code:
[Warning - NpcScript::NpcScript] Can not load script: bank.lua
data/npc/scripts/bank.lua:239: 'end' expected (to close 'function' at line 41) near <eof>
[Warning - NpcScript::NpcScript] Can not load script: bank.lua
data/npc/scripts/bank.lua:239: 'end' expected (to close 'function' at line 41) near <eof>
 
Back
Top