Post solution please
You need to edit the source to support this feature, you also need to imeplement functions to update and withdraw from a bank balanace storage value.Up,
i just need know how is the npc script command to deposit and withdraw, i saw the bahavior already exist on server sources
cómo lo hiciste brosito :C?
FullDigit,%1,0<%1,Topic=205 -> Amount=%1, "So you would like to transfer %A gold coins to whom?", Topic=206
FullDigit,"transfer",%1,0<%1 -> *
GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself."
GetString,Topic=206,PlayerExists=0 -> "A player with this name does not exist."
GetString,Topic=206,PlayerExists>=1 -> "So you would like me to transfer %A gold coins to %S, is this correct?", Topic=207
Topic=207 -> "Maybe some other time."
which sources did u added?hello everyone, I managed to make the banking system work for nostalrius 7.7 but I have a problem to transfer to other players, I get an error in these lines, someone who can help, if I can complete the system I will share it for everyone
Lua:FullDigit,%1,0<%1,Topic=205 -> Amount=%1, "So you would like to transfer %A gold coins to whom?", Topic=206 FullDigit,"transfer",%1,0<%1 -> * GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself." GetString,Topic=206,PlayerExists=0 -> "A player with this name does not exist." GetString,Topic=206,PlayerExists>=1 -> "So you would like me to transfer %A gold coins to %S, is this correct?", Topic=207 Topic=207 -> "Maybe some other time."
GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself."
i have the same problemthe error is in this line:
Lua:GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself."
# GIMUD - Graphical Interface Multi User Dungeon
# gen-bank.ndb: Datenbank für generischen Banker
# Verwendete Topics: 91 bis 99
# Topic 91(96): Gold -> Platinum
# Topic 92(97): Platinum <- Crystal
# Topic 93(98): Gold <- Platinum
# Topic 94(99): Platinum -> Crystal
"balance" -> Price=Balance, "Your bank balance is %P gold coins."
"deposit" -> "Tell me how much you would like to deposit on your bank account?", Topic=201
"deposit","all",CountMoney>0 -> Amount=CountMoney, "So you would like me to deposit %A gold coins to your bank account?", Topic=202
"deposit","all" -> "You do not carry any gold with you."
Topic=201,%1,0<%1 -> Amount=%1, "So I should deposit %A gold coins to your bank account?", Topic=202
"deposit",%1,0<%1 -> *
Topic=201 -> "Maybe some other time then."
Topic=202,CountMoney>=Amount,"yes" -> Price=Amount, "I have deposited %A to your bank account.", DeleteMoney, Deposit(Amount)
Topic=202,"yes" -> "You do not have enough money."
Topic=202 -> "Maybe some other time then."
"withdraw" -> "How much gold would you like to withdraw from your bank account?", Topic=203
Topic=203,%1,0<%1 -> Amount=%1, "So you want to withdraw %A gold coins from your bank account?", Topic=214
"withdraw",%1,0<%1 -> *
"withdraw","all" -> Amount=Balance, "So you would like me to give %A gold coins from your bank account??", Topic=213
"withdraw","all", Balance<1 -> "You have none."
Topic=213,"yes" -> "Here you are.", Withdraw(Amount), Price=Amount, CreateMoney
Topic=214,"yes" -> "Here you are.", Withdraw(Amount), Price=Amount, CreateMoney
%1,0<%1,Topic=203 -> Amount=%1, "So you would like to withdraw %A gold coins from your bank account?", Topic=204
Topic=204,"yes",Balance<Amount -> "You do not have enough balance in your bank account."
Topic=204,"yes" -> "Here you are.", Withdraw(Amount), Price=Amount, CreateMoney
Topic=204 -> "Maybe some other time then."
#"transfer" -> "How much gold would you like to transfer?", Topic=205
#%1,0<%1,Topic=205 -> Amount=%1, "So you would like to transfer %A gold coins to whom?", Topic=206
#"transfer",%1,0<%1 -> *
#GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself."
#GetString,Topic=206,PlayerExists=0 -> "A player with this name does not exist."
#Topic=206 -> "So you would like me to transfer %A gold coins to %S, is this correct?", Topic=207
#Topic=207 -> "Maybe some other time."
#"yes",Topic=207,Balance>=Amount -> "You have transferred %A gold coins to %S.", Transfer(Amount)
#"yes",Topic=207 -> "You do not have enough gold in your bank balance."
#Topic=207 -> "Maybe some other time."
"bank" -> "We can change money for you."
"offer" -> "We exchange gold, platinum and crystal coins."
"sell" -> *
"do","you","have" -> *
"buy" -> *
"money" -> *
"change" -> *
"exchange" -> *
"change","gold",! -> "How many platinum coins do you want to get?", Topic=91
"exchange","gold",! -> *
"change","platinum",! -> "Do you want to change your platinum coins to gold or crystal?", Topic=95
"exchange","platinum",! -> *
"change","crystal",! -> "How many crystal coins do you want to change to platinum?", Topic=92
"exchange","crystal",! -> *
"change" -> "Do you want to exchange gold, platinum or crystal coins?"
Topic=95,"gold",! -> "How many platinum coins do you want to change to gold?", Topic=93
Topic=95,"crystal",! -> "How many crystal coins do you want to get?", Topic=94
Topic=95 -> "Well, can I help you with something else?"
Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96
Topic=91 -> "Hmm, can I help you with something else?"
Topic=92,%1,0<%1 -> Amount=%1, Price=%1*100, "So I should change %A of your crystal coins to %P platinum coins for you?", Topic=97
Topic=92 -> "Well, can I help you with something else?"
Topic=93,%1,0<%1 -> Amount=%1, Price=%1*100, "So I should change %A of your platinum coins to %P gold coins for you?", Topic=98
Topic=93 -> "Well, can I help you with something else?"
Topic=94,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your platinum coins to %P crystal coins for you?", Topic=99
Topic=94 -> "Well, can I help you with something else?"
Topic=96,"yes",Count(3031)>=Amount -> "Here you are.", Delete(3031), Amount=Price, Create(3035)
Topic=96,"yes" -> "Sorry, you don't have enough gold coins."
Topic=96 -> "Well, can I help you with something else?"
Topic=97,"yes",Count(3043)>=Amount -> "Here you are.", Delete(3043), Amount=Price, Create(3035)
Topic=97,"yes" -> "Sorry, you don't have so many crystal coins."
Topic=97 -> "Well, can I help you with something else?"
Topic=98,"yes",Count(3035)>=Amount -> "Here you are.", Delete(3035), Amount=Price, Create(3031)
Topic=98,"yes" -> "Sorry, you don't have so many platinum coins."
Topic=98 -> "Well, can I help you with something else?"
Topic=99,"yes",Count(3035)>=Amount -> "Here you are.", Delete(3035), Amount=Price, Create(3043)
Topic=99,"yes" -> "Sorry, you don't have so many platinum coins."
Topic=99 -> "Well, can I help you with something else?"
#Topic=91,%1,0<%1 -> Amount=%1, Price=100*%1, "So I should change %P gold coins to %A platinum coins for you?", Topic=96
#Topic=91 -> "Hmm, can I help you with something else?"
#Topic=92,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %P crystal coins to %A platinum coins for you?", Topic=97
#Topic=92 -> "Well, can I help you with something else?"
#Topic=93,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %P platinum coins to %A gold coins for you?", Topic=98
#Topic=93 -> "Well, can I help you with something else?"
#Topic=94,%1,0<%1 -> Amount=%1, Price=%1*100, "So I should change %P platinum coins to %A crystal coins for you?", Topic=99
#Topic=94 -> "Well, can I help you with something else?"
#Topic=96,"yes",Count(3031)>=Price -> "Here you are.", Create(3035), Amount=Price, Delete(3031)
#Topic=96,"yes" -> "Sorry, you don't have enough gold coins."
#Topic=96 -> "Well, can I help you with something else?"
#Topic=97,"yes",Count(3043)>=Price -> "Here you are.", Create(3035), Amount=Price, Delete(3043)
#Topic=97,"yes" -> "Sorry, you don't have so many crystal coins."
#Topic=97 -> "Well, can I help you with something else?"
#Topic=98,"yes",Count(3035)>=Price -> "Here you are.", Create(3031), Amount=Price, Delete(3035)
#Topic=98,"yes" -> "Sorry, you don't have so many platinum coins."
#Topic=98 -> "Well, can I help you with something else?"
#Topic=99,"yes",Count(3035)>=Price -> "Here you are.", Create(3043), Amount=Price, Delete(3035)
#Topic=99,"yes" -> "Sorry, you don't have so many platinum coins."
#Topic=99 -> "Well, can I help you with something else?"
I have problem witth the NPC.Hello @jackl90, here is my bank npc file. Here are working balance, withdraw and deposit functions.
Transfer is a behaviour that we must add by ourselves, and I really dont know how to do it actually...
I hope it works for you.
Code:# GIMUD - Graphical Interface Multi User Dungeon # gen-bank.ndb: Datenbank für generischen Banker # Verwendete Topics: 91 bis 99 # Topic 91(96): Gold -> Platinum # Topic 92(97): Platinum <- Crystal # Topic 93(98): Gold <- Platinum # Topic 94(99): Platinum -> Crystal "balance" -> Price=Balance, "Your bank balance is %P gold coins." "deposit" -> "Tell me how much you would like to deposit on your bank account?", Topic=201 "deposit","all",CountMoney>0 -> Amount=CountMoney, "So you would like me to deposit %A gold coins to your bank account?", Topic=202 "deposit","all" -> "You do not carry any gold with you." Topic=201,%1,0<%1 -> Amount=%1, "So I should deposit %A gold coins to your bank account?", Topic=202 "deposit",%1,0<%1 -> * Topic=201 -> "Maybe some other time then." Topic=202,CountMoney>=Amount,"yes" -> Price=Amount, "I have deposited %A to your bank account.", DeleteMoney, Deposit(Amount) Topic=202,"yes" -> "You do not have enough money." Topic=202 -> "Maybe some other time then." "withdraw" -> "How much gold would you like to withdraw from your bank account?", Topic=203 Topic=203,%1,0<%1 -> Amount=%1, "So you want to withdraw %A gold coins from your bank account?", Topic=214 "withdraw",%1,0<%1 -> * "withdraw","all" -> Amount=Balance, "So you would like me to give %A gold coins from your bank account??", Topic=213 "withdraw","all", Balance<1 -> "You have none." Topic=213,"yes" -> "Here you are.", Withdraw(Amount), Price=Amount, CreateMoney Topic=214,"yes" -> "Here you are.", Withdraw(Amount), Price=Amount, CreateMoney %1,0<%1,Topic=203 -> Amount=%1, "So you would like to withdraw %A gold coins from your bank account?", Topic=204 Topic=204,"yes",Balance<Amount -> "You do not have enough balance in your bank account." Topic=204,"yes" -> "Here you are.", Withdraw(Amount), Price=Amount, CreateMoney Topic=204 -> "Maybe some other time then." #"transfer" -> "How much gold would you like to transfer?", Topic=205 #%1,0<%1,Topic=205 -> Amount=%1, "So you would like to transfer %A gold coins to whom?", Topic=206 #"transfer",%1,0<%1 -> * #GetString,Topic=206,Guid=PlayerExists -> "You cannot transfer gold to yourself." #GetString,Topic=206,PlayerExists=0 -> "A player with this name does not exist." #Topic=206 -> "So you would like me to transfer %A gold coins to %S, is this correct?", Topic=207 #Topic=207 -> "Maybe some other time." #"yes",Topic=207,Balance>=Amount -> "You have transferred %A gold coins to %S.", Transfer(Amount) #"yes",Topic=207 -> "You do not have enough gold in your bank balance." #Topic=207 -> "Maybe some other time." "bank" -> "We can change money for you." "offer" -> "We exchange gold, platinum and crystal coins." "sell" -> * "do","you","have" -> * "buy" -> * "money" -> * "change" -> * "exchange" -> * "change","gold",! -> "How many platinum coins do you want to get?", Topic=91 "exchange","gold",! -> * "change","platinum",! -> "Do you want to change your platinum coins to gold or crystal?", Topic=95 "exchange","platinum",! -> * "change","crystal",! -> "How many crystal coins do you want to change to platinum?", Topic=92 "exchange","crystal",! -> * "change" -> "Do you want to exchange gold, platinum or crystal coins?" Topic=95,"gold",! -> "How many platinum coins do you want to change to gold?", Topic=93 Topic=95,"crystal",! -> "How many crystal coins do you want to get?", Topic=94 Topic=95 -> "Well, can I help you with something else?" Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96 Topic=91 -> "Hmm, can I help you with something else?" Topic=92,%1,0<%1 -> Amount=%1, Price=%1*100, "So I should change %A of your crystal coins to %P platinum coins for you?", Topic=97 Topic=92 -> "Well, can I help you with something else?" Topic=93,%1,0<%1 -> Amount=%1, Price=%1*100, "So I should change %A of your platinum coins to %P gold coins for you?", Topic=98 Topic=93 -> "Well, can I help you with something else?" Topic=94,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your platinum coins to %P crystal coins for you?", Topic=99 Topic=94 -> "Well, can I help you with something else?" Topic=96,"yes",Count(3031)>=Amount -> "Here you are.", Delete(3031), Amount=Price, Create(3035) Topic=96,"yes" -> "Sorry, you don't have enough gold coins." Topic=96 -> "Well, can I help you with something else?" Topic=97,"yes",Count(3043)>=Amount -> "Here you are.", Delete(3043), Amount=Price, Create(3035) Topic=97,"yes" -> "Sorry, you don't have so many crystal coins." Topic=97 -> "Well, can I help you with something else?" Topic=98,"yes",Count(3035)>=Amount -> "Here you are.", Delete(3035), Amount=Price, Create(3031) Topic=98,"yes" -> "Sorry, you don't have so many platinum coins." Topic=98 -> "Well, can I help you with something else?" Topic=99,"yes",Count(3035)>=Amount -> "Here you are.", Delete(3035), Amount=Price, Create(3043) Topic=99,"yes" -> "Sorry, you don't have so many platinum coins." Topic=99 -> "Well, can I help you with something else?" #Topic=91,%1,0<%1 -> Amount=%1, Price=100*%1, "So I should change %P gold coins to %A platinum coins for you?", Topic=96 #Topic=91 -> "Hmm, can I help you with something else?" #Topic=92,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %P crystal coins to %A platinum coins for you?", Topic=97 #Topic=92 -> "Well, can I help you with something else?" #Topic=93,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %P platinum coins to %A gold coins for you?", Topic=98 #Topic=93 -> "Well, can I help you with something else?" #Topic=94,%1,0<%1 -> Amount=%1, Price=%1*100, "So I should change %P platinum coins to %A crystal coins for you?", Topic=99 #Topic=94 -> "Well, can I help you with something else?" #Topic=96,"yes",Count(3031)>=Price -> "Here you are.", Create(3035), Amount=Price, Delete(3031) #Topic=96,"yes" -> "Sorry, you don't have enough gold coins." #Topic=96 -> "Well, can I help you with something else?" #Topic=97,"yes",Count(3043)>=Price -> "Here you are.", Create(3035), Amount=Price, Delete(3043) #Topic=97,"yes" -> "Sorry, you don't have so many crystal coins." #Topic=97 -> "Well, can I help you with something else?" #Topic=98,"yes",Count(3035)>=Price -> "Here you are.", Create(3031), Amount=Price, Delete(3035) #Topic=98,"yes" -> "Sorry, you don't have so many platinum coins." #Topic=98 -> "Well, can I help you with something else?" #Topic=99,"yes",Count(3035)>=Price -> "Here you are.", Create(3043), Amount=Price, Delete(3035) #Topic=99,"yes" -> "Sorry, you don't have so many platinum coins." #Topic=99 -> "Well, can I help you with something else?"