viewing paste Unknown #13126 | 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
new_1-1,45,77,4 script  Donation Shop   685,{
 
mes "Do you want to to Donate?";
    next;
    switch(select("Why Donate:Buy Donate")) {
    case 1:
        mes "Why Donate on our Server?";
        mes "We dont force you to donate,it's your free will to donate";
        close;
    case 2:
        doevent "donationshop::OnBuy";
        close;
        }
        }
 
// ========================================================
// Menu configuration or you might want to add another shop
// ========================================================
-   script  donationshop    -1,{
 
OnBuy:
    switch(select("Headgears:Item Boost:Etc")){
    case 1:
        doevent "DONS::OnBuy";
        break;
    case 2:
        doevent "DONS2::OnBuy";
        break;
    case 3:
        doevent "DONS3::OnBuy";
        break;
    }
}
 
// ==================================================
// When Headgears is chosen the script will jump here [SHOP 1]
// ==================================================
-   shop    dynamicshop -1,501:222
-   script  DONS    -1,{
 
OnBuy:
    mes "You currently have "+countitem(.currency)+" "+getitemname(.currency)+" left";
    next;
    callshop "dynamicshop",1;
    npcshopattach "dynamicshop";
    end;
 
 
    OnBuyItem:
        for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) {
            for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) {
                if ( @bought_nameid[.@k] == .items[.@j] ) {
                    if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) {
                        if ( countitem(.currency) < .items[.@j+1] )
                            dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item.";
                        else {
                            delitem .currency, .items[.@j+1] * @bought_quantity[.@k];
                            getitem @bought_nameid[.@k], @bought_quantity[.@k];
                        }
                    } else dispbottom "You cannot carry out more items with you";
                }
            }
        }
        deletearray @bought_quantity, getarraysize(@bought_quantity);
        deletearray @bought_nameid, getarraysize(@bought_nameid);
        end;
 
// ====================
// Shop Configuration 1
// ====================
    OnInit:
        set .currency, 7179; // pods 
        setarray .items, 1750,1500,1766,500; // Usage : <item id>,<price>
        npcshopitem "dynamicshop",0,0;
        for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 )
            npcshopadditem "dynamicshop",.items[.@i], .items[.@i+1];
 
    waitingroom "Donation Shop",0;
    end;
}
 
// ===================================================
// When ITEM BOOST is chosen the script will jump here
// ===================================================
 
-   shop    dynamicshop2    -1,501:222
-   script  DONS2   -1,{
 
OnBuy:
    mes "You currently have "+countitem(.currency)+" "+getitemname(.currency)+" left";
    next;
    callshop "dynamicshop2",1;
    npcshopattach "dynamicshop2";
    end;
 
 
    OnBuyItem:
        for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) {
            for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) {
                if ( @bought_nameid[.@k] == .items[.@j] ) {
                    if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) {
                        if ( countitem(.currency) < .items[.@j+1] )
                            dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item.";
                        else {
                            delitem .currency, .items[.@j+1] * @bought_quantity[.@k];
                            getitem @bought_nameid[.@k], @bought_quantity[.@k];
                        }
                    } else dispbottom "You cannot carry out more items with you";
                }
            }
        }
        deletearray @bought_quantity, getarraysize(@bought_quantity);
        deletearray @bought_nameid, getarraysize(@bought_nameid);
        end;
 
// ====================
// Shop Configuration 2
// ====================
OnInit:
        set .currency, 7179; // pods 
        setarray .items, 501,1500,502,500; // Usage : <item id>,<price>
        npcshopitem "dynamicshop2",0,0;
        for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 )
            npcshopadditem "dynamicshop2",.items[.@i], .items[.@i+1];
 
    waitingroom "Donation Shop",0;
    end;
}
 
 
// ===================================================
// When [ E T C ] is chosen the script will jump here
// ===================================================
-   shop    dynamicshop3    -1,501:222
-   script  DONS3   -1,{
 
OnBuy:
    mes "You currently have "+countitem(.currency)+" "+getitemname(.currency)+" left";
    next;
    callshop "dynamicshop3",1;
    npcshopattach "dynamicshop3";
    end;
 
 
    OnBuyItem:
        for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) {
            for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) {
                if ( @bought_nameid[.@k] == .items[.@j] ) {
                    if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) {
                        if ( countitem(.currency) < .items[.@j+1] )
                            dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item.";
                        else {
                            delitem .currency, .items[.@j+1] * @bought_quantity[.@k];
                            getitem @bought_nameid[.@k], @bought_quantity[.@k];
                        }
                    } else dispbottom "You cannot carry out more items with you";
                }
            }
        }
        deletearray @bought_quantity, getarraysize(@bought_quantity);
        deletearray @bought_nameid, getarraysize(@bought_nameid);
        end;
 
// ====================
// Shop Configuration 3
// ====================
OnInit:
        set .currency, 7179; // pods 
        setarray .items, 508,1500,509,500; // Usage : <item id>,<price>
        npcshopitem "dynamicshop3",0,0;
        for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 )
            npcshopadditem "dynamicshop3",.items[.@i], .items[.@i+1];
 
    waitingroom "Donation Shop",0;
    end;
}
Viewed 1015 times, submitted by Guest.