Jump to content
  • 0

Regarding Bank Feature


Eross

Question


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Hi ! Im using old client now .. I just want to ask if is it possible to manipulate the bank button on my alt +V ? like you need to talk to NPC first to open account before using that feature ... and also add password on it ? Thanks a loot .. I dont know where section to post it im really sorry 

 

image.png.09a12d5343bb3a6229fc21af29cc0b96.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Hi ! Is it possible to add commands/conditions before you can open these features ??? 

image.png.9dffd2c33c542e69de90fbca18b5966c.png

Also on Modifying Homunculus and Pet names .. like asking for zeny payment ..On bank, It should ask you to open account first ? thanks

 

How to edit codes inside this button ?? Lets say I need zeny to open this one or a condition like requires level 40 and up ?? Please help ... Thanks 

image.png.a7c583d3e4b148a5b14f699221b4237e.png

 

Hi ! How to make a condition in SRC code like if (!#banking) mes "You need to open an account to use banking feature"; or if (#banking != 1) etc ... 

void clif_parse_BankOpen(int fd, struct map_session_data* sd) {
	//TODO check if preventing trade or stuff like that
	//also mark something in case char ain't available for saving, should we check now ?
	nullpo_retv(sd);
	if( !battle_config.feature_banking ) {
		clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1496),false,SELF); //Banking is disabled
		return;
	}
	if (pc_readaccountreg(sd, add_str("#account_var")) != 1 ) {
		//clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1496),false,SELF); //Banking is disabled
		clif_displaymessage(fd, "You need to open an account first.");
		return;
	}
	else {
		struct s_packet_db* info = &packet_db[RFIFOW(fd,0)];
		int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ?
		if(sd->status.account_id == aid){
			sd->state.banking = 1;
			//request save ?
			//chrif_bankdata_request(sd->status.account_id, sd->status.char_id);
			//on succes open bank ?
			clif_bank_open(sd);
		}
	}
}

Im trying to add this part but im not sure if im doing it right 

	if (pc_readaccountreg(sd, add_str("#account_var")) != 1 ) {
		//clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1496),false,SELF); //Banking is disabled
		clif_displaymessage(fd, "You need to open an account first.");
		return;
	}

please help thanks 

 

Does anyone know how to add a condition to open the bank vault in CTRL+B or ALT +V button ? Like for example check if my character or account variable is set to #Baking == 1 ?????? I Will appreciate your help thankyou !!

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

src\map\clif.cpp

/*
 * Request to Open the banking system
 * 09B6 <aid>L ??? (dunno just wild guess checkme)
 */
void clif_parse_BankOpen(int fd, struct map_session_data* sd) {
	//TODO check if preventing trade or stuff like that
	//also mark something in case char ain't available for saving, should we check now ?
	nullpo_retv(sd);
	if( !battle_config.feature_banking ) {
		clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1496),false,SELF); //Banking is disabled
		return;
	}
+	else if (sd->bank_vault <= 0) {
+		clif_messagecolor(&sd->bl, color_table[COLOR_RED], "You haven't open a bank account yet.", false, SELF); // Banking is disabled
+	}
	else {
		struct s_packet_db* info = &packet_db[RFIFOW(fd,0)];
		int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ?
		if(sd->status.account_id == aid){
			sd->state.banking = 1;
			//request save ?
			//chrif_bankdata_request(sd->status.account_id, sd->status.char_id);
			//on succes open bank ?
			clif_bank_open(sd);
		}
	}
}

add a condition to block the Bank Button access if bank vault have no Zeny.

use the NPC script below to deposit Zeny into the vault.

prontera,155,181,5	script	Bank	757,{
	if (#BANKVAULT > 0) {
		mes "Enjoy using your Bank Account.";
	}
	else {
		mes "Would you like to open a Bank Account?";
		mes "How much Zeny you gonna deposit?";
		input .@zeny, 0, Zeny;
		mes "You deposited "+F_InsertComma(.@zeny)+" Zeny.";
		Zeny -= .@zeny;
		#BANKVAULT += .@zeny;
	}
	close;
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

On 6/12/2021 at 9:20 PM, Emistry said:

src\map\clif.cpp

/*
 * Request to Open the banking system
 * 09B6 <aid>L ??? (dunno just wild guess checkme)
 */
void clif_parse_BankOpen(int fd, struct map_session_data* sd) {
	//TODO check if preventing trade or stuff like that
	//also mark something in case char ain't available for saving, should we check now ?
	nullpo_retv(sd);
	if( !battle_config.feature_banking ) {
		clif_messagecolor(&sd->bl,color_table[COLOR_RED],msg_txt(sd,1496),false,SELF); //Banking is disabled
		return;
	}
+	else if (sd->bank_vault <= 0) {
+		clif_messagecolor(&sd->bl, color_table[COLOR_RED], "You haven't open a bank account yet.", false, SELF); // Banking is disabled
+	}
	else {
		struct s_packet_db* info = &packet_db[RFIFOW(fd,0)];
		int aid = RFIFOL(fd,info->pos[0]); //unused should we check vs fd ?
		if(sd->status.account_id == aid){
			sd->state.banking = 1;
			//request save ?
			//chrif_bankdata_request(sd->status.account_id, sd->status.char_id);
			//on succes open bank ?
			clif_bank_open(sd);
		}
	}
}

add a condition to block the Bank Button access if bank vault have no Zeny.

use the NPC script below to deposit Zeny into the vault.

prontera,155,181,5	script	Bank	757,{
	if (#BANKVAULT > 0) {
		mes "Enjoy using your Bank Account.";
	}
	else {
		mes "Would you like to open a Bank Account?";
		mes "How much Zeny you gonna deposit?";
		input .@zeny, 0, Zeny;
		mes "You deposited "+F_InsertComma(.@zeny)+" Zeny.";
		Zeny -= .@zeny;
		#BANKVAULT += .@zeny;
	}
	close;
}

 

Thankyou for your answer sir ! .. How about block bank button if player value is !#bank_eligible ??? So player need to quest it to activate the bank and use the feature ?

Hi ! I tried it sir but bank still open even it has zero balance 

bump..

 

Hi ! im trying to make a condition that will check players account variable "#" .. Can you help me please 

	else if (`CONDITION GOES HERE TO CHECK IF PLAYER HAS #BANKING == 1`) {
		clif_messagecolor(&sd->bl, color_table[COLOR_RED], "You haven't open a bank account yet.", false, SELF); // Banking is disabled
	}

Credits to @Emistry

 

Update: 

 

Nevermind guys i made it using pc_readregstr(sd, add_str("#bank"))

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

if (pc_readaccountreg(sd, add_str("#bank_eligible")) <= 0) {
	clif_messagecolor(&sd->bl, color_table[COLOR_RED], "You haven't open a bank account yet.", false, SELF); // Banking is disabled
}

 

Link to comment
Share on other sites

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.

×
×
  • Create New...