Jump to content
  • 0

Exchange All TCG > Zeny


Question

Posted
						mes @header$;
						set .@i$,callfunc( "int_format", Zeny );
						mes "Do you want to exchange your ^33CC33"+.@i$+"^000000 Zeny to a ???";
						next;
							if(select("Cancel:Yes, Exchange it!")==1) close;
						next;
							mes @header$;
							mes "Okay, Here you go!, Thank you for using my services.";
							close;
							}
					break;

function	script	int_format	{
set .@int,  getarg(0);
set .@sep$, getarg(1,",");
set .@str$, "";
if ( .@int < 0 ) {
	set .@int, -.@int;
 	set .@neg, 1;
}
set .@len, getstrlen(.@int+"") - .@neg;

for ( set .@i,0; .@i<.@len; set .@i,.@i+1 )
	set .@str$, ( .@i % 3 == 2 && .@i < .@len-1 ? .@sep$ : "" ) + ( .@int / pow(10,.@i) ) % 10 + .@str$;
return ( .@neg ? "-" : "" ) + .@str$;
}

can anyone help to exchange all my  Zeny > TCG

Sample i have 27,000,000 Zeny i will get 2pcs TCG Card ( 10m * by 1 TCG )

1 answer to this question

Recommended Posts

  • 1
Posted
prontera,255,55,5	script	exchange_tcg	123,{
	.@max = Zeny/.rates;
	mes "[ Exchanger ]";
	mes "Do you want to exchange your ^33CC33" + .rates + "^000000 Zeny to a TCG?";
	next;
	if(select("Exchange:Quit") == 2)
		end;
	if(!.@max){
		mes "[ Exchanger ]";
		mes "You don't have enough zeny for the exchange.";
		close;
	}
OnExchange:
	mes "[ Exchanger ]";
	mes "You can exchange up to ^0000FF"+.@max+"^000000 TCG.";
	mes "How many would you like to exchange?";
	next;
	input .@count;
	if(.@count == 0 || .@count > .@max){
		mes "[ Exchanger ]";
		mes "You can't enter 0 or you can only exchange up to ^0000FF"+.@max+"^000000 TCG.";
		mes "Please try again.";
		next;
		goto OnExchange;
	}
	mes "[ Exchanger ]";
	mes "Are you sure you want to exchange ^33CC33" + (.rates*.@count) + "^000000 Zeny for " + .@count + "TCG?";
	next;
	if(select("Yes:No") == 2)
		end;
	mes "[ Exchanger ]";
	mes "Okay, Here you go!, Thank you for using my services.";
	Zeny -= (.rates*.@count);
	getitem .item_id,.@count;
	end;
	
OnInit:
	.item_id = 501;
	.rates = 10000000;
	end;
}

 

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