Hello,
I'm looking for an exchanger for
Zeny > Money Bag
Money Bag > Zeny
Been surfing on eathena, but their Money Bag System seems not working. It giving an freezing error due exchanging the coins to moneybag. If there's any bug, can you please look for it.
Sorry I'm aint expert on scripting.
//===== eAthena Script ================================================
//= Money Exchanger
//===== Created By =======================================================
//= Mystogan
//===== Current Version: ==============================================
//= 1.0 by Mystogan
//===== Description: ==================================================
//= A zeny -> moneybag / moneybag -> zeny exchanger.
//= Automatically counts if you have Moneybags/Zeny.
//==================================================================
prontera,140,181,7 script Money Exchanger 482,{
mes "[Money Exchanger]";
mes "Hello "+strcharinfo(0)+"! Welcome to the Money Exchanger!";
mes "Please choose your menu";
next;
menu "Moneybag ->> Zeny",moneybag,"Zeny ->> Moneybag",zenyy;
moneybag:
mes "[Money Exchanger]";
mes "Are you exchanging your money bags into zenys?";
next;
menu "Yep",yep11,"No way",noway;
yep11:
mes "[Money Exchanger]";
if(countitem(672) >= 1 || countitem(676) >= 1 || countitem(670) >= 1) {
mes "Choose what you want to exchange.";
next;
if(countitem(672) >= 1 && countitem(676) == 0 && countitem(670) == 0) {
menu "100 Million Money Bag",a100mb;
a100mb:
mes "[Money Exchanger]";
mes "Do you want to exchange your 1 ^006633100 Million Money Bag^000000 into 100 Million Zeny?";
next;
menu "- Yes",yes100mb,"- No",no;
yes100mb:
mes "[Money Exchanger]";
mes "There you are!";
close2;
set Zeny,Zeny +100000000;
delitem 672,1;
end;
no:
close;
}
else if(countitem(672) >= 1 && countitem(676) >= 1 && countitem(670) == 0) {
menu "500 Million Money Bag",a500mb,"100 Million Money Bag",a100mb;
a500mb:
mes "[Money Exchanger]";
mes "Do you want to exchange your 1 ^006633500 Million Money Bag^000000 into 500 Million Zeny?";
next;
menu "- Yes",yes500mb,"- No",no;
yes500mb:
if(Zeny >= 500000001) {
mes "[Money Exchanger]";
mes "You have more than 500,000,000z.";
mes "Do you still want to continue?";
menu "No!",no,"Yes",yes500mb1;
}
yes500mb1:
mes "[Money Exchanger]";
mes "There you are!";
close2;
set Zeny,Zeny +500000000;
delitem 676,1;
end;
}
else if(countitem(672) >= 1 && countitem(676) >= 1 && countitem(670) >= 1) {
menu "1 Billion Money Bag",a1bb,"500 Million Money Bag",a500mb,"100 Million Money Bag",a100mb;
a1bb:
mes "[Money Exchanger]";
mes "Do you want to exchange your 1 ^0066331 Billion Money Bag^000000 into 1 Billion Zeny?";
next;
menu "- Yes",yes1bb,"- No",no;
yes1bb:
if(Zeny == 0) {
yes1bb1:
mes "[Money Exchanger]";
mes "There you are!";
close2;
set Zeny,Zeny +1000000000;
delitem 670,1;
end;
}
mes "[Money Exchanger]";
mes "You have a zeny remaining.";
mes "Do you still want to continue?";
menu "No way!",no,"Yes",yes1bb1;
}
else if(countitem(672) == 0 && countitem(676) >= 1 && countitem(670) >= 1) {
menu "1 Billion Money Bag",a1bb,"500 Million Money Bag",a500mb;
}
else if(countitem(672) == 0 && countitem(676) >= 1 && countitem(670) == 0) {
menu "500 Million Money Bag",a500mb;
}
else if(countitem(672) >= 1 && countitem(676) == 0 && countitem(670) >= 1) {
menu "1 Billion Money Bag",a1bb,"100 Million Money Bag",a100mb;
}
else if(countitem(672) == 0 && countitem(676) == 0 && countitem(670) >= 1) {
menu "1 Billion Money Bag",a1bb;
}
}
else {
mes "You do not have any money bags on your inventory.";
close;
}
zenyy:
mes "[Money Exchanger]";
mes "Are you exchanging you zeny into money bags?";
next;
menu "Yep",yep,"No way",noway;
noway:
mes "[Money Exchanger]";
mes "Well, see you next time~!";
close;
yep:
mes "[Money Exchanger]";
if(Zeny < 100000000) {
mes "You do not have atleast 100 Million Zeny.";
close;
}
else if(Zeny >= 100000000) {
mes "Choose what you want to exchange.";
if(Zeny < 500000000) {
menu "100 Million Zeny",a100m;
a100m:
mes "[Money Exchanger]";
mes "Do you want to exchange your 100 Million to 1 ^006633100 Million Money Bag^000000?";
next;
menu "- Yes",yes100m,"- No",no;
yes100m:
mes "[Money Exchanger]";
mes "There you are!";
close2;
set Zeny,Zeny -100000000;
getitem 672,1;
end;
}
else if(Zeny < 1000000000) {
menu "500 Million Zeny",a500m,"100 Million Zeny",a100m;
a500m:
mes "[Money Exchanger]";
mes "Do you want to exchange your 500 Million to 1 ^006633500 Million Money Bag^000000?";
next;
menu "- Yes",yes500m,"- No",no;
yes500m:
mes "[Money Exchanger]";
mes "There you are!";
close2;
set Zeny,Zeny -500000000;
getitem 676,1;
end;
}
else if(Zeny == 10000000000) {
menu "1 Billion Zeny",a1b,"500 Million Zeny",a500m,"100 Million Zeny",a100m;
a1b:
mes "[Money Exchanger]";
mes "Do you want to exchange your 1 Billion to 1 ^0066331 Billion Money Bag^000000?";
next;
menu "- Yes",yes1b,"- No",no;
yes1b:
mes "[Money Exchanger]";
mes "There you are!";
close2;
set Zeny,Zeny -1000000000;
getitem 670,1;
end;
}
}
}
Regards,
Syntax32