Veralynn Posted October 8, 2011 Report Posted October 8, 2011 What I'm suggesting is that we enable multiple autolooting on specific drops. Such as looting only Yggdrasil Berries, Witherless Roses, and Evil Horns when killing Baphomet Jr. in prt_maze03. A few examples: @ali1 first item to loot @ali2 second @ali3 third or @ali item1; item2; item3 @ali item1, item2, item3 Benefits: Makes it easier to farm BoS/Witherless Roses while farming seeds/yggs/c speeds. Makes it easier to complete quests that have multiple items from one monster. Makes pve in general easier, no need to @autoloot for an mvps quest item + card ( annoying adds get in the way most of the time). I've played a few servers in the past (years ago) that had this implemented so it shouldn't be too hard. Issues: Would make questing easier? That's the only thing I can see it having an impact on (not sure if it's a negative impact or a positive one?) Give me some feedback, and vote in the poll! :D
Kittie Posted October 8, 2011 Report Posted October 8, 2011 (edited) I believe this was rejected already...? Here's the most recent topic about this: http://www.forsaken-ro.net/forum/index.php?showtopic=20345 Edited October 8, 2011 by Kittie
Halion Posted October 8, 2011 Report Posted October 8, 2011 What Veracity said: "At this time, adding a command like this isn't a viable option. As supream said, just try using @autoloot. Maybe in the future something like this can be added. In any case, thank you for your suggestion!" +1 to the suggestion.
Veralynn Posted October 8, 2011 Author Report Posted October 8, 2011 Why isn't this a "viable option"? o_o other servers have been doing it for years (poorly managed servers at that). I don't understand what part of it isn't viable.
Old Navy Posted October 9, 2011 Report Posted October 9, 2011 What if i can give you guys the source? will you apply it?
Veralynn Posted October 9, 2011 Author Report Posted October 9, 2011 (edited) It requires source editing.It's already been stated that source-editing will still be looked at as long as it doesn't require large amounts of effort, and I'm 100% sure there are plenty of guides on several reputable sites that would give the information to get this done in no time at all. I honestly don't see a negative side of adding this and don't know why it wasn't implemented years ago. It should be a standard feature on all private servers with autolooting enabled. Edited October 9, 2011 by Veralynn
Levis Posted October 9, 2011 Report Posted October 9, 2011 Suggesting this for years, let's see what happens this time. Still +1
supream Posted October 9, 2011 Report Posted October 9, 2011 sometimes if you want something done you have to do it yourself. so if you do the editing then there is no reason to reject it.
Veralynn Posted October 10, 2011 Author Report Posted October 10, 2011 sometimes if you want something done you have to do it yourself. so if you do the editing then there is no reason to reject it.Because we all have access to the server files.
Dudu Posted October 10, 2011 Report Posted October 10, 2011 You can always download a Private server, edit it over there, and the suggest it to the GM team.
Nadtorious Posted October 10, 2011 Report Posted October 10, 2011 I been waiting for this ages... +1 pls.
Veralynn Posted October 10, 2011 Author Report Posted October 10, 2011 (edited) Found an example array: Index: src/map/atcommand.c =================================================================== --- src/map/atcommand.c (revision 14109) +++ src/map/atcommand.c (working copy) @@ -6074,35 +6074,84 @@ } /*========================================== - * @autolootitem + * @autolootitem [modified version by Rad] + * modified to enable players autoloot 5 + * different items. Uses array. Counter checks added :p + * Sorry if it is too lousy for you :p *------------------------------------------*/ int atcommand_autolootitem(const int fd, struct map_session_data* sd, const char* command, const char* message) { struct item_data *item_data = NULL; + int i, slot=0; + char item_name[100]; - if (!message || !*message) { - if (sd->state.autolootid) { - sd->state.autolootid = 0; + memset(item_name, '\0', sizeof(item_name)); + + if (!message || !*message || ( + sscanf(message, "\"%99[^\"]\" %d", item_name, &slot) < 1 && + sscanf(message, "%99s %d", item_name, &slot) < 1 + + )) { + + if (sd->state.autolootactive) { + sd->state.autolootactive = 0; clif_displaymessage(fd, "Autolootitem have been turned OFF."); - } else - clif_displaymessage(fd, "Please, enter Item name or its ID (usage: @autolootitem <item_name_or_ID>)."); + } + else + clif_displaymessage(fd, "Please, enter Item name or its ID (usage: @alootid <item_name_or_ID> [<slot>])."); + clif_displaymessage(fd, "...to see autoloot list, @alootid list"); + return -1; + } + if(strcmp(item_name,"list")==0) + { + clif_displaymessage(fd, "Autoloot items:"); + for(i=0; i < 5; i++){ + if(sd->state.autolootid <= 500) + sprintf(atcmd_output, "Slot %d: %s",i+1,">>> Free autoloot slot <<<"); + else{ + item_data = itemdb_search(sd->state.autolootid); + sprintf(atcmd_output, "Slot %d: '%s'",i+1,item_data->name); + } + clif_displaymessage(fd, atcmd_output); + } + return 0; + } + + else if ((item_data = itemdb_searchname(item_name)) == NULL && + (item_data = itemdb_exists(atoi(item_name))) == NULL) + { + clif_displaymessage(fd, msg_txt(19)); // Invalid item ID or name. return -1; } + + if(slot<1 || slot>5) slot = 1; // check + slot = slot - 1; + + if (slot < 0 || slot >4){ //counter check + clif_displaymessage(fd, "Slot # can only be 1~5"); + return -1; + } - if ((item_data = itemdb_exists(atoi(message))) == NULL) - item_data = itemdb_searchname(message); - if (!item_data) { // No items founds in the DB with Id or Name clif_displaymessage(fd, "Item not found."); return -1; } + + for(i=0; i < 5; i++){ //to prevent duplicate entry + if(item_data->nameid == sd->state.autolootid){ + sprintf(atcmd_output, "'%s' is already auto-looted in Slot %d.",item_data->name, i+1); + clif_displaymessage(fd, atcmd_output); + return -1; + } + } - sd->state.autolootid = item_data->nameid; // Autoloot Activated + sd->state.autolootid[slot] = item_data->nameid; // Autoloot Activated + sd->state.autolootactive = 1; - sprintf(atcmd_output, "Autolooting Item: '%s'/'%s' {%d}", - item_data->name, item_data->jname, item_data->nameid); + sprintf(atcmd_output, "Autolooting Item: '%s'/'%s' {%d} , Stored in slot %d", + item_data->name, item_data->jname, item_data->nameid,slot+1); clif_displaymessage(fd, atcmd_output); return 0; Index: src/map/mob.c =================================================================== --- src/map/mob.c (revision 14109) +++ src/map/mob.c (working copy) @@ -1719,7 +1719,7 @@ if( sd == NULL ) sd = map_charid2sd(dlist->third_charid); if( sd - && (drop_rate <= sd->state.autoloot || ditem->item_data.nameid == sd->state.autolootid) + && (drop_rate <= sd->state.autoloot || mob_processdrop( sd, ditem->item_data.nameid )) && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(last_tick, sd->idletime) < battle_config.idle_no_autoloot) && (battle_config.homunculus_autoloot?1:!flag) #ifdef AUTOLOOT_DISTANCE @@ -1738,6 +1738,17 @@ dlist->item = ditem; } +int mob_processdrop(struct map_session_data * sd, int nameid) +{ + int i; + for(i=0; i < 5; i++) + { + if(nameid == sd->state.autolootid) + return 1; + } + return 0; +} + int mob_timer_delete(int tid, unsigned int tick, int id, intptr data) { struct block_list* bl = map_id2bl(id); Index: src/map/mob.h =================================================================== --- src/map/mob.h (revision 14109) +++ src/map/mob.h (working copy) @@ -230,6 +230,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type); void mob_revive(struct mob_data *md, unsigned int hp); void mob_heal(struct mob_data *md,unsigned int heal); +int mob_processdrop(struct map_session_data * sd, int nameid); #define mob_stop_walking(md, type) unit_stop_walking(&(md)->bl, type) #define mob_stop_attack(md) unit_stop_attack(&(md)->bl) Index: src/map/pc.h =================================================================== --- src/map/pc.h (revision 14109) +++ src/map/pc.h (working copy) @@ -122,7 +122,8 @@ unsigned ignoreAll : 1; unsigned debug_remove_map : 1; // temporary state to track double remove_map's [FlavioJS] unsigned short autoloot; - unsigned short autolootid; // [Zephyrus] + unsigned short autolootid[5]; // [Zephyrus] + unsigned short autolootactive; unsigned noks : 3; // [Zeph Kill Steal Protection] bool changemap; short pmap; // Previous map on Map Change This gives 5 "autoloot slots" so the command is @alootid <itemid> <slot 1-5> not sure if it would have to be modified as I'm not experienced. There it is though, credits to BrianL from eathena, he wrote the array, and has kept it updated as recently as february. Edited October 10, 2011 by Veralynn
ThePerfectHit Posted May 9, 2012 Report Posted May 9, 2012 I like this but there is also other methods of doing this though it is more complicated and annoying
Levis Posted May 10, 2012 Report Posted May 10, 2012 Yeah, indeed it's quite annoying to fill up your items with different stuff, just to autoloot indirectly more items that you need at once.