Jump to content
  • 0

Question

Posted

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;

}

2 answers to this question

Recommended Posts

Posted (edited)

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

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