Can this script be used?

Content and general development discussion, including maps, quests, and server code from the development team.
User avatar
Landon
Novice
Novice
Posts: 136
Joined: 16 Jan 2008, 22:09

Can this script be used?

Post by Landon » 10 Mar 2008, 17:54

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;
}
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
User avatar
GonzoDark
Novice
Novice
Posts: 325
Joined: 21 Apr 2007, 10:27
Location: Denmark

Re: Can this script be used?

Post by GonzoDark » 10 Mar 2008, 18:09

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;
}
I really hope it can be used! - don't know about the fee, but it's fine with me.

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

Image
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: Can this script be used?

Post by Crush » 10 Mar 2008, 18:11

1. Did you test the script?

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.
User avatar
GonzoDark
Novice
Novice
Posts: 325
Joined: 21 Apr 2007, 10:27
Location: Denmark

Re: Can this script be used?

Post by GonzoDark » 10 Mar 2008, 18:19

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?
I would also be really happy to deposit items, insted of only money, but I think it is a great start!

// GonzoDark
IchigoBlack (86) a.k.a GonzoDark (80) || HolyManaClan

Image
User avatar
Landon
Novice
Novice
Posts: 136
Joined: 16 Jan 2008, 22:09

Re: Can this script be used?

Post by Landon » 10 Mar 2008, 18:20

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.
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
User avatar
Sertraline
Novice
Novice
Posts: 128
Joined: 02 Dec 2007, 04:29
Location: Austin, TX, USA

Re: Can this script be used?

Post by Sertraline » 10 Mar 2008, 18:46

Very nice work, Landon, best of luck to you with this. One question: why the 999,999 withdraw/deposit limit?
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 17:08
Location: Germany

Re: Can this script be used?

Post by Crush » 10 Mar 2008, 18:49

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.
Matt
Knight
Knight
Posts: 1746
Joined: 07 Aug 2004, 11:47
Location: Germany->Bavaria

Re: Can this script be used?

Post by Matt » 10 Mar 2008, 18:56

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
User avatar
Landon
Novice
Novice
Posts: 136
Joined: 16 Jan 2008, 22:09

Re: Can this script be used?

Post by Landon » 10 Mar 2008, 18:57

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"
zick
Novice
Novice
Posts: 194
Joined: 21 Feb 2007, 04:30
Location: City Of Champions Again

Re: Can this script be used?

Post by zick » 11 Mar 2008, 15:43

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).
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: 01 Nov 2007, 18:35
Location: Internet

Re: Can this script be used?

Post by Jaxad0127 » 11 Mar 2008, 16:21

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).
It won't. LUA is being used instead.
Image
User avatar
Landon
Novice
Novice
Posts: 136
Joined: 16 Jan 2008, 22:09

Re: Can this script be used?

Post by Landon » 11 Mar 2008, 23:42

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"
User avatar
GonzoDark
Novice
Novice
Posts: 325
Joined: 21 Apr 2007, 10:27
Location: Denmark

Re: Can this script be used?

Post by GonzoDark » 12 Mar 2008, 00:55

Landon wrote:It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
Did you make any progress on making it work??

// GonzoDark
IchigoBlack (86) a.k.a GonzoDark (80) || HolyManaClan

Image
User avatar
Landon
Novice
Novice
Posts: 136
Joined: 16 Jan 2008, 22:09

Re: Can this script be used?

Post by Landon » 12 Mar 2008, 14:17

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:
Landon wrote:It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
Did you make any progress on making it work??

// GonzoDark
GonzoDark wrote:
Landon wrote:It is an eathena script, but the new game is not finished yet; why not enjoy something while it is there?
Did you make any progress on making it work??

// GonzoDark
Landon
"Life is like one big screwed up Merry-Go-Round, I get thrown off but I get right back on"
lost_soul
Peon
Peon
Posts: 30
Joined: 03 Dec 2007, 23:10

Re: Can this script be used?

Post by lost_soul » 14 Mar 2008, 21:48

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
Post Reply