viewing paste announce refine | Objective-C

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
function    script  refinemain  {
    disable_items;
    set .@features,getarg(1);
    mes "[" + getarg(0) + "]";
    mes "ข้าเป็นช่างตีบวกอุปกรณ์";
    mes "ข้าสามารถตีอุปกรณ์ให้เจ้าได้ทุกชนิด";
    mes "บอกมาเลยว่าให้ข้าจัดการอุปกรณ์     ชิ้นไหน ? ";
    next;
 
    setarray .@position$[1], "ส่วนหัว","ส่วนเกราะ","มือซ้าย","มือขวา","ผ้าคลุม","ส่วนเท้า","เครื่องประดับ 1","เครื่องประดับ 2","ส่วนหู","ส่วนปาก";
    set .@menu$,"";
    for(set .@i,1; .@i<=10; set .@i,.@i+1) {
        if(getequipisequiped(.@i))
            set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
        set .@menu$, .@menu$ + ":";
    }
    set .@part,select(.@menu$);
    if(!getequipisequiped(.@part)) {
        mes "[" + getarg(0) + "]";
        mes"เจ้าไม่ได้สวมใส่";
        mes"สิ่งนี้";
        mes"ข้าไม่สามารถตีให้เจ้าได้";
        emotion e_an;
        close;
    }
    //Check if the item is refinable...
    if(!getequipisenableref(.@part)) {
        mes "[" + getarg(0) + "]";
        mes"ข้าไม่คิดว่าข้าสามารถ";
        mes"ตีสิ่งนี้ให้เจ้าได้ ...";
        close;
    }
    //Check to see if the items is already +10
    if(getequiprefinerycnt(.@part) >= 10) {
        mes "[" + getarg(0) + "]";
        mes"ข้าไม่สามารถตี";
        mes"เพิ่มเติมได้ ";
        close;
    }
    set .@refineitemid, getequipid(.@part); // save id of the item
    set .@refinerycnt, getequiprefinerycnt(.@part); //save refinery count
    switch(getequipweaponlv(.@part)){
    case 0:     //Refine Armor
        set .@price,2000;
        set .@material,985;
        set .@safe,4;
        break;
    case 1:     //Refine Level 1 Weapon
        set .@price,50;
        set .@material,1010;
        set .@safe,7; 
        break;
    case 2:     //Refine Level 2 Weapon
        set .@price,200;
        set .@material,1011;
        set .@safe,6; 
        break;
    case 3:     //Refine Level 3 Weapon
        set .@price,5000;
        set .@material,984;
        set .@safe,5; 
        break;
    case 4:     //Refine Level 4 Weapon
        set .@price,20000;
        set .@material,984;
        set .@safe,4; 
        break;
    case 5:     //Refine other stuff?
        set .@price,2000;
        set .@material,985;
        set .@safe,4; 
        break;
    }
    if(.@features != 1) {
        mes "[" + getarg(0) + "]";
        mes "สิ่งจำเป็นที่ต้องใช้ในการตี";
        mes "1 ^003366"+getitemname(.@material)+"^000000 and";
        mes "ค่าบริการ " + .@price + " Zeny.";
        mes"เจ้าต้องการจะตีอีกไหม ?";
        next;
        if(select("ใช่:ไม่ใช่") == 2){
            mes "[" + getarg(0) + "]";
            mes "กลับมาได้ทุกเมื่อที่เจ้าต้องการ";
            close;
        }
        if(getequippercentrefinery(.@part) < 100) {
            mes "[" + getarg(0) + "]";
            mes"โอ้ ! ถ้าข้าทำต่อไป";
            mes"อาจมีความเสี่ยงเสียหายได้";
            switch(.@material) {
            case 985:
                mes "ไอเท็มอาจถูกทำลาย ! นั่นหมายความว่า   ^FF0000อุปกรณ์สวมใส่^000000, และ^FF0000การ์ดที่ใส่^000000 หรืออะไรที่อยู่ในอุปกร์สวมใส่ ^FF0000จะหายไป^000000.";               break;
            default:
                mes "ไอเท็มอาจถูกทำลาย นั่นหมายความว่า  ^FF0000จะสูญเสียอาวุธ^000000 และ ^FF0000การ์ดที่ใส่อยู่^000000";
                break;
            }
            next;
            mes "["+getarg(0)+"]";
            mes"เมื่อการตีบวกพิดพลาด";
            mes"จะไม่ได้รับมันกลับคืนมา";
            mes "^FF0000อุปกรณ์จะหายไป^000000 ตลอดกาล";
            mes"เจ้ายังต้องการที่จะตีมันอีกไหม ?";
            next;
            if(select("Yes:No") == 2){
                mes "[" + getarg(0) + "]";
                mes"เจ้าตกลง...";
                mes"ข้าอาจทำสำเร็จ แต่บางครั้งข้าอาจทำพลาด.";
                close;
            }
        }
        if((countitem(.@material) < 1) || (Zeny < .@price)) {
            mes "[" + getarg(0) + "]";
            mes"ดูเหมือนว่าเจ้าจะไม่ได้มี";
            mes"Zeny และ "+getitemname(.@material)+" เพียงพอ";
            mes"ไปหาของมาให้ครบและ";
            mes"กลับมาได้ทุกเมื่อที่ต้องการข้า.";
            close;
        }
        set Zeny,Zeny-.@price;
        delitem .@material,1;
        if(getequipisequiped(.@part) == 0) { // hacker has removed the item (not changed, why?)
            mes "[" + getarg(0) + "]";
            mes"ดูที่นี่ ...เจ้าไม่ได้มีรายการใดๆ...";
            close;
        }
        if(getequiprefinerycnt(.@part) != .@refinerycnt || getequipid(.@part) != .@refineitemid) { // hacker has changed the item
            mes "[" + getarg(0) + "]";
            emotion e_an;
            mes"เจ้าคิดว่าข้าโง่รึไง !";
            mes"เจ้าเปลี่ยนรายการในขณะที่ข้าไม่ได้มอง!!";
            close;
        }
        if(getequippercentrefinery(.@part) <= rand(100)) {
            failedrefitem .@part;
            mes "[" + getarg(0) + "]";
            emotion (!rand(5))?e_cash:e_omg;
            set .@lose,rand(1,3);
            if (.@lose == 1) {
                mes "โอ้ พระ เจ้า !!";
                mes"ข้าขอโทษ .";
                mes"อุปกรณชิ้นนี้ได้ถูกทำลายลงแล้ว ...";
            } else if(.@lose == 2) {
                mes "โอ้ พระ เจ้า !!";
                mes"ข้าขอโทษ .";
                mes"อุปกรณชิ้นนี้ได้ถูกทำลายลงแล้ว ...";
            } else {
                mes "โอ้ พระ เจ้า !!";
                mes"ข้าขอโทษ .";
                mes"อุปกรณชิ้นนี้ได้ถูกทำลายลงแล้ว ...";
            }
            close;
        }
        mes "["+getarg(0)+"]";
 
        if( getequiprefinerycnt(.@part) > 8 )
        {
            announce "อัพเกรดอุปกรณ์ : ผู้เล่น [ "+strcharinfo(0)+" ] ได้ตีบวก "+getequipname(.@part)+" ขึ้น +"+(getequiprefinerycnt(.@part)+1)+ ติด",bc_all,0x99FF00;
        }
        successrefitem .@part;
        emotion e_heh;
        set .@win,rand(1,3);
        if (.@win == 1) {
            mes "ยินดีด้วย!";
            mes "ฮ่า ฮ่า ฮ่า";
            mes "มันถูกเสริมพลังอย่างปลอดภัย";
        } else if(.@win == 2) {
            mes "ยินดีด้วย!";
            mes "ฮ่า ฮ่า ฮ่า";
            mes "มันถูกเสริมพลังอย่างปลอดภัย";
        } else {
            mes "ยินดีด้วย!";
            mes "ฮ่า ฮ่า ฮ่า";
            mes "มันถูกเสริมพลังอย่างปลอดภัย";
        }
        close;
    }
Viewed 753 times, submitted by Guest.