viewing paste Vinz - Upgrade Orb | 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
-   script  Upgrade Orb 112,{
    disable_items;
    setarray .@eq[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW;
    for(.@i = 1; .@i <= getarraysize(.@eq);.@i++){
        if(getequipisequiped(.@eq[.@i])){
            .@menu$ = .@menu$+F_getpositionname(.@eq[.@i])+" ~ [ " + getequipname(.@eq[.@i]) + " ]";
            .@equipped = 1;
        }
        .@menu$ = .@menu$ + ":";
    }
    if (!.@equipped) {
        mes "You aren't wearing any headgear";
        close;
    }
    .@choice = select(.@menu$);
    .@part = .@eq[.@choice];
    .@hg_id = getequipid(.@part);
    if (countitem(.@hg_id) > 1) {
        mes "Kamu membawa lebih dari 1 "+getitemname(.@hg_id);
        mes "Bawalah hanya 1 untuk upgrade";
        close;
    }
    .@card0 = getequipcardid(.@part,0);
    .@card1 = getequipcardid(.@part,1);
    .@card2 = getequipcardid(.@part,2);
    .@card3 = getequipcardid(.@part,3);
    if (!.@card3) {
        mes "Gada orb nya headgearnya euuy";
        close;
    }
    .@rate = 50;
    .@upgrade = getd(".up"+.@card3);
    mes "[Debug]";
    mes "Card Slot 0 = "+ .@card0;
    mes "Card Slot 1 = "+ .@card1;
    mes "Card Slot 2 = "+ .@card2;
    mes "Card Slot 3 = "+ .@card3;
    mes " ";
    mes "Kalo sukses "+getitemname(.@card3)+" jadi "+getitemname(.@upgrade)
    next;
    if (select("Upgrade:Cancel")==2){
        mes callfunc("F_Bye");
        close;
    }
    mes "Pencet Enter atau click close";
    close2;
    delitem .@hg_id, 1;
    delitem .@req_item, 1;
    progressbar "ffff00", 3;
    if (rand(99) < .@rate) {
        getitem2 .@hg_id,1,1,0,0,.@card0,.@card1,.@card2,.@upgrade;
    } else {
        getitem2 .@hg_id,1,1,0,0,.@card0,0,0,0;
    }
    end;
    
OnInit:
    .up501 = 502;
    end;
        
 
}
 
Viewed 1034 times, submitted by Guest.