viewing paste Unknown #24969 | Text

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 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352
    set @name$,"Loaded Refiner";
    callfunc "LoadedRefiner";
    end;
}
 
//============================================================
//= Main Refiner Function
//============================================================
function    script    LoadedRefiner    {
    set @features,0;
 
    mes "[" + @name$ + "]";
    mes "I am the Loaded Armsmith... I can refine any piece of equipment you choose with 100% success rate!";
    next;
    mes "[" + @name$ + "]";
    mes "You don't believe me?";
    mes "Here, Lemme show you.";
    next;
    mes "[" + @name$ + "]";
    mes "Which piece of equipment do you want to refine?";
    M_Menu:
    next;
    menu getequipname(1),PART1,getequipname(2),PART2,getequipname(3),PART3,getequipname(4),PART4,getequipname(5),PART5,
         getequipname(6),PART6,getequipname(7),PART7,getequipname(8),PART8,getequipname(9),PART9,getequipname(10),PART10;
 
    //Head Gear
    PART1:
        set @part,1;
        if (getequipisequiped(1)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "Do you want me to refine your dumb brain?";
        emotion 6;
        goto M_Menu;
    //Armor
    PART2:
        set @part,2;
        if (getequipisequiped(2)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "Do you want me to melt your body with blazing heat...?";
        emotion 6;
        goto M_Menu;
    //Left Hand
    PART3:
        set @part,3;
        if (getequipisequiped(3)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "I can't make your left hand into an ultimate weapon...";
        emotion 4;
        goto M_Menu;
    //Right Hand
    PART4:
        set @part,4;
        if (getequipisequiped(4)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "I can't make your right hand into an ultimate weapon...";
        emotion 4;
        goto M_Menu;
    //Garment
    PART5:
        set @part,5;
        if (getequipisequiped(5)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "Look here... you don't have any Garments on...";
        goto M_Menu;
    //Foot Gear
    PART6:
        set @part,6;
        if (getequipisequiped(6)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "Ack!! Those are some stinky feet. I definitely can't refine those... Yuck!!";
        emotion 16;
        goto M_Menu;
    //Accessory1
    PART7:
        set @part,7;
        if (getequipisequiped(7)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "What do you mean by Accessory? Which One?";
        emotion 20;
        goto M_Menu;
    //Accessory2
    PART8:
        set @part,8;
        if (getequipisequiped(8)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "What do you mean by Accessory? Which One?";
        emotion 20;
        goto M_Menu;
    PART9:
        set @part,9;
        if (getequipisequiped(9)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "What do you want from me? There's nothing equipped there...";
        emotion 20;
        goto M_Menu;
    PART10:
        set @part,10;
        if (getequipisequiped(10)) goto CHECK1;
        mes "[" + @name$ + "]";
        mes "What do you want from me? There's nothing equipped there...";
        emotion 20;
        goto M_Menu;
 
//Check if the item is refinable...
CHECK1:
    if(getequipisenableref(@part)) goto CHECK2;
    mes "[" + @name$ + "]";
    mes "I can't work on this item...";
    close;
 
//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
CHECK2:
    if(getequipisidentify(@part)) goto CHECK3;
    mes "[" + @name$ + "]";
    mes "You must appraise this item first.";
    close;
 
//Check to see if the items is already +10
CHECK3:
    if(getequiprefinerycnt(@part) < 10) goto REFINE0;
    mes "[" + @name$ + "]";
    mes "This weapon is already at its maximum level and can no longer be refined.";
    close;
 
//Refine Armor
REFINE0:
    set @refineitemid, getequipid(@part); // save id of the item
    set @refinerycnt, getequiprefinerycnt(@part); //save refinery count
    if(getequipweaponlv(@part) > 0) goto REFINE1;
    set @matname$,"Gold Coin";
    set @material,671;
    set @price,2000000;
    set @safe,10;
    if(@features == 1) goto L_refinefeatures;
    goto L_refinenormal;
//Refine Level 1 Weapon
REFINE1:
    if(getequipweaponlv(@part) > 1) goto REFINE2;
    set @matname$,"Gold Coin";
    set @material,671;
    set @price,100000;
    set @safe,10;
    if(@features == 1) goto L_refinefeatures;
    goto L_refinenormal;
//Refine Level 2 Weapon
REFINE2:
    if(getequipweaponlv(@part) > 2) goto REFINE3;
    set @matname$,"Gold COin";
    set @material,671;
    set @price,50000;
    set @safe,10;
    if(@features == 1) goto L_refinefeatures;
    goto L_refinenormal;
//Refine Level 3 Weapon
REFINE3:
    if(getequipweaponlv(@part) > 3) goto REFINE4;
    set @matname$,"Gold Coin";
    set @material,671;
    set @price,1000000;
    set @safe,10;
    if(@features == 1) goto L_refinefeatures;
    goto L_refinenormal;
//Refine Level 4 Weapon
REFINE4:
    set @matname$,"Gold Coin";
    set @material,671;
    set @price,1000000;
    set @safe,10;
    if(@features == 1) goto L_refinefeatures;
    goto L_refinenormal;
 
L_refinenormal:
    mes "[" + @name$ + "]";
    mes "To refine this stuff, I need ^ff9999" + @matname$ + "^000000 and the fee " + @price + " Zeny.";
    mes "Continue?";
    next;
    menu "Yes",-,"No",Lcancel;
 
        if (getequippercentrefinery(@part) == 100) goto L_Sub;
        mes "[" + @name$ + "]";
        mes "This item has been refined to its normal safe level.";
        next;
        mes "["+@name$+"]";
        mes "But of course, like I've said before, I can easily refine any item with 100% success chance!";
        next;
        mes "["+@name$+"]";
        mes "But, if you don't believe me, you can still back out now...";
        next;
        menu "I believe you, let's do it!",-,"Wait, stop! I'm sure you can't possibly do it!",Lcancel1;
 
        L_Sub:
            if ((countitem(@material) < 1) || (Zeny < @price)) goto Lcancel2;
            set Zeny,Zeny-@price;
            delitem @material,1;
 
Lrefine:
    if (getequipisequiped(@part) == 0) goto LNoItem; // hacker has removed the item (not changed, why?)
    if (getequipid(@part) != @refineitemid) goto LNoFake; // hacker has changed the item
    if (getequiprefinerycnt(@part) != @refinerycnt) goto LNoFake; // hacker has changed the item
    if (getequippercentrefinery(@part) <= rand(100)) goto Lfail;
    mes "[" + @name$ + "]";
    mes "Clang! Clang! Clang!";
    successrefitem @part;
    next;
    mes "[" + @name$ + "]";
    mes "Ha! Did you see that find job I just did!? Do you believe in me now?";
    emotion 21;
    close;
 
Lfail:
    mes "[" + @name$ + "]";
    mes "Clang! Clang! Clang!";
    successrefitem @part;
    next;
    mes "[" + @name$ + "]";
    mes "Ha! Did you see that find job I just did!? Do you believe in me now?";
    emotion 21;
    close;
 
LNoItem:
    mes "[" + @name$ + "]";
    mes "Look here... you don't have any Items on...";
    close;
 
LNoFake:
    mes "[" + @name$ + "]";
    mes "Clan... No, but Did you imagine I could be so stupid !?!";
    mes "You have changed it...";
    mes "Go out before I stun you with my Hammer!!!";
    close;
 
Lcancel:
    mes "[" + @name$ + "]";
    mes "You said so..Hmm so be it...";
    close;
 
Lcancel1:
    mes "[" + @name$ + "]";
    mes "It's your call.";
    mes " ";
    mes "Anyway, it's not my lost. It's definitely yours!";
    mes " ";
    mes "You've just missed half of your life, I'm telling you!";
    close;
 
Lcancel2:
    mes "[" + @name$ + "]";
    mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes.";
    close;
 
// New Refining Functions ========================
L_refinefeatures:
    if(getequiprefinerycnt(@part) >= @safe) goto Lnosafe;
    mes "[" + @name$ + "]";
    mes "I can refine this to the safe limit or a desired number of times... it's your choice...";
    next;
    menu "To the safe limit please.",Lsafe,"I'll decide how many times.",Lnosafe,"I've changed my mind...",Lcancel;
 
Lsafe:
    set @refinecnt,@safe - getequiprefinerycnt(@part);
    set @fullprice,@price * @refinecnt;
    mes "[" + @name$ + "]";
    mes "That will cost you " + @refinecnt + " " + @matname$ + " and " + @fullprice + " Zeny. Is that ok?";
    next;
    menu "Yes",-,"No...",Lcancel;
    if((countitem(@material) < @refinecnt) || (Zeny < @fullprice)) goto Lcancel2;
    set Zeny,Zeny - @fullprice;
    delitem @material,@refinecnt;
    goto L_refinesafe;
 
Lnosafe:
    mes "[" + @name$ + "]";
    mes "So how many times would you like me to refine your item?";
    next;
    input @refinecnt;
    if (@refinecnt<1) goto Lcancel3; //fixed by Lupus
    set @refinecheck,@refinecnt + getequiprefinerycnt(@part);
    if(@refinecheck > 10) goto Lcancel3;
    set @fullprice,@price * @refinecnt;
    mes "[" + @name$ + "]";
    mes "This will cost you " + @refinecnt + " " + @matname$ + " and " + @fullprice + " Zeny... Is that ok?";
    next;
    menu "Yes...",-,"No...",Lcancel;
        if(@refinecheck > @safe) goto Lwarn;
        if((countitem(@material) < @refinecnt) || (Zeny < @fullprice)) goto Lcancel2;
        set Zeny,Zeny - @fullprice;
        delitem @material,@refinecnt;
        goto L_refinenumber;
        end;
 
        Lwarn:
            set @refinecheck,@refinecheck - @safe;
            mes "[" + @name$ + "]";
            mes "This will try to refine the equipment " + @refinecheck + " times past the safe limit. Your equipment may be destroyed... is that ok?";
            next;
            menu "Yes",-,"No...",Lcancel1;
                if((countitem(@material) < @refinecnt) || (Zeny < @fullprice)) goto Lcancel2;
                set Zeny,Zeny - @fullprice;
                delitem @material,@refinecnt;
                goto L_refinenumber;
 
Lcancel3:
    mes "[" + @name$ + "]";
    mes "I can't refine this item that many times.";
    close;
 
// SubFunction: Safe Refine ---------------------
L_refinesafe:
    if (getequipisequiped(@part) == 0) goto LNoItem; // hacker has removed the item (no changed, why?)
    if (getequipid(@part) != @refineitemid) goto LNoFake; // hacker has changed the item
    if (getequippercentrefinery(@part) < 100) goto LNoFake; // hacker has changed the item (it is not safe anymore)
    mes "Clang, clang!!!";
    successrefitem @part;
    emotion 21;
    set @refinecnt,@refinecnt - 1;
    next;
    if(@refinecnt == 0) goto Lend;
    goto L_refinesafe;
 
    Lend:
        mes "[" + @name$ + "]";
        mes "All finished... Come again soon.";
        close;
        
// SubFunction: Refine 
L_refinenumber:
    if (getequipisequiped(@part) == 0) goto LNoItem; // hacker has removed the item (no changed, why?)
    if (getequipid(@part) != @refineitemid) goto LNoFake; // hacker has changed the item
    mes "Clang, clang!!!";
    if (getequippercentrefinery(@part)<=rand(100)) goto Lfail_number;
    successrefitem @part;
    emotion 21;
    set @refinecnt,@refinecnt - 1;
    next;
    if(@refinecnt == 0) goto Lend;
    goto L_refinenumber;
 
    Lfail_number:
        failedrefitem @part;
        emotion 23;
        mes "[" + @name$ + "]";
        mes "WAHHHH!!! I'm so sorry... I warned you this could happen...";
        set @refinecnt,@refinecnt - 1;
        if(@refinecnt == 0) goto Lend2;
        mes "Here's the unused Zeny and Material back...";
        getitem @material,@refinecnt;
        set @fullprice,@refinecnt * @price;
        set Zeny,Zeny + @fullprice;
 
    Lend2:
        close;
}
Viewed 918 times, submitted by Guest.