View difference between Paste ID: JA92Lv0u and kSezuWBk
SHOW: | | - or go back to the newest paste.
1
2
prontera,128,80,3	script	Banker Exchanger	833,{
3
4
setarray .@item,671,7539;
5
6
mes "Select an Item.";
7
set .@selected,select( "^0055FF ~ ^000000"+getitemname( .@item[0] ),"^0055FF ~ ^000000"+getitemname( .@item[1] ) ) - 1;
8
mes "Select a service.";
9
10
switch( select( 
11
	"Exchange ^0055FF"+getitemname( .@item[.@selected] )+"^000000 to "+( ( .@selected )?"Cashpoints":"Zeny" ),
12
	"Exchange ^0055FF"+( ( .@selected )?"Cashpoints":"Zeny" )+"^000000 to "+getitemname( .@item[.@selected] )
13
)){
14
	Case 1:
15
		if( !.@selected ){
16
			if( Zeny >= 1000000000 ){
17-
			if( Zeny > 1000000000 ){
17+
18
			}else if( !countitem( .@item[.@selected] ) ){
19
				mes "You dont have any "+getitemname( .@item[.@selected] )+".";
20
			}else{
21
				delitem .@item[.@selected],1;
22
				set Zeny,Zeny + 500000000;
23-
				set Zeny,Zeny + 1000000000;
23+
				mes "Exchanged to 500,000,000 zeny.";
24-
				mes "Exchanged to 1,000,000,000 zeny.";
24+
25
		}else{
26
			mes "How many "+getitemname( .@item[.@selected] )+" will be exchange to Cashpoints ?";
27
			mes "You got "+countitem( .@item[.@selected] )+" x "+getitemname( .@item[.@selected] );
28
			input .@amount,0,countitem( .@item[.@selected] );
29
			if( .@amount ){
30
				if( countitem( .@item[.@selected] ) < .@amount ){
31
					mes "You dont have enoug "+.@amount+" x "+getitemname( .@item[.@selected] )+".";
32
				}else{
33
					delitem .@item[.@selected],.@amount;
34
					set #KAFRAPOINTS,#KAFRAPOINTS + 15*.@amount;
35-
					set #KAFRAPOINTS,#KAFRAPOINTS + .@amount;
35+
					mes "Gained "+15*.@amount+" x Cashpoints.";
36-
					mes "Gained "+.@amount+" x Cashpoints.";
36+
37
			}
38
		}
39
		break;
40
	Case 2:
41
		if( !.@selected ){
42
			if( Zeny < 500000000 ){
43-
			if( Zeny < 1000000000 ){
43+
				mes "You dont have that much of Zeny. You need 500,000,000 zeny.";
44-
				mes "You dont have that much of Zeny. You need 1,000,000,000 zeny.";
44+
45
				getitem .@item[.@selected],1;
46
				set Zeny,Zeny - 500000000;
47-
				set Zeny,Zeny - 1000000000;
47+
48
			}
49
		}else{
50
			mes "How many Cashpoints will be exchange to "+getitemname( .@item[.@selected] )+" ?";
51
			mes "You got "+#KAFRAPOINTS+" x Cashpoints.";
52
			set .@maxamount,( 30000 - countitem( .@item[.@selected] ) );
53
			if( .@maxamount > #KAFRAPOINTS/15 )
54-
			if( .@maxamount > #KAFRAPOINTS )
54+
				set .@maxamount,#KAFRAPOINTS/15;
55-
				set .@maxamount,#KAFRAPOINTS;
55+
56
			if( .@amount ){
57
				getitem .@item[.@selected],.@amount;
58
				set #KAFRAPOINTS,#KAFRAPOINTS - 15*.@amount;
59-
				set #KAFRAPOINTS,#KAFRAPOINTS - .@amount;
59+
60
			}
61
		}
62
	default: break;
63
}
64
close;
65
66
}