viewing paste Yanatsu Coindealer | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
/*------------------
*
* 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;
 
}
Viewed 1954 times, submitted by Streusel.