Can this script be used?
Posted: 10 Mar 2008, 16: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;
}
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;
}