Jump to content
  • 0

Multiple @alootid?


Snap

Question


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.01
  • Content Count:  186
  • Reputation:   0
  • Joined:  04/07/12
  • Last Seen:  

Can someone help me regarding @alootid? I want a @alootid command that autoloots multiple items

Example @alootid 607 608 609 ( 3 Specific Autoloots )

Link to comment
Share on other sites

19 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

rAthena already supports multiple @alootid, since r15489.

Usage:

  • Add an item: @alootid +<item name or ID>
  • Remove an item: @alootid -<item name or ID>
  • Clear your list: @alootid reset

The default max is 10 items; you can increase in /src/map/config/core.h

/**
* Max number of items on @autolootid list
**/
#define AUTOLOOTITEM_SIZE 10

Edit: ah I see, you want to change the syntax of the @alootid command.

*moved to Source Requests*

Edited by Brian
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   1
  • Joined:  12/11/12
  • Last Seen:  

I try to make it like you want...
Try this...

//===== rAthena Script =======================================
//= alootid2
//===== By: ==================================================
//= mrdominic
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= make multiple alootid.
//= alternative alootid command
//= with 1 command, you can input up to 5 item to your alootid list
//= you can add the input as much as you want
//= but remember... there is a max alootid limit
//===== Additional Comments: =================================
//= 1.0 First version. [mrdominic]
//============================================================

 

alootid2.txt

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.01
  • Content Count:  186
  • Reputation:   0
  • Joined:  04/07/12
  • Last Seen:  

What i mean is. When i @alootid i can autoloot a specific item multiple times.

Example i will @alootid berries , ygg seed and white herb

@alootid <ID 1> <ID 2> <ID 3>

Btw i am using eathena.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

Exactly Snap, that's what Brian said. rAthena supports @alootid which gives you the option to hunt MULTIPLE items. Hence, the array list of max 10 he showed.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  64
  • Topics Per Day:  0.01
  • Content Count:  186
  • Reputation:   0
  • Joined:  04/07/12
  • Last Seen:  

Alright. I will try this. but i don't know how to edit in src.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

download the tortoise svn...and apply the diff to your revision..

else click on the revision link provide by Brian..

open your source folder that has been specify in the website..

and delete what they deleted in the diff

and add in the new line...

red = delete

green = add

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

how can i enable autoloot 100%?all item will be looted.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

@autoloot 100

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

bump.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

its not working.



its only show this

 

To add item to the list, use \"@alootid +<item name or ID>\". To remove item use \"@alootid -<item name or ID>\

\"@alootid reset\" will clear your autolootitem list.

Your autolootitem list is empty.

 

there is no autoloot 100.

Edited by Brynner
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  12
  • Reputation:   1
  • Joined:  03/22/13
  • Last Seen:  

its not working.

its only show this

 

To add item to the list, use \"@alootid +<item name or ID>\". To remove item use \"@alootid -<item name or ID>\

\"@alootid reset\" will clear your autolootitem list.

Your autolootitem list is empty.

 

there is no autoloot 100.

 

maybe you messed up with your atcommand_athena.conf

Do you have autoloot 100 on your groups.conf?

What Revision are you using?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

@autoloot  and @alootid are different command....both work differnt...

 

@autoloot - loot ALL item based on drop rate

@alootid - loot SPECIFIC item based on drop rate

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

since @autoloot has been replace by @alootid on rAthena emulator. that's why its not working. thanks. i think i should still use the old @autoloot from eathena. it would be possible to use @autoloot and @alootid?

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

since @autoloot has been replace by @alootid on rAthena emulator. that's why its not working. thanks. i think i should still use the old @autoloot from eathena. it would be possible to use @autoloot and @alootid?

 

rAthena never replace @autoloot to @alootid

 

@autoloot <item_drop_rate>

@alootid +/-<item_id> (multiple loots item) equals to 'old' command @autolootitem <item_id> (single item)

 

       ACMD_DEF(autoloot),
        ACMD_DEF2("alootid", autolootitem),
/*==========================================
* @autoloot by Upa-Kun
* Turns on/off AutoLoot for a specific player
*------------------------------------------*/
ACMD_FUNC(autoloot)
{
    int rate;
    nullpo_retr(-1, sd);
    // autoloot command without value
    if(!message || !*message)
    {
        if (sd->state.autoloot)
            rate = 0;
        else
            rate = 10000;
    } else {
        double drate;
        drate = atof(message);
        rate = (int)(drate*100);
    }
    if (rate < 0) rate = 0;
    if (rate > 10000) rate = 10000;

    sd->state.autoloot = rate;
    if (sd->state.autoloot) {
        snprintf(atcmd_output, sizeof atcmd_output, msg_txt(1187),((double)sd->state.autoloot)/100.); // Autolooting items with drop rates of %0.02f%% and below.
        clif_displaymessage(fd, atcmd_output);
    }else
        clif_displaymessage(fd, msg_txt(1188)); // Autoloot is now off.

    return 0;
}

/*==========================================
* @alootid
*------------------------------------------*/
ACMD_FUNC(autolootitem)
{
    struct item_data *item_data = NULL;
    int i;
    int action = 3; // 1=add, 2=remove, 3=help+list (default), 4=reset

    if (message && *message) {
        if (message[0] == '+') {
            message++;
            action = 1;
        }
        else if (message[0] == '-') {
            message++;
            action = 2;
        }
        else if (!strcmp(message,"reset"))
            action = 4;
    }

    if (action < 3) // add or remove
    {
        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, msg_txt(1189)); // Item not found.
            return -1;
        }
    }

    switch(action) {
    case 1:
        ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);
        if (i != AUTOLOOTITEM_SIZE) {
            clif_displaymessage(fd, msg_txt(1190)); // You're already autolooting this item.
            return -1;
        }
        ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == 0);
        if (i == AUTOLOOTITEM_SIZE) {
            clif_displaymessage(fd, msg_txt(1191)); // Your autolootitem list is full. Remove some items first with @autolootid -<item name or ID>.
            return -1;
        }
        sd->state.autolootid[i] = item_data->nameid; // Autoloot Activated
        sprintf(atcmd_output, msg_txt(1192), item_data->name, item_data->jname, item_data->nameid); // Autolooting item: '%s'/'%s' {%d}
        clif_displaymessage(fd, atcmd_output);
        sd->state.autolooting = 1;
        break;
    case 2:
        ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] == item_data->nameid);
        if (i == AUTOLOOTITEM_SIZE) {
            clif_displaymessage(fd, msg_txt(1193)); // You're currently not autolooting this item.
            return -1;
        }
        sd->state.autolootid[i] = 0;
        sprintf(atcmd_output, msg_txt(1194), item_data->name, item_data->jname, item_data->nameid); // Removed item: '%s'/'%s' {%d} from your autolootitem list.
        clif_displaymessage(fd, atcmd_output);
        ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);
        if (i == AUTOLOOTITEM_SIZE) {
            sd->state.autolooting = 0;
        }
        break;
    case 3:
        sprintf(atcmd_output, msg_txt(1195), AUTOLOOTITEM_SIZE); // You can have %d items on your autolootitem list.
        clif_displaymessage(fd, atcmd_output);
        clif_displaymessage(fd, msg_txt(1196)); // To add an item to the list, use "@alootid +<item name or ID>". To remove an item, use "@alootid -<item name or ID>".
        clif_displaymessage(fd, msg_txt(1197)); // "@alootid reset" will clear your autolootitem list.
        ARR_FIND(0, AUTOLOOTITEM_SIZE, i, sd->state.autolootid[i] != 0);
        if (i == AUTOLOOTITEM_SIZE) {
            clif_displaymessage(fd, msg_txt(1198)); // Your autolootitem list is empty.
        } else {
            clif_displaymessage(fd, msg_txt(1199)); // Items on your autolootitem list:
            for(i = 0; i < AUTOLOOTITEM_SIZE; i++)
            {
                if (sd->state.autolootid[i] == 0)
                    continue;
                if (!(item_data = itemdb_exists(sd->state.autolootid[i]))) {
                    ShowDebug("Non-existant item %d on autolootitem list (account_id: %d, char_id: %d)", sd->state.autolootid[i], sd->status.account_id, sd->status.char_id);
                    continue;
                }
                sprintf(atcmd_output, "'%s'/'%s' {%d}", item_data->name, item_data->jname, item_data->nameid);
                clif_displaymessage(fd, atcmd_output);
            }
        }
        break;
    case 4:
        memset(sd->state.autolootid, 0, sizeof(sd->state.autolootid));
        clif_displaymessage(fd, msg_txt(1200)); // Your autolootitem list has been reset.
        sd->state.autolooting = 0;
        break;
    }
    return 0;
}
Edited by Cydh
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  118
  • Topics Per Day:  0.03
  • Content Count:  1942
  • Reputation:   197
  • Joined:  01/08/12
  • Last Seen:  

thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/27/13
  • Last Seen:  

Bumping this. I'm using rAthena 16797, but the multiple items at once in a single line is not working. It'll only add the first Item ID of that list.

 

Example: Jellopy, Zenorc's Fang, Bacsojin Card

 

@alootid +909 1044 4372

@alootid +909 +1044 +4372

@alootid +909,1044,4372

@alootid +909,+1044,+4372

 

 

For all the above attempts, it ONLY autoloots Jellopy, and ignores everything else.

Is there a way to get this to properly work?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  


@alootid +909

@alootid +1044

@alootid +4372

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  07/27/13
  • Last Seen:  

Yeah, I know that one. But is there a way to add it all in one line?

 

Hence 'multiple alootid'.

 

What i mean is. When i @alootid i can autoloot a specific item multiple times.
Example i will @alootid berries , ygg seed and white herb

@alootid <ID 1> <ID 2> <ID 3>

Btw i am using eathena.


That's what this guy wanted too.. But nobody seemed to understand what was meant.
The point of this topic was to find out if it was possible to use one line to add multiple items to the @alootid list.

That way you don't have to repeat the command for each item, but you can compact it into one line if you want to have a batch of items added right away.

Edited by Ryudo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...