/*------------------
*
* Title: Coin Dealer
*
* Author: Streusel
*
* Created: August 11, 2011
*
* Note:
* Replace prontera with yanatsu, to avoid errors when using "run"
*
------------------*/
prontera,81,124,4 script Coin Dealer#min 109,{
if(BarExc == 1){
mes "[Bank Employee]";
mes "Welcome back.";
mes "Alright, which would you change?";
next;
switch(select("Silver","Gold","Platinum","More Info please","Leave")){
case 1: callsub S_Coin1,31004,31007;
case 2: callsub S_Coin2,31005,31008;
case 3: callsub S_Coin3,31006,31009;
case 4: callsub S_Info;
case 5:
close;
}
}
mes "[Bank Employee]";
mes "Goodday to you Sir.";
mes "I've specially been send out by the Bank of Midgard.";
mes "How may I be of service?";
next;
mes "["+strcharinfo(0)+"]";
mes "I was wondering if I could exchange my Silver, Gold or Platinum Bars here.";
next;
mes "[Bank Employee]";
mes "That you sure can,";
mes "I've been specially employed in this region of the world to collect these valuable resources to stabalize our economy and to enable a constant financial stream towards the Army of Midgard.";
mes "You never know, something might always happen may that be today or tomorrow and we from the Bank of Midgard stand under the direct order from ^990000King Strudel^000000 the 1st.";
next;
mes "["+strcharinfo(0)+"]";
mes "So, how does this work do I give you the Bars and that's it or what or rather how much do I get out of this?";
next;
mes "[Bank Employee]";
mes "Oh right, sorry I'm still new at this and only few have come by.";
mes "With ^CCCCCC1 Silver Bar^000000 you can aquire ^CCCCCC10 Silver Coins^000000.";
mes "With ^CC99991 Gold Bar^000000 you will be eligible to get ^CC99995 Gold Coins^000000.";
mes "And last but not least with ^AAAAAA1 Platinum Bar^000000 you will as well be eligible for ^AAAAAA5 Platinum Coins^000000.";
mes "Although with the last I caution you, thiefs have been on a lookout for those and we've been getting more and more reports.";
next;
mes "["+strcharinfo(0)+"]";
mes "Thief's, really?";
next;
mes "[Bank Employee]";
mes "Well, you can always buy a Bodyguard to protect yourself from such incidences.";
next;
mes "["+strcharinfo(0)+"]";
mes "And where can I do that?";
next;
mes "[Bank Employee]";
mes "I have heard news that the Kafra Service will soon be opening it, but until then I suggest you be on your guard.";
next;
mes "["+strcharinfo(0)+"]";
mes "Oh, is that so?";
mes "Thanks for the warning and for the information in general.";
next;
mes "[Bank Employee]";
mes "No problem, we have to keep our customers happy. *wink*";
next;
mes "["+strcharinfo(0)+"]";
mes "Ok.. that last part may have been a little unnessessary....";
next;
mes "[Bank Employee]";
mes "...";
next;
mes "[Bank Employee]";
mes "...";
mes "....";
next;
mes "[Bank Employee]";
mes "...";
mes "....";
mes ".....";
next;
mes "^9999FFYou notice a tear drop rolling down his cheek as he tries to hide it.^000000";
next;
mes "^9999FFYou try to comfort him although feeling uneasy about the situation.^000000";
next;
mes "["+strcharinfo(0)+"]";
mes "Well then.";
set BarExc,1;
next;
mes "[Bank Employee]";
mes "Yes, right.";
mes "Would you like to exchange your bars into coins or leave them as they are?";
switch(select("Exchange them","Leave them be.")){
case 1:
if(countitem(31004) && countitem(31005) && countitem(31006) < 1){
mes "[Bank Employee]";
mes "I'm sorry to say this but I can't find any bars in your inventory.";
}
mes "[Bank Employee]";
mes "Alright, which would you change?";
switch(select("Silver","Gold","Platinum")){
case 1: callsub S_Coin1,31004,31007;
case 2: callsub S_Coin2,31005,31008;
case 3: callsub S_Coin3,31006,31009;
}
case 2:
mes "[Bank Employee]";
mes "Have a nice day.";
close;
}
S_Coin1:
if(countitem(getarg(0)) < 1){
mes "[Bank Employee]";
mes "You don't own a Silver bar.";
close;
}
else{
next;
set .@x,countitem(getarg(0))*10;
mes "[Bank Employee]";
mes "I can give you a total of:";
mes "^CCCCCC"+.@x+" Silver Coins.^000000";
next;
mes "[Bank Employee]";
mes "Do you wish to convert all, just 1 or leave it be?";
switch(select("All","Just One","I'd like to keep mine the way they are.")){
case 1:
mes "[Bank Employee]";
mes "Please wait a secon as I have to fill in the transaction papers.";
mes "These are required by my employer.";
delitem getarg(0),.@x / 10;
getitem getarg(1),.@x;
close;
case 2:
mes "[Bank Employee]";
mes "Please wait a secon as I have to fill in the transaction papers.";
mes "These are required by my employer.";
delitem getarg(0),1;
getitem getarg(1),10;
close;
case 3:
mes "[Bank Employee]";
mes "That's perfectly fine. I just hope Midgard won't have so suffer because of your selfish actions.";
close;
}
}
S_Coin2:
if(countitem(getarg(0)) < 1){
mes "[Bank Employee]";
mes "You don't own a Gold bar.";
close;
}
else{
next;
set .@x,countitem(getarg(0))*5;
mes "[Bank Employee]";
mes "I can give you a total of:";
mes "^CCCCCC"+.@x+" Gold Coins.^000000";
next;
mes "[Bank Employee]";
mes "Do you wish to convert all, just 1 or leave it be?";
switch(select("All","Just One","I'd like to keep mine the way they are.")){
case 1:
mes "[Bank Employee]";
mes "Please wait a secon as I have to fill in the transaction papers.";
mes "These are required by my employer.";
delitem getarg(0),.@x / 5;
getitem getarg(1),.@x;
close;
case 2:
mes "[Bank Employee]";
mes "Please wait a secon as I have to fill in the transaction papers.";
mes "These are required by my employer.";
delitem getarg(0),1;
getitem getarg(1),5;
close;
case 3:
mes "[Bank Employee]";
mes "That's perfectly fine. I just hope Midgard won't have so suffer because of your selfish actions.";
close;
}
}
S_Coin3:
if(countitem(getarg(0)) < 1){
mes "[Bank Employee]";
mes "You don't own a Platinum bar.";
close;
}
else{
next;
set .@x,countitem(getarg(0))*5;
mes "[Bank Employee]";
mes "I can give you a total of:";
mes "^CCCCCC"+.@x+" Platinum Coins.^000000";
next;
mes "[Bank Employee]";
mes "Do you wish to convert all, just 1 or leave it be?";
switch(select("All","Just One","I'd like to keep mine the way they are.")){
case 1:
mes "[Bank Employee]";
mes "Please wait a secon as I have to fill in the transaction papers.";
mes "These are required by my employer.";
delitem getarg(0),.@x / 5;
getitem getarg(1),.@x;
close;
case 2:
mes "[Bank Employee]";
mes "Please wait a secon as I have to fill in the transaction papers.";
mes "These are required by my employer.";
delitem getarg(0),1;
getitem getarg(1),5;
close;
case 3:
mes "[Bank Employee]";
mes "That's perfectly fine. I just hope Midgard won't have so suffer because of your selfish actions.";
close;
}
}
S_Info:
next;
mes "^CCCCCC1 Silver Bar^000000 -> ^CCCCCC10 Silver Coins^000000.";
mes "^CC99991 Gold Bar^000000 -> ^CC99995 Gold Coins^000000.";
mes "^AAAAAA1 Platinum Bar^000000 -> ^AAAAAA5 Platinum Coins^000000.";
close;
OnPCLoadMapEvent:
if ((BarExc == 0) && (strcharinfo(3)=="yanatsu")){
showevent 1,2;
}
end;
}