Brave Posted May 5, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 208 Reputation: 11 Joined: 05/31/12 Last Seen: May 15, 2016 Share Posted May 5, 2014 Item Bound System r17351 adds in a new feature which allows characters to have specific items bounded to their account, guild, or party. Suggestion topic: http://rathena.org/board/topic/70372-item-account-bound-proposal/ Features: Items can be bounded 3 different ways. New script commands 'getitembound' and 'getitembound2' creates bounded items. New script command 'countbound' counts number of bounded items, also placing them automatically into an array. *getitembound <item id>,<amount>,<bound_type>{,<account ID>};*getitembound "<item name>",<amount>,<bound_type>{,<account ID>};This command will give an amount of specified items to the invoking character.If an optional account ID is specified, and the target character is currentlyonline, items will be created in their inventory instead. If they are notonline, nothing will happen.It works essentially the same as 'getitem', except that items created usingthis command will bound the item to the player's account. Depending on the bound type issued,the character may not be able to trade or store these items, however all bounded typescannot be sold, vended, auctioned, or mailed.Bound Types: 1 - Account Bound 2 - Guild Bound 3 - Party Bound 4 - Character Bound---------------------------------------*getitembound2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound_type>{,<account ID>};*getitembound2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound_type>{,<account ID>};This command will give an amount of specified items to the invoking character.If an optional account ID is specified, and the target character is currentlyonline, items will be created in their inventory instead. If they are notonline, nothing will happen.It works essentially the same as 'getitem2', except that items created usingthis command will bound the item to the player's account. Depending on the bound type issued,the character may not be able to trade or store these items, however all bounded typescannot be sold, vended, auctioned, or mailed.Bound Types: 1 - Account Bound 2 - Guild Bound 3 - Party Bound 4 - Character Bound---------------------------------------*countbound({<bound_type>})This function will return a number of bounded items on the character.Optionally, you may count a specific type of bounded item on the character.countbound will also build an array of items in the form of @bound_items.Using countbound without a type counts all types of bounded items.Available types are: 1 - Account Bound 2 - Guild Bound 3 - Party Bound 4 - Character BoundExample: mes "[bound Counter]"; mes "I see you currently have "+countbound+" bounded items."; next; mes "The list of bounded items include:"; for(.@i = 0; .@i<getarraysize(@bound_items); .@i++) mes getitemname(@bound_items[.@i]); close; New at commands @itembound and @itembound2 used to create bounded items on the fly. @itembound <item name/ID> <amount> <bound_type>Creates the specified item and bounds it to the account.bound_type: 1 = Account, 2 = Guild, 3 = Party, 4 = Character---------------------------------------@itembound2 <item name/ID> <quantity> <identify_flag> <refine> <attribute> <card1> <card2> <card3> <card4> <bound_type>Creates an item with the given parameters (the 'cards' can be any item) and bounds it to the account.identify_flag: 0 = unidentified, 1 = identifiedattribute: 0 = not broken, 1 = brokenbound_type: 1 = Account, 2 = Guild, 3 = Party, 4 = Character Account bound items can be stored in account storage and in cart. Guild bound items can be stored in guild storage and traded to other guild members.When a character leaves or is expelled from the guild, these bounded items are automatically returned to guild storage. Party bound items cannot be stored but only traded to other party members. These are temporary and will be deleted on party deletion or when leaving the party. Credits to Xantara for the initial diff and Lighta for helping with the guild bound system. Please report all issues/bugs in the proper bug report section. Don't forget to update your SQL tables with upgrade_svn17351.sql! I have seen that the itembound is still working even though the entry of data is not complete so i wish it would be change what i mean is this both works @itembound Poring_coin 1 <====== THIS IS INCORRECT BUT WORKING @itembound poring_coin 1 1 <==== THIS IS CORRECT and WORKING so i am suggesting that it would be changed into something incomplete data should not work the problem with this @itembound poring_coin 1 <==== it was like @item command doesn't make sense so i tried to make some configuration and it works! src/map/atcommand.c ACMD_FUNC(item){ char item_name[100]; int number = 0, flag = 0, bound = 0; struct item item_tmp; struct item_data *item_data[10]; int get_count, i, j=0; char *itemlist; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); if (!strcmpi(command+1,"itembound") && (!message || !*message || (--- sscanf(message, "\"%99[^\"]\" %d %d", item_name, &number, &bound) < 2 &&--- sscanf(message, "%99s %d %d", item_name, &number, &bound) < 2+++ sscanf(message, "\"%99[^\"]\" %d %d", item_name, &bound, &number) < 2 &&+++ sscanf(message, "%99s %d %d", item_name, &bound, &number) < 2 ))) {--- clif_displaymessage(fd, msg_txt(sd,295)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity> <bound_type>).+++ clif_displaymessage(fd, msg_txt(sd,295)); // Please enter an item name or ID (usage: @item <item name/ID> <bound_type> <quantity>). return -1; } else if (!message || !*message || ( sscanf(message, "\"%99[^\"]\" %d", item_name, &number) < 1 && sscanf(message, "%99s %d", item_name, &number) < 1 )) { clif_displaymessage(fd, msg_txt(sd,983)); // Please enter an item name or ID (usage: @item <item name/ID> <quantity>). return -1; } itemlist = strtok(item_name, ":"); while (itemlist != NULL && j<10) { if ((item_data[j] = itemdb_searchname(itemlist)) == NULL && (item_data[j] = itemdb_exists(atoi(itemlist))) == NULL){ clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name. return -1; } itemlist = strtok(NULL, ":"); //next itemline j++; } if( bound < 0 || bound > 4 ) { clif_displaymessage(fd, msg_txt(sd,298)); // Invalid bound type return -1; } if (number <= 0) number = 1; get_count = number; for(j--; j>=0; j--){ //produce items in list int16 item_id = item_data[j]->nameid; //Check if it's stackable. if (!itemdb_isstackable2(item_data[j])) get_count = 1; for (i = 0; i < number; i += get_count) { // if not pet egg if (!pet_create_egg(sd, item_id)) { memset(&item_tmp, 0, sizeof(item_tmp)); item_tmp.nameid = item_id; item_tmp.identify = 1; item_tmp.bound = bound; if ((flag = pc_additem(sd, &item_tmp, get_count, LOG_TYPE_COMMAND))) clif_additem(sd, 0, 0, flag); } } } if (flag == 0) clif_displaymessage(fd, msg_txt(sd,18)); // Item created. return 0;} JUST A SUGGESTION 1 Link to comment Share on other sites More sharing options...
Emistry Posted May 5, 2014 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 10 hours ago Share Posted May 5, 2014 lol ...is this a suggestion ?? or a bug ... O__O [suggestion] Itembound Bug ?? lol Link to comment Share on other sites More sharing options...
Brave Posted May 8, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 208 Reputation: 11 Joined: 05/31/12 Last Seen: May 15, 2016 Author Share Posted May 8, 2014 lol ...is this a suggestion ?? or a bug ... O__O [suggestion] Itembound Bug ?? lol what i mean is to fix the bug of the itembound LOL Link to comment Share on other sites More sharing options...
exneval Posted May 8, 2014 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 164 Reputation: 12 Joined: 01/03/12 Last Seen: November 18, 2019 Share Posted May 8, 2014 you may create pull request for the fix.. Link to comment Share on other sites More sharing options...
Brave Posted May 10, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 208 Reputation: 11 Joined: 05/31/12 Last Seen: May 15, 2016 Author Share Posted May 10, 2014 pull request? Link to comment Share on other sites More sharing options...
Cydh Posted May 24, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted May 24, 2014 pull request? Pull Request Q&A Link to comment Share on other sites More sharing options...
Brave Posted May 25, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 208 Reputation: 11 Joined: 05/31/12 Last Seen: May 15, 2016 Author Share Posted May 25, 2014 i don't know how to make pull request can you do it for me? Link to comment Share on other sites More sharing options...
Cydh Posted May 25, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted May 25, 2014 i don't know how to make pull request can you do it for me?didn't I give the link? well, I'll apply this in my next commit. thank you. Link to comment Share on other sites More sharing options...
Brave Posted May 26, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 208 Reputation: 11 Joined: 05/31/12 Last Seen: May 15, 2016 Author Share Posted May 26, 2014 i don't know how to make pull request can you do it for me?didn't I give the link?well, I'll apply this in my next commit. thank you. yeah sure just don't forget to mention me LOL i don't know how to make pull request can you do it for me?didn't I give the link?well, I'll apply this in my next commit. thank you. there's a little error in that in itembounding you cannot exceed 4 but i know you can fix it LOL Link to comment Share on other sites More sharing options...
Cydh Posted May 26, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted May 26, 2014 I am starting to work on this now. Link to comment Share on other sites More sharing options...
Brave Posted May 31, 2014 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 208 Reputation: 11 Joined: 05/31/12 Last Seen: May 15, 2016 Author Share Posted May 31, 2014 I am starting to work on this now. alright thank you please send me the link commit thank you very much! Link to comment Share on other sites More sharing options...
Cydh Posted May 31, 2014 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 747 Joined: 06/16/12 Last Seen: February 21 Share Posted May 31, 2014 I am starting to work on this now. alright thank you please send me the link commit thank you very much! Here you go, 794c1a8 Link to comment Share on other sites More sharing options...
Recommended Posts