Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== rAthena Script =======================================
- //= Item Bound Script
- //===== By: ==================================================
- //= Akinari
- //===== Compatible With: =====================================
- //= Revision 17351+ (rAthena Only)
- //===== Description: =========================================
- //= Item Bound Script
- //= Allows users to pay a price to make an item bound to
- //= Account, Character, or Guild
- //============================================================
- prontera,144,174,4 script Bound Items 429,{
- mes "I can bind your items to your account, guild, or character"+((.bindprice)?" for a ^0000FF"+.bindprice+"^000000 zeny fee":"")+".";
- next;
- mes "With this, you can rest assured your items are safe.";
- mes "What would you like to do?";
- next;
- if(select("Bind") == 1) {
- if(zeny < .bindprice) {
- mes "You don't have enough zeny to bind an item.";
- close;
- }
- mes "What kind of bind?";
- .@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();
- 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 "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("I understand, continue:Wait a minute") == 2) {
- mes "I'll be here when you're ready.";
- close;
- }
- 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;
- 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 "All done!";
- if(.logbinds)
- logmes "Bound "+ @inventorylist_amount[.@item]+" "+@inventorylist_id[.@item]+" as "+.boundtypes$[.@boundtype]+" type.";
- }
- }
- close;
- OnInit:
- //* Configuration *\\
- //Price
- .bindprice = 2500;
- //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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement