viewing paste Unknown #25135 | 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
prontera.gat, 144, 174, 4       script  Bound Smith     429,{
 
        mes .n$;
 
        mes callfunc("F_Hi");
 
        mes "I can bind your items to your Account, Guild, or Character"+((.bindName$)?" for a ^0000FF"+ .bindName$ +"^000000 required":"")+".";
 
        next;
 
        mes .n$;
 
        mes "With this, you can rest assured your items are safe.";
 
        mes " ";
 
        mes "What would you like to do?";
 
        next;
 
        if(select("- Bind Item") == 1) {
 
                //if(zeny < .bindprice) {
 
                if( countitem( .bindItem ) < 1 ) {
 
                        mes .n$;
 
                        mes "I'm sorry but you don't have enough "+ countitem(.bindItem) +" "+ .bindName$ +" to bind an item.";
 
                        mes " ";
 
                        mes "Please come back to me if you have already.";
 
                        close;
 
                }
 
                mes .n$;
 
                mes "What kind of bind?";
 
                next;
 
                .@boundtype = 1 << (select("- Account:- Guild:- Character")-1);
 
                if(.@boundtype == 2 && (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(0))) {
 
                        mes "In order for me to bind an item to a guild you must be the master of one.";
 
                        close;
 
                }
 
                getinventorylist();
                // Item IDs that cannot be bound
                setarray .@blacklist[0], 1201, 1207, 2301;
 
                // Check blacklist
                for (.@i = 0; .@i < getarraysize(.@blacklist); .@i++) {
                    if (@inventorylist_id[.@item] == .@blacklist[.@i]) {
                        mes "Sorry, but "+ getitemname(@inventorylist_id[.@item]) +" is blacklisted from being bound.";
                        close;
                    }
                }
                for(.@i = 0; .@i < @inventorylist_count; .@i++) {
 
                        //We only show the items that you allow to be bound
 
                        //Allows equipment (default)
 
                        if(@inventorylist_bound[.@i])
 
                                continue;
 
                        if (((.allowbind & 1) && (getiteminfo(@inventorylist_id[.@i],2) == (4|5))) || 
 
                                ((.allowbind & 2) && (getiteminfo(@inventorylist_id[.@i],2) == (0|2|11|18))) ||
 
                                ((.allowbind & 4) && (getiteminfo(@inventorylist_id[.@i],2) == (3|6|7|8|10)))
 
                        ) {
 
                                set .@bindlist$, .@bindlist$ + ":" + getitemname(@inventorylist_id[.@i]) + " - " + @inventorylist_id[.@i];
 
                                set .@bindlist[.@j],.@i;
 
                                .@j++;
 
                        }
 
                }
 
                .@item = .@bindlist[select(.@bindlist$)-2];
 
                mes .n$;
 
                mes "Before I continue, I want you to know I can't tell the difference between multiple items.  If you have a specific item you want bounded, please remove any duplicates from inventory.";
 
                next;
 
                if(select("- Continue:- Cancel") == 2) {
 
                        mes "I'll be here when you're ready.";
 
                        close;
 
                }
 
                mes .n$;
 
                mes "Are you sure you'd like to bind your '"+ getitemname(@inventorylist_id[.@item]) +"' to your '"+.boundtypes$[.@boundtype]+"'?";
 
                next;
 
                if(select("- Yes:- No") == 1) {
 
                        //zeny -= .bindprice;
 
                        delitem .bindItem, 1;
 
                        delitem2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item];
 
                        getitembound2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item],.@boundtype;
 
                        mes .n$;
 
                        mes "You have successfully bind '"+ getitemname(@inventorylist_id[.@item]) +"' to your '"+.boundtypes$[.@boundtype]+"'";
 
                        mes " ";
 
                        mes "Please come back again!";
 
                        if(.logbinds)
 
                                debugmes "Player "+ strcharinfo(0) +" Bound "+ @inventorylist_amount[.@item]+" "+@inventorylist_id[.@item]+" as "+.boundtypes$[.@boundtype]+" type.";
 
                }
 
        }
 
        close;
 
 
 
OnInit:
 
        .n$ = "[ Bound Smith ]";
 
        //* Configuration *\\
 
        //Price
 
        //.bindprice = 2500;
 
 
 
        .bindItem = 29991;
 
        .bindName$ = getitemname(.bindItem) +"";
 
                
 
        //What to allow to be bound - Add as necessary
 
        //1 = Equipment - 2 = Consumables - 4 = Etc
 
        .allowbind = 1;
 
 
 
        //Log binds via NPC?
 
        .logbinds = 1;
 
 
 
        //Other stuff
 
        .boundtypes$[1] = "account";
 
        .boundtypes$[2] = "guild";
 
        .boundtypes$[4] = "character";
 
        end;
 
}
Viewed 886 times, submitted by Guest.