Can this script be used?
Forum rules
This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.
Its current use is for the continued development of the server and game it has always served: TMW Classic.
Can this script be used?
blank.gat,132,217,5 script Banker 109,{
set @cost,0;
mes "[Banker]";
mes "Welcome to the First Bank of The Mana World. How can I help you today?";
next;
menu "I'd like to make a deposit.",Ldeposit,"I'd like to make a withdrawl.",Lwithdrawl,"What's my current balance?",Lbalance,"Cancel",Lcancel;
Ldeposit:
mes "[Banker]";
mes "Very well... How much would you like to deposit? The maximum you can deposit at once is 999,999 gold.";
next;
if (@cost > 0) goto Ldepocost;
goto Ldepocont;
Ldepocost:
mes "[Banker]";
mes "Oh and don't forget there is a " + @cost + " gold charge on all transactions.";
next;
goto Ldepocont;
Ldepocont:
input @deposit;
if (@deposit < 1) goto Lrealamount;
if (@deposit > gold) goto Lneedgold;
if (@deposit > (gold - @cost)) goto Lneedgold2;
set gold,gold - @deposit;
set gold,gold - @cost;
set #bankstorage,#bankstorage + @deposit;
mes "[Banker]";
mes "Thank you very much... Your gold is in good hands.";
close;
Lwithdrawl:
mes "[Banker]";
mes "Very well... How much would you like to withdraw? The maximum you can withdraw at one time is 999,999 gold";
next;
if (@cost > 0) goto Lwithcost;
goto Lwithcont;
Lwithcost:
mes "[Banker]";
mes "Oh and don't forget there is a " + @cost + " gold charge on all transactions.";
next;
goto Lwithcont;
Lwithcont:
input @withdrawl;
if (@withdrawl < 1) goto Lrealamount;
if (@withdrawl > #bankstorage) goto Lneedgold3;
if ((@cost > gold) && ((gold + @withdrawl) > @cost)) goto Lcostask;
if (@cost > gold) goto Lneedzeny2;
goto Lwithcont2;
Lcostask:
mes "[Banker]";
mes "You don't have the gold for the transaction fee right now. Would you like me to take the fee directly from your withdrawl?";
next;
menu "Yes please.",Lwithtake,"No thank you.",Lcancel;
Lwithtake:
mes "[Banker]";
mes "Ok then.";
set @withdrawl,@withdrawl - @cost;
set #bankstorage,#bankstorage - @cost;
set @cost,0;
next;
goto Lwithcont2;
Lwithcont2:
set gold,gold - @cost;
set gold,gold + @withdrawl;
set #bankstorage,#bankstorage - @withdrawl;
mes "[Banker]";
mes "There's your gold. Have a good day.";
close;
Lbalance:
mes "[Banker]";
mes "Hmmmm lemme check the paper work.";
next;
mes "*Rustle, Rustle*";
next;
mes "[Banker]";
mes "You currently have " + #bankstorage + " gold in your account.";
close;
Lrealamount:
mes "[Banker]";
mes "Don't play jokes with me please. Next time ask for a real amount.";
close;
Lneedzeny:
mes "[Banker]";
mes "You don't have enough gold to make that deposit.";
close;
Lneedzeny2:
mes "[Banker]";
mes "You don't have enough gold to cover the transaction fee.";
close;
Lneedzeny3:
mes "[Banker]";
mes "You don't have enough gold in your account.";
close;
Lcancel:
mes "[Banker]";
mes "Very well... come again soon.";
close;
}
set @cost,0;
mes "[Banker]";
mes "Welcome to the First Bank of The Mana World. How can I help you today?";
next;
menu "I'd like to make a deposit.",Ldeposit,"I'd like to make a withdrawl.",Lwithdrawl,"What's my current balance?",Lbalance,"Cancel",Lcancel;
Ldeposit:
mes "[Banker]";
mes "Very well... How much would you like to deposit? The maximum you can deposit at once is 999,999 gold.";
next;
if (@cost > 0) goto Ldepocost;
goto Ldepocont;
Ldepocost:
mes "[Banker]";
mes "Oh and don't forget there is a " + @cost + " gold charge on all transactions.";
next;
goto Ldepocont;
Ldepocont:
input @deposit;
if (@deposit < 1) goto Lrealamount;
if (@deposit > gold) goto Lneedgold;
if (@deposit > (gold - @cost)) goto Lneedgold2;
set gold,gold - @deposit;
set gold,gold - @cost;
set #bankstorage,#bankstorage + @deposit;
mes "[Banker]";
mes "Thank you very much... Your gold is in good hands.";
close;
Lwithdrawl:
mes "[Banker]";
mes "Very well... How much would you like to withdraw? The maximum you can withdraw at one time is 999,999 gold";
next;
if (@cost > 0) goto Lwithcost;
goto Lwithcont;
Lwithcost:
mes "[Banker]";
mes "Oh and don't forget there is a " + @cost + " gold charge on all transactions.";
next;
goto Lwithcont;
Lwithcont:
input @withdrawl;
if (@withdrawl < 1) goto Lrealamount;
if (@withdrawl > #bankstorage) goto Lneedgold3;
if ((@cost > gold) && ((gold + @withdrawl) > @cost)) goto Lcostask;
if (@cost > gold) goto Lneedzeny2;
goto Lwithcont2;
Lcostask:
mes "[Banker]";
mes "You don't have the gold for the transaction fee right now. Would you like me to take the fee directly from your withdrawl?";
next;
menu "Yes please.",Lwithtake,"No thank you.",Lcancel;
Lwithtake:
mes "[Banker]";
mes "Ok then.";
set @withdrawl,@withdrawl - @cost;
set #bankstorage,#bankstorage - @cost;
set @cost,0;
next;
goto Lwithcont2;
Lwithcont2:
set gold,gold - @cost;
set gold,gold + @withdrawl;
set #bankstorage,#bankstorage - @withdrawl;
mes "[Banker]";
mes "There's your gold. Have a good day.";
close;
Lbalance:
mes "[Banker]";
mes "Hmmmm lemme check the paper work.";
next;
mes "*Rustle, Rustle*";
next;
mes "[Banker]";
mes "You currently have " + #bankstorage + " gold in your account.";
close;
Lrealamount:
mes "[Banker]";
mes "Don't play jokes with me please. Next time ask for a real amount.";
close;
Lneedzeny:
mes "[Banker]";
mes "You don't have enough gold to make that deposit.";
close;
Lneedzeny2:
mes "[Banker]";
mes "You don't have enough gold to cover the transaction fee.";
close;
Lneedzeny3:
mes "[Banker]";
mes "You don't have enough gold in your account.";
close;
Lcancel:
mes "[Banker]";
mes "Very well... come again soon.";
close;
}
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
Re: Can this script be used?
I really hope it can be used! - don't know about the fee, but it's fine with me.Landon wrote:blank.gat,132,217,5 script Banker 109,{
set @cost,0;
mes "[Banker]";
mes "Welcome to the First Bank of The Mana World. How can I help you today?";
next;
menu "I'd like to make a deposit.",Ldeposit,"I'd like to make a withdrawl.",Lwithdrawl,"What's my current balance?",Lbalance,"Cancel",Lcancel;
Ldeposit:
mes "[Banker]";
mes "Very well... How much would you like to deposit? The maximum you can deposit at once is 999,999 gold.";
next;
if (@cost > 0) goto Ldepocost;
goto Ldepocont;
Ldepocost:
mes "[Banker]";
mes "Oh and don't forget there is a " + @cost + " gold charge on all transactions.";
next;
goto Ldepocont;
Ldepocont:
input @deposit;
if (@deposit < 1) goto Lrealamount;
if (@deposit > gold) goto Lneedgold;
if (@deposit > (gold - @cost)) goto Lneedgold2;
set gold,gold - @deposit;
set gold,gold - @cost;
set #bankstorage,#bankstorage + @deposit;
mes "[Banker]";
mes "Thank you very much... Your gold is in good hands.";
close;
Lwithdrawl:
mes "[Banker]";
mes "Very well... How much would you like to withdraw? The maximum you can withdraw at one time is 999,999 gold";
next;
if (@cost > 0) goto Lwithcost;
goto Lwithcont;
Lwithcost:
mes "[Banker]";
mes "Oh and don't forget there is a " + @cost + " gold charge on all transactions.";
next;
goto Lwithcont;
Lwithcont:
input @withdrawl;
if (@withdrawl < 1) goto Lrealamount;
if (@withdrawl > #bankstorage) goto Lneedgold3;
if ((@cost > gold) && ((gold + @withdrawl) > @cost)) goto Lcostask;
if (@cost > gold) goto Lneedzeny2;
goto Lwithcont2;
Lcostask:
mes "[Banker]";
mes "You don't have the gold for the transaction fee right now. Would you like me to take the fee directly from your withdrawl?";
next;
menu "Yes please.",Lwithtake,"No thank you.",Lcancel;
Lwithtake:
mes "[Banker]";
mes "Ok then.";
set @withdrawl,@withdrawl - @cost;
set #bankstorage,#bankstorage - @cost;
set @cost,0;
next;
goto Lwithcont2;
Lwithcont2:
set gold,gold - @cost;
set gold,gold + @withdrawl;
set #bankstorage,#bankstorage - @withdrawl;
mes "[Banker]";
mes "There's your gold. Have a good day.";
close;
Lbalance:
mes "[Banker]";
mes "Hmmmm lemme check the paper work.";
next;
mes "*Rustle, Rustle*";
next;
mes "[Banker]";
mes "You currently have " + #bankstorage + " gold in your account.";
close;
Lrealamount:
mes "[Banker]";
mes "Don't play jokes with me please. Next time ask for a real amount.";
close;
Lneedzeny:
mes "[Banker]";
mes "You don't have enough gold to make that deposit.";
close;
Lneedzeny2:
mes "[Banker]";
mes "You don't have enough gold to cover the transaction fee.";
close;
Lneedzeny3:
mes "[Banker]";
mes "You don't have enough gold in your account.";
close;
Lcancel:
mes "[Banker]";
mes "Very well... come again soon.";
close;
}
Can you make a "deposit item" code also? (that would be great!)
Great to see that someone finally makes the bank become a reality!
// GonzoDark
IchigoBlack (86) a.k.a GonzoDark (80) || HolyManaClan
Re: Can this script be used?
1. Did you test the script?
2. What reason do you have to store your money on the bank instead of on your character?
2. What reason do you have to store your money on the bank instead of on your character?
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: Can this script be used?
I would also be really happy to deposit items, insted of only money, but I think it is a great start!Crush wrote:1. Did you test the script?
2. What reason do you have to store your money on the bank instead of on your character?
// GonzoDark
IchigoBlack (86) a.k.a GonzoDark (80) || HolyManaClan
Re: Can this script be used?
It's just a generic banker script, no I have not tested it, It could possibly be altered to store items instead of gold.
I am not much of a programmer, I am still learning. If anyone thinks something can be done with, please by all means take the script modify and have implemented.
I am not much of a programmer, I am still learning. If anyone thinks something can be done with, please by all means take the script modify and have implemented.
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
- Sertraline
- Novice
- Posts: 128
- Joined: 02 Dec 2007, 03:29
- Location: Austin, TX, USA
Re: Can this script be used?
Very nice work, Landon, best of luck to you with this. One question: why the 999,999 withdraw/deposit limit?
Re: Can this script be used?
You programmed it without testing it? I see where this is leading...
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: Can this script be used?
Crush wrote:1. Did you test the script?
2. What reason do you have to store your money on the bank instead of on your character?
Well you could buy arrows for example. You can't if you have some millions of zeny
Re: Can this script be used?
Ok I tested it and it will need some work, I play around with it.
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
Re: Can this script be used?
I can't tell but that looks like the eAthena scripting language which will not be used on the new server (or so I've heard).
Re: Can this script be used?
It won't. LUA is being used instead.zick wrote:I can't tell but that looks like the eAthena scripting language which will not be used on the new server (or so I've heard).
Re: Can this script be used?
It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
Re: Can this script be used?
Did you make any progress on making it work??Landon wrote:It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
// GonzoDark
IchigoBlack (86) a.k.a GonzoDark (80) || HolyManaClan
Re: Can this script be used?
Some what, It will take me a while just started learning scripting couple weeks ago, Item storage may be beyond me. I am reading all kinds of stuff and learning. I am working on a gold and storage bank primarily a gold bank right now, I think I might have a script that would allow for pre-set interest rate where you can gain X amount of interest per every thousand gold there is. I am testing that script right now and am running into mild difficulties, It causes all character movement to freeze; but I am sure I will figure that part out soon.
GonzoDark wrote:Did you make any progress on making it work??Landon wrote:It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
// GonzoDark
GonzoDark wrote:Did you make any progress on making it work??Landon wrote:It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
// GonzoDark
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
Re: Can this script be used?
I have been thinking about how to go about implementing a Bank in the new server, and the only advantage to placing your money in a Bank were to be if you earned interest on your deposit. I think that you would have to pretty much treat money deposited like Certificate of Deposit's (CD's), with interest compounded weekly (a reasonable time??), and with automatic rollover. If you withdrew your fund's before the term was over, you would forfeit the interest earned. (I have grandiose ideas for a TMW mini-economy and stock market based upon players trade, the Bank idea is only one of such ideas I have)
just my 2 cents,
although I can only imagine the question's that would arise! You would have the make the player read a contract agreement, and make them check a box that they understand the terms, lol
cheers,
Lost
just my 2 cents,
although I can only imagine the question's that would arise! You would have the make the player read a contract agreement, and make them check a box that they understand the terms, lol
cheers,
Lost