Jump to content
  • 0

Script that checks Zeny.


Question

Posted

Can i request a script that warn a PLAYER if he/she almost exceed that Zeny Limit, for example the server zeny limit is 2 billion zeny if the player will convert the coins to zeny from the npc it will notify them, that player almost exceed the zeny limit. 

10 answers to this question

Recommended Posts

  • 0
Posted (edited)
mes "[Coin Master]";

mes "How many coins would you like to trade?";

set @mamount,0;

input @mamount;

if (@mamount <= 0) goto L_Sorry2;

if (countitem(673) < @mamount) goto L_Sorry2;

set Zeny,(Zeny + (50000000* @mamount));

delitem 673,@mamount;

close;

Edited by Noire
  • Upvote 1
  • 0
Posted

	mes "[Coin Master]";

mes "How many coins would you like to trade?";

input .@amount,0,30000;

if ( .@amount <= 0 || countitem(673) < .@amount ) goto L_Sorry2;

set .@max_zeny, ( 1000000000 - Zeny );

set .@exchange_zeny,( 50000000 * .@amount );

if ( .@exchange_zeny > .@max_zeny ) {

mes "Over zeny limit.";

}

else {

set Zeny, Zeny + .@exchange_zeny;

delitem 673,@mamount;

}

close;

  • 0
Posted (edited)
	mes "[Coin Master]";
	mes "How many coins would you like to trade?";
	input .@amount,0,30000;
	if ( .@amount <= 0 || countitem(673) < .@amount )  goto L_Sorry2;
	set .@max_zeny, ( 1000000000 - Zeny );
	set .@exchange_zeny,( 50000000 * .@amount );
	if ( .@exchange_zeny > .@max_zeny ) {
		mes "Over zeny limit.";
	}
	else {
		set Zeny, Zeny + .@exchange_zeny;
		delitem 673,@mamount;
	}
	close;

Thank you Emistry !! but can i ask how this code work? input .@amount,0,30000; ?

Edited by Noire
  • 0
Posted (edited)
	mes "[Coin Master]";
	mes "How many coins would you like to trade?";
	input .@amount,0,30000;
	if ( .@amount <= 0 || countitem(673) < .@amount )  goto L_Sorry2;
	set .@max_zeny, ( 1000000000 - Zeny );
	set .@exchange_zeny,( 50000000 * .@amount );
	if ( .@exchange_zeny > .@max_zeny ) {
		mes "Over zeny limit.";
	}
	else {
		set Zeny, Zeny + .@exchange_zeny;
		delitem 673,@mamount;
	}
	close;

Hi, I just discover it checks zeny but don't it delete the coin/673 after exchanging it still converts zeny.

Edited by Noire
  • 0
Posted (edited)

Typo? @mamount <- easily spotted, just change that line.

 

woot i found the problem thanks for the heads* up. i should replace it w/ .@amount not @amount thanks again panda and for the script emistry.

Edited by Noire

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