Jump to content
  • 0

Question

Posted

Can i request a banking script that will be save in a separate table

Account ID | Account Type | Current Zeny | Total Withdrawal Zeny

Player must open an account first before they can deposit/withdraw zeny.

Payment for registration will depend what account type they want.

Types of account : 

  1. Basic Account : Fee 1,000,000 (Player can only deposit up to 100m zeny per day and withdraw 10m per day.) this applies to their whole account.
  2. Premium Account : Fee 5,000,000 (Deposit up to 1b zeny per day and withdraw 100m per day) this applies to their whole account.
  3. Wicked Account : Fee 10,000,000 (Deposit up to 5b zeny per day and withdraw 1b per day) this applies to their whole account.

Player can only have 2b max zeny in their characters pocket. just like this images

Untitled.png.02ef2a0925573a77ae1447cc43f1118c.png

 

10 answers to this question

Recommended Posts

  • 0
Posted (edited)
8 hours ago, Emistry said:

you can try this.

https://pastebin.com/1KQSeydF

Thank you for making this script. Emistry /thx

 

Edit: I noticed something when selecting the Premium account, the bank name shows Basic Account instead of Premium.

Untitled.png.c235053df0381bb3f537ea1a126b7771.png

Edited by Radian
  • 0
Posted (edited)

okay, my turn too xD

http://upaste.me/5e274982184279fcd

Emistry script is total failure ...
yes the script engine has a limit of 2.1b, but SQL can calculate the value more than that
so its possible to make this script entirely with strings , and let the SQL do the calculation

pajodex ... not bad
a very obvious bug on a few lines with the SELECT syntax

line 84
if( query_sql("SELECT `daily_deposit` FROM `s_bank` WHERE `daily_deposit`<="+.@amount+" AND `account_id`="+getcharid(3))) {

line 110
if( query_sql("SELECT `daily_withdraw` FROM `s_bank` WHERE `daily_withdraw`<="+.@amount+" AND `account_id`="+getcharid(3))) {

line 114
if( query_sql("SELECT `zeny` FROM `s_bank` WHERE `zeny`<="+.@amount+" AND `account_id`="+getcharid(3))) {

which caused my test server to spam these error

[Warning]: script:query_sql: Too many columns, discarding last 1 columns.
[Debug]: Source (NPC): Super Banker at prontera (150,185)

ok explanation ...

.@nb = query_sql( "SELECT 5", .@value );

the .@nb is 1, .@value is 5
.@nb is equal to 1 is because it return 1 row of data
you have did the pvp ladder script which return number of rows of the highest pvp points ... you should know what this means

so the if ( query_sql("... means if the SQL does fetch the data successfully ...
usually meant to check if the player has the data inside the table or not

you can either add a .@dummy variable for it ... or change the line into

line 84
query_sql "SELECT `daily_deposit` < "+ .@amount +" FROM `s_bank` WHERE `account_id` = "+ getcharid(3), .@condition;
if ( .@condition == true ) {

 

 

and my script ... I let the script engine do all the calculations XD
there is no need to have a calculator in front of my computer to know 7,463,562 + X = 2,000,000,000
my script just let the *input script command calculate whats the best value to input in

		query_sql "select "+ .bank_with$[.@t] +" - "+ .@withdraw$, .@limit$;
		input .@num, 0, min( atoi( .@limit$ ), atoi( .@zeny$ ), MAX_ZENY - Zeny );

either the withdraw limit, the Zeny in the bank, or the maximum zeny you can hold ... the *input command do that automatically

Edited by AnnieRuru
  • Love 1
  • 0
Posted

Can I request one more thing about this script?

Like for example a player that have a Basic account can upgrade into Premium or Wicked account.

Basic Account -> Premium Account or Wicked Account
Premium Account -> Wicked Account

fee can be optional pay using the zeny you have inside your account or pay from your characters zeny.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...