Jump to content
  • 0

Simple Bank request


Tonetzkii

Question


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

Anyone this is my simple request, my script is working but i have a problem if the zeny is max npc continue widrawing zeny but the zeny is stock in 2b. I want to fix this problem if her zeny is max npc say "Your zeny is maximum limit"

mel_in,90,72,3 script Bank 860,{

cutin "kafra_08",2;

mes "[ ^336699Bank^000000 ]";

mes "Very well. Here is the list on how much each coin is worth:";

mes " ";

mes "Chips : 100,000,000m";

mes " ";

mes "Tell me, what coin would you like to get?";

menu "- Deposit money",L_Deposit,"- Withdraw money",L_Withdraw;

L_Deposit:

next;

mes "[ ^336699Bank^000000 ]";

mes "Input the amount of coin pcs.";

set @mamount,0;

input @mamount;

if (zeny < 0) goto L_Invalid;

if (zeny < (100000000* @mamount)) goto L_Invalid;

set Zeny,(zeny - (100000000* @mamount));

getitem 6242,@mamount;

next;

goto L_Thanks;

L_Withdraw:

next;

mes "[ ^336699Bank^000000 ]";

mes "Input the amount of coin pcs would you like?.";

set @mamount,0;

input @mamount;

if (@mamount < 0) goto L_Invalid;

if (countitem(6242) < @mamount) goto L_Invalid;

set Zeny,(zeny + (100000000* @mamount));

delitem 6242,@mamount;

next;

goto L_Thanks;

L_Invalid:

mes "[ ^336699Bank^000000 ]";

mes "Invalid amount of pcs please try again.";

next;

mes "[ ^336699Bank^000000 ]";

mes "Very well. Here is the list on how much each coin is worth:";

mes " ";

mes "Chips : 100,000,000m";

mes " ";

mes "Tell me, what coin would you like to get?";

menu "- Deposit money",L_Deposit,"- Withdraw money",L_Withdraw;

L_Thanks:

mes "[ ^336699Bank^000000 ]";

mes "Transaction complete..";

close2;

cutin "", 255;

close;

}

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Search for this line:

if (countitem(6242) < @mamount) goto L_Invalid;

Add this below it:


if ( (Zeny + (100000000*.@mamount)) > 2000000000 )
{
mes "You cannot hold more than 2b Zeny";
close;
}

Edited by Joseph
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  323
  • Reputation:   9
  • Joined:  11/19/11
  • Last Seen:  

Let me try.

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...